Added dialplan variables ISDNPI1 and ISDNPI2

This commit is contained in:
MelwareDE 2010-04-21 07:11:10 +00:00
parent 557768821c
commit 3256ef3db9
3 changed files with 12 additions and 2 deletions

View File

@ -3,7 +3,8 @@ CHANGES
HEAD
------------------
- added dialplan variables ISDNPI1 and ISDNPI2
- prelimiary support for 'divastreaming'.
chan_capi-1.1.5
------------------

2
README
View File

@ -542,4 +542,6 @@ REDIRECTIONNUMBER
If an outgoing call is redirected, this variable may be set to the
new destination.
ISDNPI1 and ISDNPI2
The two values of the information element PI (Progress Indicator).

View File

@ -105,7 +105,7 @@ static char *commandtdesc = CC_MESSAGE_BIGNAME " command interface.\n"
"FAXID :ID of the remote fax machine\n"
"Asterisk variables used/set by chan_capi:\n"
"BCHANNELINFO,CALLEDTON,_CALLERHOLDID,CALLINGSUBADDRESS,CALLEDSUBADDRESS\n"
"CONNECTEDNUMBER,FAXEXTEN,PRI_CAUSE,REDIRECTINGNUMBER,REDIRECTREASON\n"
"CONNECTEDNUMBER,FAXEXTEN,PRI_CAUSE,REDIRECTINGNUMBER,REDIRECTREASON,ISDNPI1,ISDNPI2\n"
"!!! for more details and samples, check the README of chan_capi !!!\n";
static char *commandapp = "capicommand";
@ -3778,6 +3778,13 @@ static void capidev_handle_info_indication(_cmsg *CMSG, unsigned int PLCI, unsig
case 0x001e: /* Progress Indicator */
cc_verbose(3, 1, VERBOSE_PREFIX_3 "%s: info element PI %02x %02x\n",
i->vname, INFO_IND_INFOELEMENT(CMSG)[1], INFO_IND_INFOELEMENT(CMSG)[2]);
if (i->owner) {
char pibuf[16];
snprintf(pibuf, sizeof(pibuf) - 1, "%d", INFO_IND_INFOELEMENT(CMSG)[1]);
pbx_builtin_setvar_helper(i->owner, "ISDNPI1", pibuf);
snprintf(pibuf, sizeof(pibuf) - 1, "%d", INFO_IND_INFOELEMENT(CMSG)[2]);
pbx_builtin_setvar_helper(i->owner, "ISDNPI2", pibuf);
}
handle_progress_indicator(CMSG, PLCI, i);
capidev_sendback_info(i, CMSG);
break;