[...]
Prior to UCM8.0, the only way to intercept calls is to configure a route pattern to send all matching calls to an app controlled CTI route point. When the call arrives at the CTI-RP your app can check the caller/called IDs and make its decision on routing - either redirect it towards the intended destination, reject it, or apply treament (audio message, etc.). This works, but introduces a dependency on your app: if your app is down, all calls matching the route pattern may fail.
Thank you for your suggestions.
I currently use UCM 7.0.2, so I tried CTI-RP way, but I could not get any event from my application.
Here's a snippet of what I do:
- first, register CTI-RP (capabilities is an array of Cisco G711, G723, G729 capability instances)
ciscoRouteTerm.register(capabilities, CiscoRouteTerminal.NO_MEDIA_REGISTRATION);
- then, I add a CallControlCallObserver implementation, plus a CiscoTerminalObserver impl
ciscoRouteTerm.addObserver(new TermObserver());
ciscoRouteTerm.addCallObserver(new CTICallObserver());
I get immediately a com.cisco.jtapi.CiscoTermInServiceEvImpl event on terminal observer; however, when I try to make call from a Cisco IP Communicator to CTI-RP's DN, busy status is shown, with no events routed to call observer.
Am I missing something? Perhaps there's some role to be assigned to my test user in order to receive call notifications on CTI-RP ?
Regards.
P.S. I was a bit puzzled by a strange message about CTI-RP "not being in provider's domain" most of times, even when I gave to my test user full access permissions. Then, I realized that when my application started too fast, no terminals were seemingly available to provider; so, I put as first operation on provider a loop introducing Thread.sleep() calls until getTerminals() returns correct, not-null answer. Is this normal behavior or a bug of my implementation?