1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.
  4. Critical FreePBX vulnerability! Update your server immediately. Details here.

DID Configuration Setup

Discussion in 'Help' started by Tron, Jun 20, 2009.

  1. Tron New Member

    :confused5:
    I am trying to configure a DID from DIDforSale.com to my PIAF 1.4 installed and hope someone can give me a hint of how to do this.
    Here is my question.
    According to DIDforSale.com support document, I need to add the following to my Asterisk box.

    ==========================
    Add the code below to your ’sip.conf‘ file
    [didforsale_did]
    type=peer
    host=[IP ADDRESS OF OUR SERVER - didforsale]
    nat=no
    canrinvite=yes
    disallow=all
    allow=ulaw
    allow=alaw
    dtmfmode=rfc2833
    insecure=very
    context=from-didforsale

    Add the code below to your ‘extensions.conf ‘ file
    [from-didforsale]
    exten => _X.,1,Set(CALLERID(num)=${CALLERID(num):1}) ;This line removes the “+” in front of the CallerID.
    include => from-trunk
    ;[you can forward it to your default context]

    ========================

    In my FreePBX, Tools, Config Edit,
    I do not see sip.conf or extensions.conf files and it is not recommended to edit those files manually.

    There are files below;
    extensions_a2billing.conf
    extensions_custom.conf
    extensions_override_freepbx.conf

    sip_custom.conf
    sip_custom_post.conf
    sip_general_custom.conf
    sip_nat.conf
    sip_registrations_custom.conf

    I would like to know which file I should add the configuration file above from didforsale.com to my Asterisk&2Billing in the FreePBX screen.

    Thank you very much for your support.
    Ron
  2. jroper Guru

    Hi

    The sip.conf stuff goes into FreePBX as a SIP trunk.

    You will just have to make some minor changes to suit FreePBX e.g. the context will be "from-trunk" and insecure very would be port,invite
  3. also have to allow anonymous sip as well...


    also in your hosts file. you can not have your FQDN in there. it causes problems. I was working with their tech support people for about 3 days and then when they called me i was actually able to find a solution for them for future reference....


    let me know if you need a sample config to try in the FreePBx admin console
  4. timlitw New Member

    I'd love to see a sample config.
  5. jroper Guru

    Hi

    These are their original settings, copied for comparison with my suggested new ones:

    Lets convert this into something a little more FreePBX friendly.

    So name of trunk - say "DID-For-sale"

    the Peer details:-

    Code:
    type=friend ;we want to make and receive calls - potentially!
     host=<<DID-For-Sales IP Address>> ;put their IP address here, as we want to authenticate on the IP address
     nat=yes ; You are probably behind NAT.
     canrinvite=yes; Your audio stream may go wrong if you re-invite
     disallow=all ; Disallow all codecs
     allow=ulaw ;allow the ulaw codec
     allow=alaw ; allow the alaw codec you could probably leave these 3 lines out.
     dtmfmode=rfc2833 ; sets the DTMF mode.
     insecure=port,invite ; allows authenticated calls from the IP address above, so that allow anonymous SIP is not required. "very" is deprecated.
     context=from-trunk; this is the context which is controlled by inbound routes.
    qualify=yes ; just so we can see some registration information, but optional.
    [IMG]
    I hope that this throws some understanding on the matter.

    Alternatively, you could just set allow anonymous to yes, make sure you add the DID as delivered, and then add a catchall route with the DID _. which you send to hangup, then you don't need to bother with a trunk at all.

    This method (IMO) is considerably more secure than leaving it to no, and letting every chancer in the world send a SIP call to your PBX, and have it play "Sorry not in service" thus telling the other end that you have FreePBX, and if they send a few more calls, they will bring your PBX to its knees playing "sorry not in service messages."

    With the method described above, people can only ring you if they know your number - just like old-fashioned telecoms!

    Joe
  6. vcallaway Guru

    Here are my settings:

    For trunk named didforsale:

    In the box PEER details
    Code:
    type=peer
    host=209.216.2.211&209.216.15.70
    nat=no
    disallow=all
    allow=ulaw&alaw
    dtmfmode=rfc2833
    context=from-trunk
    
    That's it.

    You should not have to allow anonymous but you will have to allow the two host addresses listed above through your firewall. didforsale does not do a sip registration, it is a straight sip call to your box.

    Just create an inbound route for your number from didforsale and you are set.

    I did not bother to put in anything to remove the plus from the caller id. The callerid superfecta does not seem to have an issue with it.

    If you need to strip the plus you would edit the extensions_custom.conf file and insert before the "#include extensions-away-status.com" line the following:

    Code:
    [from-didforsale]
    exten => _X.,1,Set(CALLERID(num)=${CALLERID(num):1}) ;This line removes the “+” in front of the CallerID.
    include => from-trunk
    
    Back in the PEER details box change from-trunk to from-didforsale

Share This Page