HowTo configure a SIP Trunk

From SIPfoundry sipx, The Open Source SIP PBX for Linux - Calivia

Jump to: navigation, search

What is a SIP Trunk Gateway?

Starting with version 3.8, there is improved support for setting up your PSTN access using a so-called 'SIP Trunk' or 'Internet Telephony Service Provider (ITSP)'. Essentially, this means someone else owns and maintains the gateway that translates between SIP and the PSTN, and delivers you PSTN access using SIP over the Internet.

Why use a SIP Trunk Gateway?

If you're like most of us, you have a firewall that separates your private network from the public Internet, so you can't send SIP packets directly between your sipXecs system and the ITSP on the public network. If not, you are either luckier or braver than most of us (possibly both); find an ITSP and get this set up right away.

If you do have a firewall of some kind, you'll need something that can get the packets through or around your firewall. This is called, variously, a "SIP Firewall", or a "Session Border Controler (SBC)". It can get SIP signalling and media to pass between the public network and your private protected network. Some general purpose firewalls claim to have this as an integrated function; if so, use the firewall address everywhere below where the SBC address goes.

If you need a local SBC anyway, then what's the advantage to using a local SBC and an ITSP over just using a local gateway?

  • The ITSP business is much more competetive than phone lines, so rates are generally lower.
  • The same SBC can allow you to use SIP phones remotely anywhere on the Internet registered to your system.
  • The same SBC can enable you to begin using SIP to do some of your calling directly end-to-end as SIP, and you don't have to pay anyone anything for those calls (see SipX HOWTO Library#HOWTO Route around the PSTN).

Creating a SIP Trunk Gateway

Start at the Devices > Gateways screen:

Image:Trunk_gateways.png

Select "SIP Trunk" from the "Add a new gateway..." menu:

Image:Trunk_new.png

Fill in a human-readable name, it's address, and record whatever description of it you'd like to see on the gateway description screen. The address on this screen is the public address (either an IP address, or by preference a DNS name) of the service provider. For this example, we will use a fictional provider Example ITSP Corp which uses a gateway at the DNS name (because they are Internet-savvy and don't give out IP addresses they might have to change) 'outbound.itsp.example.net':

Image:Trunk.png

Then select "Apply", and you will get a more complete configuration screen:

Image:Trunk_apply.png

If your sipXecs system is using public IP addresses and is not behind any kind of firewall, congratulations - you're ready to start using this new gateway in your Dial Plans.

If you're like most of us, you still have to get the SIP past your firewall. To configure the, select the "SIP Firewall" link on the left side (on some versions this will be labelled "SIP Trunk", which is confusing, so we changed it...) to reach this screen:

Image:Trunk_sbc.png

fill in the address (or DNS name) of your SBC and press Ok.

The SIP Trunk can now be treated like any other gateway in setting up your Dial Plans.

If you are using an Ingate SIParator, see HowTo configure InGate SIParator to work with sipX.

Personal tools