command.setMode(utils.decodeConnectionMode(value)); } else if (name.equalsIgnoreCase("N")) { command.setNotifiedEntity(utils.decodeNotifiedEntity(value, true)); } else if (name.equalsIgnoreCase("X")) { command.setNotificationRequestParms(new NotificationRequestParms(new RequestIdentifier(value)));
@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)); } }
case StringFunctions.LOW_N_BYTE: case StringFunctions.HIGH_N_BYTE: command.setNotifiedEntity(NotifiedEntityHandler.decode(data,value.getOffset(),value.getLength(), true)); break; case StringFunctions.LOW_X_BYTE:
case StringFunctions.LOW_N_BYTE: case StringFunctions.HIGH_N_BYTE: command.setNotifiedEntity(NotifiedEntityHandler.decode(data,value.getOffset(),value.getLength(), true)); break; case StringFunctions.LOW_X_BYTE:
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); }
containers[0].endpoint.getIdentifier(), ConnectionMode.Inactive); crcx.setTransactionHandle(txID); crcx.setNotifiedEntity(containers[0].session.getDriver().getCallAgent());
containers[0].endpoint.getIdentifier(), ConnectionMode.Inactive); crcx.setTransactionHandle(txID); crcx.setNotifiedEntity(containers[0].session.getDriver().getCallAgent());