/** * 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 { command = new CreateConnection(source != null ? source : stack, new CallIdentifier("0"), endpoint, ConnectionMode.Inactive); command.setTransactionHandle(remoteTID); }
public JainMgcpCommandEvent decodeCommand(byte[] data,SplitDetails[] message) throws ParseException { command = new CreateConnection(source != null ? source : stack, new CallIdentifier("0"), endpoint,ConnectionMode.Inactive); command.setTransactionHandle(remoteTID); try { (new CommandContentHandle()).parse(data,message); } catch (Exception e) { throw new ParseException(e.getMessage(), -1); } NotifiedEntity notifiedEntity = command.getNotifiedEntity(); if (command.getNotifiedEntity() != null) this.stack.provider.setNotifiedEntity(notifiedEntity); return command; }
public JainMgcpCommandEvent decodeCommand(byte[] data,SplitDetails[] message) throws ParseException { command = new CreateConnection(source != null ? source : stack, new CallIdentifier("0"), endpoint,ConnectionMode.Inactive); command.setTransactionHandle(remoteTID); try { (new CommandContentHandle()).parse(data,message); } catch (Exception e) { throw new ParseException(e.getMessage(), -1); } NotifiedEntity notifiedEntity = command.getNotifiedEntity(); if (command.getNotifiedEntity() != null) this.stack.provider.setNotifiedEntity(notifiedEntity); return command; }
@Override public void execute(final Object message) throws Exception { final OpenConnection request = (OpenConnection) message; final String sessionId = Integer.toString(session.id()); final CallIdentifier callId = new CallIdentifier(sessionId); final CreateConnection crcx = new CreateConnection(source, callId, endpointId, request.mode()); remoteDesc = request.descriptor(); if (remoteDesc != null) { crcx.setRemoteConnectionDescriptor(remoteDesc); } crcx.setNotifiedEntity(agent); LocalOptionValue[] localOptions = new LocalOptionValue[] { new LocalOptionExtension("webrtc", String.valueOf(webrtc)) }; crcx.setLocalConnectionOptions(localOptions); gateway.tell(crcx, source); // Make sure we don't wait for a response indefinitely. getContext().setReceiveTimeout(Duration.create(timeout, TimeUnit.MILLISECONDS)); } }
@Override public void execute(final Object message) throws Exception { final OpenConnection request = (OpenConnection) message; final String sessionId = Integer.toString(session.id()); final CallIdentifier callId = new CallIdentifier(sessionId); final CreateConnection crcx = new CreateConnection(source, callId, endpointId, request.mode()); remoteDesc = request.descriptor(); if (remoteDesc != null) { crcx.setRemoteConnectionDescriptor(remoteDesc); } crcx.setNotifiedEntity(agent); LocalOptionValue[] localOptions = new LocalOptionValue[] { new LocalOptionExtension("webrtc", String.valueOf(webrtc)) }; crcx.setLocalConnectionOptions(localOptions); gateway.tell(crcx, source); // Make sure we don't wait for a response indefinitely. getContext().setReceiveTimeout(Duration.create(timeout, TimeUnit.MILLISECONDS)); } }
public void connect(final ConnectionMode connectionMode) throws MgcpConnectionException { assertState(CREATED); try { final CallIdentifier callId = new CallIdentifier(Integer.toString(session.getId())); final CreateConnection crcx = new CreateConnection(this, callId, endpoint.getId(), connectionMode); crcx.setNotifiedEntity(server.getCallAgent()); if(remoteDescriptor != null) { try { crcx.setRemoteConnectionDescriptor(remoteDescriptor); } catch(final ConflictingParameterException ignored) { } } server.sendCommand(crcx, this); } catch(final MgcpServerException exception) { setState(FAILED); fireFailed(); throw new MgcpConnectionException(exception); } }
@Override public void execute(final Object message) throws Exception { final OpenLink request = (OpenLink) message; if(request.primaryEndpointId() != null) primaryEndpointId = new EndpointIdentifier(request.primaryEndpointId(), primaryEndpointId.getDomainName()); if(request.secondaryEndpointId() != null) secondaryEndpointId = new EndpointIdentifier(request.secondaryEndpointId(), secondaryEndpointId.getDomainName()); final String sessionId = Integer.toString(session.id()); final CallIdentifier callId = new CallIdentifier(sessionId); final CreateConnection crcx = new CreateConnection(source, callId, primaryEndpointId, request.mode()); crcx.setNotifiedEntity(agent); crcx.setSecondEndpointIdentifier(secondaryEndpointId); gateway.tell(crcx, source); // Make sure we don't wait for a response indefinitely. getContext().setReceiveTimeout(Duration.create(timeout, TimeUnit.MILLISECONDS)); } }
public void process(State state) { //prepear callID and endpointID parameters for request CallIdentifier callId = connection.getMediaSession().getCallID(); EndpointIdentifier endpointID = connection.getEndpoint().getIdentifier(); //ask for new unique transaction handler int txHandle = connection.getMediaSession().getUniqueHandler(); //generate message CreateConnection req = new CreateConnection(this, callId, endpointID, ConnectionMode.SendRecv); req.setTransactionHandle(txHandle); req.setNotifiedEntity(connection.getMediaSession().getDriver().getCallAgent()); //if SDP is present assign it to request if (connection.sdpPortManager.remoteSdp != null) { try { req.setRemoteConnectionDescriptor(new ConnectionDescriptor(connection.sdpPortManager.remoteSdp.toString())); req.setMode(ConnectionMode.Confrnce); } catch (Exception e) { } } //create handler for this and register it as listener connection.getMediaSession().getDriver().attach(txHandle, new CreateConnectionResponseHandler(connection)); //send request connection.getMediaSession().getDriver().send(req); }
public void process(State state) { //prepear callID and endpointID parameters for request CallIdentifier callId = connection.getMediaSession().getCallID(); EndpointIdentifier endpointID = connection.getEndpoint().getIdentifier(); //ask for new unique transaction handler int txHandle = connection.getMediaSession().getUniqueHandler(); //generate message CreateConnection req = new CreateConnection(this, callId, endpointID, ConnectionMode.SendRecv); req.setTransactionHandle(txHandle); req.setNotifiedEntity(connection.getMediaSession().getDriver().getCallAgent()); //if SDP is present assign it to request if (connection.sdpPortManager.remoteSdp != null) { try { req.setRemoteConnectionDescriptor(new ConnectionDescriptor(connection.sdpPortManager.remoteSdp.toString())); req.setMode(ConnectionMode.Confrnce); } catch (Exception e) { } } //create handler for this and register it as listener connection.getMediaSession().getDriver().attach(txHandle, new CreateConnectionResponseHandler(connection)); //send request connection.getMediaSession().getDriver().send(req); }
EndpointIdentifier endpointID = new EndpointIdentifier(ENDPOINT_NAME, JBOSS_BIND_ADDRESS + ":" + MGCP_PEER_PORT); CreateConnection createConnection = new CreateConnection(this, callID, endpointID, ConnectionMode.SendRecv);
CreateConnection createConnection = new CreateConnection(this, callID, endpointID, ConnectionMode.SendRecv);
CreateConnection crcx = new CreateConnection(this, containers[0].session.getCallID(), containers[0].endpoint.getIdentifier(), ConnectionMode.Inactive); crcx.setTransactionHandle(txID);
CreateConnection crcx = new CreateConnection(this, containers[0].session.getCallID(), containers[0].endpoint.getIdentifier(), ConnectionMode.Inactive); crcx.setTransactionHandle(txID);
PRE_ENDPOINT_NAME, mmsBindAddress + ":" + MGCP_PEER_PORT); CreateConnection createConnection = new CreateConnection(this, callID, endpointID, ConnectionMode.Confrnce); try {
CreateConnection createConnection = new CreateConnection(this, getCallIdentifier(), event .getSpecificEndpointIdentifier(), ConnectionMode.Confrnce);