IVR waiting the user press a touch

Hello Everyone,

I am in the process of crafting my own Interactive Voice Response (IVR) in extensions_custom.conf, however, I am not entirely pleased with the outcome.

I’m currently utilizing the BACKGROUND function to play a message, which allows the user to bypass it if needed. Following this, I use the “Wait” function and then proceed with result analysis. Unfortunately, this approach doesn’t appear to be user-friendly; the dialer is unclear about when to input the number, and an awkward silence emerges. I am confident that a more fluid and intuitive script can be written.

In the example below, the user is expected to input either 1 or 2, or an extension (consisting of 4 digits).

Any suggestions would be greatly appreciated.

Here is my script

exten => s,1,Answer(500)
exten => s,n,NoOp(ivr-SVI-googletts debut ${VM_EMAIL_2000})
exten => s,n,Playback(/var/lib/asterisk/sounds/fr/custom/bonjour)

;exten => s,n(message),Background(/var/lib/asterisk/agi-bin/sound/32eb53ea654ae2b9290d412f3c241c30)
;exten => s,n,Playback(beep)
exten => s,n(message),agi(googletts.php,“STREAM”,“Tapez 1 , 2 ou l’extension maintenant”,fr)

exten => s,n,Set(TIMEOUT(digit)=3) ; Temps d’attente pour la saisie de chaque touche ( secondes)
exten => s,n,Set(TIMEOUT(response)=10) ; Temps d’attente pour la saisie après le message d’accueil (secondes)
exten => s,n,WaitExten(3)

exten => 1,1,Playback(you-entered)
same => n,SayNumber(${EXTEN})
same => n,Goto(ivr-sous-menu1-fr,s,1)

exten => 2,1,Playback(you-entered)
same => n,SayNumber(${EXTEN})
same => n,Goto(ivr-sous-menu2-en,s,1)

exten => _XXXX,1,Macro(appel,${EXTEN})
;exten => _XXXX,n,Hangup()

exten => 0,1,Set(CHANNEL(language)=fr) ;
exten => 0,n,Playback(you-entered)
exten => 0,n,SayNumber(${EXTEN})
exten => 0,n,Macro(appel,2000) ; the macro makes the call

exten => i,1,agi(googletts.php,“STREAM”,“Tapez 1 pour le français”,fr,“Press 2 for English”,en)
;exten => i,n,Playback(you-entered))
;exten => i,n,SayNumber(${EXTEN})
exten => i,n,Goto(message)

exten => t,1,agi(googletts.php,“STREAM”,“Temps d’attente dépassé.Nous vous transférons au secretariat”,fr)
exten => t,n,Macro(appel,${GLOBAL_NUM_SECRETARIAT})

Having posted your context, you will need to paste your failed call log to get any feedback

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.