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

Olivier Perrin o.perrin at kosmos-telecom.fr
Fri Feb 10 04:32:24 MST 2006


Hi, 
You can use the ANSWEREDTIME variable :

exten => *244*,n,Noop(after dial duration is ${ANSWEREDTIME})

Regards,
Olivier



-------------------------------------
http://www.olivier-perrin.net


Le vendredi 10 février 2006 à 12:19 +0200, steve at daviesfam.org a écrit :
> 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
> 
> _______________________________________________
> --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




More information about the asterisk-users mailing list