DID Configuration Setup

Tron

New Member
Joined
Mar 4, 2009
Messages
22
Reaction score
0
: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
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
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
 
Joined
Apr 17, 2009
Messages
829
Reaction score
9
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
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

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

[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
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.
separator.gif

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
 

vcallaway

Guru
Joined
May 6, 2008
Messages
170
Reaction score
2
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
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top