This may be helpful for those of you who want to test application scripts on a CME environment, this may be confusing so follow along.
Say you have a voice application, and you need to test it on an inbound voip call leg. CME gives you no easy way to do this. With full CUCM your calls from the voice server come in on an inbound voip leg, which you can easily control. With CME, calls actually do come in on a VoIP call leg, but its a hidden peer which you do not have the ability to modify. So what you must do is call yourself.
In this example you want to run a voice application, and voice applications run on a voip dial peer. And you want the call to go out an FXS port. But since your a phone registered to the CME how can you make your call go through a voip dial peer? You call yourself. So say the endusers are to dial 1001. What you need to do is setup like so:
voice translation-rule 2
rule 1 /1001/ /1002/
voice translation-profile 2
translate called 2
service myapplication flash://myapplication.tcl
dial-peer voice 200 pots
dial-peer voice 300 voip
translation-profile outgoing 2
session target ipv4:172.16.2.2 <————- This is the CME’s IP address
dial-peer voice 301 voip
incoming called-number 1002
So you call 1001, it matches an outgoing voip dial peer, which then translates the called number so now you go inbound on another voip dial peer, which then goes outbound to your pots dial peer. This is pretty crazy, but if you think about how dial-peers work in CME it seems to be the only way.
We use incoming called-number to make sure our re-routed call comes in on this peer.
Why would you need to do this? Well for one, to test TCL applications. Maybe you have a CME available to you, but you don’t have a CUCM environment……although these days, with virtualization most people do have a test CUCM at their disposal. The other reason, would be you actually want to run the TCL application on CME. For example say you have a TCL application that supervises the FXS line and hangs it up after a set timeout. This is useful if your using like a page port tied to an FXS, and you don’t want it to get “stuck”. Some page units don’t properly supervise the line, and can get confused…….this is just an example. You can use this re-routing of traffic in any voip application scenario.