jain.protocol.ip.mgcp.message.Notify.getSource()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中jain.protocol.ip.mgcp.message.Notify.getSource()方法的一些代码示例,展示了Notify.getSource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Notify.getSource()方法的具体详情如下:
包路径:jain.protocol.ip.mgcp.message.Notify
类名称:Notify
方法名:getSource

Notify.getSource介绍

暂无

代码示例

代码示例来源:origin: org.mobicents.examples/mgcp-demo-tts-sbb

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);
      }
      
    }
  }
}

代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs

public void onNotifyRequest(Notify event, ActivityContextInterface aci) {
  NotifyResponse response = new NotifyResponse(event.getSource(),
      ReturnCode.Transaction_Executed_Normally);
  response.setTransactionHandle(event.getTransactionHandle());

代码示例来源:origin: org.mobicents.examples/mgcp-demo-recorder-sbb

public void onNotifyRequest(Notify event, ActivityContextInterface aci) {
  logger.info("onNotifyRequest:\n"+event);
  NotifyResponse response = new NotifyResponse(event.getSource(),
      ReturnCode.Transaction_Executed_Normally);
  response.setTransactionHandle(event.getTransactionHandle());

相关文章