merged from trunk.

This commit is contained in:
MelwareDE 2009-01-17 17:36:50 +00:00
parent 333c34bbfb
commit ee797a8a5e
13 changed files with 38 additions and 13 deletions

View File

@ -14,6 +14,7 @@ HEAD
- fixed big-endian issue for DATA_B3 messages in internal libcapi code.
- fixed NULL-pointer when no digits are signaled in DID mode.
- 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

View File

@ -3,7 +3,7 @@
#
# Makefile, based on the Asterisk Makefile, Coypright (C) 1999, Mark Spencer
#
# Copyright (C) 2005-2008 Cytronics & Melware
# Copyright (C) 2005-2009 Cytronics & Melware
#
# Armin Schindler <armin@melware.de>
#

7
README
View File

@ -1,6 +1,6 @@
chan_capi a Common ISDN API 2.0 implementation for Asterisk
Copyright (C) 2005-2007 Cytronics & Melware
Copyright (C) 2005-2009 Cytronics & Melware
Armin Schindler <armin@melware.de>
Reworked, but based on the work of
@ -302,6 +302,11 @@ Progress / early-B3 on incoming calls:
Example:
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
==========

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2005-2008 Cytronics & Melware
* Copyright (C) 2005-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*
@ -4241,6 +4241,24 @@ static int pbx_capi_call_deflect(struct ast_channel *c, char *param)
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
*/
@ -4760,6 +4778,7 @@ static struct capicommands_s {
int (*cmd)(struct ast_channel *, char *);
int capionly;
} capicommands[] = {
{ "getid", pbx_capi_get_id, 0 },
{ "peerlink", pbx_capi_peer_link, 0 },
{ "progress", pbx_capi_signal_progress, 1 },
{ "deflect", pbx_capi_call_deflect, 1 },
@ -5150,7 +5169,7 @@ static void *capidev_loop(void *data)
time_t lastcall = 0;
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 */;;) {
switch(Info = capidev_check_wait_get_cmsg(&monCMSG)) {

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2005-2008 Cytronics & Melware
* Copyright (C) 2005-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2005-2008 Cytronics & Melware
* Copyright (C) 2005-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2006-2008 Cytronics & Melware
* Copyright (C) 2006-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2006-2008 Cytronics & Melware
* Copyright (C) 2006-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2006-2008 Cytronics & Melware
* Copyright (C) 2006-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2005-2008 Cytronics & Melware
* Copyright (C) 2005-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2006-2008 Cytronics & Melware
* Copyright (C) 2006-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2006-2008 Cytronics & Melware
* Copyright (C) 2006-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*

View File

@ -1,7 +1,7 @@
/*
* An implementation of Common ISDN API 2.0 for Asterisk
*
* Copyright (C) 2006-2008 Cytronics & Melware
* Copyright (C) 2006-2009 Cytronics & Melware
*
* Armin Schindler <armin@melware.de>
*