I’m setting up an Asterisk server in my home, and everything works beautifully except for one thing. I have a “menu” of internal extensions, including one for voicemail access, that I want to have accessible from both internal phones and outside callers. Outside callers press “9” when the line is ringing to access the menu, and accessing it from an inside phone involves dialing “00” (I’m not wanting to require 9 for outside access here), then a voice prompt, then dialing the extension. I’ll probably remove the menu from the incoming call handler until I have more extensions than DIDs, and in that case I’d make some form of it the default for the main DID, but for now it’s being used to test the dialplan.
Accessing the menu from outside works very well, but not so much from inside. I dial “00”, get the prompt, and enter the extension to call… only to fall into the timeout sequence. Any idea why this might be happening? I’m pasting the relevant parts of the dialplan below. The “extvoicecall” macro is used to handle incoming calls.
[internal]
exten => 00,1,NoOp()
exten => 00,n,Goto(ext_menu,s,1)
[macro-extvoicecall]
exten => s,1,Answer()
exten => s,n,Set(EXITCONTEXT=ext_menu_start)
exten => s,n,Dial(SIP/phone-${ARG1},10,d)
exten => s,n,VoiceMail(${ARG1}@default)
exten => s,n,Hangup()
[ext_menu_start]
exten => 9,1,Goto(ext_menu,s,1)
[ext_menu]
exten => s,1,Background(enter-ext-of-person)
exten => s,n,WaitExten(15)
exten => 999,1,VoiceMailMain()
exten => 999,n,Hangup()
exten => i,1,Playback(pbx-invalid)
exten => i,n,Goto(ext_menu,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()
The only difference I can think of between incoming and internal callers is that I get the following messages when an incoming caller presses “9”, before the menu sequence starts:
-- User hit 9 to disconnect call.
== CDR updated on …
I have a feeling that has a lot to do with it working for incoming calls, but I don’t know how to replicate or replace what it may be doing for internal callers.