FYI Free SIP URI dialing service for your own domain

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,246
Reaction score
2,670
I don't know much about DNS as will be evident by these questions:
Is there a possibility of conflict if I use the same URI as email address; i.e. call or email me at [email protected]?

Entries are not actually the same. Even though both email and SIP are addressed as ward AT mundy.org, in DNS, the entries would be different. One would be ward while SIP is sip-ward. Email doesn't take its user entries from DNS anyway. They're actually stored in the mail server. Better analogy would be a web site, e.g. ward.mundy.org and SIP entry of ward AT mundy.org can still coexist. I think that's how it works anyway. :smartass:
 
  • Like
Reactions: Jose Pinto

w1ve

Guru
Joined
Nov 15, 2007
Messages
651
Reaction score
103
Exactly, Ward. A Cool implementation... when you make a SIP call, the SRV record points to the sipcloak.org server. When he gets the SIP INVITE, he does a DNS lookup for a TXT record matching '[email protected]' and sends the call to the address you specify. A very cool idea!
 
  • Like
Reactions: Jose Pinto

w1ve

Guru
Joined
Nov 15, 2007
Messages
651
Reaction score
103
BTW, cloudns.net is one of the free DNS services I use. They have lots of geographic diversity, and paid accounts are very cheap. They also support all the record types with an easy-to-use web interface. My absolute fav is dyn.com, but they cost $$$ -- I have a bunch of free accounts for life that were ported when they bought another company I was using. :)
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,246
Reaction score
2,670
In addition to lenny, for any Gurus that would like a "vanity SIP URI" @pbxinaflash.com, just PM me your sip2sip.info number. Once we get the kinks ironed out, I don't mind opening it up for everyone else. Among other things, it gives us an easy way to contact each other at no cost.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,246
Reaction score
2,670
Thanks to the genius of Bill Simon, the magic of YATE, and the generosity of RentPBX, we now have our own DNS cloaking servers running on the East and West Coast for those that prefer routing your SIP calls through a known quantity. You can either use your own domain or, for PIAF Gurus, send me your SIP URI and we'll add a Vanity Entry for your[email protected].

If you're hosting your own DNS server, here are the entries to add redundant cloaking assuming the desired SIP URI for calls to [email protected] is [email protected]:
Code:
_sip._udp.yourdomain.com. IN SRV 10 10 5060 east.pbxinaflash.com.
_sip._udp.yourdomain.com. IN SRV 10 10 5060 west.pbxinaflash.com.
sip-bill.yourdomain.com.  IN TXT "[email protected]"
For those with a shared hosting account that uses cPanel and WHM (such as one of our sponsors, BlueHost), this takes about 2 seconds to implement.

Nerd Vittles tutorial on creating a free, secure SIP URI using sip2sip.info: http://nerdvittles.com/?p=6914
 
  • Like
Reactions: w1ve and lgaetz

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,246
Reaction score
2,670
Why do you want a secure SIP URI for your Asterisk server? Because all calls worldwide to SIP URIs using Asterisk, YATE, FreeSwitch or any SIP phone are free!
 

VaHam

Member
Joined
Feb 29, 2008
Messages
77
Reaction score
10
I think the success or failure lies in how the 302 "moved temporarily" is handled by the client. For instance I found the cloaking thru both sipcloak and pbxinaflash failed using blink and the kitchen sink also. However Jitsi shows the 302 but proceeds to connect the call.
 
  • Like
Reactions: wardmundy

VaHam

Member
Joined
Feb 29, 2008
Messages
77
Reaction score
10
Ok this is interesting. I did some more testing by setting up an onsip sip account and while using that blink connects the call when using pbxinaflash cloak. I'd have to examine the difference in packet responses to see why jitsi works with both sip2sip and onsip blink only works when using onsip (when using cloaked links) but there must be differences in how the 302 moved call transfer is being presented to the softphone.
 

rxcomm

Guru
Joined
Sep 13, 2010
Messages
77
Reaction score
2
First post in a long time... be gentle, guys.

