[Asterisk-cvs] asterisk pbx.c,1.89,1.90

jeremy at lists.digium.com jeremy at lists.digium.com
Sun Nov 23 21:16:54 CST 2003


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

Modified Files:
	pbx.c 
Log Message:
deal with accountcode correctly and update CDR on a goto


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- pbx.c	21 Nov 2003 18:38:42 -0000	1.89
+++ pbx.c	24 Nov 2003 03:43:14 -0000	1.90
@@ -3828,6 +3828,7 @@
 		LOAD_OH(oh);
 		chan = __ast_request_and_dial(type, format, data, timeout, reason, callerid, &oh);
 		if (chan) {
+			pbx_builtin_setaccount(chan, account);
 			if (chan->_state == AST_STATE_UP) {
 					res = 0;
 				if (option_verbose > 3)
@@ -3883,6 +3884,7 @@
 			free(as);
 			return -1;
 		}
+		pbx_builtin_setaccount(chan, account);
 		as->chan = chan;
 		strncpy(as->context, context, sizeof(as->context) - 1);
 		strncpy(as->exten,  exten, sizeof(as->exten) - 1);
@@ -3938,6 +3940,7 @@
 	if (sync) {
 		chan = ast_request_and_dial(type, format, data, timeout, reason, callerid);
 		if (chan) {
+			pbx_builtin_setaccount(chan, account);
 			if (variable) {
 				vartmp = ast_strdupa(variable);
 				for (var = strtok_r(vartmp, "|", &vartmp); var; var = strtok_r(NULL, "|", &vartmp)) {
@@ -3986,6 +3989,7 @@
 			free(as);
 			return -1;
 		}
+		pbx_builtin_setaccount(chan, account);
 		as->chan = chan;
 		strncpy(as->app, app, sizeof(as->app) - 1);
 		if (appdata)
@@ -4321,6 +4325,7 @@
 		strncpy(chan->context, context, sizeof(chan->context)-1);
 	if (option_verbose > 2)
 		ast_verbose( VERBOSE_PREFIX_3 "Goto (%s,%s,%d)\n", chan->context,chan->exten, chan->priority+1);
+	ast_cdr_update(chan);
 	return 0;
 }
 




More information about the svn-commits mailing list