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

SIPp uac.xml 之我见

https://sipp.sourceforge.net/doc/uac.xml.html

这个 uac.xml 有没有问题呢?

有!

问题之一是:

<recv response="200" rtd="true" rrs="true">  

要加 rrs, 仔细看注释就能看到

问题之二是:

ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0

这是不对的,应该是 ACK [next_url] SIP/2.0

问题之三还是 ACK 发的不对,要加 [routes] 头

还有,encoding 配置为 UTF-8 更好,这样可以增加中文注释

至于为什么,多看看自然就知道了

附完整的 uac.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uac' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic Sipstone UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  <send retrans="500">
    <![CDATA[

      INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 1 INVITE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      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 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv response="100"
        optional="true">
  </recv>

  <recv response="180" optional="true">
  </recv>

  <!-- By adding rrs="true" (Record Route Sets), the route sets         -->
  <!-- are saved and used for following messages sent. Useful to test   -->
  <!-- against stateful SIP proxies/B2BUAs.                             -->
  <recv response="200" rtd="true" rrs="true">
  </recv>

  <!-- Packet lost can be simulated in any send/recv message by         -->
  <!-- by adding the 'lost = "10"'. Value can be [1-100] percent.       -->
  <send>
    <![CDATA[

      ACK sip:[next_url] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      CSeq: 1 ACK
      [routes]
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]>
  </send>

  <!-- This delay can be customized by the -d command-line option       -->
  <!-- or by adding a 'milliseconds = "value"' option here.             -->
  <pause/>

  <!-- The 'crlf' option inserts a blank line in the statistics report. -->
  <send retrans="500">
    <![CDATA[

      BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      CSeq: 2 BYE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]>
  </send>

  <recv response="200" crlf="true">
  </recv>

  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>


http://www.kler.cn/news/308918.html

相关文章:

  • MySQL_数据库基本操作
  • 【HarmonyOS NEXT开发】如何设置水平/垂直方向的左/居中/右对齐——RelativeContainer的AlignRules设置
  • ARM驱动学习之PWM
  • Android 签名、空包签名 、jarsigner、apksigner
  • Github 2024-09-17 Python开源项目日报 Top10
  • 剖解杨辉三角
  • 重生归来之挖掘stm32底层知识(1)——寄存器
  • 华为OD机试 - 阿里巴巴找黄金宝箱(V) - 滑动窗口(Python/JS/C/C++ 2024 E卷 100分)
  • 小程序开关组件
  • ArrayList的扩容机制
  • Spring 源码解读:实现@Scope与自定义作用域
  • 前端开发第三节课
  • 解决使用阿里云DataV Geo在线地图路径访问403问题
  • 深入解析JSON:数据交换的通用语言
  • Spring Boot-国际化(I18N)问题
  • 嵌入式Linux笔试题目
  • 【JavaWeb】利用IDEA2024+tomcat10配置web6.0版本搭建JavaWeb开发项目
  • Encountered error while trying to install package.> lxml
  • es6中set和map的区别
  • C++速通LeetCode简单第17题-爬楼梯
  • PostgreSQL维护——解决索引膨胀和数据死行
  • 运维的基本概念:服务器和网络基础知识
  • 瑞星微RK芯片的Buildroot构建系统镜像
  • 【Gateway】Gateway Filter Factories
  • Visual Studio 2019/2022 IntelliCode(AI辅助IntelliSense)功能介绍
  • 【SpringBoot】调度和执行定时任务--Spring Task(超详细)
  • 数据结构 - 树与二叉树
  • [强化你的LangChain工具创建技能:从基础到进阶]
  • C语言 | Leetcode C语言题解之第413题等差数列划分
  • c语言题目猜凶手问题