[Asterisk-cvs] asterisk/apps app_dial.c,1.125,1.126

markster at lists.digium.com markster at lists.digium.com
Sun Jan 16 01:55:25 CST 2005


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

Modified Files:
	app_dial.c 
Log Message:
Give outbound channels callerid of their extension *after* calling (bug #2489)


Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- app_dial.c	12 Jan 2005 18:14:47 -0000	1.125
+++ app_dial.c	16 Jan 2005 07:58:51 -0000	1.126
@@ -336,6 +336,9 @@
 							ast_hangup(o->chan);
 							o->chan = NULL;
 							numnochan++;
+						} else {
+							/* After calling, set callerid to extension */
+							ast_set_callerid(o->chan, ast_strlen_zero(in->macroexten) ? in->exten : in->macroexten, NULL, NULL);
 						}
 					}
 					/* Hangup the original channel now, in case we needed it */
@@ -912,9 +915,11 @@
 			tmp->chan = NULL;
 			cur = rest;
 			continue;
-		} else
+		} else {
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Called %s\n", numsubst);
+			ast_set_callerid(tmp->chan, ast_strlen_zero(chan->macroexten) ? chan->exten : chan->macroexten, NULL, NULL);
+		}
 		/* Put them in the list of outgoing thingies...  We're ready now. 
 		   XXX If we're forcibly removed, these outgoing calls won't get
 		   hung up XXX */




More information about the svn-commits mailing list