I gave the cloaked vanity sip id a try. It worked with some clients and not others (as noted above). I really wanted a vanity sip id that worked all the time. I also wanted one that did not require me to accept anonymous inbound sip calls and did not require a sip port open to the world (safe sip) on my Asterisk box.

It turns out that sip2sip.info provides the infrastructure to do this. I'll paraphrase my steps below, but the instructions are also on the sip2sip wiki here (in a fairly compact form).

The first step is to register your vanity domain. For this HowTo, I'll use mysipdomain.com as my vanity domain. When all steps are complete, I will have created the vanity sip id [email protected].

When you register the domain, you need to make sure that your registrar either 1) allows you to set NAPTR, SRV, and TXT records in the DNS zone file for your domain, or 2) allows you to set custom nameservers for the domain. In my case, my registrar (godaddy.com) did not allow me to set NAPTR records, but did let me set custom nameservers. So I set these three nameservers for mysipdomain.com:

Code:
ns1.dns-hosting.info
ns2.dns-hosting.info
ns3.dns-hosting.info
The next step is to create an account at https://sipthor.net/register_login_account.phtml. This account is not a sip account, but rather allows you to manage the sip accounts and DNS zone entries for your domain. Login to this account and register your domain with sipthor by clicking the DNS link at the top, and entering your account login in the Owner section and your domain in the DNS zone section. Click Add.

Now you need to add ten records to the DNS zone file for your vanity domain. If you are using the sipthor account established in the previous paragraph for DNS services, click the Records link for your domain. If you are using your registrar's DNS service, you will need to figure out how to add these in the registrar's system. Add the following records to the DNS zone for your domain:
Code:
mysipdomain.com. 3600 IN NAPTR 10 100 "s" "SIPS+D2T "" _sips._tcp.mysipdomain.com.
mysipdomain.com. 3600 IN NAPTR 20 100 "s" "SIP+D2T" "" _sip._tcp.mysipdomain.com.
mysipdomain.com. 3600 IN NAPTR 30 100 "s" "SIP+D2U" "" _sip._udp.mysipdomain.com.
_sips._tcp.mysipdomain.com. 3600 IN SRV 100 100 443 proxy.sipthor.net.
_sip._tcp.mysipdomain.com. 3600 IN SRV 100 100 5060 proxy.sipthor.net.
_sip._udp.mysipdomain.com. 3600 IN SRV 100 100 5060 proxy.sipthor.net.
_msrps._tcp.mysipdomain.com. 3600 IN SRV 0 0 2855 msrprelay.sipthor.net.
_stun._udp.mysipdomain.com. 3600 IN SRV 0 0 3478 stun1.sipthor.net.
_stun._udp.mysipdomain.com. 3600 IN SRV 0 0 3478 stun2.sipthor.net.
xcap.mysipdomain.com. 3600 IN TXT "https://xcap.sipthor.net/xcap-root/"
Once you have set up the DNS zone file for your vanity domain, it is time to create a sip account. Click the SIP link at the top of your sipthor account page. Enter the Account (sip userid - in my case I chose dave), Password, Name (callerid name), Email, and Owner (your sipthor login). Click Add.

Now that you have set up an account, you should be able to register a soft phone with your new vanity sip id and make phone calls. If this doesn't work, go back and check to make sure your DNS zone file entries are correct.

In the next post, I will explain how to register your new vanity sip id with your Asterisk box.

Dave
 

rxcomm

Guru
Joined
Sep 13, 2010
Messages
77
Reaction score
2
To register your vanity sip id with your Asterisk box, you will need to create two trunks (one custom), an outbound route and an inbound route. These are very similar to those required for a sip2sip.info registration. I will describe the differences below.

