Hey
I’m a new user in the asterisk and voip world. I’m trying to do some benchmarking on asterisk with SRTP over TLS connection.
i found the SIPp tool and i’m trying to use it.
I found some basic examples and setup pjsip first to check UDP. i get errors when running SIPp. I found a forum thread but there the guy just disabled the auth and thats not good for me.
Asterisk stress testing using SIPp - Asterisk / Asterisk SIP - Asterisk Community
this are my conf files
pjsip.conf
[transport-udp]
type=transport
protocol=udp
bind=192.168.1.11:5060
[sipp]
type=endpoint
context=from-internal
allow=all
auth=sipp
aors=sipp
;media_encryption=sdes
[sipp]
type=auth
auth_type=userpass
password=password
username=sipp
[sipp]
type=aor
max_contacts=20
[service]
type=endpoint
context=from-internal
allow=all
auth=service
aors=service
;media_encryption=sdes
[service]
type=auth
auth_type=userpass
password=password
username=service
[service]
type=aor
max_contacts=20
extension.conf i left what was there by default
[from-internal]
exten = service,1,Answer()
same = n,Wait(30)
same = n,Playback(hello-world)
same = n,Hangup()
exten = sipp,1,Answer()
same = n,Wait(30)
same = n,Playback(hello-world)
same = n,Hangup()
i used the basic sipp command
./sipp -sn uac -max_socket 100 -trace_err 192.168.1.11:5060
i get in the sipp log many of
2023-02-21 16:07:34.545774 1676995654.545774: Aborting call on unexpected message for Call-Id '1-14218@192.168.1.10': while expecting '100' (index 1), received 'SIP/2.0 401 Unauthorized^M
Via: SIP/2.0/UDP 192.168.1.10:5060;rport=5060;received=192.168.1.10;branch=z9hG4bK-14218-1-0^M
Call-ID: 1-14218@192.168.1.10^M
From: "sipp" <sip:sipp@192.168.1.10>;tag=14218SIPpTag001^M
To: "service" <sip:service@192.168.1.11>;tag=z9hG4bK-14218-1-0^M
CSeq: 1 INVITE^M
WWW-Authenticate: Digest realm="asterisk",nonce="1676995654/4fd8aeeb5402bca919a0b8378a037adc",opaque="49ef92d60e24bb13",algorithm=MD5,qop="auth"^M
Server: Asterisk PBX 20.1.0^M
Content-Length: 0^M
when i increase the asterisk log level i see this
<--- Received SIP request (517 bytes) from UDP:192.168.1.10:5060 --->
INVITE sip:service@192.168.1.11:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK-14740-1-0
From: sipp <sip:sipp@192.168.1.10:5060>;tag=14740SIPpTag001
To: service <sip:service@192.168.1.11:5060>
Call-ID: 1-14740@192.168.1.10
CSeq: 1 INVITE
Contact: sip:sipp@192.168.1.10:5060
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 131
v=0
o=user1 53655765 2353687637 IN IP4 192.168.1.10
s=-
c=IN IP4 192.168.1.10
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
<--- Transmitting SIP response (476 bytes) to UDP:192.168.1.10:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.10:5060;rport=5060;received=192.168.1.10;branch=z9hG4bK-14740-1-0
Call-ID: 1-14740@192.168.1.10
From: "sipp" <sip:sipp@192.168.1.10>;tag=14740SIPpTag001
To: "service" <sip:service@192.168.1.11>;tag=z9hG4bK-14740-1-0
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1676996369/ab45af4f9fe2de332def17d1606d107e",opaque="2e53c70c2847ab6a",algorithm=MD5,qop="auth"
Server: Asterisk PBX 20.1.0
Content-Length: 0
<--- Received SIP request (403 bytes) from UDP:192.168.1.10:5060 --->
ACK sip:service@192.168.1.11 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;rport=5060;received=192.168.1.10;branch=z9hG4bK-14740-1-0
From: "sipp" <sip:sipp@192.168.1.10>;tag=14740SIPpTag001
To: "service" <sip:service@192.168.1.11>;tag=z9hG4bK-14740-1-0
Call-ID: 1-14740@192.168.1.10
CSeq: 1 ACK
Contact: <sip:sipp@192.168.1.10:5060;transport=UDP>
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
<--- Received SIP request (517 bytes) from UDP:192.168.1.10:5060 --->
INVITE sip:service@192.168.1.11:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK-14740-2-0
From: sipp <sip:sipp@192.168.1.10:5060>;tag=14740SIPpTag002
To: service <sip:service@192.168.1.11:5060>
Call-ID: 2-14740@192.168.1.10
CSeq: 1 INVITE
Contact: sip:sipp@192.168.1.10:5060
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 131
v=0
o=user1 53655765 2353687637 IN IP4 192.168.1.10
s=-
c=IN IP4 192.168.1.10
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
thanks for your help