SIPp 3.1 Registering on Asterisk 1.6.1 beta
From Open CSTA
SIPp has a bug in it. Go into call.cpp on line 3388 or thereabouts and add to INFO/MESSAGES an IF statement for OPTIONS. This will then enable command line -aa option to send an automatic ACK/200 response when it receives it. It may also, yet to be confirmed, occasionally send a BYE.
Compile SIPp with ossl
- Create the scenario. This is just an XML file with character data being the SIP messages.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="registration">
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 20
From: "[field0]" <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
To: "[field0]" <sip:[field0]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 REGISTER
Contact: <sip:[field0]@[local_ip]:[local_port]>
Expires: 3600
Content-Length: 0
User-Agent: Sipp v1.1-TLS, version 20061124
Authorization: Digest username="[field0]", realm="asterisk"
]]>
</send>
<recv response="401" auth="true" rtd="true">
</recv>
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 20
From: "[field0]" <sip:[field0]@[local_ip]>;tag=[call_number]
To: "[field0]" <sip:[field0]@[remote_ip]>
Call-ID: [call_id]
CSeq: 2 REGISTER
Contact: <sip:[field0]@[local_ip]:[local_port]>
Expires: 3600
Content-Length: 0
User-Agent: Sipp v1.1-TLS, version 20061124
[field1]
]]>
</send>
<recv response="102">
</recv>
<send>
<![CDATA[
SIP/2.0 200 OK
Via: SIP/2.0/[transport] [remote_ip]:[remote_port];branch=[branch];rport=5060
Contact: <sip:[local_ip]:[local_port]>
To: <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
From: "101"<sip:[field0]@[remote_ip]>;tag=[call_number]
Call-ID: [call_id]@[remote_ip]
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO
User-Agent: Sipp v1.1-TLS, version 20061124
Allow-Events: message-summary, dialog
Content-Length: 0
]]>
</send>
<recv response="100"
optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<recv response="200" 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">
</recv>
</scenario>
- Create the user list that gets injected into the scenario (users.csv)
SEQUENTIAL 100;[authentication username=100 password=test] 101;[authentication username=101 password=test] 102;[authentication username=102 password=test] 103;[authentication username=103 password=test] 104;[authentication username=104 password=test] 105;[authentication username=105 password=test] 106;[authentication username=106 password=test] 107;[authentication username=107 password=test] 108;[authentication username=108 password=test] 109;[authentication username=109 password=test] 110;[authentication username=110 password=test] 111;[authentication username=111 password=test] 112;[authentication username=112 password=test] 113;[authentication username=113 password=test] 114;[authentication username=114 password=test] 115;[authentication username=115 password=test]
- From the command line this will create 1 registration every 5000ms.
#./sipp -s 101 -ap test -sf register-bob.xml -r 1 -rp 5000 127.0.0.1:5060 -trace_msg -trace_err -aa -inf users.csv

