[Asterisk-Users] RE: Hopefully a Simple Question?

JR Richardson jr.richardson at cox.net
Sun Mar 26 17:41:04 MST 2006


Hi Guys,

I'm writing an app that receives a call on an incoming channel (A), the 
caller
negotiates through a series of prompts and is transferred to an outgoing
channel (B) using the Dial cmd. That part works perfectly!

For billing I'd like to be able to charge for the time that the first caller
is connected to the callee on channel (B) so I can pass on my own outgoing
voip costs.

How do I do this?

I can get the DIALTIME and END time of the call from the cdr but there
doesn't seem to be a way of capturing the ANSWERTIME of channel (B) from the
dialplan.

Any suggestions would be greatly appreciated.

clint_in_sydney

*************

Clint,

Use the forkcdr command in the extension logic right before you connect the
caller to channel B.  This will close the cdr entry for the incoming call
(going through he prompts) and start a new cdr entry for the outgoing call.
Works great for me.

JR





More information about the asterisk-users mailing list