Weird dialplan behaviour with inbound calls

Below is the cli output when the dialplan was mixed up in some way and as it is supposed to work. The incoming call is “catchedâ€

Can you send your extensions.conf file, or whatever shows the inbound and outbound contexts?

Do you have a [general] context in your sip.conf? Can you paste that configuration as well?

This is it . Not really much of a dial plan. I have removed some parts that aren’t related to the the question but I checked and rechecked them to see if something strange was to be seen. I’m not a newbe if it comes to Asterisk and my question was actually if it is a rare but kwown thing to happen (this mixed up dialplan thing) or that it is completely unknown.

I believe it because I saw it happening but it is very, very weird.

I checked the general part of sip.conf and there was a context=outbound but all the sip entries had context=inbound. Maybe this causes the problem under certain circumstances. I changed it and we will see!

[globals]
language=nl

[general]
static=yes
writeprotect=yes

[test] ;
exten => _X.,1,Answer()
exten => _X.,n,MusicOnHold()
exten => _X.,n,Hangup()

[thuis]
exten => s,1,Answer()
exten => s,n,Dial(SIP/504&SIP/505,40,rt)
exetn => s,n,Voicemail(505)
exten => s,n,Hangup()

[outbound]
;;;;;;;;;;;;;;;
; naar buiten bellen
;;;;;;;;;;;;;;;

exten => _XXXXXXX.,1,NoOp(Naar buiten bellen start)
exten => _XXXXXXX.,n,Dial(SIP/31592111111/${EXTEN},40,t)
exten => _XXXXXXX.,n,Hangup()

exten => h,1,NoOp(dialedtime ${DIALEDTIME}**)
exten => h,n,NoOp(answeredtime ${ANSWEREDTIME}
)

[inbound]

exten => 31592111111,1,Goto(thuis,s,1)

exten => 31208011112,n,Answer()
exten => 31208011112,n,MusicOnHold()

exten => 31208011112,n,Hangup()

exten => 31208011113,1,Answer()
exten => 31208011113,n,Goto(main_menu,s,1)
exten => 31208011113,n,Hangup()

Hopefully that will do the trick. Strange problem though. Let us know how it turns out.