Return to IVR from voicemail not working

I have one IVR configured. This IVR has the “VM Return to IVR” option set. When I call the system the IVR greeting plays. I type in the extension of the party I want. It rings, goes to voicemail. I leave a voicemail and press # to end the voicemail. System asks me to save by pressing 1. Then it says it will return me to the main menu. However I get an error then regarding an invalid extension, and the option I created for “i” plays instead of the main IVR message.

Here is an extract from the end of the voicemail to the invalid extension (which I did not press on the keypad):

-- <DAHDI/1-1> Playing 'exited-vm-will-be-transfered' (language 'en')
-- <DAHDI/1-1> Playing 'silence/1' (language 'en')
-- Executing [vmret@from-did-direct:4] Goto("DAHDI/1-1", "ivr-5|return|1") in new stack
-- Goto (ivr-5,return,1)
-- Sent into invalid extension 'return' in context 'ivr-5' on DAHDI/1-1
-- Executing [i@ivr-5:1] Set("DAHDI/1-1", "LOOPCOUNT=1") in new stack
-- Executing [i@ivr-5:2] ExecIf("DAHDI/1-1", "1|Playback|invalid") in new stack
-- <DAHDI/1-1> Playing 'invalid' (language 'en')
-- Executing [i@ivr-5:3] GotoIf("DAHDI/1-1", "1?s|begin") in new stack
-- Goto (ivr-5,s,9)

What am I doing wrong?

do you have an exten called return in ivr-5?

could you post the snippet of the extensions.cfg for that?

This is in my /etc/asterisk/extensions_additional.conf file (no return):

[ivr-5]
include => ivr-5-custom
include => from-did-direct-ivr
include => app-directory
exten => #,1,dbDel(${BLKVM_OVERRIDE})
exten => #,n,Set(__NODEST=)
exten => #,n,Goto(app-directory,#,1)
exten => h,1,Hangup
exten => s,1,Set(MSG=custom/Thank_you_FHB&custom/Office_hours_Central&custom/If_you_know_the_extension)
exten => s,n,Set(LOOPCOUNT=0)
exten => s,n,Set(__DIR-CONTEXT=default)
exten => s,n,Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT})
exten => s,n,Set(_IVR_CONTEXT=${CONTEXT})
exten => s,n,GotoIf($["${CDR(disposition)}" = "ANSWERED"]?begin)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n(begin),Set(TIMEOUT(digit)=3)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,Set(__IVR_RETVM=RETURN)
exten => s,n,ExecIf($["${MSG}" != ""],Background,${MSG})
exten => s,n,WaitExten(,)
exten => hang,1,Playback(vm-goodbye)
exten => hang,n,Hangup
exten => 0,1,dbDel(${BLKVM_OVERRIDE})
exten => 0,n,Set(__NODEST=)
exten => 0,n,Goto(ext-group,1001,1)
exten => 1,1,dbDel(${BLKVM_OVERRIDE})
exten => 1,n,Set(__NODEST=)
exten => 1,n,Goto(from-did-direct,4357,1)
exten => 911,1,dbDel(${BLKVM_OVERRIDE})
exten => 911,n,Set(__NODEST=)
exten => 911,n,Goto(ext-group,1005,1)
exten => i,1,dbDel(${BLKVM_OVERRIDE})
exten => i,n,Set(__NODEST=)
exten => i,n,Goto(ivr-5,s,begin)
exten => t,1,dbDel(${BLKVM_OVERRIDE})
exten => t,n,Set(__NODEST=)
exten => t,n,Goto(ext-group,1001,1)
exten => fax,1,Goto(ext-fax,in_fax,1)

How do I define it? I am pretty sure this is a n00b question so a pointer to the relevant documentation would help as well.

It appears that you are running trixbox? atleast freepbx.

Did you edit and remove some lines from that block of code? When I created a ivr menu it created a section like what you posted but there is an extension called return. below is a snippet of the section…

exten => i,1,Playback(invalid) exten => i,n,Goto(loop,1) exten => t,1,Goto(loop,1) exten => loop,1,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1]) exten => loop,n,GotoIf($[${LOOPCOUNT} > 2]?hang,1) exten => loop,n,Goto(ivr-2,s,begin) exten => return,1,Set(MSG=) exten => return,n,Set(_IVR_CONTEXT=${CONTEXT}) exten => return,n,Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT_${CONTEXT}}) exten => return,n,Goto(ivr-2,s,begin) exten => fax,1,Goto(ext-fax,in_fax,1)

Notice the one called return, that tells it to go back to the ivr-2 at the beginning.

I am using Elastix/FreePBX yes. I do indeed not have those return statements in there. How can I make that the return goes to the main announcement? Currently it goes to a ring group. I added your statements but it just redirects to what seems to be IVR option 0, which goes to a ring group.

Also where in the front end should I make the changes to get this return statement as I am not supposed to edit that file directly under FreePBX as it is managed by the GUI?

Sorry, I couldn’t really tell you how you would need to get this corrected. I’ve only used freepbx enough to get so irritated with it, that I decided to not use it.

Have you tried going to the IVR entry screen and just changing a couple of the settings, saving and applying them? Then you could change them right back, but that might be enough to cause it to rewrite that section of the dialplan.