Dark345
(Dark345)
December 28, 2021, 11:15am
#1
Hello there community!
I have a local installation of FreePBX, behind NAT, RTP and 5060 forwarded correctly. One of my trunks (PJSIP) is OFFLINE but it actually works.
MSGN-VOIP-HWL/sip:sip.messagenet.it:5060 MSGN-VOIP-HWL Registered
but its endpoint is marked as Unavailable and therefore OFFLINE. How can I fix this?
I have some theoretical background in which this type of check is performed by sending SIP OPTIONS packets. I can’t see them flowing through my firewall.
david55
(david55)
December 28, 2021, 11:19am
#2
Are they reaching the firewall? If so from which side? Are they being sent according to pjsip set logger on (adapt accordingly for the deprecated driver)?
You can turn off the qualify feature, but that might hide a real problem.
Dark345
(Dark345)
December 28, 2021, 11:29am
#3
Well I have two trunks. for the first I see SIP OPTIONS packets and sip server replies (200 OK). This trunk is marked ONLINE correctly. For the problematic one, I can’t see any SIP OPTION reaching the firewall (pfsense) from any side, just some UDP packets whose payload is 4 bytes of 0s…
david55
(david55)
December 28, 2021, 12:03pm
#4
What do the Asterisk logs show. Is it sending the OPTIONS and, if so, is it sending to the correct address?
Dark345
(Dark345)
December 28, 2021, 12:21pm
#5
i guess it’s not logged
cat /var/log/asterisk/full
doesn’t show anything about OPTIONS check
david55
(david55)
December 28, 2021, 12:28pm
#6
As hinted above, you need to issue “pjsip set logger on” (or if using the deprecated driver, “sip set debug on”), using the CLI.
Dark345
(Dark345)
December 28, 2021, 1:04pm
#7
david55:
pjsip set logger on
Thanks! As I imagined there’s no trace of an OPTIONS SIP message (for the problematic trunk). Instead there’s a REGISTER SIP MESSAGE replied with a 401 and then followed by, again, a REGISTER and 200 OK. But this should be normal as I understand (Registration expiry time is lowered to 300 seconds, as suggested by my provider)
<--- Transmitting SIP request (596 bytes) to UDP:212.97.59.76:5060 --->
REGISTER sip:sip.messagenet.it:5060 SIP/2.0
Via: SIP/2.0/UDP censored:5060;rport;branch=z9hG4bKPj515bd5d9-deed-43b1-936a-d8117ef38d84
From: <sip:[email protected] >;tag=a1c28f9c-ef84-48f0-9b86-f1af239c05f2
To: <sip:[email protected] >
Call-ID: 0fd6b132-26c6-4674-aac3-162d5fe87b0e
CSeq: 27116 REGISTER
Contact: <sip:[email protected] :5060;line=zhkkjxf>
Expires: 300
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: FPBX-15.0.17.64(16.20.0)
Content-Length: 0
<--- Received SIP response (746 bytes) from UDP:212.97.59.76:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP censored:5060;rport=47533;branch=z9hG4bKPj515bd5d9-deed-43b1-936a-d8117ef38d84
From: <sip:[email protected] >;tag=a1c28f9c-ef84-48f0-9b86-f1af239c05f2
To: <sip:[email protected] >;tag=ac2f3091de46227321b1af258e10b75e-ca38
Call-ID: 0fd6b132-26c6-4674-aac3-162d5fe87b0e
CSeq: 27116 REGISTER
WWW-Authenticate: Digest realm="sip.messagenet.it", nonce="YcsJkWHLCGVqL318CZDibTKNMgn0Mv7t8S8SMrn9nATrEWQ0PrkmuygNV02B", qop="auth"
Server: sip.messagenet.it SIP Proxy
Content-Length: 0
Warning: 392 212.97.59.76:5060 "Noisy feedback tells: pid=177625 req_src_ip=censored req_src_port=47533 in_uri=sip:sip.messagenet.it:5060 out_uri=sip:sip.messagenet.it:5060 via_cnt==1"
<--- Transmitting SIP request (883 bytes) to UDP:212.97.59.76:5060 --->
REGISTER sip:sip.messagenet.it:5060 SIP/2.0
Via: SIP/2.0/UDP censored:5060;rport;branch=z9hG4bKPjbdf49d35-1e51-47d9-9a44-9f77a247cc46
From: <sip:[email protected] >;tag=a1c28f9c-ef84-48f0-9b86-f1af239c05f2
To: <sip:[email protected] >
Call-ID: 0fd6b132-26c6-4674-aac3-162d5fe87b0e
CSeq: 27117 REGISTER
Contact: <sip:[email protected] :5060;line=zhkkjxf>
Expires: 300
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: FPBX-15.0.17.64(16.20.0)
Authorization: Digest username="censored", realm="sip.messagenet.it", nonce="YcsJkWHLCGVqL318CZDibTKNMgn0Mv7t8S8SMrn9nATrEWQ0PrkmuygNV02B", uri="sip:sip.messagenet.it:5060", response="d2623749fd2085ae653bde0f7badb46f", cnonce="b15ecbc1f7b34a36aefffcbfdd4fea9d", qop=auth, nc=00000001
Content-Length: 0
<--- Received SIP response (752 bytes) from UDP:212.97.59.76:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP censored:5060;rport=47533;branch=z9hG4bKPjbdf49d35-1e51-47d9-9a44-9f77a247cc46
From: <sip:[email protected] >;tag=a1c28f9c-ef84-48f0-9b86-f1af239c05f2
To: <sip:[email protected] >;tag=ac2f3091de46227321b1af258e10b75e-e1b6
Call-ID: 0fd6b132-26c6-4674-aac3-162d5fe87b0e
CSeq: 27117 REGISTER
Date: Tue, 28 Dec 2021 12:51:50 GMT
Contact: <sip:[email protected] :5060;line=zhkkjxf>;q=0.5;expires=300;received="sip:censored:47533"
Server: sip.messagenet.it SIP Proxy
Content-Length: 0
Warning: 392 212.97.59.76:5060 "Noisy feedback tells: pid=177633 req_src_ip=censored req_src_port=47533 in_uri=sip:sip.messagenet.it:5060 out_uri=sip:sip.messagenet.it:5060 via_cnt==1"
Dark345
(Dark345)
December 28, 2021, 1:55pm
#8
solved! by clearing out these fields:
AOR
AOR Contact
system
(system)
closed
January 28, 2022, 1:56pm
#9
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.