[Asterisk-cvs] asterisk channel.c,1.48,1.49 manager.c,1.23,1.24 pbx.c,1.57,1.58

martinp at lists.digium.com martinp at lists.digium.com
Wed Oct 1 16:00:20 CDT 2003


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

Modified Files:
	channel.c manager.c pbx.c 
Log Message:
Pass accountcode to outgoing spool call when originated with Context&Extension&Priority


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- channel.c	1 Oct 2003 14:59:40 -0000	1.48
+++ channel.c	1 Oct 2003 21:01:30 -0000	1.49
@@ -1509,12 +1509,14 @@
 			while( (var = strtok_r(NULL, "|", &tmp)) ) {
 				pbx_builtin_setvar( chan, var );
 			} /* /JDG */
-			if (*oh->context)
+			if (oh->context && *oh->context)
 				strncpy(chan->context, oh->context, sizeof(chan->context) - 1);
-			if (*oh->exten)
+			if (oh->exten && *oh->exten)
 				strncpy(chan->exten, oh->exten, sizeof(chan->exten) - 1);
-			if (*oh->callerid)
+			if (oh->callerid && *oh->callerid)
 				ast_set_callerid(chan, oh->callerid, 1);
+			if (oh->account && *oh->account)
+				ast_cdr_setaccount(chan, oh->account);
 			chan->priority = oh->priority;
 		}
 		if (callerid && strlen(callerid))

Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- manager.c	8 Sep 2003 23:40:33 -0000	1.23
+++ manager.c	1 Oct 2003 21:01:30 -0000	1.24
@@ -448,9 +448,9 @@
 	*data = '\0';
 	data++;
 	if (strlen(app)) {
-           res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 0, strlen(callerid) ? callerid : NULL, NULL );
+           res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 0, strlen(callerid) ? callerid : NULL, NULL, NULL);
        	} else {
-	   res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 0, strlen(callerid) ? callerid : NULL, NULL );
+	   res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 0, strlen(callerid) ? callerid : NULL, NULL, NULL);
 	}   
 	if (!res)
 		astman_send_ack(s, m, "Originate successfully queued");

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- pbx.c	30 Sep 2003 02:46:52 -0000	1.57
+++ pbx.c	1 Oct 2003 21:01:30 -0000	1.58
@@ -3783,7 +3783,7 @@
 	return NULL;
 }
 
-int ast_pbx_outgoing_exten(char *type, int format, void *data, int timeout, char *context, char *exten, int priority, int *reason, int sync, char *callerid, char *variable)
+int ast_pbx_outgoing_exten(char *type, int format, void *data, int timeout, char *context, char *exten, int priority, int *reason, int sync, char *callerid, char *variable, char *account)
 {
 	struct ast_channel *chan;
 	struct async_stat *as;
@@ -3888,7 +3888,7 @@
 	return NULL;
 }
 
-int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *app, char *appdata, int *reason, int sync, char *callerid, char *variable)
+int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *app, char *appdata, int *reason, int sync, char *callerid, char *variable, char *account)
 {
 	struct ast_channel *chan;
 	struct async_stat *as;




More information about the svn-commits mailing list