"ROQUÉ, Francisco Emiliano"
2009-Apr-16 18:44 UTC
[asterisk-users] Set CDR(src) from dialplan
Hello, i have a question.
How can I set CDR data in dialplan? Set(CDR(src)=${EXTEN})
exten => s,1,Set(CDR(ACCOUNTCODE)=${EXTEN}) ; works fine!
exten => s,n,Set(CDR(src)=${EXTEN}) ; gives me the following error:
*ERROR[10269]: cdr.c:289 ast_cdr_setvar: Attempt to set a read-only
variable!.
*
Thanks!
--
Ing Francisco Roqu?
3Tech SRL
Plaza Paso N?92, EP B
Buenos Aires, Argentina.
www.3tech.com.ar
In my source (1.4.21.2), this snippet in cdr.c pretty much explains your
problem:
/* readonly cdr variables */
static const char *cdr_readonly_vars[] = { "clid", "src",
"dst",
"dcontext", "channel", "dstchannel",
"lastapp", "lastdata",
"start",
"answer", "end", "duration",
"billsec",
"disposition", "amaflags",
"accountcode", "uniqueid",
"userfield", NULL };
Why are you attempting to masquerade your own system?
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of "ROQU?,
Francisco Emiliano"
Sent: Thursday, April 16, 2009 1:44 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Set CDR(src) from dialplan
Hello, i have a question.
How can I set CDR data in dialplan? Set(CDR(src)=${EXTEN})
exten => s,1,Set(CDR(ACCOUNTCODE)=${EXTEN}) ; works fine!
exten => s,n,Set(CDR(src)=${EXTEN}) ; gives me the following error:
*ERROR[10269]: cdr.c:289 ast_cdr_setvar: Attempt to set a read-only
variable!.
*
Thanks!
--
Ing Francisco Roqu?
3Tech SRL
Plaza Paso N?92, EP B
Buenos Aires, Argentina.
www.3tech.com.ar
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users