- fixed did handling
This commit is contained in:
parent
e62f05eb33
commit
e9a77b066a
11
chan_capi.c
11
chan_capi.c
|
@ -2070,9 +2070,16 @@ static void handle_did_digits(_cmsg *CMSG, unsigned int PLCI, unsigned int NCCI,
|
|||
}
|
||||
|
||||
did = capi_number(INFO_IND_INFOELEMENT(CMSG), 1);
|
||||
if (strcasecmp(i->dnid, did)) {
|
||||
strncat(i->dnid, did, sizeof(i->dnid) - 1);
|
||||
|
||||
if ((!(i->isdnstate & CAPI_ISDN_STATE_DID)) &&
|
||||
(strlen(i->dnid) && !strcasecmp(i->dnid, did))) {
|
||||
did = NULL;
|
||||
}
|
||||
|
||||
if ((did) && (strlen(i->dnid) < (sizeof(i->dnid) - 1)))
|
||||
strcat(i->dnid, did);
|
||||
|
||||
i->isdnstate |= CAPI_ISDN_STATE_DID;
|
||||
|
||||
update_channel_name(i);
|
||||
|
||||
|
|
|
@ -190,6 +190,7 @@ struct ast_capi_gains {
|
|||
#define CAPI_ISDN_STATE_PROGRESS 0x0010
|
||||
#define CAPI_ISDN_STATE_LI 0x0020
|
||||
#define CAPI_ISDN_STATE_DISCONNECT 0x0040
|
||||
#define CAPI_ISDN_STATE_DID 0x0080
|
||||
#define CAPI_ISDN_STATE_PBX 0x8000
|
||||
|
||||
/* ! Private data for a capi device */
|
||||
|
|
Loading…
Reference in New Issue