[Asterisk-cvs] asterisk README.variables,1.11,1.12 pbx.c,1.87,1.88

markster at lists.digium.com markster at lists.digium.com
Thu Nov 13 14:16:03 CST 2003


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

Modified Files:
	README.variables pbx.c 
Log Message:
Make ${ACCOUNTCODE} available and document (bug #459)


Index: README.variables
===================================================================
RCS file: /usr/cvsroot/asterisk/README.variables,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- README.variables	12 Nov 2003 23:54:41 -0000	1.11
+++ README.variables	13 Nov 2003 20:42:17 -0000	1.12
@@ -44,6 +44,8 @@
 ${DNID}         Dialed Number Identifier
 ${RDNIS}        Redirected Dial Number ID Service
 ${HANGUPCAUSE}	Hangup cause on last PRI hangup
+${ACCOUNTCODE}  Account code (if specified)
+
 ${SIPDOMAIN}    SIP destination domain of an inbound call (if appropriate)
 
 There are two reference modes - reference by value and reference by name. 

Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- pbx.c	4 Nov 2003 00:16:01 -0000	1.87
+++ pbx.c	13 Nov 2003 20:42:17 -0000	1.88
@@ -865,6 +865,9 @@
         } else if (c && !strcmp(var, "HANGUPCAUSE")) {
           snprintf(workspace, workspacelen -1, "%i", c->hangupcause);
           *ret = workspace;
+        } else if (c && !strcmp(var, "ACCOUNTCODE")) {
+          strncpy(workspace, c->accountcode, workspacelen - 1);
+          *ret = workspace;
 	} else {
 		if (c) {
 			AST_LIST_TRAVERSE(headp,variables,entries) {




More information about the svn-commits mailing list