Thanks for your answers.
We found that call is actually is routed by incoming route to a trunk.
The configuration is like this.
We have CUCM connected to a FreePBX. FreePBX is connected to a Provider and to a GSM Gateway.
We need calls from some extensions, created on CUCM to be routed to:
- GSM for mobile calls;
- Provider for local, national and international calls.
Calls from other CUCM extensions should be routed differently.
Now we can not route mobile calls from caller 135 to GSM Gateway.
How can we choose inbound route by CallerID?
– Executing [5XXXXXX@from-sip-external:1] NoOp(“SIP/172.16.16.10-00000a6b”, “Received incoming SIP connection from unknown peer to 5XXXXXX”) in new stack
– Executing [5XXXXXX@from-sip-external:2] Set(“SIP/172.16.16.10-00000a6b”, “DID=5XXXXXX”) in new stack
– Executing [5XXXXXX@from-sip-external:3] Goto(“SIP/172.16.16.10-00000a6b”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/172.16.16.10-00000a6b”, “1?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] GotoIf(“SIP/172.16.16.10-00000a6b”, “1?setlanguage:from-trunk,5XXXXXX,1”) in new stack
– Goto (from-sip-external,s,3)
– Executing [s@from-sip-external:3] Set(“SIP/172.16.16.10-00000a6b”, “CHANNEL(language)=en_GB”) in new stack
– Executing [s@from-sip-external:4] Goto(“SIP/172.16.16.10-00000a6b”, “from-trunk,5XXXXXX,1”) in new stack
– Goto (from-trunk,5XXXXXX,1)
– Executing [5XXXXXX@from-trunk:1] Set(“SIP/172.16.16.10-00000a6b”, “__DIRECTION=INBOUND”) in new stack
– Executing [5XXXXXX@from-trunk:2] Set(“SIP/172.16.16.10-00000a6b”, “__FROM_DID=5XXXXXX”) in new stack
– Executing [5XXXXXX@from-trunk:3] Goto(“SIP/172.16.16.10-00000a6b”, “s,1”) in new stack
– Goto (from-trunk,s,1)
– Executing [s@from-trunk:1] Set(“SIP/172.16.16.10-00000a6b”, “__DIRECTION=INBOUND”) in new stack
– Executing [s@from-trunk:2] Gosub(“SIP/172.16.16.10-00000a6b”, “app-blacklist-check,s,1()”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“SIP/172.16.16.10-00000a6b”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:2] Set(“SIP/172.16.16.10-00000a6b”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/172.16.16.10-00000a6b”, “”) in new stack
– Executing [s@from-trunk:3] ExecIf(“SIP/172.16.16.10-00000a6b”, “0?Set(__FROM_DID=s)”) in new stack
– Executing [s@from-trunk:4] Set(“SIP/172.16.16.10-00000a6b”, “CDR(did)=5XXXXXX”) in new stack
– Executing [s@from-trunk:5] ExecIf(“SIP/172.16.16.10-00000a6b”, “0 ?Set(CALLERID(name)=135)”) in new stack
– Executing [s@from-trunk:6] Set(“SIP/172.16.16.10-00000a6b”, “__MOHCLASS=”) in new stack
– Executing [s@from-trunk:7] Set(“SIP/172.16.16.10-00000a6b”, “__REVERSAL_REJECT=FALSE”) in new stack
– Executing [s@from-trunk:8] GotoIf(“SIP/172.16.16.10-00000a6b”, “1?post-reverse-charge”) in new stack
– Goto (from-trunk,s,10)
– Executing [s@from-trunk:10] NoOp(“SIP/172.16.16.10-00000a6b”, “”) in new stack
– Executing [s@from-trunk:11] Set(“SIP/172.16.16.10-00000a6b”, “__CALLINGNAMEPRES_SV=allowed_not_screened”) in new stack
– Executing [s@from-trunk:12] Set(“SIP/172.16.16.10-00000a6b”, “__CALLINGNUMPRES_SV=allowed_not_screened”) in new stack
– Executing [s@from-trunk:13] Set(“SIP/172.16.16.10-00000a6b”, “CALLERID(name-pres)=allowed_not_screened”) in new stack
– Executing [s@from-trunk:14] Set(“SIP/172.16.16.10-00000a6b”, “CALLERID(num-pres)=allowed_not_screened”) in new stack
– Executing [s@from-trunk:15] NoOp(“SIP/172.16.16.10-00000a6b”, “CallerID Entry Point”) in new stack
– Executing [s@from-trunk:16] Goto(“SIP/172.16.16.10-00000a6b”, “ext-trunk,2,1”) in new stack
– Goto (ext-trunk,2,1)
– Executing [2@ext-trunk:1] Set(“SIP/172.16.16.10-00000a6b”, “TDIAL_STRING=SIP/Route-OUT”) in new stack
– Executing [2@ext-trunk:2] Set(“SIP/172.16.16.10-00000a6b”, “DIAL_TRUNK=2”) in new stack
– Executing [2@ext-trunk:3] Goto(“SIP/172.16.16.10-00000a6b”, “ext-trunk,tdial,1”) in new stack
– Goto (ext-trunk,tdial,1)
– Executing [tdial@ext-trunk:1] Set(“SIP/172.16.16.10-00000a6b”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [tdial@ext-trunk:2] GotoIf(“SIP/172.16.16.10-00000a6b”, “0?nomax”) in new stack
– Executing [tdial@ext-trunk:3] GotoIf(“SIP/172.16.16.10-00000a6b”, “0?hangit”) in new stack
– Executing [tdial@ext-trunk:4] ExecIf(“SIP/172.16.16.10-00000a6b”, “1?Set(CALLERPRES(name-pres)=allowed_not_screened)”) in new stack
– Executing [tdial@ext-trunk:5] ExecIf(“SIP/172.16.16.10-00000a6b”, “1?Set(CALLERPRES(num-pres)=allowed_not_screened)”) in new stack
– Executing [tdial@ext-trunk:6] Set(“SIP/172.16.16.10-00000a6b”, “DIAL_NUMBER=5XXXXXX”) in new stack
– Executing [tdial@ext-trunk:7] GosubIf(“SIP/172.16.16.10-00000a6b”, “1?sub-flp-2,s,1()”) in new stack
– Executing [s@sub-flp-2:1] ExecIf(“SIP/172.16.16.10-00000a6b”, “0?Set(TARGET_FLP_2=05XXXXXX)”) in new stack
– Executing [s@sub-flp-2:2] GotoIf(“SIP/172.16.16.10-00000a6b”, “0?match”) in new stack
– Executing [s@sub-flp-2:3] Return(“SIP/172.16.16.10-00000a6b”, “”) in new stack
– Executing [tdial@ext-trunk:8] Set(“SIP/172.16.16.10-00000a6b”, “OUTNUM=5XXXXXX”) in new stack
– Executing [tdial@ext-trunk:9] Set(“SIP/172.16.16.10-00000a6b”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [tdial@ext-trunk:10] Dial(“SIP/172.16.16.10-00000a6b”, “SIP/Route-OUT/5XXXXXX,300,T”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/Route-OUT/5XXXXXX
– Got SIP response 603 “Declined” back from 169.169.169.169:5060
– SIP/Route-OUT-00000a6c is busy
== Everyone is busy/congested at this time (1:1/0/0)
– Executing [tdial@ext-trunk:11] Set(“SIP/172.16.16.10-00000a6b”, “CALLERID(number)=135”) in new stack
– Executing [tdial@ext-trunk:12] Set(“SIP/172.16.16.10-00000a6b”, “CALLERID(name)=Di Di”) in new stack
– Executing [tdial@ext-trunk:13] Hangup(“SIP/172.16.16.10-00000a6b”, “”) in new stack
== Spawn extension (ext-trunk, tdial, 13) exited non-zero on ‘SIP/172.16.16.10-00000a6b’