[asterisk-users] Asterisk16 - PJSIP - Error 401 on outbound registration
chris at PenguinPBX.com
Tue Jan 21 09:47:14 CST 2020
On 2020-01-16 02:16, Administrator wrote:
> Le 15/01/2020 à 19:50, C.Maj a écrit :
>> On 2020-01-15 11:24, Administrator wrote:
>>> 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 !
>> 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
> <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
That "User-Agent" might be getting filtered by the provider as a basic
Can you try the default string for your version of Asterisk ?
> Content-Length: 0
> Please notice the
> E..V.T at .?...X....2N$.r...B..
> in front of REGISTER, could this create the problem ?
Probably not. Those dots are hiding some details about the packet. The
output is ASCII due to "-A" flag to tcpdump. Try changing to "-X" for
hexadecimal and ASCII. Or, write the packets to a file, and then open
the file in Wireshark (there are many helpful SIP analysis tools built
in to Wireshark.)
>> 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.
How about giving it a try from a hosted/cloud virtual machine running
somewhere else on the internet ie. not from behind your firewall ?
🤠 C. Maj, Technology Captain @ Penguin PBX Solutions
📞 USA Toll Free 1-833-PNGNPBX (1-833-764-6729)
🤙 International & SMS Texting +1.7126.96.36.199.9
🐧 Visit on the World Wide Web at PENGUINPBX.COM
More information about the asterisk-users