sipp注册带鉴权的xml

 

注册CSV脚本

SEQUENTIAL
20000;20000;[authentication username=20000 password=a111111]
20001;20001;[authentication username=20001 password=a111111]

第一行SEQUENTIAL表示顺序读取

第二行中每一项使用";"分割,分割的每一项被用于xml文件中的field字段,field字段从0开始编码

第二项中field1表示的注册域名,不能使用ip地址代替

 

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="branch_client"> <label id="1"/>

  <send retrans="6000">     

<![CDATA[       

REGISTER sip:[remote_ip] SIP/2.0       

Via: SIP/2.0/[transport] [local_ip]:5062;branch=[branch]       

From: <sip:[field0]@[field1]>;tag=[call_number]       

To: <sip:[field0]@[field1]>       

Call-ID: [call_id]       

CSeq: 1 REGISTER       

Contact: sip:[field0]@[local_ip]:5062       

Max-Forwards: 5       

Expires: 3600       

User-Agent: SIPp       

Content-Length: 0     

]]>   

</send>   

<recv response="401" auth="true">    #鉴权认证。如果该属性被设置为“true”则消息 中 的 消 息 头"Proxy-Authenticate:"会被存储并可以用来生 成 认 证 用 的 关 键 词[authentication]

</recv>   

<send retrans="6000">     

<![CDATA[       

REGISTER sip:[remote_ip] SIP/2.0       

Via: SIP/2.0/[transport] [local_ip]:5062;branch=[branch]       

From: <sip:[field0]@[field1]>;tag=[call_number]       

To: <sip:[field0]@[field1]>       

Call-ID: [call_id]       

CSeq: 2 REGISTER      

 Contact: sip:[field0]@[local_ip]:5062       

[field2]       

Max-Forwards: 5       

Expires: 3600       

User-Agent: SIPp       

Content-Length: 0     

]]>   

</send>       

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

<pause milliseconds="600000" next="1"/>   

<!-- definition of the response time repartition table (unit is ms)   -->   

<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>    </scenario>

--------------------- 作者:oklizy 来源:CSDN 原文:https://blog.csdn.net/oklizy/article/details/49123215 版权声明:本文为博主原创文章,转载请附上博文链接!

 

posted @ 2019-02-27 19:44  (●—●)大白  阅读(927)  评论(0编辑  收藏  举报