[Asterisk-Users] Obtaining billsecs in the dialplan after a call?

steve at daviesfam.org steve at daviesfam.org
Fri Feb 10 03:19:07 MST 2006


Hi,

I'm stuck on a silly thing.  I need to get the "billsec" CDR value after a 
call.  But I'm finding its always 0.

Here's my test code:

exten => *244*,1,Dial(Local/test at custom-tests/n,,g)
exten => *244*,n,Noop(after dial duration is ${CDR(duration)} billsec is 
${CDR(billsec)})
exten => *244*,n,Hangup

[custom-tests]

exten => test,1,Answer
exten => test,n,Playback(tt-somethingwrong)
exten => test,n,Hangup



The actual CDR record that gets posted in Master.csv looks like so:

"","200","*244*","default","""Exten 200"" <200>","SIP/200-94dd","Local/test at custom-tests-0255,1","Hangup","","2006-02-10 
11:57:42","2006-02-10 11:57:42","2006-02-10 11:57:45",3,3,"ANSWERED","DOCUMENTATION"

So the duration is there just fine.  But ${CDR(billsec)} remains stubbonly 
0.

Now I don't really understand the CDR code 100% - but it looks like 
billsec is only worked out then the cdr is posted.  But there is no way to 
force the cdr to be posted from the dialplan, is there?

Thanks,
Steve




More information about the asterisk-users mailing list