[asterisk-commits] russell: branch 1.2 r41411 -
/branches/1.2/channels/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Aug 30 11:59:44 MST 2006
Author: russell
Date: Wed Aug 30 13:59:44 2006
New Revision: 41411
URL: http://svn.digium.com/view/asterisk?rev=41411&view=rev
Log:
Restore original functionality of 1.2 in places where ANI was not set, but was
changed to be set. The original change was done to ensure that the behavior of
the "callerid" option in each channel driver was consistent, but it caused an
unexpected behavior change of CDR records for users, so this change is being
reverted in 1.2. (issue #7695)
Modified:
branches/1.2/channels/chan_features.c
branches/1.2/channels/chan_h323.c
branches/1.2/channels/chan_iax2.c
branches/1.2/channels/chan_local.c
branches/1.2/channels/chan_mgcp.c
branches/1.2/channels/chan_misdn.c
branches/1.2/channels/chan_phone.c
branches/1.2/channels/chan_sip.c
branches/1.2/channels/chan_skinny.c
Modified: branches/1.2/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_features.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_features.c (original)
+++ branches/1.2/channels/chan_features.c Wed Aug 30 13:59:44 2006
@@ -328,14 +328,14 @@
ast_mutex_lock(&p->lock);
x = indexof(p, ast, 0);
if (!x && p->subchan) {
- ast_set_callerid(p->subchan,
- p->owner->cid.cid_num, p->owner->cid.cid_name,
- p->owner->cid.cid_ani ? p->owner->cid.cid_ani : p->owner->cid.cid_num);
-
- if (p->owner->cid.cid_rdnis)
- p->subchan->cid.cid_rdnis = strdup(p->owner->cid.cid_rdnis);
- else
- p->subchan->cid.cid_rdnis = NULL;
+ p->subchan->cid.cid_name = p->owner->cid.cid_name ?
+ strdup(p->owner->cid.cid_name) : NULL;
+ p->subchan->cid.cid_num = p->owner->cid.cid_num ?
+ strdup(p->owner->cid.cid_num) : NULL;
+ p->subchan->cid.cid_ani = p->owner->cid.cid_ani ?
+ strdup(p->owner->cid.cid_ani) : NULL;
+ p->subchan->cid.cid_rdnis = p->owner->cid.cid_rdnis ?
+ strdup(p->owner->cid.cid_rdnis) : NULL;
p->subchan->cid.cid_pres = p->owner->cid.cid_pres;
strncpy(p->subchan->language, p->owner->language, sizeof(p->subchan->language) - 1);
Modified: branches/1.2/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_h323.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_h323.c (original)
+++ branches/1.2/channels/chan_h323.c Wed Aug 30 13:59:44 2006
@@ -770,13 +770,10 @@
ch->amaflags = pvt->amaflags;
}
- if (!ast_strlen_zero(pvt->cid_num)) {
+ if (!ast_strlen_zero(pvt->cid_num))
ch->cid.cid_num = strdup(pvt->cid_num);
- ch->cid.cid_ani = strdup(pvt->cid_num);
- } else if (!ast_strlen_zero(pvt->cd.call_source_e164)) {
+ else if (!ast_strlen_zero(pvt->cd.call_source_e164))
ch->cid.cid_num = strdup(pvt->cd.call_source_e164);
- ch->cid.cid_ani = strdup(pvt->cd.call_source_e164);
- }
if (!ast_strlen_zero(pvt->cid_name))
ch->cid.cid_name = strdup(pvt->cid_name);
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Wed Aug 30 13:59:44 2006
@@ -3448,8 +3448,6 @@
tmp->cid.cid_name = strdup(i->cid_name);
if (!ast_strlen_zero(i->ani))
tmp->cid.cid_ani = strdup(i->ani);
- else if (!ast_strlen_zero(i->cid_num))
- tmp->cid.cid_ani = strdup(i->cid_num);
tmp->cid.cid_pres = i->calling_pres;
tmp->cid.cid_ton = i->calling_ton;
tmp->cid.cid_tns = i->calling_tns;
Modified: branches/1.2/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_local.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_local.c (original)
+++ branches/1.2/channels/chan_local.c Wed Aug 30 13:59:44 2006
@@ -339,7 +339,7 @@
ast_set_callerid(p->chan,
p->owner->cid.cid_num, p->owner->cid.cid_name,
- p->owner->cid.cid_ani ? p->chan->cid.cid_ani : p->owner->cid.cid_num);
+ p->owner->cid.cid_ani);
if (p->owner->cid.cid_rdnis)
p->chan->cid.cid_rdnis = strdup(p->owner->cid.cid_rdnis);
Modified: branches/1.2/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_mgcp.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_mgcp.c (original)
+++ branches/1.2/channels/chan_mgcp.c Wed Aug 30 13:59:44 2006
@@ -1429,10 +1429,8 @@
strncpy(tmp->context, i->context, sizeof(tmp->context)-1);
strncpy(tmp->exten, i->exten, sizeof(tmp->exten)-1);
- if (!ast_strlen_zero(i->cid_num)) {
+ if (!ast_strlen_zero(i->cid_num))
tmp->cid.cid_num = strdup(i->cid_num);
- tmp->cid.cid_ani = strdup(i->cid_num);
- }
if (!ast_strlen_zero(i->cid_name))
tmp->cid.cid_name = strdup(i->cid_name);
@@ -2630,7 +2628,7 @@
ast_set_callerid(chan,
p->hidecallerid ? "" : p->cid_num,
p->hidecallerid ? "" : p->cid_name,
- chan->cid.cid_ani ? NULL : p->cid_num);
+ p->cid_num);
ast_setstate(chan, AST_STATE_RING);
/*zt_enable_ec(p);*/
if (p->dtmfmode & MGCP_DTMF_HYBRID) {
Modified: branches/1.2/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_misdn.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_misdn.c (original)
+++ branches/1.2/channels/chan_misdn.c Wed Aug 30 13:59:44 2006
@@ -2706,10 +2706,8 @@
ast_callerid_parse(callerid, &cid_name, &cid_num);
- if (!ast_strlen_zero(cid_num)) {
+ if (!ast_strlen_zero(cid_num))
tmp->cid.cid_num = strdup(cid_num);
- tmp->cid.cid_ani = strdup(cid_num);
- }
if (!ast_strlen_zero(cid_name))
tmp->cid.cid_name = strdup(cid_name);
}
Modified: branches/1.2/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_phone.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_phone.c (original)
+++ branches/1.2/channels/chan_phone.c Wed Aug 30 13:59:44 2006
@@ -826,10 +826,8 @@
if (!ast_strlen_zero(i->language))
strncpy(tmp->language, i->language, sizeof(tmp->language)-1);
- if (!ast_strlen_zero(i->cid_num)) {
+ if (!ast_strlen_zero(i->cid_num))
tmp->cid.cid_num = strdup(i->cid_num);
- tmp->cid.cid_ani = strdup(i->cid_num);
- }
if (!ast_strlen_zero(i->cid_name))
tmp->cid.cid_name = strdup(i->cid_name);
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Wed Aug 30 13:59:44 2006
@@ -2824,10 +2824,8 @@
ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten));
- if (!ast_strlen_zero(i->cid_num)) {
+ if (!ast_strlen_zero(i->cid_num))
tmp->cid.cid_num = strdup(i->cid_num);
- tmp->cid.cid_ani = strdup(i->cid_num);
- }
if (!ast_strlen_zero(i->cid_name))
tmp->cid.cid_name = strdup(i->cid_name);
if (!ast_strlen_zero(i->rdnis))
Modified: branches/1.2/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_skinny.c?rev=41411&r1=41410&r2=41411&view=diff
==============================================================================
--- branches/1.2/channels/chan_skinny.c (original)
+++ branches/1.2/channels/chan_skinny.c Wed Aug 30 13:59:44 2006
@@ -1746,7 +1746,7 @@
ast_set_callerid(chan,
l->hidecallerid ? "" : l->cid_num,
l->hidecallerid ? "" : l->cid_name,
- chan->cid.cid_ani ? NULL : l->cid_num);
+ NULL);
ast_setstate(chan, AST_STATE_RING);
res = ast_pbx_run(chan);
if (res) {
@@ -2280,10 +2280,8 @@
strncpy(tmp->context, l->context, sizeof(tmp->context)-1);
strncpy(tmp->exten,l->exten, sizeof(tmp->exten)-1);
- if (!ast_strlen_zero(l->cid_num)) {
+ if (!ast_strlen_zero(l->cid_num))
tmp->cid.cid_num = strdup(l->cid_num);
- tmp->cid.cid_ani = strdup(l->cid_num);
- }
if (!ast_strlen_zero(l->cid_name))
tmp->cid.cid_name = strdup(l->cid_name);
More information about the asterisk-commits
mailing list