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

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

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

Notify.setTransactionHandle介绍

暂无

代码示例

代码示例来源:origin: org.mobicents.media.client/mgcp-driver

@Override
public JainMgcpCommandEvent decodeCommand(byte[] data,SplitDetails[] message) throws ParseException 
{
  command = new Notify(source != null ? source : stack, endpoint, new RequestIdentifier("0"), new EventName[] {});
  command.setTransactionHandle(remoteTID);
  
  try 
  {
    (new CommandContentHandle()).parse(data,message);
  } 
  catch (Exception e) 
  {
    throw new ParseException(e.getMessage(), -1);
  }
  return command;
}

代码示例来源:origin: org.mobicents.jain/mobicents-mgcp-impl

public void header(String header) throws ParseException {
  command = new Notify(source != null ? source : stack, endpoint, new RequestIdentifier("0"), new EventName[] {});
  command.setTransactionHandle(remoteTID);
}

代码示例来源:origin: ua.mobius.media.client/mgcp-driver

@Override
public JainMgcpCommandEvent decodeCommand(byte[] data,SplitDetails[] message) throws ParseException 
{
  command = new Notify(source != null ? source : stack, endpoint, new RequestIdentifier("0"), new EventName[] {});
  command.setTransactionHandle(remoteTID);
  
  try 
  {
    (new CommandContentHandle()).parse(data,message);
  } 
  catch (Exception e) 
  {
    throw new ParseException(e.getMessage(), -1);
  }
  return command;
}

代码示例来源:origin: org.restcomm/restcomm-connect.mgcp

private void notify(final Object message, final ActorRef sender) {
  final ActorRef self = self();
  final NotificationRequest request = (NotificationRequest) message;
  final MgcpEvent event = AUMgcpEvent.auoc.withParm("rc=100 dc=1");
  final EventName[] events = {new EventName(AUPackage.AU, event)};
  final Notify notify = new Notify(this, request.getEndpointIdentifier(), request.getRequestIdentifier(), events);
  notify.setTransactionHandle((int) transactionIdPool.get());
  System.out.println(notify.toString());
  sender.tell(notify, self);
}

代码示例来源:origin: org.restcomm/restcomm-connect.mgcp

protected void notify (final Object message, final ActorRef sender) {
  final ActorRef self = self();
  final NotificationRequest request = (NotificationRequest) message;
  MgcpEvent event = null;
  if (request.getSignalRequests()[0].getEventIdentifier().getName().equalsIgnoreCase("es")
      || request.getSignalRequests()[0].getEventIdentifier().getName().equalsIgnoreCase("pr")) {
    //Looks like this is either an RQNT AU/ES or
    //recording max length reached and we got the original recording RQNT
    event = AUMgcpEvent.auoc.withParm("AU/pr ri=file://" + recordingFile.toPath() + " rc=100 dc=1");
  } else {
    event = AUMgcpEvent.auoc.withParm("rc=100 dc=1");
  }
  final EventName[] events = {new EventName(AUPackage.AU, event)};
  final Notify notify = new Notify(this, request.getEndpointIdentifier(), request.getRequestIdentifier(), events);
  notify.setTransactionHandle((int) transactionIdPool.get());
  System.out.println(notify.toString());
  sender.tell(notify, self);
}

代码示例来源:origin: org.restcomm/restcomm-connect.mgcp

@Override
  protected void notify(Object message, ActorRef sender) {
    final ActorRef self = self();
    final NotificationRequest request = (NotificationRequest) message;

    MgcpEvent event = null;
    if (request.getSignalRequests()[0].getEventIdentifier().getName().equalsIgnoreCase("es")
        || request.getSignalRequests()[0].getEventIdentifier().getName().equalsIgnoreCase("pr")) {
      //Looks like this is either an RQNT AU/ES or
      //recording max length reached and we got the original recording RQNT
      event = AUMgcpEvent.auoc.withParm("AU/pr ri=file://" + recordingFile.toPath() + " rc=100 dc=1");
    } else {
      event = AUMgcpEvent.auoc.withParm("rc=100 dc=1");
      if(!request.getSignalRequests()[0].getEventIdentifier().getParms().contains("ringing.wav")) {
        try {
          Thread.sleep(2000);
        } catch (Exception e){
          logger.error(e.toString());
        }
      }
    }

    final EventName[] events = {new EventName(AUPackage.AU, event)};

    final Notify notify = new Notify(this, request.getEndpointIdentifier(), request.getRequestIdentifier(), events);
    notify.setTransactionHandle((int) transactionIdPool.get());
    System.out.println(notify.toString());
    sender.tell(notify, self);
  }
}

相关文章