Proper PDD calculation?

Hi there,

as far as I understand the DIAL app populates the DIALEDTIME and ANSWEREDTIME channel vars.
Dialedtime is timestamped with the event of executing the DIAL app so I am missing the event of receiving the ALERTING message (or 180 Ringing in case of a SIP chan) in order to be able to properly calculate the post dial-delay.

Is there any way to get this info?

Thanks for helping me out here!

Best regards,

Tillman

Update: just figured that I am gonna have a quick look at the app_dial.c and it looks like I could easily add timestamps to the AST_CONTROL_RINGING status and then use the pbx_builtin_setvar_helper to populate something like ALERTTIME.
Will try this later and keep you guys posted.

Hello!

To calculate the PDD is required start time of the call + the start time of the event “180 Ringing”

That’s it!

Hi
How can I get the start time of the event “180 Ringing”, I tried CHANNEL() and CEL, but they were all unsuccessful. Do you know how to get this timestamp?
Thank you very much.

This thread is 15 years old! I would suggest that the time of the start of ringing is not something you can reliably measure in VoIP, as RINGING may be faked (quite common in Asterisk dialplans), in band progress may be used instead, it is transmitted unreliably, so may never arrive; or the peer may go directly to a final status.