Adding SIP Trunks

It is recommended that you use the IP Trunk Assistant page to configure known SIP trunk providers (See Video Tutorial below). For other trunk configuration examples, navigate to SIP Trunks.

Adding a SIP Trunk

To add a new SIP trunk, perform the following steps:

  1. Open the UCx Web-based Configuration Utility
  2. From the PBX tab, select PBX Configuration
  3. From the left side column, select Trunks
  4. On the Add a Trunk page, which presents available trunk types, select the Add SIP Trunk link
  5. On the Add SIP Trunk page, enter the following:
    • Trunk Name - Descriptive name for the trunk
    • Outbound Caller ID (caller ID used for outgoing calls)

  6. Fill in all trunk specific parameters. You should configure at least the following fields:
    • Outgoing Settings - PEER Name (a unique name of the trunk, i.e. the channel ID of the trunk) - this field was labeled Trunk Name in earlier releases
    • Outgoing Settings - PEER Details (type, host, user name, secret, DTMF mode)

  7. For a registration based authenticated trunk, you will need to configure the following field as well:

    Some SIP trunk providers require the registration string (e.g., username:[email protected]) to be followed by the DID number of the SIP trunk (e.g., username:[email protected]/2145551234). If your SIP trunk is provided by one of these providers, DID matching in inbound routes will not work without this registration string suffix.
  8. Press the Submit Changes button to create the SIP trunk

The following table describes the trunk parameters under PEER Details. You should obtain the required parameters and values from your service provider and enter them into the PEER Details box.

Order of the parameters is important. For example when using the deny/permit parameters,  deny should be listed before permit.

Parameter Commonly Used Values Description
host xxx.xxx.xxx.xxx IP address of the SIP trunk provider's server
type peer The supported values are: peer, user, friend. Friend is both a peer and user.
context from-trunk "from-trunk" means that incoming calls from this trunk will be treated as if they are coming from an outside line, and will be routed using the rules that you setup in the Inbound Routes page.
"from-internal" means that incoming calls from this trunk will be treated as if they were made by an internal phone, and will be routed directly to an extension number, a feature code, or through the outbound routes page.  
Generally, you use "from-trunk" when routing calls from an outside source and "from-internal" for trunks that tie two trusted systems together.
qualify yes "yes" means to periodically send a request that the other system identify itself.  If there is no answer within 2 seconds, your system will assume that the other system is down and stop sending calls to the system until the system responds. Instead of "yes," you can also put a number, in miliseconds.  For example, qualify=3000 means that your system will wait 3 seconds for a response, instead of 2 seconds.
insecure port,invite "port" means to accept incoming calls even if they come from a port other than the one where calls are expected to come from.
"invite" means to accept incoming calls even if they are not accompanied by the proper username and password.  
Most ITSP's require this line.  If only one is used, the comma separating them is omitted.
deny 0.0.0.0/0.0.0.0 [Optional] For added security, include "deny" and "permit" to limit access based on IP address.
permit xxx.xxx.xxx.0/255.255.255.0 [Optional] Allow access only to the specified IP subnet.
callbackextension xxxxxxxxxx [Optional] DID number associated with the trunk. Add this field if you have more than one SIP trunk from the same SIP provider.

The connection parameters in PEER Details are applied to both incoming and outgoing. Only in cases when you have two different PEERS for incoming and outgoing, then you would fill in the USER Context and USER Details for the second PEER. In most cases, you just leave the USER Context and USER Details blank.

Dedicated Internet Connection

If you have a dedicated internet connection for your SIP trunk, proceed to the Static Routes page to configure a static route for your SIP trunk.

Multiple SIP trunks from the same provider

If you have more than one SIP trunk from the same SIP provider, add the callbackextension=<DID number> parameter to PEER Details section to correctly identify the trunk source in the CDR records.

For example, you have two SIP trunks from the same service provider. One trunk is associated with DID number 2144277218 and another is associated with DID number 4697012911. Both trunks are registered to the same provider's server.
For the first trunk, add callbackextension=2144277218 to the PEER Details of the first trunk.
For the second trunk, add callbackextension=4697012911 to the PEER Details of the second trunk.

Video Tutorial

Self Assessment Quiz

  1. What is the difference between an IP-based authentication versus a Registration based authentication SIP trunk?
  2. Under PEER Details, what are the possible values for the type parameter?
  3. Do you need to specify the trunk details under both OUTGOING and INCOMING Settings sections?