Asterissk 1.8

master
MelwareDE 12 years ago
parent 3e891c11c1
commit 30d7131076
  1. 2
      chan_capi_qsig_core.c
  2. 13
      chan_capi_qsig_ecma.c
  3. 2
      chan_capi_qsig_ecma.h

@ -1003,7 +1003,7 @@ unsigned int cc_qsig_add_call_setup_data(unsigned char *data, struct capi_pvt *i
}
cc_qsig_build_facility_struct(data, &dataidx, protocolvar, APDUINTERPRETATION_IGNORE, &nfe);
cc_qsig_encode_ecma_name_invoke(data, &dataidx, &invoke, i, 0, i->owner->cid.cid_name);
cc_qsig_encode_ecma_name_invoke(data, &dataidx, &invoke, i, 0, pbx_capi_get_callername (i->owner));
cc_qsig_add_invoke(data, &dataidx, &invoke, i);
if (add_externalinfo) {

@ -75,7 +75,11 @@ void cc_qsig_op_ecma_isdn_namepres(struct cc_qsig_invokedata *invoke, struct cap
switch (invoke->type) {
case 0: /* Calling Name */
#ifdef CC_AST_HAS_VERSION_1_8
ast_set_callerid(i->owner, NULL, callername, NULL);
#else
i->owner->cid.cid_name = strdup(callername); /* Save name to callerid */
#endif
break;
case 1: /* Called Name */
case 2: /* Connected Name */
@ -112,7 +116,7 @@ void cc_qsig_op_ecma_isdn_namepres(struct cc_qsig_invokedata *invoke, struct cap
* returns
* always 0
*/
int cc_qsig_encode_ecma_name_invoke(unsigned char * buf, unsigned int *idx, struct cc_qsig_invokedata *invoke, struct capi_pvt *i, int nametype, char * name)
int cc_qsig_encode_ecma_name_invoke(unsigned char * buf, unsigned int *idx, struct cc_qsig_invokedata *invoke, struct capi_pvt *i, int nametype, const char * name)
{
unsigned char namebuf[51];
unsigned char data[255];
@ -408,10 +412,17 @@ void cc_qsig_encode_ecma_calltransfer(unsigned char * buf, unsigned int *idx, st
if (ii) {
/* send callers name to user B */
#ifdef CC_AST_HAS_VERSION_1_8
if (ii->owner->caller.id.name.valid ) {
name = ast_strdupa(S_COR(ii->owner->caller.id.name.valid, ii->owner->caller.id.name.str, ""));
namelength = strlen(name);
}
#else
if (ii->owner->cid.cid_name) {
name = ast_strdupa(ii->owner->cid.cid_name);
namelength = strlen(name);
}
#endif
}
} 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);

@ -53,7 +53,7 @@ struct cc_qsig_ccbsreq {
*/
extern void cc_qsig_op_ecma_isdn_namepres(struct cc_qsig_invokedata *invoke, struct capi_pvt *i);
extern int cc_qsig_encode_ecma_name_invoke(unsigned char * buf, unsigned int *idx, struct cc_qsig_invokedata *invoke, struct capi_pvt *i, int nametype, char *name);
extern int cc_qsig_encode_ecma_name_invoke(unsigned char * buf, unsigned int *idx, struct cc_qsig_invokedata *invoke, struct capi_pvt *i, int nametype, const char *name);
extern int cc_qsig_encode_ecma_isdn_leginfo3_invoke(unsigned char * buf, unsigned int *idx, struct cc_qsig_invokedata *invoke, struct capi_pvt *i, char *name);

Loading…
Cancel
Save