No incoming call?! (noob alert)

im trying to call my phone on the pbx from the outside.

I know the nat works, because in asterisk -rvvvvvvvvv
and sip set debug ip (my ip) i get this

My sip provides ip is 91.217.201.94
and sip providers domain; sip5.sippeer.dk
My pbx servers lan ip 172.168.5.70

<— SIP read from UDP:91.217.201.94:5060 —>

SIP/2.0 200 OK

Via: SIP/2.0/UDP 172.168.5.70:5160;branch=z9hG4bK6bc6ba90;received=172.168.5.70;rport=5160

From: <sip:[email protected]>;tag=as504db358

To: <sip:[email protected]>;tag=as4c04f000

Call-ID: [email protected]

CSeq: 113 REGISTER

User-Agent: CME VoIP PBX

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

Supported: replaces

Expires: 120

Contact: <sip:[email protected]:5160>;expires=120

Date: Sat, 10 Nov 2018 14:40:22 GMT

Content-Length: 0

<------------->

You need to read up on “NAT” and setting up your network to use it.

Specifically, I suspect you are going to have to port-forward port 5060 on your Firewall (and probably 10000-20000) from the routable address you are using on the Internet to the 172.168.x.x address you are using inside the network.

guess I didn’t make that clear, but those ports are already forwarded :wink:
I’ve played with “nat” for most 20 years now :wink: im far from a noob when
it comes to network :wink:

Then you would realize that NAT is the issue here. When the device sends a REGISTER, it’s sending a new outbound request that is going to make your “NAT hole” in your router. Once you’re device is registered and gives the PBX its location (IP:port) the PBX will try to “qualify” the endpoint/peer. It will send OPTION messages to that endpoint/peer and expect replies. If it doesn’t get them in a timely fashion or at all, it will mark the endpoint/peer as UNREACHABLE (it can’t reach it) and it will stop sending calls to it. Now if you pick up your device and make a call again, you are initiating a new outbound request and again opening your “NAT hole”. Same applies when the device re-registers, it sends a new outbound request.

In the case of the PBX, logic is still the same but the provider probably is not “qualifying” your trunk and is just sending the calls to the IP:port it was told upon last registration.

So this would be 100% NAT/network. What type of firewall/router is in front of the PBX?

I can only tell u that its a hardcore one :wink: I dont wanna leak my
hardware to the internet, and I guess u won’t know the model either :slight_smile:

but got another setup, and now it tells me “the number u have dialled is not in service”

Sure. OK. Well your hardcore router is being hardcore crappy with NAT or is hardcore setup wrong.

Is this for an outbound call or an inbound call? Either way that means you have something not configured like an Outbound or Inbound Route and the PBX doesn’t know to do with the call.

1 Like

incoming call

Then make sure you have proper Inbound Routes to route those calls.

Check your logs (/var/log/asterisk/full) for the call.

If you are processing the call, your NAT and router are set up correctly. If not, your server is returning the message to the caller, which would mean you have something else set up wrong.

In order for this to NOT be a router problem, your calls have to be hitting the PBX and failing there.

can u send me a PM? I can’t

hm nat is fine, and tested it simple, by disable em , and the error dint come,
and in terminal I can see call is coming in, currenty I can’t access it , the machine
is running a bounce of updates :wink:

== Using SIP RTP TOS bits 184

== Using SIP RTP CoS mark 5

&gt; 0x6d500018 – Strict RTP learning after remote address set to: 91.217.201.94:17188

Executing [MY [email protected]:1] Set(“SIP/MY IN TRUUNK-00000005”, “__FROM_DID=MY USER”) in new stack

Executing [MY [email protected]:2] NoOp(“SIP/MY IN ROUTE-00000005”, “Received an unknown call with DID set to MY USER”) in new stack

Executing [MY [email protected]:3] Goto(“SIP/MY IN ROUTE-00000005”, “s,a2”) in new stack

Goto (from-trunk,s,2)

Executing [[email protected]:2] Answer(“SIP/MY IN ROUTE-00000005”, “”) in new stack

