[Asterisk-cvs] asterisk/apps app_dial.c,1.94.2.3,1.94.2.4

russell at lists.digium.com russell at lists.digium.com
Sat Jan 29 00:44:14 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv21988/apps

Modified Files:
      Tag: v1-0
	app_dial.c 
Log Message:
fix DIALEDPEERNUMBER (bug #3427)


Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.94.2.3
retrieving revision 1.94.2.4
diff -u -d -r1.94.2.3 -r1.94.2.4
--- app_dial.c	17 Jan 2005 22:52:49 -0000	1.94.2.3
+++ app_dial.c	29 Jan 2005 06:46:05 -0000	1.94.2.4
@@ -753,6 +753,7 @@
 			cur = rest;
 			continue;
 		}
+		pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
 		if (!ast_strlen_zero(tmp->chan->call_forward)) {
 			char tmpchan[256]="";
 			char *stuff;
@@ -917,8 +918,11 @@
 			ast_cdr_setdestchan(chan->cdr, peer->name);
 		if (peer->name)
 			pbx_builtin_setvar_helper(chan, "DIALEDPEERNAME", peer->name);
-		if (numsubst)
-			pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", numsubst);
+
+		number = pbx_builtin_getvar_helper(peer, "DIALEDPEERNUMBER");
+		if (!number)
+			number = numsubst;
+		pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", number);
  		/* JDG: sendurl */
  		if( url && !ast_strlen_zero(url) && ast_channel_supports_html(peer) ) {
  			ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", url);




More information about the svn-commits mailing list