« Back to Cisco JTAPI Questions

Call Monitoring fails when calling an outside line

Combination View Flat View Tree View
Threads [ Previous | Next ]
I've got a CiscoRouteTerminal that I am using to silently monitor calls from a group of terminals.  I can monitor calls from terminals just fine when calling from one terminal to another, but when a terminal dials outside the system startMonitor(...) throws this exception: "InvalidStateExceptionImpl:  Primary call is not in valid state".  As far as I can tell the call state is the same as it is when dialing to another terminal.  Is there a setting somewhere on the CUCM that I need to adjust?
Thanks,
Joaquin Luna

Events will be somewhat different for terminals where JTAPI is 'simulating' call state - e.g. external calls.  You may want to compare the sequence of events between the two scenarios. 
 
For more concrete help, you'll need to provide some more details about what events you are seeing, what methods are failing, and possibly attach JTAPI trace logs.

I was able to get my code working by keying off of a different event. I was using ConnConnectedEv then checking call.getState() == Call.ACTIVE and ensuring that each connection connection.getState() == Connection.CONNECTED but that only worked when calling inside the cisco system. I modified my code to do the same checks but instead of using the ConnConnectedEv I started using the CallCtlConnEstablishedEv. This solved my problem. I'm not sure if its the best way to do this, but it's worked so far.

- Joaquin Luna