Get help with installing, upgrading and running a PBX such as Asterisk.
100 %
User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
#64
Many people struggle when initially trying to use Sipgate on their Asterisk system - especially when going through a NAT firewall.

The key to getting the system to work reliably without getting one way transmission problems is to allocate ports for each Sipgate trunk. On my PBX I have 4 standard Sipgate numbers, and I use one of them for outgoing calls while the others are purely for incoming.

To avoid NAT problems make sure that your /etc/asterisk/sip_nat.conf contains:
  1. nat=yes
  2. externip=x.x.x.x
Where x.x.x.x = your 'public' IP address.
Lets start by seeing a working incoming and outgoing trunk Freepbx setup :
sipgate_asterisk_config.png
sipgate_asterisk_config.png (4.86 KiB) Viewed 2323 times
In Outgoing settings, make sure you have fromuser and username set to your Sipgate ID.
Enter context=from-trunk in Outgoing settings if you do not allow anonymous sip calls.
0
User avatar
By Mrdiy88
Posts Likes Avatar Topics
#5735
Hi WelshPaul,

I have followed this advice to setup Sipgate basic as my trunk (I know others have already achieved this). I am using the latest version of freepbx but it doesn't seem to register with the above details. Does anyone have any ideas of what to try to get it to work.

Also when I dial any number I get the dead tone, is this just because my trunk is not setup correctly?

Thanks
0
User avatar
By VoipIT
Posts Likes Avatar
#5737
@WelshPaul's original post is dated 2013 and so it may now be outdated. Try following this guide:

FreePBX Configuration - sipgate SIP Trunking

The following guide describes the configuration of a sipgate SIP Trunk on a fresh install of FreePBX.

Estimated setup time required: under 20 minutes (excluding download and installation of FreePBX)

FreePBX version used in this guide: FreePBX 13; Linux 6.6; Asterisk 13

FreePBX Documentation, Installation & Configuration Guides:

You'll need your sipgate SIP Trunk's SIP-ID and SIP Password.

To find these:
  • Login to your sipgate account: https://login.sipgate.com
  • Under the Trunks menu in the Navigation bar click on the Trunk you wish to configure
  • Scroll down to the SIP Credentials section at the bottom of the main page.
Open your computer's browser and enter FreePBX's IP address into your browser's address bar.
Click on FreePBX Administration:
Image

Remember:

Submit your changes regularly:
Image

Double check your changes before applying them:
Image

1. Add a SIP Trunk:

Open Connectivity --> Trunks:
Image

Click Add Trunk --> Add SIP (chan_sip) TRUNK:
Image

Add Trunk --> General:
Image

Add Trunk --> sip Settings:
Image

Peer Details:
  • fromuser=SIPID
  • username=SIPID
  • secret=SIP_Password
  • host=sipconnect.sipgate.co.uk
  • fromdomain=sipconnect.sipgate.co.uk
  • port=5060
  • type=peer
  • context=from-trunk
  • insecure=port,invite
  • canreinvite=no
  • registertimeout=600
  • dtmfmode=rfc2833
  • disallow=all
  • allow=alaw&ulaw&G729&GSM&G726
If your PBX is behind a NAT Firewall add the following to your Peer Details:
  • qualify=yes
  • keepalive=30
  • nat=yes
Edit Trunk --> SIP Settings --> Incoming:
Image

Your SIP Trunk must be registered online to receive incoming calls.
If you only wish to place outbound calls with your sipgate trunk this step can be skipped.
In the Incoming menu, delete any settings already showing/entered and add your Register String in the format: SIP-ID:SIP_Password@sipconnect.sipgate.co.uk/SIP-ID
Click Submit followed by Apply Config to register your trunk online with sipgate.
After your trunk has registered online successfully, the status in your sipgate account will update to online:

Click Submit followed by Apply Config to register your trunk online with sipgate.

Your Trunk's registration status can also be checked in the FreePBX GUI under:
Reports --> Asterisk Info --> Registries


2. Add Outbound Route:

Connectivity --> Outbound Routes --> Route Settings:
Image

Outbound Routes --> Dial Patterns:

Simplest Dial Pattern - using X. will send all dialled digits to sipgate:
Image

If you also add a Dial Pattern in your Trunk settings, the Outbound Route's Dial Pattern will be applied to the dialled number first followed by the Trunk's Dialling Pattern.

Set your Outgoing Caller ID:

** Please Note ** It is only possible to set an outgoing Caller ID from a/the number(s) you have on your sipgate trunking account. It is not possible for you to set "any number" as an outbound caller ID with sipgate trunking.

More than one phone number can be used with a single SIP Trunk.

The phone numbers the Trunk will receive incoming calls with can be chosen in your sipgate account Settings:
- Under the Trunking tab click on the trunk.
- On the right hand side of the trunk's settings click Assign Phone Number to add a single number.
- Choose +Phone Number Block to add a block of three or ten numbers.

To set the Outgoing caller ID in FreePBX:
- Open Admin --> Config Edit
- Click on the extensions_Custom.conf file and add the following text:
[macro-dialout-trunk-predial-hook]
exten => s,1,SipAddHeader(P-Preferred-Identity:sip:${CALLERID(number)}@sipconnect.sipgate.co.uk)
exten => s,n,MacroExit()

- The number you wish to show on outgoing calls can be selected in FreePBXs settings in the the Trunk Settings ('General' --> 'Outbound Caller ID'), the Outbound Route's settings ('Route Settings' -> 'Route CID') or in the Extension settings ('Outbound CID').

The number to be displayed as your outgoing caller ID must be sent to sipgate in the in the E.164 format (i.e. international format without the leading zeros or plus (+) sign) as a new header P-Preferred-Identity: 4420300000000)


2. Asterisk SIP Settings:
Image

