Although your options from the main IVR menu may be clear, there will always be someone who decides to push a wrong option number. To handle this we can use the extension âiâ, which will act as a catch all for all invalid options.
Typically when a user presses a wrong option number they are sent back to the prompt they just listened to. We will playback the invalid_message audio file we recorded and redirect them back to the main menu of the IVR. To do this create a new extension in the [ivr] context using the following code:
exten => i,1,NoOp(Invalid Key) same => n,Playback(ivr/invalid_message) same => n,Goto(ivr,s,1) same => n,Hangup |
A user may also not select an option at all. Typically when this happens the main menu of the IVR will repeat. We can use the extension âtâ to handle timeout exceptions. Create the new extension in the [ivr] context of the dialplan.
exten => t,1,NoOp(Timeout) same => n,Goto(ivr,s,1) same => n,Hangup |