How SIP Works

Source

Have you ever wondered why long distance calls cost so much? In part the reason is because telephone lines cost so much. When driving, you might occasionally see a telephone crew maintaining a telephone line, but what you may have never considered is that there are literally thousands of individuals working around the clock to maintain our telephone lines.

The telephony system works via a cog and wheel setup. What this means is that every long distance call you make is routed along a telephone wire to a central station, where your voice is routed to another central station, which is finally carried to the person with whom you are trying to communicate. For the call to be maintained, the entire time you are speaking, a space along all the lines in between you and the person you are talking with must be completely devoted to you. Because millions of people are talking at the same time, the little space along the telephone lines becomes rather desired property. And like all things desired, the price is high. Before recent innovations, however, there were no alternatives, so everyone grudgingly paid the often costly long-distance telephone bill.

SIP, or Session Initiation Protocol, has turned the telephony world upside down. Specifically, SIP refers to a protocol that allows computers to talk to each other without going through a central station. Practically, what that means for you and me is that it is no longer necessary to pay for expensive telephone lines to complete our calls. SIP technology is a relatively new development in which calls are made on a peer-to-peer rather than cog and wheel network. What that means, is that you are now able to call people directly from your SIP enabled phone to theirs. This ends up being radically cheaper than the old way of calling.

The SIP system does not require a central computer and operators like the old telephony system did. Rather, your computer, or SIP enabled phone, does all the routing for you.

SIP has been around for a number of years, but only recently has it begun to go mainstream and take off in popularity. This quick increase in interest over SIP is due to companies like Mobalex, who were aware of the fact that over the generations we have come to expect certain tones, buttons, and protocols from our phones. So what they have done is to transpose those functions onto the SIP system. Rather than forcing users to communicate in a completely new way, what these companies have done is to provide a calling experience which from the user’s perspective is completely identical to traditional telephony.

SIP is typically offered in two formats, computer based and hardware based. Computer based SIP is a system that allows you to make calls using your computer as the router and communicating via a headset on your computer. The more practical and popular version, however, actually provides you with new SIP enabled telephone handsets or converts your existing phones to SIP. By eliminating any technical requirements, modern SIP providers have made using the system as easy, or easier, than using a traditional phone. I say easier, because many companies are able to take advantage of the fact that the system is internet based to provide you with some very unique benefits. These include the ability to adjust your plan, change your calling options, and even pay your bill from the same website.

SIP technology is quite revolutionary in the world of communication. By creating a peer-to-peer network, SIP has been able to radically undercut the prices of traditional telephony, take advantage of the Internet, and still maintain the ease of traditional telephony. It is merely a matter of time before we are all using SIP for all of our telephoning needs.

Chowing on some Nerd Vittles.

To get started on some askerisk hackin’, let’s head on over to nerdvittles for a very nice treat from a fellow Charlestonian asterisk guru (much more than I).

What they are offering is a .torrent of a VMWare image containing a fully configured Trixbox instance with lots of goodies. Please do download the VMWare server console and the Trixbox virtual machine, and we can get started a-hackin’. Help save bandwidth and keep your torrent tracker open to distribute the load among lots-n-lots of peers.

Also consider all of nerdvittles’ hard work and click the paypal link to donate.

When you have followed the directions and downloaded all the pieces, I have one small recommendation. Open the Virtual Machine and select Ethernet. Choose the setting – ‘Bridged’. Since I don’t like to think very much about this, this allows me to have the machine run and appear on my LAN as a separate IP.

BridgedVMWare

Bridged = ‘Connected directly to the physical network’

You may have to shutdown and restart the virtual machine for this to take effect.
After I start mine, from the command line I type:

ifconfig

and receive info about the virtual machine appearing on my LAN. Look for the ‘inet addr’, mine is 192.168.1.93.

From the command line of the host box, just for grins, I then tried to ping the virtual trixbox instance:

C:Documents and SettingsDan>ping 192.168.1.93
Pinging 192.168.1.93 with 32 bytes of data:
Reply from 192.168.1.93: bytes=32 time=1ms TTL=64
Reply from 192.168.1.93: bytes=32 time=1ms TTL=64

If you have a couple of boxes on your lan, put the XLite softphone on both and call each other. Here’s how. In the Trixbox vmware instance provided by Nerdvittles, they kindly set up several extensions you can use.

sipsetup
Click the little setup button on your XLite softphone and choose ‘System Settings’, then ‘SIP Proxy’, then ‘Default’. Enter the IP address of the Trixbox image running in your VMWare player.

For one phone I chose extension 500, for the other on the other box, 501. I hopped over to my wife’s PC, now running XLite as extension 501, and dialed 500. I ran back over and answered the line and had a nice little conversation with myself.

For our next installment, we’ll show you how to get nitty-gritty and watch the actual IP packets traverse our LAN. It’s really enlightening!

Case Study #1 – Geek Love Radio

Hey guys, Chris here. I’m starting to do a little bit of Asterisk work professionally now, so I figure I’ll throw out some case studies for you to look at. Critique me, learn from me, and help me learn from you. That’s what these will be about.

For my first case study, I will be setting up an Asterisk box via SSH running on Trixbox for the guys at the Geek Love Network. Their Season 3 is coming up soon, and they have a LOT of great things in store.

Geek Love Network is a network dedicated to dating for us geeks. I admit it, most of us aren’t the hottest and hippest out there, so they help out with that. I’ve been in close contact with these guys for a long while now, and I’ll tell you right now that everyone on their staff is the real deal.

I’ll just leave you with this for right now, but I’ll post more details soon. I will be posting dial plans, audio files (maybe?), and asking for your help in the best way to go about things. Make sure you make lots of use of the comment button below, I’d love to hear your opinion on these sorts of things!

Greetings!

Hello to the Asterisk community! I’m really excited to write for asteriskblog. Many thanks to Chris!

As Chris said, I am planning some great content from a developer’s perspective. I remember the thrill I got the first time I got a RAGI (the Ruby Asterisk Gateway Interface) app to work, and I’d like to share my experience with that, as well as the other AGI-fu techniques I have learned. I’ve been doing Java in a professional context for a while now, so there’s probably some fun projects out there we can write about.

Finally I would like to detail some of the inner workings of Asterisk itself as I plan on some small additions to the code base as well, starting with some code janitor tasks. Big plans, so stay tuned!

New Writer

Oi! We have a new writer here on staff at the Asterisk Blog! His name is Dan and he will be writing from a developers side for us. I’m not much of a coder, so this guy will take over that aspect. But he will be writing an introduction here soon, so watch out for it!

Back Back Back.

Hey guys, me again, yeah… it’s been a while, I know, deal with it. Anyway, so I’m back, and having issues with 1and1, getting all this transferred to my other host. So anyway, I’ve got someone that I may cast on to help out with writing articles, that will be great for content.

So keep checking back in the next few days and expect some awesome updates!