Setting up a SIP trunk in FreePBX 13

  • Service Provider

    Log in to and navigate to DID Numbers -> Manage DID(s)

    Look for the DID you want to use for the trunk and note the number, routing, and POP.

    In FreePBX, navigate to Connectivity -> Trunks

    Click +Add Trunk -> +Add SIP (chan_pjsip) Trunk. PJSIP simplifies the setup from the PBX side and is the new default for Asterisk. You can read all about it straight from Digium if you want.

    Fill out the General tab as desired. Note the outbound Caller ID format and also set a reasonable maximum channels value to protect against extreme charges if a SIP user's credentials are ever compromised. I generally leave the Caller ID blank and set it on the outbound routes, but it is easy to miss there.

    Leave the Dialed Number Manipulation Rules empty. I always recommend handling that on the outbound route(s).

    Fill out the General tab on PJSIP Settings with your information noted from above. The username is the account number, or if you use a sub account it is the account number _subaccountname. The secret is the password for the account on The SIP server is the pop name with the dash removed and appended.

    Click to the advanced tab

    Scroll to the bottom and change detect fax to enabled if you want to enable inbound faxing on this trunk. does not support T.38 FoIP but faxing over SIP works for most simple needs.

    You can leave the codecs tab alone unless you have changed default codecs on side.

    Click submit at the bottom of the screen, and then after it finishes, click the red Apply Config button.

    Go back to the FreePBX dashboard and you should see the trunk online after you click the little circle arrows to refresh.

    Part of the FreePBX 13 Setup Guide

  • Service Provider

    Some people have reported issues using the PJSIP settings with I have been using it for months with no problems, but if you are having problems, then you can create a CHAN_SIP based trunk with no problems.

    If you have problems with PJSIP, or jsut need to confirmed support of CHAN_SIP from your provider, setting up a CHAN_SIP trunk is not much more difficult.

    Choose CHAN_SIP

    The General tab gets filled out the same as with PJSIP.

    Leave the Dialed Number Manipulation Rules empty. I always recommend handling that on the outbound route(s).

    Remove the default information in the Outgoing tab

    And populate it with your information. No spaces or characters in the trunk name as that gets used as the Asterisk context.

    Here are the settings, you should only need to edit the first 4 lines appropriately.

    On the Incoming tab , again delete the default data.

    This time leave the USER Context and USER Details blank and only populate the registration string. This is why you want to avoid @ or : in your SIP trunk password.

  • Service Provider

    Just followed this, worked great.

  • Service Provider

    Following up on this way too many weeks later...

    Sorry about that...

    With and PJSIP, you also need to go to the advanced tab and change the default expiration time from 3600 to 120.

    I have not tested this with other providers yet as it would be disruptive to a client.
    When I have time I will setup a backup provider and change my extension to use that normally and see how things go. The problem is that with a not very used system, it will still reregister every hour, so to catch it, I have to make a call between the fial time and the reregister time.


  • Service Provider

    Post 2 updated with the CHAN_SIP instructions.. sorry to be so bad about this.

Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.