QSIG:
- minor bug fix on name decoding - corrected callerid handling in call transfer
This commit is contained in:
parent
a25c5ee55c
commit
d0c0964067
|
@ -97,4 +97,4 @@ Set qsig to one of the following values, which corresponds to your configuration
|
||||||
ToDo List:
|
ToDo List:
|
||||||
==========
|
==========
|
||||||
|
|
||||||
- Support for inbound routing
|
- Support for inbound routing
|
||||||
|
|
|
@ -73,7 +73,7 @@ unsigned int cc_qsig_asn197no_get_name(char *buf, int buflen, unsigned int *bufd
|
||||||
if (data[myidx++] == ASN1_OCTETSTRING) {
|
if (data[myidx++] == ASN1_OCTETSTRING) {
|
||||||
/* should be so */
|
/* should be so */
|
||||||
namelength = cc_qsig_asn1_get_string((unsigned char *)buf, buflen, &data[myidx]);
|
namelength = cc_qsig_asn1_get_string((unsigned char *)buf, buflen, &data[myidx]);
|
||||||
myidx += data[myidx-1]; /* is this safe? */
|
myidx += namelength + 1;
|
||||||
} else {
|
} else {
|
||||||
cc_verbose(1, 1, VERBOSE_PREFIX_4 " Namestruct not ECMA conform (String expected)\n");
|
cc_verbose(1, 1, VERBOSE_PREFIX_4 " Namestruct not ECMA conform (String expected)\n");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -27,8 +27,14 @@
|
||||||
#include "chan_capi_qsig_asn197ade.h"
|
#include "chan_capi_qsig_asn197ade.h"
|
||||||
#include "chan_capi_qsig_asn197no.h"
|
#include "chan_capi_qsig_asn197no.h"
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Encodes an ASN.1 string
|
* 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)
|
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;
|
icanswer = ccanswer[0] - 0x30;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cid = strdup(i->owner->cid.cid_num);
|
/* cid = strdup(i->owner->cid.cid_num);*/ /* Here we get the Asterisk extension */
|
||||||
cidlen = strlen(cid);
|
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)
|
if (!info)
|
||||||
icanswer = i->qsig_data.calltransfer_onring % 1;
|
icanswer = i->qsig_data.calltransfer_onring % 1;
|
||||||
|
|
Loading…
Reference in New Issue