一个简单的 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 要倒过来

相关推荐
无名3872 个月前
FreeSWITCH json api
通讯
无名3872 个月前
关于 FreeSWITCH mod_sofia 注册过期时间的测试
通讯
无名3873 个月前
SIPp uac.xml 之我见
通讯
酒茶白开水5 个月前
React二组件进阶
react.js·生命周期·context·通讯·props·render-props·高阶组件
佳途自动化学院5 个月前
三菱FX3U进阶课程-运动控制讲解
自动化·plc·工控·通讯·三菱
无名3876 个月前
简单介绍 Kamailio cfg_rpc 模块
通讯
无名3877 个月前
MicroSIP 使用笔记
通讯
无名3877 个月前
Kamailio openssl 3.0.x 需要注意的事项
通讯
h6play8 个月前
如何优雅的实现 iframe 多层级嵌套通讯
npm·vue·bridge·iframe·通讯·连接·嵌套iframe