parent
8c79f0d18a
commit
cd8e0d3dc2
3
CHANGES
3
CHANGES
|
@ -6,6 +6,9 @@ HEAD
|
|||
- added qsig caller-name patch by Mario Goegel
|
||||
- recognise asterisk 1.4.1
|
||||
- register at CAPI with needed maxLogicalConnections only
|
||||
QSIG:
|
||||
- added support for different qsig variants
|
||||
- added support for rerouting informations on incoming calls
|
||||
|
||||
chan_capi-1.0.0
|
||||
------------------
|
||||
|
|
|
@ -82,3 +82,10 @@ Set qsig to one of the following values, which corresponds to your configuration
|
|||
1 Alcatel (4400 & Enterprise - Maybe OXO/4200) ECMA variant
|
||||
2 Siemens HiPath 4000 ECMAV2
|
||||
|
||||
|
||||
ToDo List:
|
||||
==========
|
||||
|
||||
- Invoke Identifier handling - currently i use invoke id #1, will be corrected by capi (outgoing)
|
||||
- Handle later facilities - i don't know what to do with most informations now, maybe they are useless in asterisk
|
||||
- Outgoing calls support only qsig type 1 (Alcatel) - add support for others on outgoing
|
||||
|
|
|
@ -35,11 +35,19 @@
|
|||
* return:
|
||||
* index counter
|
||||
*/
|
||||
unsigned int cc_qsig_asn197ade_get_partynumber(unsigned char *buf, int buflen, int *idx, unsigned char *data)
|
||||
unsigned int cc_qsig_asn197ade_get_partynumber(char *buf, int buflen, int *idx, unsigned char *data)
|
||||
{
|
||||
int myidx = *idx;
|
||||
int datalength = data[myidx++];
|
||||
int numtype = (data[myidx++] & 0x0F); /* defines type of Number: numDigits, publicPartyNum, nsapEncNum, dataNumDigits */
|
||||
int datalength;
|
||||
int numtype;
|
||||
|
||||
datalength = data[myidx++];
|
||||
|
||||
if (!datalength) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
numtype = (data[myidx++] & 0x0F); /* defines type of Number: numDigits, publicPartyNum, nsapEncNum, dataNumDigits */
|
||||
|
||||
/* cc_verbose(1, 1, VERBOSE_PREFIX_4 " * num type %i\n", numtype); */
|
||||
switch (numtype){
|
||||
|
@ -66,7 +74,7 @@ unsigned int cc_qsig_asn197ade_get_partynumber(unsigned char *buf, int buflen, i
|
|||
/*
|
||||
* Returns an string from ASN.1 encoded string
|
||||
*/
|
||||
unsigned int cc_qsig_asn197ade_get_numdigits(unsigned char *buf, int buflen, int *idx, unsigned char *data)
|
||||
unsigned int cc_qsig_asn197ade_get_numdigits(char *buf, int buflen, int *idx, unsigned char *data)
|
||||
{
|
||||
int strsize;
|
||||
int myidx = *idx;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#define ASN197ADE_NUMDIGITS_STRSIZE 20
|
||||
|
||||
extern unsigned int cc_qsig_asn197ade_get_partynumber(unsigned char *buf, int buflen, int *idx, unsigned char *data);
|
||||
extern unsigned int cc_qsig_asn197ade_get_numdigits(unsigned char *buf, int buflen, int *idx, unsigned char *data);
|
||||
extern unsigned int cc_qsig_asn197ade_get_partynumber(char *buf, int buflen, int *idx, unsigned char *data);
|
||||
extern unsigned int cc_qsig_asn197ade_get_numdigits(char *buf, int buflen, int *idx, unsigned char *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
* index counter
|
||||
*/
|
||||
|
||||
unsigned int cc_qsig_asn197no_get_name(unsigned char *buf, int buflen, unsigned int *bufds, int *idx, unsigned char *data)
|
||||
unsigned int cc_qsig_asn197no_get_name(char *buf, int buflen, unsigned int *bufds, int *idx, unsigned char *data)
|
||||
{
|
||||
unsigned int myidx = *idx;
|
||||
int myidx = *idx;
|
||||
unsigned int nametag;
|
||||
unsigned int namelength = 0;
|
||||
unsigned int nametype;
|
||||
|
@ -79,7 +79,7 @@ unsigned int cc_qsig_asn197no_get_name(unsigned char *buf, int buflen, unsigned
|
|||
break;
|
||||
}
|
||||
if (data[myidx++] == ASN1_INTEGER) {
|
||||
charset=cc_qsig_asn1_get_integer(data, &myidx);
|
||||
charset = cc_qsig_asn1_get_integer(data, &myidx);
|
||||
} else {
|
||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 " Namestruct not ECMA conform (Integer expected)\n");
|
||||
}
|
||||
|
|
|
@ -23,6 +23,6 @@
|
|||
|
||||
#define ASN197NO_NAME_STRSIZE 50
|
||||
|
||||
extern unsigned int cc_qsig_asn197no_get_name(unsigned char *buf, int buflen, unsigned int *bufds, int *idx, unsigned char *data);
|
||||
extern unsigned int cc_qsig_asn197no_get_name(char *buf, int buflen, unsigned int *bufds, int *idx, unsigned char *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -310,9 +310,6 @@ signed int cc_qsig_get_invokeid(unsigned char *data, int *idx, struct cc_qsig_in
|
|||
temp = cc_qsig_asn1_get_integer(data, &myidx);
|
||||
invoke->id = temp;
|
||||
*idx = myidx;
|
||||
/* *idx += invlen + 1; */
|
||||
/* cc_verbose(1, 1, VERBOSE_PREFIX_3 "CONNECT_IND (Invoke Identifier %#x)\n", temp); */
|
||||
/* *idx=myidx; /* Set by cc_qsig_asn1get_integer */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -336,8 +333,6 @@ signed int cc_qsig_fill_invokestruct(unsigned char *data, int *idx, struct cc_qs
|
|||
temp = cc_qsig_asn1_get_integer(data, &myidx);
|
||||
invoke->descr_type = ASN1_INTEGER;
|
||||
invoke->type = temp;
|
||||
/*myidx++;*/ /* component length */
|
||||
/*datalen=data[myidx++]; /* maybe correct, better we calculate the datalength */
|
||||
temp2 = (invoke->len) + (invoke->offset) + 1; /* Array End = Invoke Length + Invoke Offset +1 */
|
||||
datalen = temp2 - myidx;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <asterisk/channel.h>
|
||||
#include <asterisk/options.h>
|
||||
#include <asterisk/pbx.h>
|
||||
#include "chan_capi20.h"
|
||||
#include "chan_capi.h"
|
||||
#include "chan_capi_qsig.h"
|
||||
|
@ -153,10 +154,10 @@ void cc_qsig_op_ecma_isdn_leginfo2(struct cc_qsig_invokedata *invoke, struct cap
|
|||
unsigned int divReason = 0;
|
||||
unsigned int orgDivReason = 0;
|
||||
char tempstr[5];
|
||||
unsigned char divertNum[ASN197ADE_NUMDIGITS_STRSIZE+1];
|
||||
unsigned char origCalledNum[ASN197ADE_NUMDIGITS_STRSIZE+1];
|
||||
unsigned char divertName[ASN197NO_NAME_STRSIZE+1];
|
||||
unsigned char origCalledName[ASN197NO_NAME_STRSIZE+1];
|
||||
char divertNum[ASN197ADE_NUMDIGITS_STRSIZE+1];
|
||||
char origCalledNum[ASN197ADE_NUMDIGITS_STRSIZE+1];
|
||||
char divertName[ASN197NO_NAME_STRSIZE+1];
|
||||
char origCalledName[ASN197NO_NAME_STRSIZE+1];
|
||||
unsigned int temp = 0;
|
||||
unsigned int temp2 = 0;
|
||||
|
||||
|
@ -240,7 +241,7 @@ void cc_qsig_op_ecma_isdn_leginfo2(struct cc_qsig_invokedata *invoke, struct cap
|
|||
pbx_builtin_setvar_helper(i->owner, "QSIG_LI2_DIVNAME", divertName);
|
||||
pbx_builtin_setvar_helper(i->owner, "QSIG_LI2_ODIVNAME", origCalledName);
|
||||
|
||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 " * QSIG_LEG_INFO2: (%i(%i), %ix %s->%s, %s->%s)\n", divReason, orgDivReason, divCount, origCalledNum, divertNum, origCalledName, divertName);
|
||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 " * QSIG_LEG_INFO2: %i(%i), %ix %s->%s, %s->%s\n", divReason, orgDivReason, divCount, origCalledNum, divertNum, origCalledName, divertName);
|
||||
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue