To get answer time after the call is answered using curl


I need to trigger call answered time when the call is answered once,how to configure to get the answered time.

can you please help any one on this to get the call answered time.

You could use ${CDR(answer)}, just google “asterisk cdr variables”.

Maybe you should take a look at the available documentation,

Think you will find answers quicker there than having to wait till you might get an answer on the questions you post at the forum.

And yes, of course you can post questions on the forum, but provide a bit more of a description and maybe what you want to achieve, the forum members might be able to give you a push in the right direction or point you to something that is already build that will give you your wanted result.

Ok.Thanks for your reply .


when i attend the call answer priority is not execute,I need to trigger the call events when the call was answered.

here is my sample configuration

exten =>100,Dial(SIP/100,20)
exten =>100,Answer()Set(x=curl(${STRFTIME(${EPOCH},GMT+9:30,%Y-%m-%d/%H:%M:%S)})
exten =>100,Hangup()

please help on this and guide me to configure the extension.

Dial doesn’t just dial the outgoing call, it handles the whole call until one part hangs up. Subsequent priorities are not run unless the B side of the call fails, or the B side hangs up at the end of a successful call, and you used the option on Dial (g, I think) that enables continuation in that case.

Dial will answer the A side when the B side answers, so the only effect of Answer, where you have used it, is to answer the A side on failed calls (meaning that even failed calls get billed).

Also, you have no prioirity numbers and you can’t concatenate two applications on one line.

If you want to run dialplan at the point of the B side answer, you need to either use the Dial options that run subroutines (or, but deprecated, macros) then, or use the option that performs a goto on each leg, followed by explicitly bridging the two legs together.

1 Like