Ejemplo n.º 1
0
 public void processMgcpResponseEvent(JainMgcpResponseEvent jainmgcpresponseevent) {
   logger.debug("processMgcpResponseEvent = " + jainmgcpresponseevent);
   switch (jainmgcpresponseevent.getObjectIdentifier()) {
     case Constants.RESP_MODIFY_CONNECTION:
       if (jainmgcpresponseevent.getReturnCode().getValue()
               == ReturnCode.ENDPOINT_INSUFFICIENT_RESOURCES
           || jainmgcpresponseevent.getReturnCode().getValue()
               == ReturnCode.TRANSACTION_EXECUTED_NORMALLY) {
         responseReceived = true;
       }
       break;
     default:
       logger.warn("This RESPONSE is unexpected " + jainmgcpresponseevent);
       ModifyConnectionTest.fail("Incorrect response for MDCX command ");
       responseReceived = false;
       break;
   }
 }
Ejemplo n.º 2
0
  public void processMgcpResponseEvent(JainMgcpResponseEvent event) {
    JainMgcpListener handler = null;

    // we are considering transaction completed if any response received except provisional
    // listener related to completed transaction must be derigistered
    if (event.getReturnCode() != ReturnCode.Transaction_Being_Executed) {
      handler = txListeners.remove(event.getTransactionHandle());
    } else {
      handler = txListeners.get(event.getTransactionHandle());
    }

    // unknown transaction?
    if (handler == null) {
      return;
    }

    // deliver event to tx handler
    handler.processMgcpResponseEvent(event);
  }