- added capicommand to set CAPI application id into asterisk dialplan variable.
This commit is contained in:
parent
a0976a0f3e
commit
eb7496a92b
1
CHANGES
1
CHANGES
|
@ -14,6 +14,7 @@ HEAD
|
||||||
- fixed big-endian issue for DATA_B3 messages in internal libcapi code.
|
- fixed big-endian issue for DATA_B3 messages in internal libcapi code.
|
||||||
- fixed NULL-pointer when no digits are signaled in DID mode.
|
- fixed NULL-pointer when no digits are signaled in DID mode.
|
||||||
- adapt to new Asterisk 1.6.1 changes.
|
- adapt to new Asterisk 1.6.1 changes.
|
||||||
|
- added capicommand to set CAPI application id into an Asterisk dialplan variable.
|
||||||
|
|
||||||
|
|
||||||
chan_capi-1.1.1
|
chan_capi-1.1.1
|
||||||
|
|
5
README
5
README
|
@ -302,6 +302,11 @@ Progress / early-B3 on incoming calls:
|
||||||
Example:
|
Example:
|
||||||
exten => s,1,capicommand(progress)
|
exten => s,1,capicommand(progress)
|
||||||
|
|
||||||
|
Get CAPI application ID:
|
||||||
|
To store the CAPI application ID in an asterisk dialplan variable, use:
|
||||||
|
Example:
|
||||||
|
exten => s,1,capicommand(getid,CAPI_ID)
|
||||||
|
exten => s,2,NoOp(CAPI appl-id is ${CAPI_ID})
|
||||||
|
|
||||||
Using CLIR
|
Using CLIR
|
||||||
==========
|
==========
|
||||||
|
|
21
chan_capi.c
21
chan_capi.c
|
@ -4241,6 +4241,24 @@ static int pbx_capi_call_deflect(struct ast_channel *c, char *param)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* store the peer for future actions
|
||||||
|
*/
|
||||||
|
static int pbx_capi_get_id(struct ast_channel *c, char *param)
|
||||||
|
{
|
||||||
|
char buffer[32];
|
||||||
|
|
||||||
|
if ((!param) || (!(*param))) {
|
||||||
|
cc_log(LOG_WARNING, "Parameter for getid missing.\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf(buffer, sizeof(buffer) - 1, "%d", capi_ApplID);
|
||||||
|
pbx_builtin_setvar_helper(c, param, buffer);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store the peer for future actions
|
* store the peer for future actions
|
||||||
*/
|
*/
|
||||||
|
@ -4760,6 +4778,7 @@ static struct capicommands_s {
|
||||||
int (*cmd)(struct ast_channel *, char *);
|
int (*cmd)(struct ast_channel *, char *);
|
||||||
int capionly;
|
int capionly;
|
||||||
} capicommands[] = {
|
} capicommands[] = {
|
||||||
|
{ "getid", pbx_capi_get_id, 0 },
|
||||||
{ "peerlink", pbx_capi_peer_link, 0 },
|
{ "peerlink", pbx_capi_peer_link, 0 },
|
||||||
{ "progress", pbx_capi_signal_progress, 1 },
|
{ "progress", pbx_capi_signal_progress, 1 },
|
||||||
{ "deflect", pbx_capi_call_deflect, 1 },
|
{ "deflect", pbx_capi_call_deflect, 1 },
|
||||||
|
@ -5150,7 +5169,7 @@ static void *capidev_loop(void *data)
|
||||||
time_t lastcall = 0;
|
time_t lastcall = 0;
|
||||||
time_t newtime;
|
time_t newtime;
|
||||||
|
|
||||||
cc_log(LOG_NOTICE, "Started CAPI device thread.\n");
|
cc_log(LOG_NOTICE, "Started CAPI device thread for CAPI Appl-ID %d.\n", capi_ApplID);
|
||||||
|
|
||||||
for (/* for ever */;;) {
|
for (/* for ever */;;) {
|
||||||
switch(Info = capidev_check_wait_get_cmsg(&monCMSG)) {
|
switch(Info = capidev_check_wait_get_cmsg(&monCMSG)) {
|
||||||
|
|
Loading…
Reference in New Issue