<div dir="ltr">Asterisk does have logging and can write CDR with start time and answer time. The exact details will depend on the version of Asterisk you are using.<div><br><div>For example, <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification">https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CDR+Specification</a></div><div><br></div><div>Watch for lines with "disposition" = "ANSWERED" and calculate the difference of "start" and "answer".</div><div><br></div><div>Your requirements dictate that you know the PDD immediately, not as each call ends. You might have to do some digging to get that from the logs directly, or force CDRs to be written when calls are answered as well as when they end.</div><div><br></div><div>A "no ring timeout" setting will help to help route advance when facing unexpected PDD. 4 seconds is reasonable for most carriers, in my experience.</div><div><br></div><div>This problem might already be solved by the asterisk community. Have you checked those forums/mailing lists?</div><div><br></div><div>Now might be the time to consider the future of your routing, rating, billing, monitoring, and alerting. The right solution now might save you considerable time and effort later.</div><div><br></div><div>If you really want to do this yourself, consider attaching your Asterisk boxes to a RADIUS server and doing your CDR crunching from there.</div><div><br></div><div><a href="https://wiki.asterisk.org/wiki/display/AST/RADIUS+CDR+Backend">https://wiki.asterisk.org/wiki/display/AST/RADIUS+CDR+Backend</a><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 1:02 PM, Peter Beckman <span dir="ltr"><<a href="mailto:beckman@angryox.com" target="_blank">beckman@angryox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Mon, 20 Apr 2015, Richard Jobson wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Do you have an SBC or switch that already measures this and outputs it with<br>
the CDR?<br>
</blockquote>
<br></span>
Nope.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Do you want to report on all PDD long-term? Or just one or two specific<br>
calls?<br>
</blockquote>
<br></span>
Long term. A handful of Asterisk servers. Looking for what Calvin E.<br>
suggested, except a tool that someone has already written. I can do what<br>
Calvin suggests, but interpreted scripts are no match for C compiled<br>
packet matching.<br>
<br>
What Calvin suggests is something that would work for a PCAP file<br>
processed after the fact. I'm looking for something that would be able to<br>
catch the non-100 response for each INVITE and log it to a file or send a<br>
metric. Even if it has to wake up and parse a 80MB+ pcap file each run to<br>
find the PDD per Call-ID, then determine if that Call-ID has been<br>
reported. Lots of caching of data... it can be done, but speed is<br>
important and a scripting language is quick and dirty but unlikely to be<br>
fast and reliable.<br>
<br>
Does Asterisk support logging or emitting metrics like PDD?<br>
<br>
When a carrier jumps from <1 second Post Dial Delay to 20+ seconds Post<br>
Dial Delay I need (a) to know about it and (b) be able to demote them in<br>
my LCR in an automated fashion temporarily so I don't need to wake up and<br>
take care of my customers.<div class=""><div class="h5"><br>
<br>
Beckman<br>
---------------------------------------------------------------------------<br>
Peter Beckman Internet Guy<br>
<a href="mailto:beckman@angryox.com" target="_blank">beckman@angryox.com</a> <a href="http://www.angryox.com/" target="_blank">http://www.angryox.com/</a><br>
---------------------------------------------------------------------------<br>
</div></div></blockquote></div><br></div></div></div>