Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1" ?>
- <!DOCTYPE scenario SYSTEM "sipp.dtd">
- <scenario name="Basic UAS registrar with authentication">
- <label id="badauth"/>
- <recv request="REGISTER" />
- <send><![CDATA[
- SIP/2.0 401 Authorization Required
- [last_Via:]
- [last_From:]
- [last_To:];tag=[pid]SIPpTag01[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Contact: <sip:[local_ip]:[local_port];transport=[transport]>
- WWW-Authenticate: Digest realm="test.example.com", nonce="47ebe028cda119c35d4877b383027d28da013815"
- Content-Length: [len]
- ]]>
- </send>
- <recv request="REGISTER" >
- <action>
- <ereg regexp="Digest .*username=\"([^\"]*)\"" search_in="hdr" header="Authorization:" assign_to="junk,username" />
- <lookup assign_to="line" file="users.csv" key="[$username]" />
- <assign assign_to="junk" value="0" />
- <log message="Received REGISTER from user -[$username]-" />
- <log message="searching in file at line [$line]: Username: [field0 line=\"[$line]\"] Pass: [field1 line=\"[$line]\"]"/>
- <verifyauth assign_to="authvalid" username="[field0 line=\"[$line]\"]" password="[field1 line=\"[$line]\"]" />
- </action>
- </recv>
- <nop hide="true" test="authvalid" next="goodauth" />
- <nop hide="true" next="badauth" />
- <label id="goodauth"/>
- <send>
- <![CDATA[
- SIP/2.0 200 OK
- [last_Via:]
- [last_From:]
- [last_To:];tag=[call_number]
- [last_Call-ID:]
- [last_CSeq:]
- Contact: <sip:[local_ip]:[local_port];transport=[transport]>
- Content-Length: 0
- Expires: 3600
- ]]>
- </send>
- <!-- 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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement