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

russell at lists.digium.com russell at lists.digium.com
Mon Jan 17 16:49:32 CST 2005


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

Modified Files:
      Tag: v1-0
	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.94.2.2
retrieving revision 1.94.2.3
diff -u -d -r1.94.2.2 -r1.94.2.3
--- app_dial.c	6 Dec 2004 23:15:19 -0000	1.94.2.2
+++ app_dial.c	17 Jan 2005 22:52:49 -0000	1.94.2.3
@@ -281,6 +281,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, 0);
 						}
 					}
 					/* Hangup the original channel now, in case we needed it */
@@ -845,9 +848,11 @@
 			free(tmp);
 			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, 0);
+		}
 		/* 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