@Override public JainMgcpResponseEvent getProvisionalResponse() { CreateConnectionResponse provisionalResponse = null; if (!sent) { ConnectionIdentifier connectionIdentifier = new ConnectionIdentifier("1"); provisionalResponse = new CreateConnectionResponse(source != null ? source : stack,ReturnCode.Transaction_Being_Executed, connectionIdentifier); provisionalResponse.setTransactionHandle(remoteTID); } return provisionalResponse; } }
@Override public JainMgcpResponseEvent getProvisionalResponse() { CreateConnectionResponse provisionalResponse = null; if (!sent) { // TODO We are hardcoding connectionIdentifier here. This would // differ from final response. Problem? ConnectionIdentifier connectionIdentifier = new ConnectionIdentifier("1"); provisionalResponse = new CreateConnectionResponse(source != null ? source : stack, ReturnCode.Transaction_Being_Executed, connectionIdentifier); provisionalResponse.setTransactionHandle(remoteTID); } return provisionalResponse; }
@Override public JainMgcpResponseEvent getProvisionalResponse() { CreateConnectionResponse provisionalResponse = null; if (!sent) { ConnectionIdentifier connectionIdentifier = new ConnectionIdentifier("1"); provisionalResponse = new CreateConnectionResponse(source != null ? source : stack,ReturnCode.Transaction_Being_Executed, connectionIdentifier); provisionalResponse.setTransactionHandle(remoteTID); } return provisionalResponse; } }
/** * Receive notification of the header of a message. Parser will call * this method to report about header reading. * * @param header * the header from the message. */ public void header(String header) throws ParseException { String[] tokens = utils.splitStringBySpace(header); int tid = Integer.parseInt(tokens[1]); response = new CreateConnectionResponse(source != null ? source : stack, utils.decodeReturnCode(Integer .parseInt(tokens[0])), new ConnectionIdentifier("00")); response.setTransactionHandle(tid); }
public JainMgcpResponseEvent decodeResponse(byte[] data,SplitDetails[] msg,Integer txID,ReturnCode returnCode) throws ParseException { response = new CreateConnectionResponse(source != null ? source : stack, returnCode, new ConnectionIdentifier("00")); response.setTransactionHandle(txID); try { (new ResponseContentHandle()).parse(data,msg); } catch (IOException e) { logger.error("Decode of CRCX Response failed ", e); } return response; }
public JainMgcpResponseEvent decodeResponse(byte[] data,SplitDetails[] msg,Integer txID,ReturnCode returnCode) throws ParseException { response = new CreateConnectionResponse(source != null ? source : stack, returnCode, new ConnectionIdentifier("00")); response.setTransactionHandle(txID); try { (new ResponseContentHandle()).parse(data,msg); } catch (IOException e) { logger.error("Decode of CRCX Response failed ", e); } return response; }
ConnectionIdentifier connId = new ConnectionIdentifier(buffer.toString()); final ReturnCode code = ReturnCode.Transaction_Executed_Normally; final CreateConnectionResponse response = new CreateConnectionResponse(self, code, connId);
break; case Constants.CMD_CREATE_CONNECTION: response = new CreateConnectionResponse(this, ReturnCode.Transient_Error, new ConnectionIdentifier(Long .toHexString(new Random(System.currentTimeMillis()).nextLong()))); break;
@Override protected void createConnection (final Object message, final ActorRef sender) { final jain.protocol.ip.mgcp.message.CreateConnection crcx = (jain.protocol.ip.mgcp.message.CreateConnection) message; if(logger.isInfoEnabled()) logger.info("createConnection: " +crcx.toString()); // check if its a conference and call link request if(crcx.getSecondEndpointIdentifier() != null && crcx.getSecondEndpointIdentifier().getLocalEndpointName() != null && crcx.getSecondEndpointIdentifier().getLocalEndpointName().contains("cnf")){ // if yes then fail this connection request if(logger.isInfoEnabled()) logger.info("got conference and call link request, will fail it! with error code Endpoint_Unknown"); StringBuilder buffer = new StringBuilder(); buffer.append(connectionIdPool.get()); ConnectionIdentifier connId = new ConnectionIdentifier(buffer.toString()); sender.tell(new CreateConnectionResponse(self(), ReturnCode.Endpoint_Unknown, connId), self()); }else { // if not then let daddy proceed with existing mocked mechanism. super.createConnection(message, sender); } } }
ConnectionIdentifier connId = new ConnectionIdentifier(buffer.toString()); final ReturnCode code = ReturnCode.Transaction_Executed_Normally; final CreateConnectionResponse response = new CreateConnectionResponse(self, code, connId);
break; case Constants.CMD_CREATE_CONNECTION: response = new CreateConnectionResponse(this, ReturnCode.Transient_Error, new ConnectionIdentifier(Long .toHexString(new Random(System.currentTimeMillis()).nextLong()))); break;
break; case Constants.CMD_CREATE_CONNECTION: response = new CreateConnectionResponse(this, ReturnCode.Transient_Error, new ConnectionIdentifier(Long .toHexString(new Random(System.currentTimeMillis()).nextLong()))); break;