VoIP perf
It is a SIP signaling performance testing application that can provide a server and a client. It can produce latency stats at specified intervals in csv to measure the response time of any SIP endpoint. It can also read a json configuration file and randomize numbers.
./voip_perf \
--local-port=5072 \ # server listening port
--trying \ # when receiving invite 100 trying will be send
--ringing \ # when receiving invite 183 will be sent
--thread-count=4 \ # number of server threads created
--delay=1500 # ringing delay in MS 1.5 second
This will send one INVITE to a randomise number starting with 1206?????? to server 1.1.1.1
./voip_perf \
"sip: [email protected]" \ # target R-URI, <?> will be replaced by random digit
--method="INVITE" \ # method
--local-port=5072 \ # source port
--caller-id=" 1??????????" \ # user part of the From header, <?> will be replaced by random digit
--count=1 \ # total calls to send
--proxy=2.2.2.2 \ # this will send the SIP message to a SIP proxy instead of the host in R-URI
--duration=5 \ # send BYE after 5 seconds
--call-per-second=500 \ # send 500cps
--window=100000 \ # maximum amount of in progress calls
--thread-count=1 \ # number of thread used
--interval=1 \ # reporting interval, everyone second a line is added to voip_perf_stats.log with latency metrics
--timeout 7200 # total run time , if all the requests where not send, voip_perf will stop and report scnenario timeout
# --verbose # runwith verbose logs
./voip_perf "sip: [email protected]:5061;transport=tls" \
--local-port=5050 \
--method="INVITE" \
--caller-id=" 1??????????" \
--interval=1 \
--count=20 \
--call-per-second=10 \
--window=25 \
--thread-count=1 \
--use-tls \
--timeout 7200 \
--tls-cert="tls/certificate.pem" \
--tls-key="tls/key.pem" \
--tls-calist="tls/ca_list.pem" \
--conf="conf.json"
# --verbose \
{
"server" : [
{
"response" : [
{ "code" : 200,
"reason" : "OK",
"probability" : 0.6
},
{ "code" : 404,
"reason" : "Not found",
"probability" : 0.3
},
{ "code" : 0,
"reason" : "drop/no response timeout",
"probability" : 0.1
}
]
}
],
"client": [
{
"extra-headers": {
"Foo": "Bar",
"Bar": "Foo"
}
},
{
"users": [
{
"ruri": "sip:[email protected]",
"extra-headers": {
"Bar": "Open"
}
},
{
"ruri": "sip:[email protected]",
"extra-headers": {
"Bar": "Close"
}
},
{
"ruri": "sip:[email protected]",
"extra-headers": {
"VIP": "True",
"Bar": "Open"
}
}
]
}
]
}
You can add custom headers in this file
include/custom_headers.h
voip_perf was initially a fork from pjsip-apps/src/samples/pjsip-perf.c