No inbound calls


I have been trying to setup a PBX at home with Faktortel service and cannot get it to work.

This is the versions I am running:
Debian 9
Asterisk 15.7.2
Freepbx 14

I currently setup a soft phone extension to make and receive calls.

Outbound calls are working fine. But I cannot get inbound calls to work.

I have both Inbound and Outbound route setup already. Have also forwarded all necessary ports 5060, 10000 - 20000 and 16000 - 65000 (Faktortel guide says to forward these ports) to my Asterisk server (which is behind a NAT firewall).

This is my trunk settings below.



MYUSERNAME:[email protected]

If I try to call from a mobile to my number 0291234567, I hear this:
“The number you have dialed is not in service, please check the number and try again”

It seems to hit my PBX, cause I can see below generated in asterisk CLI:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
> 0x7ff09000eb50 – Strict RTP learning after remote address set to:
– Executing [[email protected]:1] NoOp(“SIP/”, “Received incoming SIP connection from unknown peer to 0291234567”) in new stack
– Executing [[email protected]:2] Set(“SIP/”, “DID=0291234567”) in new stack
– Executing [[email protected]:3] Goto(“SIP/”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [[email protected]:1] GotoIf(“SIP/”, “1?setlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [[email protected]:2] Set(“SIP/”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/”, “1?noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [[email protected]:5] Set(“SIP/”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2019-05-05 09:44:45.309 AEST.
– Executing [[email protected]:6] Log(“SIP/”, "WARNING,“Rejecting unknown SIP connection from"”) in new stack
[2019-05-05 09:44:30] WARNING[1217][C-00000004]: Ext. s:6 @ from-sip-external: “Rejecting unknown SIP connection from”
– Executing [[email protected]:7] Answer(“SIP/”, “”) in new stack
– Executing [[email protected]:8] Wait(“SIP/”, “2”) in new stack
– Executing [[email protected]:9] Playback(“SIP/”, “ss-noservice”) in new stack
– <SIP/> Playing ‘ss-noservice.ulaw’ (language ‘en’)
> 0x7ff09000eb50 – Strict RTP switching to RTP target address as source
> 0x7ff09000eb50 – Strict RTP learning complete - Locking on source address
– Executing [[email protected]:10] PlayTones(“SIP/”, “congestion”) in new stack
– Executing [[email protected]:11] Congestion(“SIP/”, “5”) in new stack
== Spawn extension (from-sip-external, s, 11) exited non-zero on ‘SIP/’
– Executing [[email protected]:1] Hangup(“SIP/”, “”) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/’

I have been trying to get this to work for days now.

Can someone please help get these Inbound calls working?

Your trunk settings are a mess. Are you registering with them or peering with them?

  1. Remove all the Incoming settings. Those aren’t needed.
  2. If you are registering then the only thing in the Incoming section should be the register string and the name at the top setting. Nothing in the peer details.
  3. Outgoing overrides Incoming, so you only need your settings in Outgoing.
  4. If you are registering then the type must be friend not peer.
  5. If the calls are going to source from different IP addresses then you need as many trunks as there are IPs. Chan_SIP only supports one host per trunk.

This would be better handled with a Chan_PJSIP trunk overall since it handles SRV and can support multiple source IPs/subnets in one trunk.

Also, get off a the 15 branch of Asterisk. It only gets security fixes. You should be on 13 or 16 as those are both LTS and getting continual support.

1 Like

Thanks for all your suggestions BlazeStudios, I will try giving those things a try.

I did try Chan_PJSIP trunk earlier, but could not get it to register at all, I probably set something wrong. Is Chan_PJSIP trunk only supported by particular providers or should it work with all providers including my one Faktortel?

Once I get this working, I may try to upgrade to version 16 later.

Also, Incoming works if I enable “Allow Anonymous Inbound SIP Calls” but I read this is a security risk, so I have disabled it.

Thanks so much BlazeStudios, your suggestion about chan_pjsip trunk worked for me, I thought chan_pjsip trunk was not working because when I typed “sip show peers” the trunk did not show up at all so I assumed it was not working, but found out I needed to type “pjsip show endpoints” to check correctly. After I confirmed it was registered, tested both incoming and outgoing calls worked immediately!!!

Im so happy. Thanks again.

Sorry, it was all working, but for some reason after some time inbound calls stop working again.

If I call from my mobile, the call never goes through and just drops i.e. does not even ring.

Also, the call never even reaches the PBX, as Asterisk CLI does not show anything when I make the call.

If I restart asterisk, inbound calls work for a while again and suddenly stops again after some time and once it stops it seems to never work again until I restart Asterisk.

Any ideas what might be causing this weird issue?

That sounds like a NAT issue. You should look at your router and make sure things like SIP ALG or any SIP helpers are turned off.

1 Like

You really know your stuff. Spot on, changed a setting on my router and now inbound calls been going strong for 2 hours already (I assume its good because previously it stopped working after a few mins).

You have been great help, without you I probably would still be stuck with this. Thanks again!!!

1 Like

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