FreePBX | Register | Issues | Wiki | Portal | Support

No inbound calls

siptrunk
Tags: #<Tag:0x00007f7497074ca8>

(Bruc3) #1

Hi,

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.

====OUTGOING - PEER DETAILS===
username=MYUSERNAME
type=peer
sendrpid=pai
secret=MYPASSWORD
qualify=yes
nat=yes
host=sip.faktortel.net.au
fromuser=MYUSERNAME
dtmfmode=rfc2833
disallow=all
directmedia=no
context=from-trunk
canreinvite=no
allow=alaw&ulaw

==== INCOMING - USER DETAILS===
type=user
trustrpid=yes
secret=MYPASSWORD
qualify=yes
nat=yes
insecure=port,invite
host=dynamic
dtmfmode=rfc2833
disallow=all
directmedia=no&no
context=from-trunk
canreinvite=no&no
allow=alaw&ulaw

=== REGISTER STRING ===
MYUSERNAME:MYPASSWORD@sip.faktortel.net.au

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

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

Can someone please help get these Inbound calls working?


(Tom Ray) #3

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.


(Bruc3) #4

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.


(Bruc3) #5

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.


(Bruc3) #6

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?


(Tom Ray) #7

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.


(Bruc3) #8

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!!!


(system) closed #9

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