I have multiple phone numbers under the same SIP service provider.
Neet to have dial in rules when a direct number is being used. Thought I can do this very easily…
Using AsteriksNow GUI I was not able to do this at all.
So trying manually…
Starting situation generated by GUI:
[DID_trunk_1]
include = default
exten = _X.,1,Goto(default|6005|1)
exten = s,1,ExecIf($[ “${CALLERID(num)}”="" ],SetCallerPres,unavailable)
exten = s,2,ExecIf($[ “${CALLERID(num)}”="" ],Set,CALLERID(all)=unknown <0000000>)
exten = s,3,Goto(default|6005|1)
(all incoming calls are routed to 6005)
I thought I can do the trick just adding one rule by GUI:
[DID_trunk_1]
include = default
exten = _X.,1,Goto(default|6005|1)
exten = _0XXXXXXX50,1,Goto(default|6000|1)
exten = s,1,ExecIf($[ “${CALLERID(num)}”="" ],SetCallerPres,unavailable)
exten = s,2,ExecIf($[ “${CALLERID(num)}”="" ],Set,CALLERID(all)=unknown <0000000>)
exten = s,3,Goto(default|6005|1)
(All incoming calls are still routed to 6005)
So, I tried this:
[DID_trunk_1]
include = default
exten = _X.,1,Goto(default|6005|1)
exten = s,1,ExecIf($[ “${CALLERID(num)}”="" ],SetCallerPres,unavailable)
exten = s,2,ExecIf($[ “${CALLERID(num)}”="" ],Set,CALLERID(all)=unknown <0000000>)
exten = _0XXXXXXX50,3,Goto(default|6000|1)
exten = s,4,Goto(default|6005|1)
Incoming calls are rejected. Asterisk console says:
== Auto fallthrough, channel ‘SIP/0555555550-b5900dc0’ status is ‘UNKNOWN’
Anyway, incoming call rules are not working - at least the way AsteriskNow generates extension lines…
Maybe you can help me out. Thanks,
Axel