当前位置: 首页 > article >正文

一个简单的 uas_send_bye.xml for SIPp

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="iinv-o200-obye.xml -- wjd 2014">

  <recv request="INVITE" rrs="true"/>

  <send>
    <![CDATA[

      SIP/2.0 180 Ringing
      [last_Via:]
      [last_Record-Route:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: sip:[service]@[local_ip]:[local_port]
      Content-Length: 0

    ]]>
  </send>

  <send retrans="500">
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_Record-Route:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: sip:[service]@[local_ip]:[local_port]
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 8 0
      a=rtpmap:8 PCMA/8000
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv request="ACK" rrs="true">
    <action>
      <ereg regexp=": *(.*)" search_in="hdr" header="To" assign_to="_,us"/><!-- with tag -->
      <ereg regexp=": *(.*)" search_in="hdr" header="From" assign_to="_,them"/>
    </action>
  </recv>
  <Reference variables="_"/>

  <!-- Wait for the other side to send some RTP -->
  <pause milliseconds="1000"/>

  <send start_txn="bye" retrans="500">
    <![CDATA[

      BYE [next_url] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      [routes]
      From: [$us]
      To: [$them]
      [last_Call-ID:]
      CSeq: [cseq] BYE
      Contact: sip:[service]@[local_ip]:[local_port]
      Content-Length: 0

    ]]>
  </send>

  <recv response="200" response_txn="bye"/>

</scenario><!-- vim: set ts=8 sw=2 sts=2 et ai: -->

sipp -sf uas.xml -i 10.0.16.12 -p 6666 -m 10000 -rtp_echo


支持 Kamailio/OpenSIPS

发 bye 时,from tag 和 to tag 要倒过来


http://www.kler.cn/a/369057.html

相关文章:

  • 【机器学习】多元线性回归
  • 碰一碰支付系统搭建怎么做?头部公司源码大测评!
  • c/c++--静态变量和静态函数(static)
  • 深入探索:深度学习在时间序列预测中的强大应用与实现
  • PHP-FPM 性能配置优化
  • ML 系列:机器学习和深度学习的深层次总结(17)从样本空间到概率规则概率
  • 2025秋招八股文--Redis篇
  • 阿里云环境下用docker搭建redis主从复制
  • Nodejs使用pkg打包为可执行文件
  • FLINK 分流
  • STM32软件模拟I2C的实现方式(一)
  • 常用设计模式总结
  • conda虚拟环境中安装cuda方法、遇到的问题
  • 如何用AI绘画插画!价值5万的AI绘画思路分享
  • 《关于神经网络的几个问题》
  • Gazebo学习笔记(2)--传感器和执行器的使用
  • Angular中ChangeDetectorRef.detectChanges是如何实现的,对比vue种的nextTick有何不同
  • 海量数据面试题
  • springmvc-springsecurity-redhat keycloak SAML2 xml实现
  • 【C++】继承与模板
  • WASM 使用说明23事(RUST实现)
  • 【TIMM库】是一个专门为PyTorch用户设计的图像模型库 python库
  • 15分钟学 Go 第 23 天:并发基础:Goroutines
  • 【CSS3】css开篇基础(4)
  • JavaScript 函数与事件处理
  • 灵动AI:艺术与科技的融合