« Back to Cisco JTAPI Questions

RE: InvalidStateExceptionImpl: Could not meet post conditions of generateDT

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
I am working on an IVR program and I am having an unexplained error when I try to send DTMF. I am only sending my DTMF string after I first receive a '#' tone from the other end. When the '#' is received the program correclty tries to send my DTMF string as shown below.
 


try{
        CiscoCall call = (CiscoCall)((MediaTermConnDtmfEv)ce).getCall();
        TerminalConnection tc = call.getCallingTerminal().getTerminalConnections()[1];
        ((MediaTerminalConnection)tc).generateDtmf(message);
}
catch(Exception e){
LOG.error(e);
throw new TransferCallException(
"Unable to play dtmf message",
TransferCallError.UNABLE_TO_PLAY_DTMF,
e
);
}


 
Every time the program reaches the line with "generateDtmf(message)" it throws the following error:
InvalidStateExceptionImpl: Could not meet post conditions of generateDTMF()
 
Can anyone tell me what the post conditions are of generateDtmf()? Has anyone had success resolving this error?
 
Java version: 1.6
Call manager: 7.1.5.34900-7

You code needs a lot of things:
* you have terminal and address observers on voice port/terminal
* you have 2 (and only 2) calls in progress on said terminal/address, second call is outgoing
* you do not receive # on incoming call, only on outgoing call
Is it the case?