SIPp: Difference between revisions
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) |
||
Line 8: | Line 8: | ||
== Initial tests == | == Initial tests == | ||
=== Basic ommand line === | |||
This command will hit the server with one request (-r 1) at a time and repeat every second (-rp 1000). | This command will hit the server with one request (-r 1) at a time and repeat every second (-rp 1000). | ||
Line 13: | Line 15: | ||
sipp -sn uac -r 1 -rp 1000 cds.wildsong.biz:5060 -i 192.168.1.2 | sipp -sn uac -r 1 -rp 1000 cds.wildsong.biz:5060 -i 192.168.1.2 | ||
=== Asterisk test === | |||
On the asterisk console, so I can see what happens, I turn on debug. | On the asterisk console, so I can see what happens, I turn on debug. | ||
Line 38: | Line 42: | ||
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="14229989" | WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="14229989" | ||
Content-Length: 0 | Content-Length: 0 | ||
=== Add peer to sip.conf === | |||
It is not authorized, | It is not authorized, | ||
Line 79: | Line 85: | ||
Subject: Performance Test | Subject: Performance Test | ||
Content-Length: 0 | Content-Length: 0 | ||
=== Add extension to asterisk === | |||
So I add the context and the extension to 'extensions.conf' and do 'dialplan reload'. | So I add the context and the extension to 'extensions.conf' and do 'dialplan reload'. | ||
Line 113: | Line 121: | ||
-- Executing [service@testing:2] Answer("SIP/sipp-0000029b", "") in new stack | -- Executing [service@testing:2] Answer("SIP/sipp-0000029b", "") in new stack | ||
== Spawn extension (testing, service, 2) exited non-zero on 'SIP/sipp-0000029b' | == Spawn extension (testing, service, 2) exited non-zero on 'SIP/sipp-0000029b' | ||
== More settings and tests == | |||
=== Stop test after 100 calls === | |||
sipp -sn uac -r 5 -rp 500 cds.wildsong.biz:5060 -i 192.168.1.2 -m 100 | |||
== What can I do with it? == | == What can I do with it? == |
Revision as of 21:35, 19 June 2016
SIPp SIP testing program.
You can set it to pound away at a remote SIP server to see how it performs.
How to install
Set up a Debian server and install the 'sip-tester' package. I used Bellman.
Initial tests
Basic ommand line
This command will hit the server with one request (-r 1) at a time and repeat every second (-rp 1000). Use 192.168.1.2 as the source IP address (bellman).
sipp -sn uac -r 1 -rp 1000 cds.wildsong.biz:5060 -i 192.168.1.2
Asterisk test
On the asterisk console, so I can see what happens, I turn on debug.
core set debug 10 sip set debug on
Then I can see requests coming in,
Sending to 192.168.1.2:5123 (no NAT) Sending to 192.168.1.2:5123 (no NAT) Using INVITE request as basis request - [email protected] No matching peer for 'sipp' from '192.168.1.2:5123' <--- Reliably Transmitting (no NAT) to 192.168.1.2:5123 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.1.2:5123;branch=z9hG4bK-9441-25-0;received=192.168.1.2 From: sipp <sip:[email protected]:5123>;tag=9441SIPpTag0025 To: sut <sip:[email protected]:5060>;tag=as58ab0f52 Call-ID: [email protected] CSeq: 1 INVITE Server: Asterisk PBX 13.9.1 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="14229989" Content-Length: 0
Add peer to sip.conf
It is not authorized, so I add a peer called 'sipp' in sip.conf:
[sipp] type=friend context=testing host=192.168.1.2 user=sipp canreinvite=no disallow=all allow=ulaw
Making progress: now I get this error:
SIP/2.0 404 Not Found Via: SIP/2.0/UDP 192.168.1.2:5123;branch=z9hG4bK-9453-11-0;received=192.168.1.2 From: sipp <sip:[email protected]:5123>;tag=9453SIPpTag0011 To: sut <sip:[email protected]:5060>;tag=as3d8a6110 Call-ID: [email protected] CSeq: 1 INVITE Server: Asterisk PBX 13.9.1 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0 <------------> [2016-06-19 12:18:27] NOTICE[25269][C-000000f1]: chan_sip.c:26219 handle_request_invite: Call from 'sipp' (192.168.1.2:5123) to extension 'service' rejected because extension not found in context 'testing'. Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE) <--- SIP read from UDP:192.168.1.2:5123 ---> ACK sip:[email protected]:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.2:5123;branch=z9hG4bK-9453-11-0;received=192.168.1.2 From: sipp <sip:[email protected]:5123>;tag=9453SIPpTag0011 To: sut <sip:[email protected]:5060>;tag=as3d8a6110 Call-ID: [email protected] CSeq: 1 ACK Contact: <sip:[email protected]:5123;transport=UDP> Max-Forwards: 70 Subject: Performance Test Content-Length: 0
Add extension to asterisk
So I add the context and the extension to 'extensions.conf' and do 'dialplan reload'.
[testing] exten => service,1,Verbose(1,SIP test) same => n,Answer() same => n,Playback(SIP_Test_Success) same => n,Hangup()
And it works! I turn off SIP debug and I can see this in the asterisk console.
sip set debug off
== Using SIP RTP CoS mark 5 -- Executing [service@testing:1] Verbose("SIP/sipp-00000298", "1,SIP test") in new stack SIP test -- Executing [service@testing:2] Answer("SIP/sipp-00000298", "") in new stack == Spawn extension (testing, service, 2) exited non-zero on 'SIP/sipp-00000298' == Using SIP RTP CoS mark 5 -- Executing [service@testing:1] Verbose("SIP/sipp-00000299", "1,SIP test") in new stack SIP test -- Executing [service@testing:2] Answer("SIP/sipp-00000299", "") in new stack == Spawn extension (testing, service, 2) exited non-zero on 'SIP/sipp-00000299' == Using SIP RTP CoS mark 5 -- Executing [service@testing:1] Verbose("SIP/sipp-0000029a", "1,SIP test") in new stack SIP test -- Executing [service@testing:2] Answer("SIP/sipp-0000029a", "") in new stack == Spawn extension (testing, service, 2) exited non-zero on 'SIP/sipp-0000029a' == Using SIP RTP CoS mark 5 -- Executing [service@testing:1] Verbose("SIP/sipp-0000029b", "1,SIP test") in new stack SIP test -- Executing [service@testing:2] Answer("SIP/sipp-0000029b", "") in new stack == Spawn extension (testing, service, 2) exited non-zero on 'SIP/sipp-0000029b'
More settings and tests
Stop test after 100 calls
sipp -sn uac -r 5 -rp 500 cds.wildsong.biz:5060 -i 192.168.1.2 -m 100
What can I do with it?
Load test
Of course I'd like to get a sense of what a given hardware set up can do by load testing it.
Functionality test
I'd like to be able to build a suite of tests that I can run after I make any change to an Asterisk server, to confirm the server is still doing everything it needs to do.
I think SIPp might play a big role in this.
Reachability tests
I'd like to be able to do
* LAN test * VPN test (no NAT) * WAN test (via NAT)