Asterisk SIP Settings --> General SIP Settings:
- Allow Anonymous Inbound SIP Calls: Yes/No
- STUN Server
- RTP Port Ranges
- Codec Selection

Asterisk SIP Settings --> Chan SIP Settings:
Registration Timer/Expiry Settings
Bind Port: Standard Value = 5160
Bind Address: Standard value is 0.0.0.0.0 (Asterisk will listen on all addresses)

Disclaimer: I copied the above guide from the Sipgate website. You can view the original source by clicking here.
WelshPaul liked this
0
0
User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
#5752
@VoipIT thanks for the detailed guide. :thumbsup:

@Mrdiy88 here is my current working FreePBX trunk configuration:
Image

Inbound:
Image
0
User avatar
By Unicorns99
Posts Avatar
#5948
Hate to dig up an old topic, but I'm having issues getting my FreePBX to work with SipGate, If I dial its number (the one sipgate gave me) I get FreePBX's "This number is not in service" and then it reads off my userID for sipgate..? No phones or extensions ring, even though a ring group is set up in the inbound routes.

Im a total newbie at this, so if anyone could lend a hand that'd be fantasitc.
0
0
User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
#5950
@Unicorns99 i'm going to assume that you're trying to use a Sipgate Basic account with your FreePBX setup and that the trunk is successfully registered...

Check that the DID field found on the 'Inbound Routes' page contains your SIP-ID and that it starts with _.

To clarify, if your Sipgate SIP-ID is:
Code: Select all
1234567e0
Enter it like so under the DID field on the 'Inbound Routes' page:
Code: Select all
_1234567e0
The following setup will pass all incoming calls from the Sipgate account (1234567e0) to Extension 200:
Image
0
0
0
User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
#5954
Unicorns99 wrote:So, happy days that fixed it, I can now recieve incoming calls from my Sipgate basic account! I cannot still make outgoing calls though - same "all circuits are busy now" and then it cuts me off. Thank you for the help so far though!
Glad to read that you can now receive inbound calls. 👍

If you're unable to make outbound calls, check the outbound routes (you did create one?). Simply enter your phone number in the 'Route Name' field, and make sure that you have selected the following paramaters at the bottom of the 'Route Settings' page:
  • Time Match Time Group: Permanent Route
  • Trunk Sequence for Matched Routes: SipGate Trunk
Save the changes! You must now add your dial Patterns too (I have attached an export of my own for you to use). Simply download the file below and unzip it to your desktop. Now upload the unzipped csv file via the 'Import/Export Patterns' tab found on the Sipgate outbound route:
(1.05 KiB) Downloaded 25 times
Again, Save and Apply the changes!

Don't forget to configure the Dial Number Manipulation Rules for the SipGate trunk too! I have the following configuration set:
Image
Simply replace 01792 with your own area code and then save and apply the changes once more. 🤞
0
User avatar
By Unicorns99
Posts Avatar
#5967
Absolute legend, got it working, inbound and outbound calls are now behaving, but it does however seem to not transmit audio from the mics of either phones (Cisco 7940), DTMF doesn't work either.. They're both set to ULAW as the preferred codec , but no dice? I got it working a while ago but not sure how I got it working. There's probably something obvious I'm missing though.
0
User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
#5968
One way audio (I'm guessing you can hear the caller but they cannot hear you?) is usually a routing issue. Have you configured your NAT settings on both FreePBX and IP phones correctly?

Navigate too 'Settings > Asterisk SIP Settings > NAT Settings' and click the 'Detect Network Settings' button. Click submit and apply changes!

Under 'Settings > Advanced Settings' what is the value of the 'SIP nat' parameter? Also check the NAT settings under each extension and set as per your NAT requirements. If you still have issues post your Cisco configuration here so I can take a look at it.

DTMF isn't working - Check the phones configuration XML file and make sure that you have added the required configuration parameters for DTMF.

Example:
Code: Select all
# Inband DTMF Settings (0-disable, 1-enable (default))
dtmf_inband: "1"
 
# Out of band DTMF Settings (none-disable, avt-avt enable (default), avt_always - always avt )
dtmf_outofband: "avt"
0
User avatar
By Unicorns99
Posts Avatar
#5972
Long story short, I was fiddling about with the TFTP server and somehow borked the configs of the Cisco phones, I have just tried the pbx with PortSIP on my android and MicroSIP on windows and voila! Works both ways, so how the heck do I get these Cisco phones working again? I found a repo on GitHub which I used to update them to SIP, which worked. Been using that folder to get the configs figured out as well - which used to work, so I might have to grab the configs from my server and try them tomorrow :/

Is there a magic trick to get a tftp server working under freepbx (sangomaOS)?, And how hard is it to get the image over to a 7940 for the background? I've gave it the web url, it just doesn't seem to grab the file :/

Also, do I need NAT? I'm not going over the internet.. so if not, how can I turn it off and make everything still happy? I mean, I might VPN back into my house but surely VoIP will still work over that?

Massive thanks for the help so far!
0
User avatar
By WelshPaul
Posts Signature Likes Avatar Topics
#5973
Grab the Cisco 7940 SIP firmware file from here.

Included are all the config files needed to program the phones. Just unzip to your desktop and follow the upgrade instructions and edit the config files to include your own credentials.
Unicorns99 wrote: Is there a magic trick to get a tftp server working under freepbx (sangomaOS)?, And how hard is it to get the image over to a 7940 for the background? I've gave it the web url, it just doesn't seem to grab the file :/
What version of FreePBX are you running and have you read this?
0

Anyway, first things first. You need to get your TFTP…

That works a treat - thanks. Have you done something s…

I have no first hand experience with these devices but …

Openstage 40 not updating FW

I don't think the issue you're having is caused by the …

Sign up for VIP membership