[asterisk-users] Detecting end of Ringback

Joshua Colp jcolp at digium.com
Mon Aug 1 10:22:33 CDT 2016

Saint Michael wrote:
> On an outbound call, PJSIP, I execute a macro and try to detect the end
> of ringback, inside the macro. So far waitforring() does nothing, stays
> stuck. Any combination of waitffornoise and waitforsilence, or
> backgrounddetect fail to find the moment when the ringabck stops. I can
> detect when it starts, with waitfornoise, but not its end.
> Any idea? Should I open a ticket for waitforring?

WaitForRing doesn't do audio analysis to determine ringing, it's up to 
the channel driver to signal that ringing has occurred using a frame. As 
PJSIP doesn't do audio analysis (it's up to the provider or gateway) 
it's just answered instead.

Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

More information about the asterisk-users mailing list