QSIG:
- minor bug fix on name decoding - corrected callerid handling in call transfer
This commit is contained in:
parent
a25c5ee55c
commit
d0c0964067
|
@ -73,7 +73,7 @@ unsigned int cc_qsig_asn197no_get_name(char *buf, int buflen, unsigned int *bufd
|
|||
if (data[myidx++] == ASN1_OCTETSTRING) {
|
||||
/* should be so */
|
||||
namelength = cc_qsig_asn1_get_string((unsigned char *)buf, buflen, &data[myidx]);
|
||||
myidx += data[myidx-1]; /* is this safe? */
|
||||
myidx += namelength + 1;
|
||||
} else {
|
||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 " Namestruct not ECMA conform (String expected)\n");
|
||||
break;
|
||||
|
|
|
@ -27,8 +27,14 @@
|
|||
#include "chan_capi_qsig_asn197ade.h"
|
||||
#include "chan_capi_qsig_asn197no.h"
|
||||
|
||||
/*
|
||||
/**
|
||||
* Encodes an ASN.1 string
|
||||
*
|
||||
* @param buf destination pointer for string
|
||||
* @param idx index points to string position in buffer
|
||||
* @param data string
|
||||
* @param datalen string length
|
||||
* @return always zero
|
||||
*/
|
||||
unsigned int cc_qsig_asn1_add_string(unsigned char *buf, int *idx, char *data, int datalen)
|
||||
{
|
||||
|
|
|
@ -292,8 +292,15 @@ void cc_qsig_encode_ecma_calltransfer(unsigned char * buf, unsigned int *idx, st
|
|||
icanswer = ccanswer[0] - 0x30;
|
||||
}
|
||||
} else {
|
||||
cid = strdup(i->owner->cid.cid_num);
|
||||
/* cid = strdup(i->owner->cid.cid_num);*/ /* Here we get the Asterisk extension */
|
||||
if (info) { /* info should be >0 on outbound channel */
|
||||
cid = strdup(i->cid);
|
||||
cidlen = strlen(cid);
|
||||
} else { /* have to build first facility - send destination number back to inbound channel */
|
||||
struct capi_pvt *ii = capi_find_interface_by_plci(i->qsig_data.partner_plci);
|
||||
cid = strdup(ii->dnid);
|
||||
cidlen = strlen(cid);
|
||||
}
|
||||
|
||||
if (!info)
|
||||
icanswer = i->qsig_data.calltransfer_onring % 1;
|
||||
|
|
Loading…
Reference in New Issue