Trunk unreachable

Similar to this has been asked before, but I just can’t find any specific solution that works.

FreePBX 14.0.3.2 Asterisk 13.19.1

Background: Trying to find an easy to implement failover for when our internet (NBN in Australia) gets cut as it periodically does. This would require a mobile-broadband based solution.

I have a mobile broadband sim in a Netgear 785s modem and a ddwrt modem in client mode. All other modems and router combinations I tried would not allow voip. Much has been written about that topic elsewhere. But with this set up I could make voip calls from my laptop from a softphone.

The problem: With FreePBX, the trunk registers back to the SIP provider (as in show sip registry, and also visible as online status with the provider). But Show Sip Peers gives Unreachable. Attempted calls get: “all circuits are busy etc”

Firewall in the router is disabled, and no difference when I disabled firewall in freepbx/asterisk.
Sip settings:
use_q850_reason=yes
type=peer
remotesecret=****
qualify=2000
preferred_codec_only=yes
insecure=port,invite
host=sip3.xxxxxxx.com.au
fromuser=10xxxxx
dtmfmode=rfc2833
disallow=all
defaultuser=10xxxxx
context=from-pstn
allow=ulaw

which the sip provider can’t fault.

The extensions are on PJSIP, and that all seems ok.

I would blame the router or the modem, but calls direct from the softphone get through ok.

Add: Last night I briefly had the trunk become reachable (Status=Unknown) and could make outgoing calls.
With a restart I have lost that again. I have some logfile from just prior to when the connection was made and when SIP Show Peers listed status as “unknown” rather than “unreachable”

[2018-06-12 09:44:45] ERROR[1858] netsock2.c: getaddrinfo(“sip3.xxxxxxx.com.au”, “(null)”, …): Name or service not known
[2018-06-12 09:44:45] WARNING[1858] acl.c: Unable to lookup ‘sip3.xxxxxxx.com.au’
[2018-06-12 09:44:46] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:44:47] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:44:49] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:44:53] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:44:57] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:45:01] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:45:05] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c004a30 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:45:41] ERROR[1858] netsock2.c: getaddrinfo(“sip3.xxxxxx.com.au”, “(null)”, …): Name or service not known
[2018-06-12 09:45:41] WARNING[1858] acl.c: Unable to lookup ‘sip3.xxxxxxx.com.au’
[2018-06-12 09:46:01] ERROR[2198] netsock2.c: getaddrinfo(“sip3.xxxxxxxx.com.au”, “(null)”, …): Name or service not known
[2018-06-12 09:46:01] WARNING[2198] acl.c: Unable to lookup ‘sip3.xxxxxxxx.com.au’
[2018-06-12 09:46:01] WARNING[2198] acl.c: Cannot connect to (null): Invalid argument
[2018-06-12 09:46:01] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:01] NOTICE[2198] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #79)
[2018-06-12 09:46:01] WARNING[2198] chan_sip.c: Retransmission timeout reached on transmission 2c8aaf3c36ada6075b4a823927e13ea3@[::1] for seqno 179 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 76046ms with no response
[2018-06-12 09:46:02] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:03] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:05] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:09] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:13] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:17] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:21] WARNING[2198] chan_sip.c: sip_xmit of 0x7f074c001c10 (len 419) to (null) returned -1: Invalid argument
[2018-06-12 09:46:21] NOTICE[2198] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #80)

And then I made a call.

Shouldn’t have pushed my luck, but I really need this stable. After the reload, I get this:
[2018-06-12 09:56:53] NOTICE[2198] chan_sip.c: Peer ‘Trunkname chansip’ is now UNREACHABLE! Last qualify: 0
[2018-06-12 09:56:53] NOTICE[2198] chan_sip.c: Peer ‘10xxxxx’ is now UNREACHABLE! Last qualify: 0
[2018-06-12 09:57:10] NOTICE[2198] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #2)
[2018-06-12 09:57:30] NOTICE[2198] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #3)
[2018-06-12 09:57:50] NOTICE[2198] chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #4)

and so on.
(I changed the address from Sip3 to Sip4 and back. It worked briefly on the Sip3 address, but that has stopped now and makes no difference to outcome)

Can anyone make a suggestion?

Add: Tried it with a different Sip provider: exact same result: trunk registered, but unreachable.

please double check the address first and make sure it is reachable.

Address is definitely right. I don’t think it would show as registered in Sip Show Registry if it was wrong. Is that the case?

Check your DNS settings as well.

http://forums.asterisk.org/viewtopic.php?t=94169

Would the DNS settings be within FreePBX or my network?

check both.

OK, full disclosure: I am no networking guru. So, guided by Askubuntu.com, when I ask my Ubuntu system:
cat /etc/resolv.conf
I get: nameserver 127.0.1.1 (which looks weird to me)

Then I tried nmcli dev show | grep DNS
I get
IP4.DNS[1]: 8.8.8.8

Should I have both of those listed in the DNS box in system admin?

In my router, the local DNS is 192.168.0.x
Should that also be in there? (none of these changes plus reboot have fixed my problem so far)

Really appreciate any help.

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