• EspañolEspañol
  • ItalianoItaliano
  • EnglishEnglish

FreePBX guide

Our DID numbers can be forwarded to any standard SIP server. You can find many 3rd party VOIP providers, which provide for free a SIP account to receive calls. If you wish to build your own SIP server, there are also many alternatives. All you need is to subscribe an account by a host provider, which gives you the ownership of a Virtual Provide Server (VPS). A VPS is a remote computer, always online, where you can install your PBX.

Unfortunately we don't provide any support for assisting you in the setup of a PBX. However we'd like to give some useful hints about one of the most popular PBX solutions, FreePBX, an open source PBX framework based on Asterisk. It runs over Sangoma linux.

How to configure freepbx to receive calls from DID numbers of buylocalnumbers.com

General SIP settings

Open Settings => Asterisk SIP settings

In "General" pane of SIP Settings

  • set NO in “Allow Anonymous Inbound SIP Calls”
  • set YES in “Allow SIP Guests”

Create trunk
- Create an inbound trunk at Connectivity => Trunks => Add SIP (chan_pjsip) Trunk.
- In General section, choose freely the Trunk name
- Navigate to “pjsip settings” and fill out these fields:

In "General" section:

  • Authentication: none
  • Registration: none
  • SIP server: 46.19.209.14,46.19.210.14,46.19.212.14,46.19.213.14,46.19.214.14
  • SIP Server Port: 5060
  • Context: from-pstn
  • Transport: 0.0.0.0-udp

In "Advanced" section:

  • Match (Permit): 46.19.209.14,46.19.210.14,46.19.212.14,46.19.213.14,46.19.214.14

Create extension
- Create an extension in Applications => Extensions => Add new “SIP [chan_pjsip] extension”
- In "General" section:

  • Choose a number for “User extension” field. For example, 1000
    Important: the extension number is the VOIP account name that you have to write in the details of the forwarding destination, in your buylocalnumbers account
  • Choose “display name” (this is a free choice; it can contain numbers or letters)
  • “Secret”: choose the SIP password. It will be used to register a SIP phone to this extension.
  • In “Link to a Default User” field, leave “Create new user” (default). In this way, a user with a name equal to the extension number will be automatically created and associated to this extension.

- In Advanced section

  • Disallowed Codecs: all
  • Allowed Codecs: alaw&ulaw&g729
  • Leave all other fields with default values

Note: in the extension you can create a voicemail. Here this topic is not described.

Create an inbound route
- Create an inbound route in Connectivity => Inbound routes => add inbound route
- In "General" section

  • choose freely a description for the route
  • In “DID number” field, write the number of the extension you have just created. In our example, 1000
    Important: the name “DID number” of this field is misleading! You don’t have to write the DID number here, but the extension number (1000 in this example)!
  • In “Set destination”, choose Extensions and in the dropdown list the extension number you have just created (1000 in this example).

Hint
It may happen that incoming calls are dropped immediately after answering because the anonymous endpoint is used and unsupported codec g723 is used for it. In this case I found an experimental work around:

edit /etc/asterisk/pjsip.endpoint.conf

Change the following

[anonymous]
type=endpoint
context=from-sip-external
allow=all

Into

[anonymous]
type=endpoint
context=from-sip-external
disallow=g723
allow=alaw,ulaw,g729

 

Share this page with your friends