[asterisk-users] WaitForSilence Problems
Julian Lyndon-Smith
asterisk at dotr.com
Thu Jul 17 15:43:47 CDT 2008
This is what we use, with (seemingly) good success:
exten => answermachine,1,Answer
exten => answermachine,n,Wait(5)
exten => answermachine,n,WaitForSilence(1000,2)
....
Julian
Nicholas Blasgen wrote:
> I'm trying to write an application for using after an agent has decided the
> person on the other end is an answering machine and would like to drop in a
> message automaticly. When I'm testing this using my own voice as an
> aswering machine, WaitForSilence works correctly and returns only after a
> decent delay. But when I hit my real cell phone's voice mail and transfer
> the call to the auto-message system, WaitForSilence returns after the given
> delay without waiting for it to finish. I'm thinking this has something to
> do with the audio level and it not being enough for WaitForSilence to
> register. But that really makes no sense.
>
> -- Executing [360445792 at dropin:1] Wait("SIP/vitelity-09e4f7c8", "1") in
> new stack
> -- AGI Script Executing Application: (PLAYBACK) Options: (beep)
> -- <SIP/vitelity-09e4b8c8> Playing 'beep' (language 'en')
> -- Executing [360445792 at dropin:2]
> WaitForSilence("SIP/vitelity-09e4f7c8", "2500") in new stack
> -- Waiting 1 time(s) for 2500 ms silence with 0 timeout
> -- AGI Script Executing Application: (PLAYBACK) Options: (beep)
> -- <SIP/vitelity-09e4b8c8> Playing 'beep' (language 'en')
> -- Exiting with 2500ms silence >= 2500ms required
> -- Executing [360445792 at dropin:3] Playback("SIP/vitelity-09e4f7c8",
> "recordings/360445792") in new stack
> -- <SIP/vitelity-09e4f7c8> Playing 'recordings/360445792' (language
> 'en')
> -- AGI Script Executing Application: (PLAYBACK) Options: (beep)
> -- <SIP/vitelity-09e4b8c8> Playing 'beep' (language 'en')
> -- Executing [360445792 at dropin:4] Hangup("SIP/vitelity-09e4f7c8", "") in
> new stack
>
> [dropin]
> exten => _X.,1,Answer()
> exten => _X.,n,Wait(1)
> exten => _X.,n,WaitForSilence(2500)
> exten => _X.,n,Playback(recordings/${EXTEN})
> exten => _X.,n,Hangup()
>
> I added the Wait(1) and Answer() just as an added thing, but they shouldn't
> be needed. Anyone have a suggestion?
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list