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!