Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.00 KB | None | 0 0
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <!DOCTYPE scenario SYSTEM "sipp.dtd">
  3.  
  4. <scenario name="Basic UAS registrar with authentication">
  5.  
  6. <label id="badauth"/>
  7. <recv request="REGISTER" />
  8.   <send><![CDATA[
  9.  
  10.      SIP/2.0 401 Authorization Required
  11.      [last_Via:]
  12.      [last_From:]
  13.      [last_To:];tag=[pid]SIPpTag01[call_number]
  14.      [last_Call-ID:]
  15.      [last_CSeq:]
  16.      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
  17.      WWW-Authenticate: Digest realm="test.example.com", nonce="47ebe028cda119c35d4877b383027d28da013815"
  18.      Content-Length: [len]
  19.  
  20.    ]]>
  21.   </send>
  22.   <recv request="REGISTER" >
  23.         <action>
  24.                 <ereg regexp="Digest .*username=\"([^\"]*)\"" search_in="hdr" header="Authorization:" assign_to="junk,username" />
  25.                 <lookup assign_to="line" file="users.csv" key="[$username]" />
  26.                 <assign assign_to="junk" value="0" />
  27.                 <log message="Received REGISTER from user -[$username]-" />
  28.                 <log message="searching in file at line [$line]: Username: [field0 line=\"[$line]\"] Pass: [field1 line=\"[$line]\"]"/>
  29.                 <verifyauth assign_to="authvalid" username="[field0 line=\"[$line]\"]" password="[field1 line=\"[$line]\"]" />
  30.         </action>
  31.   </recv>
  32.  
  33.   <nop hide="true" test="authvalid" next="goodauth" />
  34.   <nop hide="true" next="badauth" />
  35.  
  36.   <label id="goodauth"/>
  37.   <send>
  38.     <![CDATA[
  39.  
  40.      SIP/2.0 200 OK
  41.      [last_Via:]
  42.      [last_From:]
  43.      [last_To:];tag=[call_number]
  44.      [last_Call-ID:]
  45.      [last_CSeq:]
  46.      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
  47.      Content-Length: 0
  48.      Expires: 3600
  49.  
  50.    ]]>
  51.   </send>
  52.  
  53.  
  54.   <!-- definition of the response time repartition table (unit is ms)   -->
  55.   <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  56.  
  57.   <!-- definition of the call length repartition table (unit is ms)     -->
  58.   <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
  59.  
  60. </scenario>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement