Fast and simple question: suppose this simple extensions.conf
[local]
exten=>500,1,Noop(UnixTime)
exten=>500,n,SayUnixTime(,EST5EDT)
exten=>500,n,NoOp(demo-echotest)
exten=>500,n,Playback(demo-echotest)
exten=>500,n(echo),Echo()
exten=>500,n,Playback(demo-echodone)
exten=>500,n,Hangup()
[sip]
exten => _X.,1,NoOp()
same => n,Dial(PJSIP/${EXTEN}@asterisk01,30,tTkK)
same => n,Hangup()
exten = s,1,NoOp()
same => n,Dial(PJSIP/telefono1&DAHDI/1,30,tTkK)
same => n,Hangup()
[from-dahdi]
include => local
include => sip
exten => 4001,1,Dial(dahdi/1,10,t,m)
;exten => 1004,2,Voicemail(1004@local)
exten => 4001,3,Hangup
exten => s,n,Answer()
exten => s,n,Dial(Local/${EXTEN},10,t,m)
exten => s,n,Hangup()
Works fine, but If I call the 500 to hear echo test…it use my sip (voip TELCO) line!
Is possible to prioritize the context?
For example…
I call 500, if is in the local context it answer, otherwise use SIP context.
I know is possible to use the patterns:
_XXXXX.
But some number in my country (info, emergency, etc) are 4 and even 3 digits.