6.2. Web Integration of SIP Services

In this chapter we will provide an overview of some added value services implemented using web interface. Serweb, the web interface for SIP Express Router described in Chapter 4, will be used as an example implementation of web-based added value services for SIP

Integration of SIP services with web interface is the most common scenario. Web interface is often used for provisioning of SIP products and for implementation of advanced services and web browser are available in vast majority of existing operating systems.

Click-to-Dial, in other words, it a method of establishing a call between participants using web interface. It greatly simplifies dialing in that callers do not have to dial lengthy addresses and they keep their phonebooks separately from SIP phones. In its simplest form a user has a web page where he can enter SIP addresses of two users and SIP user agents of those two users get connected. We will focus on REFER-based click-to-dial.

REFER based click-to-dial scenario is based on the paradigm of intelligent end devices and dumb network. One of involved SIP user agent is asked to connect to the other and report to the server when it is done.

Drawback of this approach is that one of involved SIP user agents must support REFER SIP method which has been standardized recently, see RFC3515. Big advantage that balances the previous drawback is that it is extremely easy to implement REFER based click to dial in the server.

Call-flow for REFER based click-to-dial is depicted on Figure 6.1.

First the SIP server sends an INVITE to one of the phones because phones usually do not accept REFER without prior invitation. The invite contains 0.0.0.0 as IP address in SDP because there is no remote phone (the message is sent by user agent within the SIP server which doesn't deal with media).

After that the server sends a REFER method which will ask the phone to send INVITE somewhere else. URI of the callee is passed to the phone in Refer-To header field of the REFER method.

The phone sends a NOTIFY method back to the server once the connection is established.

The click-to-dial feature allows creation of many advanced features, like phone-book in which you can click on an entry and your phone and phone of the person represented by the entry get connected. You can implement list of missed call in exactly the same way, clicking on an entry in the list will connect your phone with that person, and many others possible scenarios.

Serweb is a web frontend for for SIP Express Router, see Section 4.6.2 for more details. Serweb creates a user interface for users of the proxy server, where they can manage their account, change their configuration and do many advanced things.

Serweb is a set of php scripts. To run it you will need apache web server with php and mysql support. Because SIP Express Router and serweb talk together using FIFO interface, the SIP proxy and the web server must be running on the same machine.

Get serweb from http://developer.berlios.de/projects/serweb and untar the archive, it is recommended not to untar it to the document root of your web server. Alternatively you can get serweb using CVS:

lexport CVSROOT=:pserver:anonymous:@cvs.berlios.de:/cvsroot/serweb
cvs login
cvs co iptel

To login into serweb open http://<your_server>/user in your web browser. You will be prompted for username and password. The username and password is same as the one you are using in your SIP user agent to register at the server.

The “My Account” tab, see Figure 6.2 allows users to change their preferences and modified registered contacts. They can also see aliases they created and permissions for calling to PSTN.

Users can also create their own phone book, see Figure 6.3. In the phonebook you can see presence status of each user. If the user is currently registered then you will see “on line” in the status column. If he is not registered then you will see “offline” and if the user doesn't belong to administrative domain of the server then you will see “non-local”.

Clicking on the address of a user will establish a phone call between your and his phone, provided that your phone supports REFER, as described in Section 6.2.1.

Missed calls plane, see Figure 6.4, allows users' to see their missed calls. Again, clicking on an entry will connect you with that user and status describes presence of the user as described in the previous section.

When anyone sends a SIMPLE message to a user that is currently not online, the server will store the message and send it later when the recipient becomes online. In plane “message store”, see Figure 6.5 you can see all messages that are stored for you.