« Back to Cisco JTAPI Questions

change ANI on redirect from RP

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,

I need to do the folloing on my jtapi application.

DN is forwarded to the RP that I have registered.
but I want to be able to bypass that call forward from some numbers.
for example.
DN 1001 CFA to 1000 (RP).
if I call from 1002 to 1001 it should not forward.

is it possible to do at all?

What I tried to do is the following.
when the call is forwarded from 1001 to 1000, I am trying to redirect it back to 1001.
and take advantage of "Call Forward Override" feature.
basically before redirecting the call from 1000 to 1001 I want to change the calling number to 1000, so for CUCM it will look like 1000 is calling to 1001 therefore no forwarding will happen.

in jtapi documentation I found this option:
"Modifying Calling Number" chapter.

and when I register RP, I register RouteCallback with my class as well which implements RouteCallback interface.


    private class myCallBack implements RouteCallback {

        @Override
        public void reRouteEvent(ReRouteEvent arg0) {
            // TODO Auto-generated method stub
            System.out.println("reRouteEvent");
        }

        @Override
        public void routeCallbackEndedEvent(RouteCallbackEndedEvent arg0) {
            // TODO Auto-generated method stub
            System.out.println("routeCallbackEndedEvent");
        }

        @Override
        public void routeEndEvent(RouteEndEvent arg0) {
            // TODO Auto-generated method stub
            System.out.println("routeEndEvent");
        }

        @Override
        public void routeEvent(RouteEvent arg0) {
//            TODO Auto-generated method stub
            System.out.println("routeEvent");
        }

        @Override
        public void routeUsedEvent(RouteUsedEvent arg0) {
            System.out.println("routeUsedEvent");
        }
       
    }
}

from what I understand, I should change the calling number on RouteUsedEvent.
but on the incoming call, I do not get that triggered.
I get RouteEvent triggered, I get routeEndEvent.
but I never get routeUsedEvent.

Can you please let me know what I'm doing wrong?
CUCM is version 8.6

Thank you,