Issue With Speech In IVR

Home » Asterisk Users » Issue With Speech In IVR
Asterisk Users 21 Comments

hello list

i have an IVR menu in asterisk 1.4

like below

exten => 600,1,Ringing()
exten => 600,n,Wait(2)
exten => 600,n,Goto(home,s,1)

exten => s,1,SetGlobalVar(sounds_path=/var/lib/asterisk/sounds/)
exten => s,n,Background(${sounds_path}music1)
exten => s,n,Background(${sounds_path}music2)
exten => s,n,Background(${sounds_path}music3)
exten => s,n,WaitExten(5)
exten => s,n,goto(home,s,1)
exten => i,1,Playback(${sounds_path}error)
exten => i,n,WaitExten(5)
exten => i,n,goto(home,s,1)
exten => 1,1,Goto(project,s,1)


exten => s,1,SetGlobalVar(sounds_path=/var/lib/asterisk/sounds/)
exten => s,n,Background(${sounds_path}mymusic)
exten => s,n,WaitExten(5)
exten => s,n,Goto(project,s,1)
exten => i,1,Playback(${sounds_path}error)
exten => i,n,goto(project,s,1)

my problem when the customor call the number 600 and press 1 in order to go to the project menu he must wait all the speech music1 music2 and music 3

if there is any way to go to project menu during the speech

thanks and regards

