Apache SIP Module Testing Directions


This is the testing instructions page for the Apache SIP module. This module has been compiled to interpret a SIP message, recognize that it is different than an HTTP message, and pass this to a script. The script will then process the SIP message accordingly. The current script is designed to redirect an incoming call to one of two different locations, depending on a variable which can be set using a standard web server and the HTTP side of Apache, essentially duplicating a redirect server. The test involves the Apache server and 3 UAs, all running on the same machine. The first UA calls Apache, and using a web page, the user selects which of the other two UAs will be called.

Documentation is available here.

Setup To Test:

I will try to leave the Apache server running on Orion. If it is not running, starting it is simple. All files for testing are stored on the machine orion (my desktop) under the directory: /usr/APACHE_TEST_JUNE_30. The diff of the change needed for Apache proper, as well as the source code for the Apache, appropriate Apache root, and README are checked into vovida/apache. The reason that these files are on my machines /usr volume is because Apache has a dislike for running with the document root on NFS disks. A complete copy of the tree lives in ~bryan/APACHE_TEST_JUNE_30 just to be safe but it may not work if you run from there (since Apache may complain...) Additionally, my Apache configuration is non-standard, so it needs to be run on this machine (Apache runs as the user "webuser" which is normal, but most machines at Vovida don't have this account) Because of this, log on and do all testing on Orion (my machine) -- I will log out of it when I leave.


1) Verify that Apache is running

If Apache is running correctly, run netscape and open the URL "orion" (just orion). You should see a screen with the Vovida logo and three choices -- "Call Forwarding Setup Page", "Documentation" and "Instructions for Testing". If so, Apache is up and running properly. Skip the list below and go on to starting the UAs.

If you see a different page, or you end up at orion.com (which is what will happen if no server is running at all), then we need to start Apache on Orion. Follow the instructions below.:

  1. su as root (standard Vovida password).
  2. Check if a server is running. Do this by typing:
    ps aux | grep httpd
    If you see something like:
    root     29870  0.0  0.8  2376 1144 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29871  0.0  0.9  2384 1212 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29872  0.0  0.9  2384 1208 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29873  0.0  0.9  2384 1160 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29874  0.0  0.9  2384 1160 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29875  0.0  0.9  2384 1160 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29877  0.0  0.9  2384 1160 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29878  0.0  0.9  2384 1160 ?      S    16:10   0:00 ./httpd -d /usr/A
    webuser  29879  0.0  0.9  2384 1160 ?      S    16:10   0:00 ./httpd -d /usr/A
    root     29881  0.0  0.3  1360  508 pts/17 R    16:13   0:00 grep httpd
    
    Another server is running (for whatever reason) and needs to be killed. Kill it by sending kill (not kill -9!) to the httpd process running as root only. In this case, the command would be (in the window that is root):
    kill 29870
    
    If you see this when you type ps aux instead:
    root     29885  0.0  0.4  1360  516 pts/17   S    16:17   0:00 grep httpd
    
    or nothing, Apache is not running at all.
  3. Start Apache server with correct config file
    cd /usr/APACHE_TEST_JUNE_30/server/bin
    ./httpd -d /usr/APACHE_TEST_JUNE_30/server/www
    
    At this point Apache should be running. Type "orion" by itself as URL and verify you see the Vovida logo and 3 options.

    The -d command specifies to Apache where to look for its root. The root contains such things as the configuration file for Apache (which tells it to, among other things, enable the SIP module). the HTML files that at serves (this document, the documenation, and the redirect configuration pages), and the SIP sh script that does redirection.


2) Start 3 UAs

We need to start three UAs. We will start all three on Orion. The Apache server is using the default port of 5060, so the UAs are set up to use ports 5065, 5070 and 5075. There are 3 config files already created that set the ports, ensure the UAs are running as TCP (not UDP, since Apache is TCP only) and that with speed dial configured for the UA to initiate.

This is the current ua as of 4:30 pm on Monday, June 26. The first UA window (5065) will dial out, contacting Apache. You will be able to use Apache to define which of the other two UAs you want the message redirected to.

To start the UAs, do the following (as a normal user):

  1. Open three windows.
  2. In the first window type:
    cd /usr/APACHE_TEST_JUNE_30/ua
     ./ua -f ua.cfg.5065
    
  3. In the second....
    cd /usr/APACHE_TEST_JUNE_30/ua
     ./ua -f ua.cfg.5070
    
  4. ...and the third....
    cd /usr/APACHE_TEST_JUNE_30/ua
     ./ua -f ua.cfg.5075
    
    or if you want, you can make this window actually ring by giving the quicknet option instead and typing:
    cd /usr/APACHE_TEST_JUNE_30/ua
     ./ua -f -q ua.cfg.5075
    
    I only have one quicknet card, so one of the two UAs will just have to be an onscreen test. Each config file sets to port (5065, 5070 or 5075) and sets the UAs to TCP. The first UAs file also contains the speed dial number for Apache (set to be user 6502@192.168.22.20, port 5060. The choice of 6502 was arbitrary and 192.168.22.20 is Orion (the machine to run the test on).


    3) Pick Where to Forward the Calls...

    1. Open a Netscape window and type in "orion" by itself.
    2. Choose the option "Call Forwarding Setup Page".
    3. Choose which of the UAs you started you would like to forward to.
    4. Press "Forward my calls here". You should see a confirmation message.

    4) Testing

    1. In the first UA window (5065), press 'a' to go offhook.
    2. Speed dial Apache by typing "#001". This will call Apache (actually a particular user on the Apache server, since the server can be configured to handle redirect for any number of users), and whichever UA you selected above should ring.
    3. Press 'z' in the first UA window to hang up.
    4. Go back to the Netscape window, and change it to forward to the other phone.
    5. Press 'a' and "#001" to dial again. The other UA should ring.
    6. Verify Apache, while having served these requests, is still serving HTTP documents by opening "orion" in a netscape window. You should again get the main server page.

    David A Bryan,
    dbryan@vovida.com, Last modifed June 26, 2000