It’s been a while since we’ve explored SIP URIs and all of the advantages that SIP URI calling brings to your PBX. Number one on that list is FREE calling to and from anyone on the planet so long as both of you have an Internet connection with a SIP phone or a VoIP server such as Incredible PBX for XiVO. SIP URIs are the fundamental building blocks for VoIP technology. Consider this. If everyone in the world had a SIP address instead of a phone number, every call to every person in the world via the Internet would be free. That pretty much sums up why SIP URIs are important. The syntax for SIP URIs depends upon your platform. With Asterisk® they look like this: SIP/somebody@FQDN.yourdomain.com. On SIP phones, SIP URIs look like this: sip:somenameORnumber@FQDN.yourdomain.com. Others use somenameORnumber@FQDN.yourdomain.com. Assuming you have a reliable Internet connection, once you have “dialed” a SIP URI, the destination SIP device will ring just as if the called party had a POTS phone. Asterisk® processes SIP URIs in much the same way as other calls originating from trunks and, as noted, SIP URI calls of any duration to anywhere are free. Today we’ll show you how to set things up on your XiVO PBX without exposing any ports to the Internet in a way that would jeopardize your server’s security.
Placing Outbound SIP URI Calls with a SIP Softphone
There are two ways to place outbound SIP calls. You can use a SIP phone or softphone that supports SIP URI calling to dial SIP URIs directly. If you have a Mac, the best free softphone for SIP URI calling is Telephone which you can download from the App Store. On other platforms as well as Macs, Zoiper is a great no-cost option. Both of these softphones support the sip:someone@FQDN.yourdomain.com syntax. An excellent way to test this is to call our friend Lenny and strike up a conversation: sip:firstname.lastname@example.org.
Configuring Outbound SIP URIs with XiVO
The major drawback of SIP URIs is they’re difficult both to remember and to dial. It’s much simpler to dial a short number using a traditional phone. And, with Incredible PBX for XiVO, it’s easy to create custom extensions that can be accessed simply by dialing a few digits from any phone connected to your server. Here’s how to set it up in the XiVO GUI.
1. Create a User and assign the Customized Protocol and an Extension Number to that user:
TIP: If you’d prefer to use a different series of numbers for speeddials so you don’t get them mixed up with your standard extension numbers, just add a new range of numbers for XiVO: IPX Configuration → Contexts → Default → Users. Then choose one of them above.
2. Access the new Line that was generated for the new User:
3. Replace the Interface entry for the Line with the desired SIP URI for your speeddial, e.g. SIPemail@example.com. Then SAVE your new Line settings.
4. Dial 750 from an Extension on your XiVO PBX to try out Lenny using your new SIP URI.
A Better Way to Create SpeedDials with XiVO
We’ve gone through the XiVO GUI approach to demonstrate that it is indeed possible to create speeddials for SIP URIs. However, there is a better way unless you’re one of the naysayers that believes everything is better in a GUI. If you have dozens or even hundreds of speeddials to create, you may change your mind. The GUI approach could obviously become tedious. Instead, with one line of Asterisk dialplan code, you can create as many speeddials as you like keeping in mind that it’s your responsibility to assure that SIP URI extension numbers don’t conflict with existing extensions on your server. Insert a new section of code at the bottom of /etc/asterisk/extensions_extra.d/xivo-extrafeatures.conf and reload your dialplan:
asterisk -rx "dialplan reload".
You can also insert this code from within the XiVO GUI itself: IPX Configuration → Configuration Files. Edit xivo-extrafeatures.conf and insert the following code snippet at the end of the file and Save your entries. The dialplan will be reloaded automatically.
Some of our favorites include the following:
;# // BEGIN SpeedDials exten = 882,1,Dial(SIPfirstname.lastname@example.org) ; V-U-C on Fridays at noon EST exten = 8378,1,Dial(SIPemail@example.com) ; T-E-S-T everything VoIP exten = 53669,1,Dial(SIPfirstname.lastname@example.org) ; L-E-N-N-Y exten = 68742,1,Dial(SIPemail@example.com) ; M-U-S-I-C exten = 3733411,1,Dial(SIPfirstname.lastname@example.org) ; F-R-E-E-4-1-1 Directory Asst ;# // END SpeedDials
Creating a SIP URI Address for Your XiVO PBX
Free calls to other folks is only half of the story, of course. You’re also going to want a way for people to call you without incurring charges for the calls. There are many SIP URI approaches for inbound calls. Most of them are not safe with Asterisk. Let me say that again. Most of them are not safe with Asterisk. The reason is because most of them force you to open SIP access to your server for everybody in the world. Unfortunately, that means they can not only call you, but they can also attempt to use your extensions and trunks to place very expensive calls to others. Don’t even think about opening the SIP floodgate by exposing port 5060 unless Bill Gates sends you a check every week. You’ve been warned!
Setting Up an iNum SIP URI Trunk with XiVO
The better and safer way to add SIP URI connectivity to your XiVO server is to first obtain a freely available iNum DID from one of the many providers that support iNum and then use that provider as a SIP intermediary. All SIP calls pass only over your registered trunk with your provider. Our favorites in no particular order are VoIP.ms, LocalPhone and CallCentric. There are many, many others. In order to obtain a free iNum DID, you will need an account with one of these providers. All require some sort of minimal deposit, but you usually can get back unused funds if you decide to close your account down the road. Our XiVO tutorials for VoIP.ms, LocalPhone, and CallCentric will walk you through creating your SIP account and registering it with your XiVO server. Then verify that your SIP account is registered:
asterisk -rx "sip show registry"
Configuring an iNum DID with VoIP.ms
Our trunk tutorials for LocalPhone and CallCentric will walk you through their setup procedures for iNUM DIDs. VoIP.ms provides more flexibility in redirecting trunks so let us quickly walk you through their procedure. Log in to your VoIP.ms account and then order your free iNum DID at this link. Your iNum DID then will appear in your DID Listing here. Write down your iNum DID which you’ll need in a minute to configure the XiVO side of things. Then click on the Edit DID icon beside your iNum DID and assign the DID to your registered Main Account or the SubAccount that you’ve already registered with XiVO. Be sure to use the same DID POP that you used when you registered your VoIP.ms account with XiVO. Don’t enable VoiceMail and set the ring time to 60 seconds just to keep things simple.
Configuring XiVO to Support Your iNum DID
Now for the XiVO part. Using a browser, log into the XiVO GUI. Navigate to IPX Configuration → Contexts → Default → Users. For VoIP.ms and LocalPhone, add a new Number Range starting and ending with your iNum DID. Then click Save. For CallCentric, do the same thing but substitute your CallCentric username which will be an 11-digit number starting with 1777.
Repeat the above in IPX Configuration → Contexts → from-extern (Incalls) → Users.
For CallCentric only, also click on the Incoming Calls tab and add a new Number Range. For the Starting value, use your 11-digit LocalPhone username. For the DID length, set it to 11. You do NOT need to include a Number Range ending value. Click Save when you’re finished.
For VoIP.ms, navigate to IPX Settings → Users. Then Add a new User for your iNum DID. In the General tab, name the User VoIP.ms iNum. In the Lines tab, provide your actual iNum DID number. This must be the same number you added to the Number Range in the Default context above. In the No Answer tab, set the Fail option to the Destination of your choice, e.g. an extension, a ring group, an IVR, etc. Then click Save.
For LocalPhone, navigate to Call Management → Incoming Calls and Add a new Inbound Route for your DID specifying the destination for the calls using your iNum DID number:
For CallCentric, navigate to Call Management → Incoming Calls and Add a new Inbound Route using your 11-digit CallCentric username as the DID. Then specify the destination for the calls and click Save.
Calling Your XiVO PBX Using Your iNum SIP URI
To receive SIP URI calls safely on your iNum DID, your SIP URI is your iNum DID number followed by @sip.inum.net, e.g. email@example.com. Neither the identity of your XiVO PBX or your SIP service provider is ever exposed. Enjoy your safe, free calling!
Originally published: Monday, September 26, 2016
58 years later: Raspberry Pi Zero vs. the Elliott 405. Can you guess the fastest computer between the two? pic.twitter.com/D0J2Ql8ArD
— nixCraft # (@nixcraft) September 25, 2016
Need help with Asterisk? Come join the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
Awesome Vitelity Special. Vitelity has generously offered a terrific discount for Nerd Vittles readers. You now can get an almost half-price DID from our special Vitelity sign-up link. If you’re seeking the best flexibility in choosing an area code and phone number plus the lowest entry level pricing plus high quality calls, then Vitelity is the hands-down winner. Vitelity provides Tier A DID inbound service in over 3,000 rate centers throughout the US and Canada. When you use our special link to sign up, Nerd Vittles gets a few shekels down the road to support our open source development efforts while you get an incredible signup deal as well. The going rate for Vitelity’s DID service is $7.95 a month which includes up to 4,000 incoming minutes on two simultaneous channels with terminations priced at 1.45¢ per minute. Not any more! For our users, here’s a deal you can’t (and shouldn’t) refuse! Sign up now, and you can purchase a Tier A DID with unlimited incoming calls and four simultaneous channels for just $3.99 a month. To check availability of local numbers and tiers of service from Vitelity, click here. NOTE: You can only use the Nerd Vittles sign-up link to order your DIDs, or you won’t get the special pricing! Vitelity’s rate is just 1.44¢ per minute for outbound calls in the U.S. There is a $35 prepay when you sign up. This covers future usage. Any balance is refundable if you decide to discontinue service with Vitelity.
3CX is a software PBX that’s easy to install & manage. It includes integrated softphones, WebRTC conferencing and essential add-ons out of the box, at no additional cost. Try the free edition at www.3cx.com. Better yet, download the PIAF5 ISO powered by 3CX. Free version includes support for 8 simultaneous calls with a SIP trunk.
Some Recent Nerd Vittles Articles of Interest…