Saturday, April 25, 2009

Session Initiation Protocol : My experience

Back in 2006 I was trying to design/code an application over SIP. Well I was trying to submit it to my college so that I could graduate. When I presented the abstract my professors went crazy. The whole college said are you nuts. What is SIP? Being an electronics student how could you work on computers were some questions floating around. In India, especially in electronics fields professors are very unhappy with students. More and more students are turning towards computers leaving the Microwave and Core electronic fields. So with limited knowledge of what is SIP i got through the abstract stage. Then I had to understand the protocol.

SIP was very new in India in 2006. There were few people working in SIP application development, atleast I was told so. I started my design and I wanted to have 3 tier architecture with oracle data base hooked in instead of flat file. I had very fancy ideas I should say. 3 months of time and very limited programming knowledge I turned to Java. I liked Java. It was pretty easy for me to code there. I used Java swings to create the interface, JSP to create webpage and JDBC:ODBC to connect to database. The design seemed good.

But there was huge problem. How do I get SIP stack? Jain SIP was at my rescue. Open source Java API's for SIP. Search for the same in internet, its pretty nice API. So I was equipped with everything. What should I implement was the question.

I had these in my mind : User Agents (SIP phones) and SIP Proxy server. But as I said I wanted to have a very fancy application I thought of doing more. So I thought of implementing Do not Disturb/Call forwarding/RTP. Note that till then my idea was just to write the SIP signaling but not to code the actual voice. But RTP gave me breather and I did voice later. Ok , all set so how does my SIP phone look like?

SIP_Phone.bmp

Isn't it beautiful! I customized the buttons dial panel. I am huge fan of Matrix and green over black for messages was direct lift from matrix. :) People now say UI looks like skype but I had no idea what skype was back then. I loved the project so much that I continued the same in my Masters. For my post graduation I implemented conferencing/IM/Draw board features. I ran everything once and it worked just perfect. It was triumph moment when I submitted project in my engineering and masters. Everyone were impressed. Cool. I passed out with flying colours.


Proxy.bmp

The above screen shows two SIP phones communicating and SIP proxy routing the calls. I tired checking in the code in source forge but I had no idea how to do it. I left it there. As always, I am happy to share the code with you guys if interested.

Write to me or comment here if you would like to know more.


2 comments:

Manish said...

Nice article about sharing your experience. Keep it up.

VoIP, SIP and now IMS. Have you ever tried to setup Open IMS?

Once I saw live demo of IMS, SIP based video call between two PC in one tech fair.

Yes, I implemented voice chat without SIP. No signaling. Just VC++ application running over LAN with socket API. No RTP. just ncompressed voice over UDP orver IP over Ethernet.

And yes, once I implemented a practical VoIP solution, with Skype and 2 mobiles. We had group of about 10 people regularly meeting over Skpye across the globe. One such meeting, I connected my phone output to computer microphone jeck. I called my local friend attending an event and thus I made live audiocast from a remote venue to accross the world.

Too long comment? Let me stop now

Regards and Keep Smiling
Manish

Santosh said...

Thanks Manish. Looks like you have done lot in this area. I have tested my phone with various softphone available in internet and it worked great. I ran it with Cisco IP phone (hardphone) too and it worked good. After that I couldnt put much effort on it.

Cool solutions you have implemented.

Santosh