[asterisk-commits] jpeeler: branch 1.6.2 r224334 - in /branches/1.6.2: ./ channels/chan_dahdi.c

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


Author: jpeeler
Date: Fri Oct 16 20:58:45 2009
New Revision: 224334

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

................
  r224331 | jpeeler | 2009-10-16 20:36:08 -0500 (Fri, 16 Oct 2009) | 20 lines
  
  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:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_dahdi.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_dahdi.c?view=diff&rev=224334&r1=224333&r2=224334
==============================================================================
--- branches/1.6.2/channels/chan_dahdi.c (original)
+++ branches/1.6.2/channels/chan_dahdi.c Fri Oct 16 20:58:45 2009
@@ -4328,6 +4328,8 @@
 	if ((p->sig == SIG_PRI) || (p->sig == SIG_SS7) || (p->sig == SIG_BRI) || (p->sig == SIG_BRI_PTMP)) {
 		x = 1;
 		ast_channel_setoption(ast,AST_OPTION_AUDIO_MODE,&x,sizeof(char),0);
+		p->cid_num[0] = '\0';
+		p->cid_name[0] = '\0';
 	}
 
 	x = 0;
@@ -4522,6 +4524,8 @@
 		}
 #endif
 #ifdef HAVE_OPENR2
+		p->cid_num[0] = '\0';
+		p->cid_name[0] = '\0';
 		if (p->mfcr2 && p->mfcr2call && openr2_chan_get_direction(p->r2chan) != OR2_DIR_STOPPED) {
 			ast_log(LOG_DEBUG, "disconnecting MFC/R2 call on chan %d\n", p->channel);
 			/* If it's an incoming call, check the mfcr2_forced_release setting */
@@ -10466,10 +10470,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 ((tmp->sig != SIG_PRI) || (tmp->sig != SIG_SS7) || (tmp->sig != SIG_BRI) || (tmp->sig != SIG_BRI_PTMP) || (tmp->sig != SIG_MFCR2)) {
+			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;




More information about the asterisk-commits mailing list