Administrator
2020-Jan-15 18:24 UTC
[asterisk-users] Asterisk16 - PJSIP - Error 401 on outbound registration
Hi all, we face a strange behavior while connecting an Asterisk16 instance with PJSIP to 2 providers: we receive error 401 Unauthorized, both of them having Kamailio as front-end. With other providers -we don't know if they run kamailio- registration is just fine. One of the provider took a pcap and told us that expiration was set to 0 that's why they don't accept the registration. We took a pcap on our side when SIP packet goes out of our server and we see that the expiration parameter is setted to 3600 ! Asterisk version is Asterisk 16.2.1~dfsg-1+deb10u1 on Debian 10 up to date. We also installed 16.7 from scratch, same problem. I have to mention that our test asterisk is also a Debian 10 with Asterisk stock 16.7 and _does_ register normally against the same provider :( If someone had a clue on this, welcome. -- Daniel
C.Maj
2020-Jan-15 18:50 UTC
[asterisk-users] Asterisk16 - PJSIP - Error 401 on outbound registration
On 2020-01-15 11:24, Administrator wrote: 8<'s> One of the provider took a pcap and told us that expiration was set to 0 > that's why they don't accept the registration. We took a pcap on our > side when SIP packet goes out of our server and we see that the > expiration parameter is setted to 3600 !Howdy, Maybe the clipping of your SIP packet is occurring on another provider's (faulty) node somewhere in between your dualing pcaps at the endpoints ? As for what you can control, first, you might try reducing the expiration from 3600 to 999, or maybe something in the 30-60 range is better for you. If that works, then raise it from there, but I think an hour is more than enough. Or, change network paths; by adding new outbound SIP connection to the provider from alternate port and/or IP on the PBX/firewall, use VPN, etc. Regards, -- 🤠 C. Maj, Technology Captain @ Penguin PBX Solutions 📞 USA Toll Free 1-833-PNGNPBX (1-833-764-6729) 🤙 International & SMS Texting +1.720.32.42.72.9 🐧 Visit on the World Wide Web at PENGUINPBX.COM
Administrator
2020-Jan-16 09:16 UTC
[asterisk-users] Asterisk16 - PJSIP - Error 401 on outbound registration
Le 15/01/2020 à 19:50, C.Maj a écrit :> On 2020-01-15 11:24, Administrator wrote: > > 8<'s > >> One of the provider took a pcap and told us that expiration was set to 0 >> that's why they don't accept the registration. We took a pcap on our >> side when SIP packet goes out of our server and we see that the >> expiration parameter is setted to 3600 ! > Howdy, > > Maybe the clipping of your SIP packet is occurring on another provider's > (faulty) node somewhere in between your dualing pcaps at the endpoints ?No.tcpdump -nqt -s 0 -i enp0s31f6 -A "dst xxx.yyy.78.36 and dst port 5060" where xxx.yyy.78.36 is the provider Kamailio IP Capture being: IP zzz.xyz.174.138.58738 > xxx.yyy.78.36.5060: UDP, length 570 E..V.T at .?...X....2N$.r...B..REGISTER sip:sip.myprovider.net SIP/2.0 Via: SIP/2.0/UDP zzz.xyz.174.138:5060;rport;branch=z9hG4bKPj673a37a2-da52-4f8f-b460-17a93005bc98 From: <sip:123456 at sip.myprovider.net>;tag=d0be9b76-6363-4ce8-b747-7d75f222eef7 To: <sip:123456 at sip.myprovider.net> Call-ID: e906c156-a23f-4cff-b099-43c61a4447c5 CSeq: 47982 REGISTER Contact: <sip:123456 at zzz.xyz.174.138:5060> Expires: 3600 Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER Max-Forwards: 70 User-Agent: TOOTAiAudio Content-Length: 0 Please notice the E..V.T at .?...X....2N$.r...B.. in front of REGISTER, could this create the problem ?> As for what you can control, first, you might try reducing the > expiration from 3600 to 999, or maybe something in the 30-60 range is > better for you. If that works, then raise it from there, but I think an > hour is more than enough.We tried with 99, 60, 986, without setting expiration leting Asterisk using his default value, no changes :(> Or, change network paths; by adding new outbound SIP connection to the > provider from alternate port and/or IP on the PBX/firewall, use VPN, etc.Not a solution, to risky. -- Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200116/ca29549c/attachment.html>
Administrator
2020-Jan-17 10:54 UTC
[asterisk-users] Asterisk16 - PJSIP - Error 401 on outbound registration
Le 15/01/2020 à 19:24, Administrator a écrit :> Hi all, > > we face a strange behavior while connecting an Asterisk16 instance > with PJSIP to 2 providers: we receive error 401 Unauthorized, both of > them having Kamailio as front-end. With other providers -we don't know > if they run kamailio- registration is just fine. > > One of the provider took a pcap and told us that expiration was set to > 0 that's why they don't accept the registration. We took a pcap on our > side when SIP packet goes out of our server and we see that the > expiration parameter is setted to 3600 ! > > Asterisk version is Asterisk 16.2.1~dfsg-1+deb10u1 on Debian 10 up to > date. We also installed 16.7 from scratch, same problem. I have to > mention that our test asterisk is also a Debian 10 with Asterisk stock > 16.7 and _does_ register normally against the same provider :( > > If someone had a clue on this, welcome.We went a step further: when Asterisk is receiving the 401 Unauthorized it doesn't send the Authorization back, insteed it send the Register back with the *same* CSeq which it shoudn't. Pjsip is pabx16*CLI> pjsip show version PJPROJECT version currently running against: 2.8 -- Daniel
Administrator
2020-Jan-18 17:10 UTC
[asterisk-users] Asterisk16 - PJSIP - Error 401 on outbound registration
Le 17/01/2020 à 11:54, Administrator a écrit :> > Le 15/01/2020 à 19:24, Administrator a écrit : >> Hi all, >> >> we face a strange behavior while connecting an Asterisk16 instance >> with PJSIP to 2 providers: we receive error 401 Unauthorized, both of >> them having Kamailio as front-end. With other providers -we don't >> know if they run kamailio- registration is just fine. >> >> One of the provider took a pcap and told us that expiration was set >> to 0 that's why they don't accept the registration. We took a pcap on >> our side when SIP packet goes out of our server and we see that the >> expiration parameter is setted to 3600 ! >> >> Asterisk version is Asterisk 16.2.1~dfsg-1+deb10u1 on Debian 10 up to >> date. We also installed 16.7 from scratch, same problem. I have to >> mention that our test asterisk is also a Debian 10 with Asterisk >> stock 16.7 and _does_ register normally against the same provider :( >> >> If someone had a clue on this, welcome. > > We went a step further: when Asterisk is receiving the 401 > Unauthorized it doesn't send the Authorization back, insteed it send > the Register back with the *same* CSeq which it shoudn't. Pjsip is > > pabx16*CLI> pjsip show version > PJPROJECT version currently running against: 2.8We removed the debian asterisk deb package and compiled from 16.7.0 source. Problem stays, still ni CSeq increment. Pjsip is pabx16*CLI> pjsip show version PJPROJECT version currently running against: 2.9 Anyone on this ? -- Daniel
Seemingly Similar Threads
- Asterisk16 - PJSIP - Error 401 on outbound registration
- Asterisk16 - PJSIP - Error 401 on outbound registration
- Asterisk16 - PJSIP - Error 401 on outbound registration
- Asterisk16 - PJSIP - Error 401 on outbound registration
- Asterisk16 - PJSIP - Error 401 on outbound registration