Softphones won't register to PJSIP ext over UDP


#1

Hello,

I’m trying to setup some PJSIP extensions using softphones and when I try to register them over UDP they fail to register and get a 401 failed to authenticate error. If I try to register them over TLS and tell the softphones not to verify the certificate they register just fine. The softphones are on the same lan as the PBX. Anything to check? The default ports are being used with PJSIP. I have verified the extensions secret is correct in the softphone.

What should I check?

Thanks,
Daniel


#2

The log file.


#3

Here is the log:

[2020-07-17 23:59:40] VERBOSE[31791] res_pjsip_logger.c: <--- Received SIP request (657 bytes) from UDP:192.168.0.230:44196 --->
REGISTER sip:192.168.100.3 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.230:44196;branch=z9hG4bK-524287-1---c3000d1c1ff6e56a;rport
Max-Forwards: 70
Contact: <sip:4400@192.168.0.230:44196;rinstance=f5d6bab85ab7b8ea>;+sip.instance="<urn:uuid:da39a3ee-5e6b-5b0d-b255-bfef95601890>";reg-id=1
To: "4400"<sip:4400@192.168.100.3>
From: "4400"<sip:4400@192.168.100.3>;tag=a869da25
Call-ID: 143678_rel51Yjk2YTNmNDNkOGNkOGJhMTEzMmVjY2JhNTUyN2RhNmE
CSeq: 6 REGISTER
Expires: 900
Allow: INVITE, ACK, CANCEL, BYE, REFER, INFO, NOTIFY, OPTIONS, UPDATE, PRACK, SUBSCRIBE, MESSAGE
Supported: outbound, path
User-Agent: Bria Android 3.9.6 build 99409
Content-Length: 0


[2020-07-17 23:59:40] VERBOSE[31792] res_pjsip_logger.c: <--- Transmitting SIP response (556 bytes) to UDP:192.168.0.230:44196 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.230:44196;rport=44196;received=192.168.0.230;branch=z9hG4bK-524287-1---c3000d1c1ff6e56a
Call-ID: 143678_rel51Yjk2YTNmNDNkOGNkOGJhMTEzMmVjY2JhNTUyN2RhNmE
From: "4400" <sip:4400@192.168.100.3>;tag=a869da25
To: "4400" <sip:4400@192.168.100.3>;tag=z9hG4bK-524287-1---c3000d1c1ff6e56a
CSeq: 6 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1595030380/7bb7ad1724755c8196f45072cf610b3a",opaque="47d3baef33d7abe0",algorithm=md5,qop="auth"
Server: FPBX-15.0.16.67(16.9.0)
Content-Length: 0

Thanks,
Daniel


#4

Your phone is supposed to react to that 401 response by sending another register request with credentials. 401 is not a terminal error message.


#5

Your phone is supposed to react to that 401 response by sending another register request with credentials. 401 is not a terminal error message.

The softphone shows a 408 time out error. Is it not odd that TLS is working but UDP is not?


#6

Not really. It means something is blocking the return path - network firewall or firewall on the PC.

TLS is a stateful protocol and keeps the connection open whereas UDP just fires a datagram and then waits around hoping a reply will come back.


#7

Thanks @billsimon that does make sense.

Interesting enough, the softphone is on an Android 10 Google Pixel 2. If I reboot the smart phone the softphone will register over UDP for a while. Then the registration will drop and the softphone stops receiving UDP packets. I’ll have to do some digging to see if I can figure out what is blocking it.

Any ideas on what could be causing an Android device to stop receiving UDP packets?

Thanks again for your help!

-Daniel


(Dave Burgess) #8

That sounds a lot like the firewall losing your session and giving up on the connection. Search the forum for “30 seconds” and “30 minutes” and you should find several discussions that talk about ways to solve this if it actually your problem.


(system) closed #9

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