21 thoughts on - Issue With Speech In IVR

  • Go inside the time machine and come back to 2013!

    Use a newer version asterisk and you will get help. There are a lot of changes and a lot of bugs solved.

    Best regards.


    Enviado desde mi BlackBerry de Personal (

    —–Original Message—

  • hello,

    i have add the the code below but the issue still the same i can’t go to the project during the speech any other solution

    best regards

    NB:for the version of asterisk i can’t move to another version for the moment

    exten => _X,1,NoOp(Digit entered during prompt)
    exten => _X,2,Goto(project,s,1)

    2013/11/28 Paul Belanger

  • This is an actual dialplan application that I wrote. It’s a “spike” — a proof of concept that is all depth and no breadth. It’s known to work in Asterisk 1.8.

    The sound files “ajs_juke01” and “ajs_anykey” you will need to create for yourself, depending what MP3s you have available (and replace ajs_ with your own prefix). You can interrupt the announcements or the MP3s by pressing keys while playing.

    ;;;;;;;;;;; VERY PRIMITIVE JUKE BOX CONTEXT ;;;;;;;;;;;
    exten => s,1,Background(ajs_juke01)
    ; “Press 1 for Ocean Colour Scene, 2 for Crowded House”
    exten => s,n,WaitExten(1)
    exten => s,n,Goto(1)

    exten => i,1,Hangup()

    exten => 1,1,Background(ajs_anykey)
    ; “Press any key to stop the music and return to the menu”
    exten => 1,n,MP3Player(/songs/09_policemen+pirates.mp3)
    exten => 1,n,Goto(vpjb,s,1)

    exten => 2,1,Background(ajs_anykey)
    ; “Press any key to stop the music and return to the menu”
    exten => 2,n,MP3Player(/songs/15_distant_sun.mp3)
    exten => 2,n,Goto(vpjb,s,1)

    exten => _X,1,Hangup()

  • hi i follow your dialplan but the issue still the same ican’t stop the speech and go to another context

    any other idea please

    best regards .

    2013/11/28 A J Stiles

  • ​My guess is that your DTMF tones are not reaching Asterisk. Seen it many times.

    Study the path whereby the DTMF is generated and recognized and processed by Asterisk. What kind of device are you using? Dahdi? SIP? You can use the rtp set debug to see if the DTMF is coming thru; look at your channel config, there may be something there that might prevent DTMF. Same with the phone settings.

    Best of Luck,


  • thanks steve for your response i use dahdi. and in my sip.conf i have dtmfmode=auto

    idon’t know if i must to put relaxdtmf=yes ? in sip.conf or i need to it in another files

    FYI i have a diguim card with dahdi and asterisk 1.4

    thanks and regards

    2013/11/28 Steve Murphy

  • It sounds as thgough the DTMF tones are not being sent in a way that Asterisk is seeing …..

    What type of telephone technology are you using? Hardware SIP phones, software SIP phones, analogue phones via an FXS card, analogue phones via a SIP ATA? What codec are you using?

    If you make an extension-to-extension call, can you send DTMF tones down the line? Both ways around? Do they decode properly? (You can get a mobile phone app for this.)

  • hi

    yes if imake an extension-to-extension call, i can send DTMF, Both ways ===yes

    in my case i don’t need a Hardware SIP phone or a software SIP phones

    i have just a number 05xxxxxx600

    when the customer call this number i stor his number in my database and i call him later

    if he press 1 for xxxxxx 1 press 2 for yyyyyyy

    i sotre his phone number and his choice in my database

    for me the issue the customer he can nto wait the speech of unless xxxx and yyyy finished .

    best regards

    i use a diguim card with PRI

    2013/11/29 A J Stiles

  • Are you using a mp3 file?
    I have noticed that using control playback with a mp3 file I cannot use the keypad to control the playback

    —–Original Message—

  • Well, the Background() application should definitely allow you to interrupt a sound being played.

    One possibility is that DTMF tones being generated within a call are not reaching Asterisk. If you phone someone and then press keys in-call, do they hear the DTMF tones in their handset?

    What kind of phones are you using? Analogue phones via an ATA, SIP phones or something else?

    Have you a scrap PC on which you could temporarily install a newer Asterisk and Dahdi version and try my VPJB app again? (I don’t actually think your problem is caused by an out-of-date version, but it wouldn’t hurt to check.)

  • hello

    i add the following in chan_dahdi and the issue has been solved thanks a lot for your help and support now ican stop the speech and go to my context

    i really appreciate your help and support

    2013/11/29 Mitul Limbani

  • hello

    i add the following in chan_dahdi and the issue has been solved thanks a lot for your help and support now ican stop the speech and go to my context

    i really appreciate your help and support

    immediate = yes echocancel = no dtmfmode = auto

    ———- Forwarded message ——–

  • Sounds cool, I suspected the echo cancel situation, these are usually issue even for FAX communication on dahdi.


  • hello list

    i have one question related to the IVR below

    exten => 600,1,Ringing()
    exten => 600,n,Wait(2)
    exten => 600,n,Goto(home,s,1)

    how can i ask the customer to enter a password before to go to (home,s,1)

    and where i must to store a password for example password 1234

    if the customer enter 1234 he can Goto(home,s,1) and if the password is wrong i playback an error message

    exten => 600,1,Ringing()
    exten => 600,n,Wait(2)
    the customer must enter 1234 if yes go to (home,s,1) if no go to error exten => 600,n,Goto(home,s,1)


    exten => s,1,SetGlobalVar(sounds_path=/var/lib/asterisk/sounds/)
    exten => s,n,Background(${sounds_path}error

    any example would be appreciated

    2013/11/29 Mitul Limbani

  • That’s 3 questions 🙂

    You need to provide more details.

    Is the password fixed or stored in a database? Is it the same as their voicemail password?

    There are examples for all these scenarios. Goggle about, read ATFOT, visit or use the Asterisk ‘help’ commands.

    Why are you fiddling with global variables? Isn’t
    ‘/var/lib/asterisk/sounds/’ your ‘default’ sounds path?

    Please don’t top post.

    Please trim irrelevent cruft from previous posts.

    Please don’t burn all your karma points asking simple questions.

  • hello johan,

    i use Authenticate and i get what i want thank you so much for your help 🙂

    exten => 600,1,Ringing(2)
    exten => 600,n,Answer exten => 600,n,Authenticate(1234)
    exten => 600,n,Goto(home,s,1)

    2013/12/5 Steve Edwards