[EMAIL PROTECTED] ha scritto:
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/[EMAIL PROTECTED]/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/[EMAIL PROTECTED],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?
You have to read that variable after the hangup, use the h extension
and / or
ResetCDR([options])
Causes the Call Data Record to be reset, optionally storing the current
CDR before zeroing it out (if 'w' option is specifed).
A CDR record *will* be stored for any activity following this command.
using h is cleaner in my opinion
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users