Asterisk stress testing using SIPp

Hi Everyone, i am new to a testing tool called SIPp and i am trying to do stress testing for asterisk, i am running this command:

./sipp -sn uac -d 20000 -s 44444 {asterisk server IP address} -l 100 -r 10 -trace_err -error_file sipperror

But i am getting error on my asterisk CLI stating that no matching endpoint is found, please help if anyone familiar with this type of error:

[Apr 7 02:50:24] NOTICE[59495]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“sipp” sip:sipp@127.0.1.1’ failed for ‘asterisk ip:5061’ (callid: 604-59494@127.0.1.1) - No matching endpoint found

The endpoint is reachable on asterisk server and to make sure i checked pjsip show endpoints and can confirm there is a sip registration to that endpoint, Here is my pjsip file if it is related:

[44444]
type=endpoint
context=for_everyone
allow=!all,all
auth=44444
aors=44444

[44444]
type=auth
auth_type=userpass
password=0000
username=44444

[44444]
type=aor
max_contacts=20

While checking my sipp error file i am getting this error

2020-04-07 03:51:04:245 1586256664.245611: Aborting call on unexpected message for Call-Id ‘2-60270@127.0.1.1’: while expecting ‘100’ (index 1), received 'SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 127.0.1.1:5061;rport=5061;received=asterisk ip address;branch=z9hG4bK-60270-2-0
Call-ID: 2-60270@127.0.1.1
From: “sipp” sip:sipp@127.0.1.1;tag=60270SIPpTag002
To: “44444” <sip:44444@asterisk ip address>;tag=z9hG4bK-60270-2-0
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1586256664/daa749475fb2894808c796f9efd74afa”,opaque=“1f65cab44992bf66”,algorithm=md5,qop=“auth”
Server: Asterisk PBX 17.1.0
Content-Length: 0

All PJSIP traffic gets associated with an endpoint. Your request from SIPp did not match an endpoint, so it was rejected and challenged for authentication.

You’d need to add another endpoint for SIPp, if named “sipp” then it would be matched as that is the username in the “From” header.

Hey jcolp, I added another endpoint called “sipp” in my asterisk configuration files but i am still getting the same error. Do i have to change anything in my sipp command?

sudo ./sipp -sn uac -d 20000 -s 44444 {asterisk ip address} -l 100 -r 10 -trace_err -error_file sipperror

Did you reload the Asterisk configuration? What is the actual configuration?

Okay i restarted my asterisk and i stopped getting the previous error on asterisk CLI which was the “No matching endpoint found”, but i am still getting the error on SIPp in my error file

Here is my pjsip file:

[44444]
type=endpoint
context=for_everyone
allow=!all,all
auth=44444
aors=44444

[44444]
type=auth
auth_type=userpass
password=0000
username=44444

[44444]
type=aor
max_contacts=20

[sipp]
type=endpoint
context=for_everyone
allow=!all,all
auth=sipp
aors=sipp

[sipp]
type=auth
auth_type=userpass
password=2222
username=sipp

[sipp]
type=aor
max_contacts=20

Jcolp should i do a SIP registration on another phone for the “sipp” endpoint as well?

You haven’t specified what error occurred, shown console output, or described what is happening in SIPp so I can’t answer. I’d suggest taking a step back, breaking down each bit, figuring out what you want to happen, and then piecing it together and figuring out when something doesn’t work what exactly about it isn’t working.

If you are talking about this error them make sure you use sipp with SIP user authentication because your SIP endpoints in pjsip are configured to use user authentication.

Hi satish,
Thank you for pointing out the user authentication as it is causing the problem, so i did my research and found this section:

https://sipp.readthedocs.io/en/v3.6.0/scenarios/sipauth.html

As you know i will have to provide “-ap” in my sipp command for password authentication, in addition, the scenario should have auth=“true” in the . So my first step was to create my own XML scenario but when i run the sipp command i get:

Unable to load or parse ‘playback_with_initial_sdp.xml’ xml scenario file.

I was not getting this error before because i was using a default scenario but it will not work in my case due to authentication, can i solve this issue by removing the user authentication in my pjsip.conf file on asterisk?

Okay it worked by removing authentication from my endpoints to do stress testing with sipp.
Thank you so much jcolp and satish!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.