Follow

FreePBX v 13+ PJSIP Configuration

NTRODUCTION:

Starting with FreePBX version 12, the PJSIP libraries were introduced. In FreePBX version 13, these libraries are used by default on port 5060, while the traditional CHAN_SIP_C libraries were relegated to port 5061. You can create a trunk using either library. The SIPTRUNK.com module uses the traditional library by default. However, some people wish to use PJSIP for one reason or another. These instructions will help you set up a trunk using PJSIP on FreePBX 13.

STEP 1:

When you create a trunk with PJSIP, you should be dropped off into a screen similar to the one below. The only field which is important at this time is the "Trunk Name." You must enter some sort of distinctive name for this trunk.

STEP 2:

Select the "pjsip Settings" tab and edit the settings under the "General" sub-tab. Enter your SIPTRUNK.com Trunk Number (usually starts with 52) as the username. The "Secret" is the password for your trunk found under the "show password" link in your SIPTRUNK.com portal (THIS IS NOT THE SAME AS YOUR LOGIN PASSWORD FOR SIP.US). "Authentication" should be set to "Outbound," and "Registration" should be set to "Send." Enter "gw1.siptrunk.com" in the "SIP Server" field, and "5060" in the "SIP Server Port." 

STEP 3:

Select the "Advanced" sub-tab under the "pjsip Settings" tab. Look at the image below. You must edit the "From Domain" field to say gw1.siptrunk.com. Additional Note: You will need to add the trunk number in the From User field which is directly under the From Domain.

STEP 4:

Select the "Codecs" sub-tab under the "pjsip Settings" tab. Here you should select only G711ulaw. All other boxes should be unchecked.

STEP 5:

It is time to create an "Outbound Route" so we can dial out through SIPTRUNK.com. Select "Connectivity" then "Outbound Routes." To create a new "Outbound Route," you must first enter a distinctive "Route Name." Then select the trunk you just created as the top route in "Trunk Sequence for Matched Routes." ***Note that we created a second trunk to gw2.siptrunk.com and added in the Trunk Sequence section for redundancy.***

STEP 6:

Select the "Dial Patterns" tab. Enter dial patterns exactly like the image below. They will allow for you to dial 3 digits (think 911), 10 Digits (U.S. Calling), 11 Digits (North American Calling), and International Calls (starting with 011). After entering this info, and hitting "Submit" then "Apply Config." You can dial outbound through your SIP.US trunk.

STEP 7:

To direct calls from SIPTRUNK.com to an extension you must create an inbound route. To start select "Inbound Routes" from the "Connectivity" menu on your FreePBX interface. The image below demonstrates an inbound route that will send ANY call to a certain extension. To direct a specific number to a specific extension you would create a route and set the "DID Number" field to your 11 digit DID with SIPTRUNK.com (for instance 15557778888).

REDUNDANCY:

To add redundancy to your system, follow the steps to create a trunk and substitute gw2.siptrunk.com anywhere you had gw1.siptrunk.com. Then add this additional trunk to your outbound route as the second entry. This will provide a redundant path to call through SIP.US in case you cannot reach gw1.siptrunk.com for some reason.

After following this guide, your PBX should be successfully registered, and you can make outbound and inbound calls. If you have any issues, please use the support link to open a ticket.

Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk