PJSIP outbound registration difficulty

Good day all,

So I’m having a bit of a weird issue here. I’ve got a basic outbound reg configured (see screenshots below) I’m able to get an initial registration out to a domain once, and then without a single config change, suddenly the REG stops sending auth details after receiving a 401 challenge. I’ve tried flat file config, realtime DB config and a combination of the 2. Please see screenshots below


Screenshot 2022-10-14 at 14.57.14



What does the pjsip set logger on output show (as plain text, please). Asterisk is behaving as though it never sees the 401s.

Hi David,

Appears your suspicion is correct, I see the REGISTER in the CLI but not the 401.

<— Transmitting SIP request (583 bytes) to UDP:41.X.X.251:5060 —>
REGISTER sip:27212029908@sip1.XXXXXX.co.za SIP/2.0
Via: SIP/2.0/UDP 41.X.X.245:5060;rport;branch=z9hG4bKPj0ff486ca-40a2-470c-9119-0da9d9d8dadc
From: sip:27212029908@sip1.XXXXXX.co.za;tag=7397587b-37c4-4114-a312-5d0ae6886814
To: sip:27212029908@sip1.XXXXXX.co.za
Call-ID: 5d2b7269-f568-4971-b7e6-fe32ae88bd45
CSeq: 34339 REGISTER
Contact: sip:s@41.X.X.245:5060
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 18.12.1
Content-Length: 0

<— Transmitting SIP request (583 bytes) to UDP:41.X.X.251:5060 —>
REGISTER sip:27212029908@sip1.XXXXXX.co.za SIP/2.0
Via: SIP/2.0/UDP 41.X.X.245:5060;rport;branch=z9hG4bKPj0ff486ca-40a2-470c-9119-0da9d9d8dadc
From: sip:27212029908@sip1.XXXXXX.co.za;tag=7397587b-37c4-4114-a312-5d0ae6886814
To: sip:27212029908@sip1.XXXXXX.co.za
Call-ID: 5d2b7269-f568-4971-b7e6-fe32ae88bd45
CSeq: 34339 REGISTER
Contact: sip:s@41.X.X.245:5060
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 18.12.1
Content-Length: 0

<— Transmitting SIP request (583 bytes) to UDP:41.X.X.251:5060 —>
REGISTER sip:27212029908@sip1.XXXXXX.co.za SIP/2.0
Via: SIP/2.0/UDP 41.X.X.245:5060;rport;branch=z9hG4bKPj0ff486ca-40a2-470c-9119-0da9d9d8dadc
From: sip:27212029908@sip1.XXXXXX.co.za;tag=7397587b-37c4-4114-a312-5d0ae6886814
To: sip:27212029908@sip1.XXXXXX.co.za
Call-ID: 5d2b7269-f568-4971-b7e6-fe32ae88bd45
CSeq: 34339 REGISTER
Contact: sip:s@41.X.X.245:5060
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 18.12.1
Content-Length: 0

<— Transmitting SIP request (583 bytes) to UDP:41.X.X.251:5060 —>
REGISTER sip:27212029908@sip1.XXXXXX.co.za SIP/2.0
Via: SIP/2.0/UDP 41.X.X.245:5060;rport;branch=z9hG4bKPj0ff486ca-40a2-470c-9119-0da9d9d8dadc
From: sip:27212029908@sip1.XXXXXX.co.za;tag=7397587b-37c4-4114-a312-5d0ae6886814
To: sip:27212029908@sip1.XXXXXX.co.za
Call-ID: 5d2b7269-f568-4971-b7e6-fe32ae88bd45
CSeq: 34339 REGISTER
Contact: sip:s@41.X.X.245:5060
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 18.12.1
Content-Length: 0

I found the issue. It’s related to the specific implementation of Fail2Ban being used.

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