@Override public JainMgcpResponseEvent getProvisionalResponse() { NotificationRequestResponse provisionalresponse = null; if (!sent) provisionalresponse = new NotificationRequestResponse(source != null ? source : stack, ReturnCode.Transaction_Being_Executed); return provisionalresponse; } }
@Override public JainMgcpResponseEvent getProvisionalResponse() { NotificationRequestResponse provisionalresponse = null; if (!sent) provisionalresponse = new NotificationRequestResponse(source != null ? source : stack, ReturnCode.Transaction_Being_Executed); return provisionalresponse; } }
@Override public JainMgcpResponseEvent getProvisionalResponse() { NotificationRequestResponse provisionalresponse = null; if (!sent) { provisionalresponse = new NotificationRequestResponse(source != null ? source : stack, ReturnCode.Transaction_Being_Executed); } return provisionalresponse; }
public void header(String header) throws ParseException { String[] tokens = utils.splitStringBySpace(header); int tid = Integer.parseInt(tokens[1]); response = new NotificationRequestResponse(source != null ? source : stack, utils.decodeReturnCode(Integer .parseInt(tokens[0]))); response.setTransactionHandle(tid); }
@Override public JainMgcpResponseEvent decodeResponse(byte[] data,SplitDetails[] msg,Integer txID,ReturnCode returnCode) throws ParseException { response = new NotificationRequestResponse(source != null ? source : stack, returnCode); response.setTransactionHandle(txID); try { (new ResponseContentHandle()).parse(data,msg); } catch (IOException e) { logger.error("Decode RQNT Response failed", e); } return response; }
@Override public JainMgcpResponseEvent decodeResponse(byte[] data,SplitDetails[] msg,Integer txID,ReturnCode returnCode) throws ParseException { response = new NotificationRequestResponse(source != null ? source : stack, returnCode); response.setTransactionHandle(txID); try { (new ResponseContentHandle()).parse(data,msg); } catch (IOException e) { logger.error("Decode RQNT Response failed", e); } return response; }
code = ReturnCode.Transaction_Executed_Normally; final JainMgcpResponseEvent response = new NotificationRequestResponse(self, code); final int transaction = rqnt.getTransactionHandle(); response.setTransactionHandle(transaction);
code = ReturnCode.Transaction_Executed_Normally; final JainMgcpResponseEvent response = new NotificationRequestResponse(self, code); final int transaction = rqnt.getTransactionHandle(); response.setTransactionHandle(transaction);
code = ReturnCode.Transaction_Executed_Normally; final JainMgcpResponseEvent response = new NotificationRequestResponse(self, code); final int transaction = rqnt.getTransactionHandle(); response.setTransactionHandle(transaction);
break; case Constants.CMD_NOTIFICATION_REQUEST: response = new NotificationRequestResponse(this, ReturnCode.Transient_Error); break; case Constants.CMD_NOTIFY:
break; case Constants.CMD_NOTIFICATION_REQUEST: response = new NotificationRequestResponse(this, ReturnCode.Transient_Error); break; case Constants.CMD_NOTIFY:
break; case Constants.CMD_NOTIFICATION_REQUEST: response = new NotificationRequestResponse(this, ReturnCode.Transient_Error); break; case Constants.CMD_NOTIFY:
public void onNotifyRequest(Notify event, ActivityContextInterface aci) { logger.info("onNotifyRequest"); NotificationRequestResponse response = new NotificationRequestResponse(event.getSource(), ReturnCode.Transaction_Executed_Normally); response.setTransactionHandle(event.getTransactionHandle()); mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { response }); EventName[] observedEvents = event.getObservedEvents(); for (EventName observedEvent : observedEvents) { switch (observedEvent.getEventIdentifier().intValue()) { case MgcpEvent.REPORT_ON_COMPLETION: logger.info("Announcemnet Completed NTFY received"); break; case MgcpEvent.REPORT_FAILURE: logger.info("Announcemnet Failed received"); // TODO : Send DLCX and Send BYE to UA break; default: //MGCP RI expects D/dtmfX, but correct is D/X ... hence it fails to match on //MgcpEvent.DTMF_X .... Thus event ID is wrong.... if(observedEvent.getPackageName().toString().equals("D")) { int decodedId = decodeDTMF(observedEvent); processDTMF(decodedId); } } } }