How to get Called number answered time in asterisk dialplan.

It should be the same as the incoming leg answer time unless you answer the call. Otherwise, you will need to use channel event logging, or reset or fork the CDR, or use the CDR on the called called channel.

Dear David,
These all features only set channel answered time not set b party user call answered time.In other word IN and OUT channels bridge start time.

The channel B CDR answer time is always the B channel answer time.

The A side answer time is the first answer after the CDR was last initialised, or at least that is how it used to work.

If you don’t answer A explicitly,and normally you should not, A and Banswer times will be the same.

B channel answer time is start immediately when call start ringing on B channel but we need that date time when call answered on B number.

You will need to fix this at the place where the premature answer is happening, which will be downstream of your Asterisk box, except, if you have analogue FXO lines going to the box. If the downstream peer chooses to answer immediately, rather than using call progress signalling,or early medial, Asterisk cannot distinguish the premature answer from the real answer.

Note that, by default, DAHDI analogue FXO lines assume an immediate answer. That is because many public telephone operators do not provide answer supervision. If this is the case, but your PTO provides line reversal supervision, there is a dahdi option to enable the use of this. If you enable it, but they don’t provide it, the call will never be treated as answered.

This is why it is important to provide all the information. Normally someone who doesn’t say what channel technology they are using is actually using SIP, and premature answer is a downstream problem.

we are using SIP channel for out call.Incoming call is working fine with premature media.Only problem with out call to calculate actual outdial duration after answered cal by B party.