[asterisk-commits] jpeeler: trunk r224331 - in /trunk: ./ channels/chan_dahdi.c channels/sig_pri.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 16 20:36:13 CDT 2009


Author: jpeeler
Date: Fri Oct 16 20:36:08 2009
New Revision: 224331

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=224331
Log:
Merged revisions 224330 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224330 | jpeeler | 2009-10-16 20:32:47 -0500 (Fri, 16 Oct 2009) | 13 lines
  
  Fix stale caller id data from being reported in AMI NewChannel event
  
  The problem here is that chan_dahdi is designed in such a way to set
  certain values in the dahdi_pvt only once. One of those such values
  is the configured caller id data in chan_dahdi.conf. For PRI, the
  configured caller id data could be overwritten during a call. Instead
  of saving the data and restoring, it was decided that for all non-analog
  channels it was simply best to not set the configured caller id in the
  first place and also clear it at the end of the call.
  
  (closes issue #15883)
  Reported by: jsmith
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_dahdi.c
    trunk/channels/sig_pri.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=224331&r1=224330&r2=224331
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Fri Oct 16 20:36:08 2009
@@ -5218,6 +5218,9 @@
 		revert_fax_buffers(p, ast);
 
 		goto hangup_out;
+	} else {
+		p->cid_num[0] = '\0';
+		p->cid_name[0] = '\0';
 	}
 
 	ast_mutex_lock(&p->lock);
@@ -11285,10 +11288,15 @@
 		ast_copy_string(tmp->mohinterpret, conf->chan.mohinterpret, sizeof(tmp->mohinterpret));
 		ast_copy_string(tmp->mohsuggest, conf->chan.mohsuggest, sizeof(tmp->mohsuggest));
 		ast_copy_string(tmp->context, conf->chan.context, sizeof(tmp->context));
-		ast_copy_string(tmp->cid_num, conf->chan.cid_num, sizeof(tmp->cid_num));
 		ast_copy_string(tmp->parkinglot, conf->chan.parkinglot, sizeof(tmp->parkinglot));
 		tmp->cid_ton = 0;
-		ast_copy_string(tmp->cid_name, conf->chan.cid_name, sizeof(tmp->cid_name));
+		if (analog_lib_handles(p->sig, p->radio, p->oprmode))
+			ast_copy_string(tmp->cid_num, conf->chan.cid_num, sizeof(tmp->cid_num));
+			ast_copy_string(tmp->cid_name, conf->chan.cid_name, sizeof(tmp->cid_name));
+		} else {
+			tmp->cid_num[0] = '\0';
+			tmp->cid_name[0] = '\0';
+		}
 		ast_copy_string(tmp->mailbox, conf->chan.mailbox, sizeof(tmp->mailbox));
 		if (channel != CHAN_PSEUDO && !ast_strlen_zero(tmp->mailbox)) {
 			char *mailbox, *context;

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=224331&r1=224330&r2=224331
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Fri Oct 16 20:36:08 2009
@@ -2410,6 +2410,8 @@
 	p->progress = 0;
 	p->alerting = 0;
 	p->setup_ack = 0;
+	p->cid_num[0] = '\0';
+	p->cid_name[0] = '\0';
 	p->exten[0] = '\0';
 	sig_pri_set_dialing(p, 0);
 




More information about the asterisk-commits mailing list