Configure Inboud DID with FreePBX and DID For Sale

In FreePBX web portal, Add a trunk,

[didforsale]
type=peer
host=[IP ADDRESS OF OUR SERVER]
nat=no
canreinvite=yes
disallow=all
allow=ulaw
allow=alaw

dtmfmode=rfc2833
insecure=very
context=from-didforsale

Please note: You can find the IP for DIDForSale upon logging into your account.  We send the calls to your public IP address and do not require any username, password or registration to our server.

In extension.conf, add these lines.  //This will remove + from the callerid, which many people can not handle.
[from-didforsale]
exten => _X.,1,Set(CALLERID(num)=${CALLERID(num):1})
include => from-trunk

Now your system will be able to accept calls from didforsale.com. Now you can do anything you want with the DIDs.

Hope this helps, feel free to comment in this if you want to see any additional information of help.

Thank you,

-Jai

3 comments to Configure Inboud DID with FreePBX and DID For Sale

  • Faiz

    My Settings for Freepbx and it’s working

    Login to freePBX administrative interface
    Click on Setup
    in top right of page
    Click on Trunks
    in left side navigation
    Click Add SIP Trunk
    in middle of page
    Scroll to Outgoing
    Settings
    and enter didforsale_did
    into Trunk Name field

    Copy and paste the following into the PEER Details field:

    Peer Details:
    type=peer
    host=209.216.2.211
    nat=no
    canrinvite=no
    disallow=all
    allow=ulaw&alaw
    dtmfmode=rfc2833
    insecure=very
    qualify=yes

    Click on Submit Changes to add your new SIP trunk to your Asterisk server
    Click on the red bar at the top of the screen to apply the changes you just made

    in extensions.conf add thease lines

    [custom-a2billing]
    exten => _X.,1,Answer
    exten => _X.,n,Wait(1)
    exten => _X.,n,DeadAGI(a2billing.php|1)
    exten => _X.,n,Hangup

    in FreePBX UI create a Custom Destination;
    custom-a2billing,${EXTEN},1
    Description: A2Billing
    Notes: For a call through service

    Click on Inbound Routes
     
    Click on Add Incoming
    Route
    .
    You will first want to fill the
    DID Number
    field with your
    DID
    Make sure to leave the Caller ID Number and
    Zaptel channel blank in order to match any
    incoming call.
     This is useful if you wish to receive all calls
     
    Scroll down to Set Destination
    Choose A2Billing Custom Destinations
    From Drop Down Menu
     
    Click on Submit Changes to add your new
    inbound route to your Asterisk server
     
    Click on the red bar at the top of the screen to apply the changes you
    just made
     

  • Andy

    Do NOT edit extensions.conf when using FreePBX
    edit extensions_override_freepbx.conf instead

    (at least this is what I had to do in Trixbox CE)

  • Lee

    Hi, I followed the settings above and my asterisk box says the status is OK when I do a “sip show peers” from the CLI. However when I dial my did I see nothing in the CLI/logs and I just get silence. Any help would be appreciated.. Thanks