[Asterisk-cvs] asterisk/channels chan_iax2.c,1.191,1.192
markster at lists.digium.com
markster at lists.digium.com
Fri Oct 1 22:10:59 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv32144/channels
Modified Files:
chan_iax2.c
Log Message:
More IAX2 TNS/TOS/PRES fixes
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- chan_iax2.c 2 Oct 2004 01:56:08 -0000 1.191
+++ chan_iax2.c 2 Oct 2004 02:13:04 -0000 1.192
@@ -2330,8 +2330,13 @@
/* Request auto answer */
iax_ie_append(&ied, IAX_IE_AUTOANSWER);
}
- if (l)
+ if (l) {
iax_ie_append_str(&ied, IAX_IE_CALLING_NUMBER, l);
+ iax_ie_append_byte(&ied, IAX_IE_CALLINGPRES, c->cid.cid_pres);
+ } else
+ iax_ie_append_byte(&ied, IAX_IE_CALLINGPRES, AST_PRES_NUMBER_NOT_AVAILABLE);
+ iax_ie_append_byte(&ied, IAX_IE_CALLINGTON, c->cid.cid_ton);
+ iax_ie_append_short(&ied, IAX_IE_CALLINGTNS, c->cid.cid_tns);
if (n)
iax_ie_append_str(&ied, IAX_IE_CALLING_NAME, n);
if (iaxs[callno]->sendani && c->cid.cid_ani) {
@@ -2732,6 +2737,9 @@
strncpy(tmp->language, i->language, sizeof(tmp->language)-1);
if (!ast_strlen_zero(i->dnid))
tmp->cid.cid_dnid = strdup(i->dnid);
+ tmp->cid.cid_pres = i->calling_pres;
+ tmp->cid.cid_ton = i->calling_ton;
+ tmp->cid.cid_tns = i->calling_tns;
if (!ast_strlen_zero(i->accountcode))
strncpy(tmp->accountcode, i->accountcode, sizeof(tmp->accountcode)-1);
if (i->amaflags)
@@ -3720,7 +3728,12 @@
if (user->hascallerid) {
strncpy(iaxs[callno]->cid_num, user->cid_num, sizeof(iaxs[callno]->cid_num)-1);
strncpy(iaxs[callno]->cid_name, user->cid_name, sizeof(iaxs[callno]->cid_name)-1);
+ iaxs[callno]->calling_pres = 0;
+ } else {
+ iaxs[callno]->calling_pres = AST_PRES_NUMBER_NOT_AVAILABLE;
}
+ iaxs[callno]->calling_tns = 0;
+ iaxs[callno]->calling_ton = 0;
strncpy(iaxs[callno]->ani, user->cid_num, sizeof(iaxs[callno]->ani)-1);
}
if (!ast_strlen_zero(user->accountcode))
More information about the svn-commits
mailing list