I have an IP registration SIP trunk with a provider in Brasil. I can make outbound calls with no problem.
Inbound calls come from a second IP address (Outbound uses x.x.x.2, inbound uses x.x.x.3).
So, if from CLI i run asterisk -rvvvvvvvvv and then sip set debug on and place a call to any of my inbound DID’s, I never see anything hit my system.
Provider has shown that my fPBX is replying to the inbound that he is passing as SIP/2.0 401 Unauthorized.
I have:
disabled IPtables (temporarily, as a test)
enabled anonymous calls
enabled guest calls
restarted asterisk service
rebooted entire PBX
Nothing seems to be working.
Server: FPBX-13.0.195(13.21.0)
U 2018/05/14 22:09:08.622053 X.X.X.3:5070 -> Y.Y.Y.192:5060
INVITE sip:Inbound [email protected] SIP/2.0.
Via: SIP/2.0/UDP X.X.X.3:5070;branch=z9hG4bK6d9fd0fa.
Max-Forwards: 70.
From: "CallerID" <sip:[email protected]:5070>;tag=as6ba970a0.
To: <sip:Inbound [email protected]>.
Contact: <sip:[email protected]:5070>.
Call-ID: [email protected]:5070.
CSeq: 102 INVITE.
User-Agent: VoipControl PBX.
Date: Tue, 15 May 2018 01:09:08 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces, timer.
Diversion: <sip:+Inbound [email protected]>;reason=unconditional.
Content-Type: application/sdp.
Content-Length: 261.
.
v=0.
o=root 1928389977 1928389977 IN IP4 X.X.X.3.
s=Asterisk PBX 1.8.32.3.
c=IN IP4 X.X.X.3.
t=0 0.
m=audio 29838 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
U 2018/05/14 22:09:08.627763 Y.Y.Y.192:5060 -> X.X.X.3:5070
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP X.X.X.3:5070;branch=z9hG4bK6d9fd0fa;received=X.X.X.3.
From: "CallerID" <sip:[email protected]:5070>;tag=as6ba970a0.
To: <sip:Inbound [email protected]>;tag=as0f5f8369.
Call-ID: [email protected]:5070.
CSeq: 102 INVITE.
Server: FPBX-13.0.195(13.21.0).
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces, timer.
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="77e740d9".
Content-Length: 0.
.
U 2018/05/14 22:09:08.627948 X.X.X.3:5070 -> Y.Y.Y.192:5060
ACK sip:Inbound [email protected] SIP/2.0.
Via: SIP/2.0/UDP X.X.X.3:5070;branch=z9hG4bK6d9fd0fa.
Max-Forwards: 70.
From: "CallerID" <sip:[email protected]:5070>;tag=as6ba970a0.
To: <sip:Inbound [email protected]>;tag=as0f5f8369.
Contact: <sip:[email protected]:5070>.
Call-ID: [email protected]:5070.
CSeq: 102 ACK.
User-Agent: VoipControl PBX.
Content-Length: 0.
.
U 2018/05/14 22:09:16.499463 Y.Y.Y.192:5060 -> X.X.X.2:5060
OPTIONS sip:Provider FQDN SIP/2.0.
Via: SIP/2.0/UDP Y.Y.Y.192:5060;branch=z9hG4bK2faf7142.
Max-Forwards: 70.
From: "Unknown" <sip:[email protected]>;tag=as39b641c6.
To: <sip:Provider FQDN>.
Contact: <sip:[email protected]:5060>.
Call-ID: [email protected]:5060.
CSeq: 102 OPTIONS.
User-Agent: FPBX-13.0.195(13.21.0).
Date: Tue, 15 May 2018 01:09:08 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces.
Content-Length: 0.
.
U 2018/05/14 22:09:16.505340 X.X.X.2:5060 -> Y.Y.Y.192:5060
SIP/2.0 501 Not Implemented.
Via: SIP/2.0/UDP Y.Y.Y.192:5060;branch=z9hG4bK2faf7142.
From: "Unknown" <sip:[email protected]>;tag=as39b641c6.
To: <sip:Provider FQDN>.
Call-ID: [email protected]:5060.
CSeq: 102 OPTIONS.
Server: MERA MSIP v.1.0.2.
Content-Length: 0.
Trunk Settings:
PEER DETAILS:
type=friend
host=Provider FQDN&X.X.X.3
insecure=port,invite
context=from-trunk
nat=no
session-timers=refuse
Any help would be greatly appreciated!