$ sudo apt-get install sip-tester $ sipp -v SIPp v2.0.1-TLS-PCAP, version 20070516, built May 7 2008, 10:10:34.Ubuntu 9.04 での実行例.
$ make
$ make ossl (TLS and authentication)
$ make pcapplay (PCAP play)
$ make pcapplay_ossl (PCAP play, TLS, authenticaton)
$ sipp -sn uas (UAS シナリオ)
$ sipp -sn uac 127.0.0.1 (UAC シナリオ)

$ sipp [options] remote_host[:remote_port] -sn: 組み込みシナリオの指定 (-sn uac) -sf: シナリオファイルの指定 (-sf uac.xml) -s: リクエストURIのユーザ名部分 (-s 200 -> ex. INVITE sip:200@192.168.0.1) -d: 通話が成立したあとのpauseの長さ(ms) (-d 10000 -> 10 秒) -r: 1秒当たりの通話数(calls per sec.) (-r 10) -m: 指定した数の通話が終了した時点でテストを終わる (-m 1) -l: 同時発呼数 -trace_stat: 統計ログの保存 -trace_rtt: 応答時間ログの保存 (例) $ sipp -sn uac -d 10000 -s 200 -r 10 -m 10000 192.168.0.1 (uac シナリオを使って 192.168.0.1 の 200 番に対して 10 call/sec の割合で 10000 通話テストする)
| UAC | UAS |
SIPp UAC Remote
|(1) INVITE |
|------------------>|
|(2) 100 (optional) |
|<------------------|
|(3) 180 (optional) |
|<------------------|
|(4) 200 |
|<------------------|
|(5) ACK |
|------------------>|
| |
|(6) PAUSE |
| |
|(7) BYE |
|------------------>|
|(8) 200 |
|<------------------|
|
Remote SIPp UAS
|(1) INVITE |
|------------------>|
|(2) 180 |
|<------------------|
|(3) 200 |
|<------------------|
|(4) ACK |
|------------------>|
| |
|(5) PAUSE |
| |
|(6) BYE |
|------------------>|
|(7) 200 |
|<------------------|
|
<scenario name="Basic Sipstone UAC"> <send retrans="500"> <![CDATA[ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number] To: sut <sip:[service]@[remote_ip]:[remote_port]> Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Type: application/sdp Content-Length: [len] : : (snip)
[sipp]
type=friend
host=dynamic
user=sipp
canreinvite=no
exten => 400,1,Answer()
exten => 400,n,SetMusicOnHold(default)
exten => 400,n,WaitMusicOnHold(10)
exten => 400,n,Hangup()
$ sipp -sn uac -d 10000 -s 400 -m 1 -i 192.168.0.2 192.168.0.1
<nop>
<action>
<exec play_pcap_audio="pcap/g711a.pcap.pcap"/>
</action>
</nop>
# sipp -sn uac_pcap -d 10000 -s 201 -m 1 -i 192.168.0.2 192.168.0.1
Echo するだけの extension に対して発信.
# sipp -sn uac_pcap -d 10000 -s 300 -m 1 -i 192.168.0.2 192.168.0.1
exten => 300,1,Answer() exten => 300,n,Echo() exten => 300,n,Hangup()
$ sipp -sd uac > uac.xml
[authentication username=sipp password=sipp]のような行を追加する.sipp が認証用のヘッダを追加してくれる.
$ sipp -sf uac.xml -d 10000 -s 400 -m 1 -i 192.168.0.1 192.168.0.8
SEQUENTIAL 200;300 201;301
csv で発信元,通話先,認証データを挿入.
SEQUENTIAL 201;[authentication username=201 password=pass];401 202;[authentication username=202 password=pass];402 203;[authentication username=203 password=pass];403
<scenario name="Basic Sipstone UAC">
<send retrans="500">
<![CDATA[
INVITE sip:[field2]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
To: [field2] <sip:[field2]@[remote_ip]:[remote_port]>
sipp -sf uac_auth_csv.xml -inf demo.csv -m 3 -d 10000 -i 192.168.0.2 192.168.0.1
性能評価方法の例
性能評価項目
|
「Asterisk運用・開発ガイド」(エムトゥエックス株式会社監修,株式会社アイウィーヴ,マッキーソフト株式会社共著,オーム社)に載っていた性能評価方法. |
ご清聴ありがとうございました.