&gt; 0x6d500018 – Strict RTP switching to RTP target address 91.217.201.94:17188 as source

Executing [[email protected]:3] Log(“SIP/MY IN ROUTE-00000005”, “WARNING,Friendly Scanner from 91.217.201.94”) in new stack

[2018-11-13 18:48:21] WARNING[11953][C-00000008]: Ext. s:3 @ from-trunk: Friendly Scanner from 91.217.201.94

Executing [[email protected]:4] Wait(“SIP/MY IN ROUTE-00000005”, “2”) in new stack

Executing [[email protected]:5] Playback(“SIP/MY IN ROUTE-00000005”, “ss-noservice”) in new stack

&lt;SIP/MY IN ROUTE-00000005&gt; Playing ‘ss-noservice.alaw’ (language ‘en’)

Executing [[email protected]:1] Macro(“SIP/MY IN ROUTE-00000005”, “hangupcall,”) in new stack

Executing [[email protected]:1] GotoIf(“SIP/MY IN ROUTE-00000005”, “1?theend”) in new stack

Goto (macro-hangupcall,s,3)

Executing [[email protected]:3] ExecIf(“SIP/MY IN ROUTE-00000005”, “0?Set(CDR(recordingfile)=)”) in new stack

Executing [[email protected]:4] NoOp(“SIP/MY IN ROUTE-00000005”, " monior file= ") in new stack

Executing [[email protected]:5] AGI(“SIP/MY IN ROUTE-00000005”, “attendedtransfer-rec-restart.php,”) in new stack

Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php

&lt;SIP/MY IN ROUTE-00000005&gt;AGI Script attendedtransfer-rec-restart.php completed, returning 0

Executing [[email protected]:6] Hangup(“SIP/MY IN ROUTE-00000005”, “”) in new stack

== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/MY IN ROUTE-00000005’ in macro ‘hangupcall’

== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/MY IN ROUTE-00000005’

The solution was given already.

hmm what am I missing here

Do a test with the Inbound Route DID Number blank. If that allows the call to come in, you either have the number in the wrong format, or the trunking provider is sending it in To or some other header, rather than in the URI.

For example, your provider may be sending 32345678, 4532345678 or +4532345678. The DID Number in your route must match exactly.

Here is the problem, you have masked every vital piece of information that we would need to troubleshoot this. We have no idea if your Inbound Route is actually matching what is being sent because you’ve changed it all.

We have no real reference points. The DID being sent by the provider should be an exact match in Inbound Routes.

I’ve only masked my phone number

okkk if ANY set the phone rings :wink: so most there :smiley:

hm tried with my number with dk area code +45 no dice :wink:

You mean the thing your provider is using to send calls and that has to match what is the Inbound Route? That thing? Yeah, we don’t know how they are sending it and how you have it actually set in the Inbound Route. Therefore we cannot truly what the issue is.

== Using SIP RTP TOS bits 184

== Using SIP RTP CoS mark 5

> 0x6d500018 – Strict RTP learning after remote address set to: 91.217.201.94:18518

Executing [[email protected]:1] Set(“SIP/86518610-in-0000000c”, “__FROM_DID=8618610”) in new stack

Executing [[email protected]:2] NoOp(“SIP/86518610-in-0000000c”, “Received an unknown call with DID set to 8618610”) in new stack

Executing [[email protected]:3] Goto(“SIP/86518610-in-0000000c”, “s,a2”) in new stack

Goto (from-trunk,s,2)

Executing [[email protected]:2] Answer(“SIP/86518610-in-0000000c”, “”) in new stack

> 0x6d500018 – Strict RTP switching to RTP target address 91.217.201.94:18518 as source

Executing [[email protected]:3] Log(“SIP/86518610-in-0000000c”, “WARNING,Friendly Scanner from 91.217.201.94”) in new stack

[2018-11-13 19:43:23] WARNING[14734][C-0000000f]: Ext. s:3 @ from-trunk: Friendly Scanner from 91.217.201.94

Executing [[email protected]:4] Wait(“SIP/86518610-in-0000000c”, “2”) in new stac

k