First, create a SIP trunk named mysipdomain. In the Outgoing Settings, place the following:
Code:
Trunk Name: mysipdomain
Code:
PEER Details:
type=peer
secret=***your secret***
qualify=yes
outboundproxy=proxy.sipthor.net
nat=yes
insecure=invite
host=sip2sip.info&81.23.228.129&81.23.228.150&85.17.186.7
fromuser=***your sip id***
fromdomain=mysipdomain.com
domain=mysipdomain.com
defaultuser=***your sip id***
context=from-trunk
canreinvite=no
Code:
Register string:
***your sip id***:***your secret***@mysipdomain/***your sip id***
In the entries above, you should replace ***your sip id*** with the username part of your vanity sip id, ***your secret*** with the password of your vanity sip id, and mysipdomain.com with your vanity domain.

Next, you need to create a Custom trunk for outbound calling. Call this trunk mysipdomain-Out. The register string should be:
Code:
The next step is to create an outbound route. The route should include the usual sip2sip dial patterns of 223NXXXXXX, 3333, 4444 (this is essentially a sip2sip route in disguise). Name the route mysipdomain, and set mysipdomain-Out as the trunk sequence.

Finally, you need to create an inbound route. Call this route mysipdomain-Incoming, and set the DID Number to ***your sip id*** from above. Point the route to your favorite extension/ivr/whatever.

Check to make sure your new trunk is registered. At this point, you should be able to receive incoming calls on your Asterisk box to your new vanity sip id from anywhere.

Dave
 

HT Greedy

New Member
Joined
Apr 15, 2015
Messages
6
Reaction score
0
Location
USA
Why do you want a secure SIP URI for your Asterisk server? Because all calls worldwide to SIP URIs using Asterisk, YATE, FreeSwitch or any SIP phone are free!
Ward
I know this an old post but I cannot seem to find the solution to a similar issue regarding SIP URI use. I have a Grandstream UCM6102 and I have several Google Voice trunks that go through Simonics. I have found that in order to complete an inbound call, a SIP URI is necessary. I have a callcentric trunk and I have used that URI successfully but it costs $$ per minute. I have registered for a Sip2Sip account and I have the URI plugged into the field on my Simonics account for that number, but no joy. I have had success with getonsip but they changed there model. Do I need to use Sip2Sip as the SIP server or how can I get the URI pointing to my Grandstream? What am I missing? Thanks in advance.

HT
 

billsimon

Experienced in Asterisk, FreePBX, and SIP
Joined
Jan 2, 2011
Messages
995
Reaction score
330
I have several Google Voice trunks that go through Simonics. I have found that in order to complete an inbound call, a SIP URI is necessary.
No, you can configure your PBX to do SIP registration to Google Voice Gateway instead, and not have to use SIP URI routing.
 

jbstanford

New Member
Joined
Dec 1, 2013
Messages
7
Reaction score
3
I was unable to get inbound to function as Asterisk categorized all of them into the external SIP uri which then gave me the out of service. To resolve this, I had to add my custom domain to the host list as well, like this:
Code:
host=sip2sip.info&81.23.228.129&81.23.228.150&85.17.186.7&**mysipdomain.com**
Once that was done, inbound functions correctly.
 
Joined
Oct 26, 2013
Messages
60
Reaction score
22
Finally, you need to create an inbound route. Call this route mysipdomain-Incoming, and set the DID Number to ***your sip id*** from above. Point the route to your favorite extension/ivr/whatever.

Check to make sure your new trunk is registered. At this point, you should be able to receive incoming calls on your Asterisk box to your new vanity sip id from anywhere.

Dave
Old post, but I actually still use this method to have a Vanity SIP URI, has worked quite well for several years. However, a new issue arises with the new FreePBX 13 included with Incredible PBX 13.

You can no longer use letters in your DID number for inbound routes, so in your example you are not allowed to enter 'dave' as your DID for the inbound route.

I have found a method around that using the extensions_custom.conf and setting your context appropriately. Would be happy to share, but I thought I would see if there is a better way, because now I have to edit the extensions_custom.conf file anytime I need to make changes.

Thanks
 

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,456
Messages
138,072
Members
14,620
Latest member
Brads#Bell