SIPp uac.xml 之我见

打印 上一主题 下一主题

主题 245|帖子 245|积分 735

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:
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE scenario SYSTEM "sipp.dtd">
  3. <!-- This program is free software; you can redistribute it and/or      -->
  4. <!-- modify it under the terms of the GNU General Public License as     -->
  5. <!-- published by the Free Software Foundation; either version 2 of the -->
  6. <!-- License, or (at your option) any later version.                    -->
  7. <!--                                                                    -->
  8. <!-- This program is distributed in the hope that it will be useful,    -->
  9. <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
  10. <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
  11. <!-- GNU General Public License for more details.                       -->
  12. <!--                                                                    -->
  13. <!-- You should have received a copy of the GNU General Public License  -->
  14. <!-- along with this program; if not, write to the                      -->
  15. <!-- Free Software Foundation, Inc.,                                    -->
  16. <!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
  17. <!--                                                                    -->
  18. <!--                 Sipp default 'uac' scenario.                       -->
  19. <!--                                                                    -->
  20. <scenario name="Basic Sipstone UAC">
  21.   <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  22.   <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  23.   <send retrans="500">
  24.     <![CDATA[
  25.       INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
  26.       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
  27.       From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
  28.       To: sut <sip:[service]@[remote_ip]:[remote_port]>
  29.       Call-ID: [call_id]
  30.       CSeq: 1 INVITE
  31.       Contact: sip:sipp@[local_ip]:[local_port]
  32.       Max-Forwards: 70
  33.       Subject: Performance Test
  34.       Content-Type: application/sdp
  35.       Content-Length: [len]
  36.       v=0
  37.       o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
  38.       s=-
  39.       c=IN IP[media_ip_type] [media_ip]
  40.       t=0 0
  41.       m=audio [media_port] RTP/AVP 0
  42.       a=rtpmap:0 PCMU/8000
  43.     ]]>
  44.   </send>
  45.   <recv response="100"
  46.         optional="true">
  47.   </recv>
  48.   <recv response="180" optional="true">
  49.   </recv>
  50.   <!-- By adding rrs="true" (Record Route Sets), the route sets         -->
  51.   <!-- are saved and used for following messages sent. Useful to test   -->
  52.   <!-- against stateful SIP proxies/B2BUAs.                             -->
  53.   <recv response="200" rtd="true" rrs="true">
  54.   </recv>
  55.   <!-- Packet lost can be simulated in any send/recv message by         -->
  56.   <!-- by adding the 'lost = "10"'. Value can be [1-100] percent.       -->
  57.   <send>
  58.     <![CDATA[
  59.       ACK sip:[next_url] SIP/2.0
  60.       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
  61.       From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
  62.       To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
  63.       Call-ID: [call_id]
  64.       CSeq: 1 ACK
  65.       [routes]
  66.       Contact: sip:sipp@[local_ip]:[local_port]
  67.       Max-Forwards: 70
  68.       Subject: Performance Test
  69.       Content-Length: 0
  70.     ]]>
  71.   </send>
  72.   <!-- This delay can be customized by the -d command-line option       -->
  73.   <!-- or by adding a 'milliseconds = "value"' option here.             -->
  74.   <pause/>
  75.   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
  76.   <send retrans="500">
  77.     <![CDATA[
  78.       BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
  79.       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
  80.       From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
  81.       To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
  82.       Call-ID: [call_id]
  83.       CSeq: 2 BYE
  84.       Contact: sip:sipp@[local_ip]:[local_port]
  85.       Max-Forwards: 70
  86.       Subject: Performance Test
  87.       Content-Length: 0
  88.     ]]>
  89.   </send>
  90.   <recv response="200" crlf="true">
  91.   </recv>
  92.   <!-- definition of the response time repartition table (unit is ms)   -->
  93.   <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  94.   <!-- definition of the call length repartition table (unit is ms)     -->
  95.   <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
  96. </scenario>
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

梦应逍遥

高级会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表