Monday 15 July 2013

Asterisk - Reseting CDR to show correct billsec of a new call when channel is answered beforehand -



Asterisk - Reseting CDR to show correct billsec of a new call when channel is answered beforehand -

what want do: reply incoming phone call , dial number. when phone call finished need have right conversation time of phone call (which supposed stored in ${cdr(billsec)}). what getting: since channel answered, c alternative in dial application resetting reply variable of cdr current time hence resulting billsec equal duration variable of cdr , equal channel seize time not phone call conversation time. my dial plan:

exten => 333333,1,noop(here reply channel , create call) same => n,answer same => n,dial(dahdi/g0/123456789,,gc) same => n,noop(billsec: ${cdr(billsec)}) // here billsec equal cdr(duration)

note: if remove reply cmd dialplan billsec variable showing right phone call time , makes sense because channel not answered , cdr(answer) assigned called party answers channel. problem in finish dialplan have reply channel before making phone call because need interact user beforehand , needs channel answered.

btw, using asterisk 13.0.0-beta1. of guys allow me know how can accomplish want please?

if basic cdr functionality not plenty billing, check out cel (channel event logging). supports db backends, , has event's phone call (timestamped) perchance ever need.

asterisk

No comments:

Post a Comment