Struggling with setup of Gamma SIP Trunks on FreePBX

Firstly i’ll apologize in advance as i’m not entirely familiar with what i’m trying to do here.

I’ve setup a FreePBX and ordered some SIP Trunks from Gamma for my new Yealink T48S Phones. The phones are registered and working internally with FreePBX, but as far as now setting these up for inbound/outbound i’m stumped.

As far as i’m aware, the basic installation is going to require me to setup a Trunk on the FreePBX, as well as inbound and outbound rules. Here’s where i’m having the problem translating the information provided to me by Gamma into the fields i can change on the FreePBX.

The information supplied to my by Gamma is as follows:

IP Address: XX.XX.XX.221

Channels: 2

Signalling UDP: XX.XX.XX.139

Media UDP: XX.XX.XX.140

and of course the phone number itself.

Is there anyone familiar with utilizing Gamma SIP Trunks with FreePBX that might be able to talk me through how to translate the information Gamma has provided me with into my PBX to make it functional?

UPDATE - my PBX is now functioning for outbound calls, i’m now just stuck on the inbound route. My current settings are as follows:

Connectivity > Trunks > General

Trunk Name: Gamma
Hide Caller ID: NO
Outbound CallerID: XXXXXXXXX96 (My DDI)
CID Options: Allow Any CID
Maximum Channels: 2 (i’ve paid for 2 trunks)

Connectivity > Trunks > Outgoing

Trunk Name: Gamma Out


Connectivity > Trunks > Incoming

User Context: XXXXXXXXX96


Connectivity > Outbound Routes

I’ve not really changed anything here other can given it:
Route Name: outbound
Trunk Sequence for Matched Routes: gamma (the name of my trunk)

This is the error i receive when trying to make and inbound call:

[2018-09-13 10:14:32] ERROR[6115] res_pjsip.c: Unable to retrieve PJSIP transport ‘udp,tcp,ws,wss’


For a chan_sip trunk, try outbound settings:

If no luck, post log of a failing attempted call.

Thanks for the input Stewart,

i’ve got my outbound called working with the settings I’ve updated on my main post. I’m just stuck at receiving inbound calls now, here’s the error i get when i try:

[2018-09-13 10:14:32] ERROR[6115] res_pjsip.c: Unable to retrieve PJSIP transport ‘udp,tcp,ws,wss’

Any ideas?

Thanks again.

The error that you are seeing might be related to this bug:

If your trunk is set as PJSIP, try setting it up as SIP, but you might need to assign port 5060 to SIP and 5160 to PJSIP.

IMO the inbound problem is simply that Gamma is sending calls to port 5060 on your PBX (where pjsip is listening), rather than the chan_sip port (probably 5160, check at Asterisk SIP Settings -> Chan SIP Settings -> Bind Port).

Possible fixes:

  1. Get Gamma to send your calls to port 5160 (or whatever your chan_sip is using). If needed, allow it in your firewall.
  2. Change your Gamma trunk to use pjsip instead of chan_sip.
  3. Keep your existing chan_sip trunk for outgoing and create a new pjsip trunk to accept incoming calls.
  4. Change the pjsip Port to Listen On from 5060 to something else, then change chan_sip Bind Port to 5060. You’ll need to update your extensions to use the new ports and restart Asterisk.
1 Like

Thank you very much, i think you’ve hit the nail on the head here.

I worked my way through list and having switched over my chan_sip and pjsip ports, and re-registered the phones with the new 5160 port,I now officially have inbound and outbound calling.

I get the impression this freePBX system is have quite a learning curve, as i’m now getting some new errors in my logs about failed registration for extensions i’m using which from the phone is showing as registered, and also from other random extensions i’m not using i.e 1820 (101, 102 are my only current setup extensions)

[2018-09-14 14:10:47] NOTICE[2490] chan_sip.c: Registration from ‘1820 <sip:[email protected]:5060>’ failed for ‘’ - Wrong password

That snipped seems to be registering from Estonia, so i’m assuming it’s part of some kind of brute force attack(i’m in the UK), i’m going to work on some IP tables now and see if that resolves these issues.

Again, thank you for your help.

Time to set up the integrated firewall.

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