/** * 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 DeleteConnection(source != null ? source : stack, endpoint); command.setTransactionHandle(remoteTID); }
public JainMgcpCommandEvent decodeCommand(byte[] data,SplitDetails[] message) throws ParseException { command = new DeleteConnection(source != null ? source : stack, endpoint); command.setTransactionHandle(remoteTID); try { (new CommandContentHandle()).parse(data,message); } catch (IOException e) { logger.error("Decode of DLCX command failed", e); } return command; }
public JainMgcpCommandEvent decodeCommand(byte[] data,SplitDetails[] message) throws ParseException { command = new DeleteConnection(source != null ? source : stack, endpoint); command.setTransactionHandle(remoteTID); try { (new CommandContentHandle()).parse(data,message); } catch (IOException e) { logger.error("Decode of DLCX command failed", e); } return command; }
public void onCallTerminated(RequestEvent evt, ActivityContextInterface aci) { EndpointIdentifier endpointID = new EndpointIdentifier(this.getEndpointName(), JBOSS_BIND_ADDRESS + ":" + MGCP_PEER_PORT); DeleteConnection deleteConnection = new DeleteConnection(this, endpointID); deleteConnection.setTransactionHandle(mgcpProvider.getUniqueTransactionHandler()); mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { deleteConnection }); ServerTransaction tx = evt.getServerTransaction(); Request request = evt.getRequest(); try { Response response = messageFactory.createResponse(Response.OK, request); tx.sendResponse(response); } catch (Exception e) { logger.severe("Error while sending DLCX ", e); } }
public void onCallTerminated(CustomEvent evt, ActivityContextInterface aci) { logger.info("Conference Terminated " + this.getEndpointIdentifier() + " Connection Id " + this.getConnectionIdentifier().toString() + " callId = " + this.getCallIdentifier().toString()); EndpointIdentifier endpointID = this.getEndpointIdentifier(); ConnectionIdentifier connectionID=this.getConnectionIdentifier(); DeleteConnection deleteConnection = new DeleteConnection(this, this.getCallIdentifier(), endpointID,connectionID); deleteConnection.setTransactionHandle(this.mgcpProvider.getUniqueTransactionHandler()); mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { deleteConnection }); }
public void onCallTerminated(RequestEvent evt, ActivityContextInterface aci) { try { MgcpConnectionActivity activity = getMgcpConnectionActivity(); DeleteConnection deleteConnection = new DeleteConnection(this, activity.getEndpointIdentifier()); deleteConnection.setTransactionHandle(mgcpProvider.getUniqueTransactionHandler()); mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { deleteConnection }); ServerTransaction tx = evt.getServerTransaction(); Request request = evt.getRequest(); Response response = messageFactory.createResponse(Response.OK, request); tx.sendResponse(response); cancelTimer(); } catch (Exception e) { logger.severe("Error while sending OK for BYE", e); } }
public void onEvent(State state) { //first leg if (connections[0] != null) { int txID = containers[0].getMediaSession().getDriver().getNextTxID(); DeleteConnection req = new DeleteConnection(this, containers[0].session.getCallID(), containers[0].endpoint.getIdentifier(), connections[0]); req.setTransactionHandle(txID); containers[0].session.getDriver().attach(txID, new UnjoinResponse()); containers[0].session.getDriver().send(req); } else { signalAsync("success"); } //second leg if (connections[1] != null) { int txID = containers[1].getMediaSession().getDriver().getNextTxID(); DeleteConnection req = new DeleteConnection(this, containers[1].session.getCallID(), containers[1].endpoint.getIdentifier(), connections[1]); req.setTransactionHandle(txID); containers[1].session.getDriver().attach(txID, new UnjoinResponse()); containers[1].session.getDriver().send(req); } else { signalAsync("success"); } } }
public void onEvent(State state) { //first leg if (connections[0] != null) { int txID = containers[0].getMediaSession().getDriver().getNextTxID(); DeleteConnection req = new DeleteConnection(this, containers[0].session.getCallID(), containers[0].endpoint.getIdentifier(), connections[0]); req.setTransactionHandle(txID); containers[0].session.getDriver().attach(txID, new UnjoinResponse()); containers[0].session.getDriver().send(req); } else { signalAsync("success"); } //second leg if (connections[1] != null) { int txID = containers[1].getMediaSession().getDriver().getNextTxID(); DeleteConnection req = new DeleteConnection(this, containers[1].session.getCallID(), containers[1].endpoint.getIdentifier(), connections[1]); req.setTransactionHandle(txID); containers[1].session.getDriver().attach(txID, new UnjoinResponse()); containers[1].session.getDriver().send(req); } else { signalAsync("success"); } } }
public void onEvent(State state) { //if connection has not concrete name then it was not created if (!connection.getEndpoint().hasConcreteName()) { return; } //prepear callID and endpointID parameters for request CallIdentifier callId = connection.getMediaSession().getCallID(); EndpointIdentifier endpointID = connection.getEndpoint().getIdentifier(); ConnectionIdentifier connectionID = connection.getConnectionID(); //ask for new unique transaction handler int txHandle = connection.getMediaSession().getUniqueHandler(); //ask for new unique transaction handler DeleteConnection req = new DeleteConnection(this, callId, endpointID, connectionID); req.setTransactionHandle(txHandle); connection.getMediaSession().getDriver().attach(txHandle, new DeleteConnectionResponseHandler(connection)); //send request connection.getMediaSession().getDriver().send(req); }
public void onEvent(State state) { //if connection has not concrete name then it was not created if (!connection.getEndpoint().hasConcreteName()) { return; } //prepear callID and endpointID parameters for request CallIdentifier callId = connection.getMediaSession().getCallID(); EndpointIdentifier endpointID = connection.getEndpoint().getIdentifier(); ConnectionIdentifier connectionID = connection.getConnectionID(); //ask for new unique transaction handler int txHandle = connection.getMediaSession().getUniqueHandler(); //ask for new unique transaction handler DeleteConnection req = new DeleteConnection(this, callId, endpointID, connectionID); req.setTransactionHandle(txHandle); connection.getMediaSession().getDriver().attach(txHandle, new DeleteConnectionResponseHandler(connection)); //send request connection.getMediaSession().getDriver().send(req); }
deleteConnection.setCallIdentifier(this.getCallIdentifier()); deleteConnection.setTransactionHandle(mgcpProvider.getUniqueTransactionHandler()); mgcpProvider.sendMgcpEvents( new JainMgcpEvent[] { deleteConnection });