Having researched this issue, I came across this thread online..
There is no way for CCME/CUCM to route calls based on TO field. You can use TCL scripts but be mindful it can cause other issues. Your best bet is to speak to your provider to see if they can modify the Request-URI field to match the TO field
I just worked with the CUBE BU, CUSP BU, Cisco Advanced Services, TAC, and my Channel SE team about this.
Bottom line, CUBE and CUCM cannot route on the TO field.
We ran into the same issue. Telco wanted to send a generic request-URI and have us route on the TO field. The Cisco Unified Sip Proxy server can do this. However, CUBE, CUCM, CVP etc. cannot. And yes, I did get my hands on a TCL script for CUBE, which worked on the inbound to replace the Request-URI with the TO field so everything else would work. BUT, we ran into other issues.
For example, when routing to a busy phone or a non-registered phone, the SIP messages would die at CUBE. CUBE with the TCL script would not pass them back to the SIP Proxy or back to the Telco. Cisco said that the TCL script (which they provided) is not supported and that I needed to engage development to come up with a script that will take into consideration all the SIP Messages.
Also, neither CUSP, CUBE, nor CUCM can replace the Request-URI with the value in the TO field.
The telco did come through with a way that they can replace the Request-URI with the DNIS when routing calls in. Hooray for Verizon.
Please rate all useful posts
"opportunity is a haughty goddess who waste no time with those who are unprepared"
The problem is, the IOS gateway use the INVITE sip tag to do the call routing, as is part of the SIP RFC. Only a SIP normalisation (copy the TO: or P-preferd tag to INVITE)will help.
For the CUCM-IOS gateway-SIP you can upgrade the gateway with a CUBE license and do the normalisation or wait for the TCL script mention above.
Sent from Cisco Technical Support iPad App
Thanks for TCL script.
But I asked my SP to change scheme from sip-ua registration to sip trunk with auth by ip address.
After this change incoming calls started to come with correct number in INVITE sip tag.
So now gateway routes these calls correctly.
Thanks everybody for help and recomendations.