- moved QSIG initialation out of chan_capi.c
This commit is contained in:
MelwareDE 2007-05-28 19:30:20 +00:00
parent 873a1bf074
commit de60f52c59
4 changed files with 30 additions and 21 deletions

View File

@ -4837,20 +4837,7 @@ int mkif(struct cc_capi_conf *conf)
tmp->qsigfeat = conf->qsigfeat;
if (conf->qsigfeat) {
tmp->qsig_data.calltransfer_active = 0;
tmp->qsig_data.calltransfer = 0;
tmp->qsig_data.calltransfer_onring = 0;
tmp->qsig_data.callmark = 0;
tmp->qsig_data.dnameid = NULL;
/* Path Replacement */
tmp->qsig_data.pr_propose_sendback = 0; /* send back an prior received PR PROPOSE on Connect */
tmp->qsig_data.pr_propose_cid = NULL; /* Call identity */
tmp->qsig_data.pr_propose_pn = NULL; /* Party Number */
/* Partner Channel - needed for many features */
tmp->qsig_data.partner_ch = NULL;
tmp->qsig_data.partner_plci = 0;
cc_qsig_interface_init(conf, tmp);
}
tmp->next = capi_iflist; /* prepend */

View File

@ -168,6 +168,7 @@ extern int pbx_capi_qsig_ssct(struct ast_channel *c, char *param);
extern int pbx_capi_qsig_ct(struct ast_channel *c, char *param);
extern int pbx_capi_qsig_callmark(struct ast_channel *c, char *param);
extern void cc_qsig_interface_init(struct cc_capi_conf *conf, struct capi_pvt *tmp);
extern void interface_cleanup_qsig(struct capi_pvt *i);
extern void pbx_capi_qsig_handle_info_indication(_cmsg *CMSG, unsigned int PLCI, unsigned int NCCI, struct capi_pvt *i);

View File

@ -984,6 +984,27 @@ int pbx_capi_qsig_callmark(struct ast_channel *c, char *param)
return 0;
}
/*
* init QSIG data on new channel - will be called by mkif
*/
void cc_qsig_interface_init(struct cc_capi_conf *conf, struct capi_pvt *tmp)
{
tmp->qsig_data.calltransfer_active = 0;
tmp->qsig_data.calltransfer = 0;
tmp->qsig_data.calltransfer_onring = 0;
tmp->qsig_data.callmark = 0;
tmp->qsig_data.dnameid = NULL;
/* Path Replacement */
tmp->qsig_data.pr_propose_sendback = 0; /* send back an prior received PR PROPOSE on Connect */
tmp->qsig_data.pr_propose_cid = NULL; /* Call identity */
tmp->qsig_data.pr_propose_pn = NULL; /* Party Number */
/* Partner Channel - needed for many features */
tmp->qsig_data.partner_ch = NULL;
tmp->qsig_data.partner_plci = 0;
}
/*
* cleanup QSIG stuff on interface
*/

View File

@ -352,13 +352,13 @@ void cc_qsig_encode_ecma_calltransfer(unsigned char * buf, unsigned int *idx, st
c[ix++] = ASN1_TC_CONTEXTSPEC | ASN1_TF_CONSTRUCTED; /* val 2 - Source Caller ID struct */
c[ix++] = 5 + cidlen;
c[ix++] = ASN1_TC_CONTEXTSPEC; /* CallerID */
c[ix++] = cidlen;
memcpy(&c[ix], cid, cidlen);
ix += cidlen;
c[ix++] = ASN1_ENUMERATED; /* Screening Indicator */
c[ix++] = 1; /* length */
c[ix++] = 1; /* 01 = userProvidedVerifiedAndPassed ...we hope so */
c[ix++] = ASN1_TC_CONTEXTSPEC; /* CallerID */
c[ix++] = cidlen;
memcpy(&c[ix], cid, cidlen);
ix += cidlen;
c[ix++] = ASN1_ENUMERATED; /* Screening Indicator */
c[ix++] = 1; /* length */
c[ix++] = 1; /* 01 = userProvidedVerifiedAndPassed ...we hope so */
c[ix++] = ASN1_ENUMERATED; /* val 3 - wait for connect ? */
c[ix++] = 1;