Three trunks... port disallowed

Hallo!

I’m trying to add a trunk for the UK Cnet and having a spot of bother. The port needed to access the service is perhaps(?) non standard. Do I need to use bindport??

This is the information I’ve been given to connect. I should note that I can happily connect using an Xlite client and also using a SPA3000 or PAP2T. Just not yet using FreePBX.

type=peer
secret=PASSWORD
insecure=invite
username=MYUSERNAME
defaultuser=MYUSERNAME
fromuser=MYUSERNAME
context=CUSTOMCONTEXT
fromdomain=83.124.130.28:5062
host=83.124.130.28:5062
outboundproxy=83.124.130.28:5062
qualify=yes
disallow=all
allow=ulaw          
dtmfmode=rfc2833

Please note I’ve obfuscated the IP (but not the port!).

I was also given a REGISTER string which I’ve tried inputting under INCOMING on the SIP trunk GUI.

MYUSERNAME:[email protected]:5062/PASSWORD

I get various errors, from port disallowed, to lookup failed on the domain, to the domain showing up as UNSPECIFIED on the “sip show peers” screen.

I have two other SIP trunks working: one for my SPA3000 and one for Sipgate. Both of these use other ports. I tried removing the :5062 and instead adding port=5062 but that didn’t help. I’m NOT running a firewall.

Please help!?! Thank you!!!

This format is not supported, for chan_sip you need something like this:

host=83.124.130.28
port=5062

The port in your register string should work like that, but you will want to confirm at Asterisk CLI:

sip show registry

As @lgaetz says. I believe that you also need:

outboundproxy=83.124.130.28
outboundproxyport=5062

If you still have trouble, post the log for an attempted call.

1 Like

Thanks guys!!! After ENDLESS (literally HOURS) of faffing around with it, trying different combinations of IPs and ports, the working config (if anyone following me is also trying to connect to UK CNet) is:-

type=peer
insecure=invite
username=USER
secret=PASS
defaultuser=USERNAME
fromuser=USERNAME
context=from-trunk
host=IPADDR
port=PORT
qualify=yes
disallow=all
allow=ulaw
dtmfmode=rfc2833

ANY other combination of additional ip/port related settings means the host is UNREACHABLE!! Thank you!!!

Your register string is also incorrect but I would need to see the full details they gave you because you may need to have the fromdomain in it, or an auth user. Without knowing what type of settings they want to be auth/validated with can’t speak more to what you have misconfigured or missing.

Yes I’d spotted that and had corrected it (as in my OP was how it was provided to me, but you’re right it’s not right).

But yes - all sorted and working now thank you!

1 Like

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