[SOLVED] Dialplan fails?

Hello all.

I’m running Asterisk 1.4.8, and trying to set up a simple menu (eventually I’ll be adding voicemail, but that’s later).

Anyway, here’s what I have so far in extensions.conf:

exten => s,1,Answer()
exten => s,2,Background(/mnt/vm/outgoing/000)
exten => t,2,Goto(menu2,2,1)
exten => s,3,Waitexten(30)
exten => s,4,Playback(/mnt/vm/outgoing/999)
exten => s,5,Hangup()

exten => 2,1,Background(/mnt/vm/outgoing/002)
exten => 2,2,Read(REPEAT)
exten => 2,3,Gotoif($[${REPEAT}=1]?menu2,2,1)
exten => 2,4,Gotoif($[${REPEAT}=0]?incoming,s,2)
exten => 2,5,Waitexten(10)
exten => 2,6,Playback(/mnt/vm/outgoing/999)
exten => 2,7,Hangup()

BUT, whenever I call in and choose option 2, I get hung up on, and the CLI gives me this:

WARNING[4974]: pbx.c:2437 __ast_pbx_run: Channel ‘Zap/1-1’ sent into invalid extension ‘2’ in context ‘incoming’, but no invalid handler
– Hungup ‘Zap/1-1’

Any ideas on how to resolve this?

Thanks in advance!

As the error message says, your incoming context lacks an extension 2. Try adding something like this to your incoming context:

exten => 2,1,Background(/mnt/vm/outgoing/002)

Ah, I see! :smile: Thank you!