public String encode(JainMgcpResponseEvent event) { CreateConnectionResponse response = (CreateConnectionResponse) event; ReturnCode returnCode = response.getReturnCode(); StringBuffer s = new StringBuffer(); s.append(returnCode.getValue()).append(SINGLE_CHAR_SPACE).append(response.getTransactionHandle()).append( SINGLE_CHAR_SPACE).append(returnCode.getComment()).append(NEW_LINE); if (response.getConnectionIdentifier() != null) { s.append("I: ").append(response.getConnectionIdentifier()).append(NEW_LINE); } if (response.getSpecificEndpointIdentifier() != null) { s.append("Z: ").append(response.getSpecificEndpointIdentifier()).append(NEW_LINE); } if (response.getSecondConnectionIdentifier() != null) { s.append("I2: ").append(response.getSecondConnectionIdentifier()).append(NEW_LINE); } if (response.getSecondEndpointIdentifier() != null) { s.append("Z2: ").append(response.getSecondEndpointIdentifier()).append(NEW_LINE); } if (response.getLocalConnectionDescriptor() != null) { s.append(NEW_LINE).append(response.getLocalConnectionDescriptor()); } return s.toString(); }
@Override public void execute(final Object message) throws Exception { final CreateConnectionResponse response = (CreateConnectionResponse) message; if (connId == null) { connId = response.getConnectionIdentifier(); } localDesc = response.getLocalConnectionDescriptor(); // If the end point ends with a wild card we should update it. if (endpointId.getLocalEndpointName().endsWith("$")) { endpointId = response.getSpecificEndpointIdentifier(); endpoint.tell(new UpdateEndpointId(endpointId), source); } } }
@Override public void execute(final Object message) throws Exception { final CreateConnectionResponse response = (CreateConnectionResponse) message; if (connId == null) { connId = response.getConnectionIdentifier(); } localDesc = response.getLocalConnectionDescriptor(); // If the end point ends with a wild card we should update it. if (endpointId.getLocalEndpointName().endsWith("$")) { endpointId = response.getSpecificEndpointIdentifier(); endpoint.tell(new UpdateEndpointId(endpointId), source); } } }
if (response.getSpecificEndpointIdentifier() != null) totalLength+=EndpointIdentifierHandler.encode(array,totalLength,response.getSpecificEndpointIdentifier());
private void created(final CreateConnectionResponse response) { connectionId = response.getConnectionIdentifier(); localDescriptor = response.getLocalConnectionDescriptor(); endpoint.updateId(response.getSpecificEndpointIdentifier()); if(remoteDescriptor != null) { setState(OPEN); fireOpen(); } else { setState(HALF_OPEN); fireHalfOpen(); } }
if (response.getSpecificEndpointIdentifier() != null) totalLength+=EndpointIdentifierHandler.encode(array,totalLength,response.getSpecificEndpointIdentifier());
primaryEndpointId = response.getSpecificEndpointIdentifier(); primaryEndpoint.tell(new UpdateEndpointId(primaryEndpointId), source);
public void processMgcpResponseEvent(JainMgcpResponseEvent evt) { CreateConnectionResponse resp = (CreateConnectionResponse) evt; switch (resp.getReturnCode().getValue()) { case ReturnCode.TRANSACTION_BEING_EXECUTED: return; case ReturnCode.TRANSACTION_EXECUTED_NORMALLY: containers[0].setConcreteName(resp.getSpecificEndpointIdentifier()); containers[1].setConcreteName(resp.getSecondEndpointIdentifier()); connections[0] = resp.getConnectionIdentifier(); connections[1] = resp.getSecondConnectionIdentifier(); try { signal("success"); } catch (Exception e) { } break; default: try { signal("failure"); } catch (Exception e) { } } }
public void processMgcpResponseEvent(JainMgcpResponseEvent evt) { CreateConnectionResponse resp = (CreateConnectionResponse) evt; switch (resp.getReturnCode().getValue()) { case ReturnCode.TRANSACTION_BEING_EXECUTED: return; case ReturnCode.TRANSACTION_EXECUTED_NORMALLY: containers[0].setConcreteName(resp.getSpecificEndpointIdentifier()); containers[1].setConcreteName(resp.getSecondEndpointIdentifier()); connections[0] = resp.getConnectionIdentifier(); connections[1] = resp.getSecondConnectionIdentifier(); try { signal("success"); } catch (Exception e) { } break; default: try { signal("failure"); } catch (Exception e) { } } }
EndpointIdentifier specificEndpointId = ccResponse.getSpecificEndpointIdentifier(); if (specificEndpointId != null && this.endpointId.compareTo(specificEndpointId.toString()) == 0) {
case ReturnCode.TRANSACTION_EXECUTED_NORMALLY : connection.connectionID = resp.getConnectionIdentifier(); connection.setConcreteName(resp.getSpecificEndpointIdentifier());
case ReturnCode.TRANSACTION_EXECUTED_NORMALLY : connection.connectionID = resp.getConnectionIdentifier(); connection.setConcreteName(resp.getSpecificEndpointIdentifier());
case ReturnCode.TRANSACTION_EXECUTED_NORMALLY: this.setEndpointName(event.getSpecificEndpointIdentifier().getLocalEndpointName());
case ReturnCode.TRANSACTION_EXECUTED_NORMALLY: this.setEndpointName(event.getSpecificEndpointIdentifier().getLocalEndpointName()); logger.info("***&& " + this.getEndpointName());
IVR_ENDPOINT_NAME, mmsBindAddress + ":" + MGCP_PEER_PORT); CreateConnection createConnection = new CreateConnection(this, getCallIdentifier(), event .getSpecificEndpointIdentifier(), ConnectionMode.Confrnce); }else eid = event.getSpecificEndpointIdentifier();