- Spelling checked
[sip-router] / doc / serhowto / ser-howto.sgml
1 <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [
2
3 <!--Include general SER documentation entities -->
4 <!ENTITY % serentities SYSTEM "../ser_entities.sgml">
5 %serentities;
6
7 ]>
8
9 <book>
10     <bookinfo>
11         <title>&ser; HOWTO</title>
12         <authorgroup>
13             <author>
14                 <firstname>Dan</firstname>
15                 <surname>Austin</surname>
16             </author>
17             <editor>
18                 <firstname>Nils</firstname>
19                 <surname>Ohlmeier</surname>
20                 <address>
21                     <email>nils@iptel.org</email>
22                 </address>
23             </editor>
24         </authorgroup>
25         <copyright>
26             <year>2002-2003</year>
27             <holder>NSI Ltd.</holder>
28         </copyright>
29     </bookinfo>
30     <toc></toc>
31     
32     <chapter>
33         <title>Introduction</title>
34         <section>
35             <title>Revision</title>
36             <itemizedlist>
37                 <listitem>
38                     <para>
39                         Version 0.1      12/02/2002      Dan Austin
40                     </para>
41                 </listitem>
42                 <listitem>
43                     <para>
44                         Version 0.2      12/03/2002      Dan Austin
45                     </para>
46                 </listitem>
47                 <listitem>
48                     <para>
49                         Version 1.0      12/06/2002      Dan Austin
50                     </para>
51                 </listitem>
52                 <listitem>
53                     <para>
54                         Version 1.1      12/16/2002      Dan Austin
55                     </para>
56                 </listitem>
57                 <listitem>
58                     <para>
59                         Version 2.0      10/04/2003      NSI Ltd.
60                     </para>
61                 </listitem>
62             </itemizedlist>
63             <para>
64                 This document is a result of a merge of two documents <ulink
65                     url="http://www.fitawi.com/ser-Howto.html"></ulink> and <ulink
66                     url="http://cvs.berlios.de/cgi-bin/viewcvs.cgi/*checkout*/ser/sip_router/INSTALL?rev=ser_0_8_10&amp;content-type=text/plain"></ulink>
67                 with some add-ons, made by NSI team.
68             </para>
69         </section>
70         <section>
71             <title>Why &ser;</title>
72             <para>
73                 &ser; is an open-source project that aims to make available a fully functional and
74                 scalable Session Initiated Protocol server. Call processing is described with a
75                 concise scripting language that offers the flexibility of regular expressions and
76                 the ability to interface with 3rd party applications for the purposes of call
77                 accounting and authorization.
78             </para>
79         </section>
80         <section>
81             <title>Where to get &ser;</title>
82             <para>
83                 &ser is available for download from <ulink
84                     url="ftp://ftp.berlios.de/pub/ser"></ulink>
85             </para>
86             <para>
87                 The newest release may be found in the folder /latest
88             </para>
89         </section>
90     </chapter>
91     <chapter>
92         <title>Installation</title>
93         <section>
94             <title>Installation Notes</title>
95             <para>
96                 Supported architectures:
97             </para>
98             <itemizedlist>
99                 <listitem>
100                     <para>
101                         Linux/i386
102                     </para>
103                 </listitem>
104                         <listitem>
105                     <para>
106                         Linux/armv4l
107                     </para>
108                 </listitem>
109                 <listitem>
110                     <para>
111                         FreeBSD/i386
112                     </para>
113                 </listitem>
114                 <listitem>
115                     <para>
116                         OpenBSD/i386
117                     </para>
118                 </listitem>
119                 <listitem>
120                     <para>
121                         Solaris/sparc64
122                     </para>
123                 </listitem>
124                 <listitem>
125                     <para>
126                         NetBSD/sparc64
127                     </para>
128                 </listitem>
129             </itemizedlist>
130             <para>
131                 (For other architectures the Makefiles might need to be edited) There are various
132                 configuration options defined in the Makefile and Makefile.defs.
133             </para>
134         </section>
135         <section>
136             <title>Requirements</title>
137             <itemizedlist>
138                 <listitem>
139                     <para>
140                         gcc or icc : gcc &gt;= 2.9x; &gt;=3.1 recommended (it will work with older version
141                         but it might require some options tweaking for best performance)
142                     </para>
143                 </listitem>
144                 <listitem>
145                     <para>
146                         bison or yacc (Berkley yacc)
147                     </para>
148                 </listitem>
149                 <listitem>
150                     <para>
151                         flex
152                     </para>
153                 </listitem>
154                 <listitem>
155                     <para>
156                         <acronym>GNU</acronym> make (on Linux this is the standard
157                         <quote>make</quote>, on FreeBSD and Solaris is called <quote>gmake</quote>)
158                     </para>
159                 </listitem>
160                 <listitem>
161                     <para>
162                         sed and tr (used in the make files)
163                     </para>
164                 </listitem>
165                 <listitem>
166                     <para>
167                         <acronym>GNU</acronym> tar (<quote>gtar</quote> on Solaris) and gzip if you
168                         want <quote>make tar</quote> to work.
169                     </para>
170                 </listitem>
171                 <listitem>
172                     <para>
173                         <acronym>GNU</acronym> install or <acronym>BSD install (on Solaris
174                         <quote>ginstall</quote>) if you want <quote>make install</quote>,
175                         <quote>make bin</quote>, <quote>make sunpkg</quote> to work.
176                     </para>
177                 </listitem>
178                 <listitem>
179                     <para>
180                         <quote>mysql</quote> if you need MySQL support.
181                     </para>
182                 </listitem>
183                 <listitem>
184                     <para>
185                         <quote>Apache (httpd)</quote> if you want serweb support
186                 </para>
187                 </listitem>
188                 <listitem>
189                     <para>
190                         <quote>PHP, MySQL-PHP</quote> for serweb support
191                     </para>
192                 </listitem>
193                 <listitem>
194                     <para>
195                         libmysqlclient & libz (zlib) if you want mysql support (the mysql module)
196                     </para>
197                 </listitem>
198                 <listitem>
199                     <para>
200                         libexpat if you want the jabber gateway support (the jabber module)
201                     </para>
202                 </listitem>
203             </itemizedlist>
204             <para>
205                 Installing &ser; on a RedHat Linux distribution for example, is a simple matter of
206                 unzipping the downloaded file and using your favorite package manager.
207             </para>
208         </section>
209         <section>
210             <title>Install the package</title>
211             <para>
212                 Example:
213             </para>
214             <screen>
215                 /root&gt;rpm -i ser-08.11-1.i386.rpm
216             </screen>
217             <para>
218                 Packages for other popular distributions are available, and can be installed using
219                 the appropriate package manager for that distribution.
220             </para>
221             <para>
222                 On many platforms you can start the service with:
223             </para>
224             <screen>
225                 /etc/init.d/ser start
226             </screen>
227             <para>
228                 RedHat systems will use:
229             </para>
230             <screen>
231                 /etc/rc.d/init.d/ser start
232             </screen>
233             <para>
234                 You now have a functioning &sip; server, but what can you do with it?  At this point
235                 not very much. With an &sip; client, such as Microsoft MSN Messenger 4.6, you can
236                 register with the server, send Instant Messages to other logged on clients of the
237                 same server, and even have voice conversations with them.
238             </para>
239             <para>
240                 That sounds pretty good, but maybe you'd like to add a little more security, or make
241                 you server accessible to others.
242             </para>
243         </section>
244         <section>
245             <title>Serctl Utility</title>
246             <para>
247                 To do so, first set the environment variable SIP_DOMAIN to your domain name, e.g.,
248                 in Bourne shell (bash), call:
249             </para>
250             <screen>
251                 export SIP_DOMAIN=<quote>foo.bar</quote>
252             </screen>
253             <para>
254                 If you wont the system to created this variable automatically, you need to add the
255                 line
256             </para>
257             <screen format="linespecific">
258 export SIP_DOMAIN=<quote>foo.bar</quote>
259 </screen>
260             <para>
261                 in the end of file /etc/profile.
262             </para>
263             <para>
264                 If you are using other than 'localhost' mysql server for maintaining subscriber
265                 database, change the variable 'SQL_HOST' to the proper host name in the serctl
266                 script.
267             </para>
268             <para>
269                 Run the serctl utility
270             </para>
271             <screen>
272                 /usr/sbin/serctl monitor
273             </screen>
274             <para>
275                 If you installed from a tar.gz or Solaris package:
276             </para>
277             <screen format="linespecific">
278 /usr/local/sbin/serctl monitor
279  </screen>
280         </section>
281         <section>
282             <title>DNS SVR Resource Records</title>
283             <para>
284                 It is important that your &sip; clients can connect to your server for purposes of
285                 registration and call control.  You might even want to have a redundant server to
286                 handle calls if your primary server is unavailable.
287             </para>
288             <para>
289                 These requirements can be meet by using <acronym>DNS</acronym>
290                 <acronym>SVR</acronym> Resource Records, available in BIND 8.X and up releases.
291             </para>
292             <para>
293                 The format for a <acronym>SVR RR</acronym> is this:
294             </para>
295             <screen format="linespecific">
296 _service._protocol        SVR Priority Weight     Port hostname
297 </screen>
298             <para>
299                 In this case we want to establish an entry for our primary &sip; server,
300                 gateway.mydomain.com, that will listen on &udp; port 5060.  The entry will look like
301                 this:
302             </para>
303             <screen format="linespecific">
304 _sip._udp         SRV     0  0   5060  gateway.mydomain.com
305 </screen>
306             <para>
307                 Placement of the new resource record is important.  Here is a sample zone file:
308                 </para>
309                 <para>
310                 <screen format="linespecific">
311 ; zone 'mydomain.com'   last serial 1998071308
312 $ORIGIN com.
313 mydomain  86400           IN      SOA     gateway.mydomain.com. postmaster.mydomain.com. (
314                                         1998111908 ; Serial
315                                         36000 ; Refresh
316                                         900 ; Retry
317                                         36000 ; Expire
318                                         28800 ); Minimum
319                 IN      NS              gateway.mydomain.com.
320                 IN      NS              ns3.backupdomain.com.
321                 IN      MX              1 gateway.mydomain.com.
322                 IN      A               192.168.0.1
323
324 ;If we place the SRV record above the next line it fails to load
325 $ORIGIN fitawi.com.
326 _sip._udp               SRV  0 0  5060  gateway.mydomain.com.
327 gateway         IN      A               192.168.0.1
328 www             IN      CNAME           gateway.mydomain.com.
329 </screen>
330             </para>
331             <para>
332                 After reloading your zone file you can verify that the entry is working by using dig.
333             </para>
334             <screen format="linespecific">
335 dig -t SRV _sip._udp.mydomain.com
336 </screen>
337             <para>
338                 The results should look something like this:
339             </para>
340             <para>
341                 <screen format="linespecific">
342 ; &lt;&lt;&gt;&gt; DiG 9.1.0 &lt;&lt;&gt;&gt; -t SRV _sip._udp.mydomain.com
343 ;; global options:  printcmd
344 ;; Got answer:
345 ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 32654
346 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
347
348 ;; QUESTION SECTION:
349 ;_sip._udp.mydomain.com.          IN      SRV
350
351 ;; ANSWER SECTION:
352 _sip._udp.mydomain.com.   86400   IN   SRV   0 0 5060 gateway.mydomain.com.
353
354 ;; AUTHORITY SECTION:
355 mydomain.com.             86400   IN      NS      ns3.elsewhere.com.
356 mydomain..com             86400   IN      NS      gateway. mydomain.com.
357
358 ;; ADDITIONAL SECTION:
359 gateway. mydomain.com.     86400   IN      A       192.168.0.150
360
361 ;; Query time: 6 msec
362 ;; SERVER: 192.168.0.150#53(192.168.0.150)
363 ;; WHEN: Tue Dec  3 08:34:17 2002
364 ;; MSG SIZE  rcvd: 132
365 </screen>
366             </para>
367         </section>
368         <section>
369             <title>Adding a database for client information</title>
370             <para>
371                 By leveraging a MySQL database, we can provide support for user credentials, and
372                 keeping track of where the clients are logged on during server restarts.
373             </para>
374         </section>
375         <section>
376             <title>MySQL setup</title>
377             <para>
378                 To install support for a MySQL database you will need to download the package
379                 ser-mysql, which is available from the same download location that you retrieved
380                 &ser;. This package has scripts to create the required database and establish
381                 permissions for the accounts needed.  A recent release of MySQL is recommended.
382                 Earlier versions may have problems with the syntax required to set permissions on
383                 the database.
384             </para>
385             <para>
386                 If you do not already have a copy of MySQL installed, download it from your <ulink
387                 url="http://www.mysql.com"></ulink>
388             </para>
389             <para>
390                 Once you have MySQL installed and started, execute
391             </para>
392             <screen format="linespecific">
393 /usr/sbin/ser_mysql.sh
394 </screen>
395             <para>
396                 You can verify that the database has been created, and correct permissions assigned
397                 by using the mysql management tool and these steps:
398             </para>
399             <para>
400                 <screen format="linespecific">
401 Mysql&gt; select * from user;
402 | Host               | User  | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv |
403 | %                  | ser   | 4e633cf914a735a0 | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          |
404 | localhost          | ser   | 4e633cf914a735a0 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | N          | Y               | Y          | Y          |
405 | %                  | serro | 7cb73a267cb7bd5f | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          |
406 | localhost          | serro | 7cb73a267cb7bd5f | Y           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          |
407 </screen>
408             </para>
409             <para>
410                 The above results show that the two user, ser and serro, have been created and
411                 granted the permissions needed to access the database. Note that in the above
412                 example the permissions have been modified to deny access to these accounts from any
413                 system(%) other than local host.
414             </para>
415             <para>
416                 <screen format="linespecific">
417 mysql&gt; connect ser;
418 Connection id:    294
419 Current database: ser
420
421 mysql> show tables;
422 +-----------------+
423 | Tables_in_ser   |
424 +-----------------+
425 | acc             |
426 | active_sessions |
427 | aliases         |
428 | config          |
429 | event           |
430 | grp             |
431 | location        |
432 | missed_calls    |
433 | pending         |
434 | phonebook       |
435 | reserved        |
436 | silo            |
437 | subscriber      |
438 | version         |
439 +-----------------+
440 14 rows in set (0.00 sec)
441
442 mysql&gt; select * from subscriber;
443 | phplib_id                        | USERNAME | PASSWORD | FIRST_NAME | LAST_NAME | PHONE        | EMAIL_ADDRESS              | DATETIME_CREATED    | DATETIME_MODIFIED   | confirmation                     | flag | SendNotification | Greeting | HA1                              | REALM      | ha1b                             | perms | allow_find | timezone            |
444 | 4cefa7a4d3c8c2dbf6328520bd873a19 | admin     | heslo | first        | admin    | 557-8469     | admin@iptel.org      | 2002-12-02 19:20:41 | 2002-12-02 20:29:46 | 80e0f273b2067d40277b49ff842bb9e3 | o    |                  |          | c79a8f8f08596baa84bb02c88884426d | iptel.org | f322c94b8b2fbe557d43ab3ac9e05b3a | admin | 1          | America/Los_Angeles |
445                 </screen>
446             </para>
447             <para>
448                 This last query shows that you have one user account defined and it has
449                 administrator privileges.
450             </para>
451             <para>
452                 We'll need to add another account to be the administrator for your realm, which we
453                 will do after the next section.
454             </para>
455         </section>
456     </chapter>
457     <chapter>
458         <title>Configuration</title>
459         <section>
460             <title>Modify &ser; configuration</title>
461             <para>
462                 Now that we have a working MySQL database, we need to modify the configuration file
463                 for ser, located on a RedHat, installed in /etc/ser/ser.cfg.  The following changes
464                 need to be made:
465             </para>
466             <para>
467                 To enable support for the new MySQL database we need to load the appropriate module.
468                 That is accomplished by uncomment this line:
469             </para>
470             <screen format="linespecific">
471 loadmodule "/usr/lib/ser/modules/mysql.so
472 </screen>
473             <para>
474                 Next we need to set &ser; to use the database and write changes instead of just
475                 caching them in memory. This is done by means of commenting this line:
476             </para>
477             <screen format="linespecific">
478 modparam ("usrloc", "db_mode",  0)
479 </screen>
480             <para>
481                 And uncomment this line:
482             </para>
483             <screen format="linespecific">
484 modparam ("usrloc", "db_mode", 2)
485 </screen>
486             <para>
487                 Note on db_modes:
488             </para>
489             <para>
490                 <itemizedlist>
491                     <listitem>
492                         <para>
493                             Mode 0
494                         </para>
495                         <para>
496                             Disables writes to the database.  Contact information will not be
497                             preserved if the server is restarted.
498                         </para>
499                     </listitem>
500                     <listitem>
501                         <para>
502                             Mode 1
503                         </para>
504                         <para>
505                             Writes all changes to the database immediately. Contact information is
506                             saved to the database immediately.  This can slow the response to
507                             clients as they connect.
508                         </para>
509                     </listitem>
510                     <listitem>
511                         <para>
512                             Mode 2
513                         </para>
514                         <para>
515                             Periodically writes contact information to the database based in the in
516                             memory cache.
517                         </para>
518                     </listitem>
519                 </itemizedlist>
520             </para>
521             <para>
522                 To enable digest authentication we additionally need to uncomment the following two lines:
523             </para>
524             <screen format="linespecific">
525 loadmodule "/usr/lib/ser/modules/auth.so"
526 loadmodule "/usr/lib/ser/modules/auth_db.so"
527 </screen>
528             <para>
529                 We have the option of storing passwords in our database in plain text.  This allows
530                 for password recovery and makes the initial setup and testing easier.  To enable
531                 this feature uncomment these lines:
532             </para>
533             <screen format="linespecific">
534 modparam (<quote>auth_db</quote>, <quote>calculate_ha1</quote>, yes)
535 modparam (<quote>auth_db</quote>, <quote>password_column</quote>, <quote>password</quote>)
536 </screen>
537             <para>
538                 These lines work together. The first tells &ser; to generate a hash based on
539                 username, password and realm. The second tells &ser; where to look for the plain-text
540                 password in the database.
541             </para>
542             <para>
543                 Uncomment these lines and change all instances of iptel.org to your domain
544             </para>
545             <para>
546                 <screen format="linespecific">
547 if (!www_authorize("mydomain.com", "subscriber")) {
548         www_challenge("mydomain.com", "0");
549         break;
550 };
551 </screen>
552             </para>
553             <para>
554                 We're now ready to restart ser. On RedHat use
555             </para>
556             <screen format="linespecific">
557 /etc/rc.d/init.d/ser restart
558 </screen>
559         </section>
560         <section>
561             <title>Adding an admin for your realm</title>
562             <para>
563                 Now that we have a working database and ser is configured to use it, we need to add
564                 some users and at least one of them should have administrator privileges.  The
565                 administrator role becomes important if you want to use a web management tool such
566                 as serweb.
567             </para>
568             <para>
569                 Basic account manipulation can be performed with the serctl script, located in
570                 /usr/sbin.
571             </para>
572             <para>
573                 To add a user use these commands
574             </para>
575             <screen>
576                 serctl add JoeUser qwerty joe@mydomain.com
577             </screen>
578             <para>
579                 The system notify for <quote>Type MySQL Password</quote>, the default password is
580                 <quote>heslo</quote>
581             </para>
582             <para>
583                 To make JoeUser an administrator, we need to login to MySQL and modify the database.
584             </para>
585             <para>
586                 <screen format="linespecific">
587 mysql&gt; connect ser;
588
589 mysql&gt; update subscriber set perms=?admin? where USER_ID=?JoeUser?;
590 Query OK, 1 row affected (0.00 sec)
591 Rows matched: 1  Changed: 1  Warnings: 0
592
593 mysql&gt; select * from subscriber;
594 | 4cefa7a4d3c8c2dbf6328520bd873a19 | JoeUser     | qwerty |  |   |   | joe@mydomain.com   | 2002-12-02 19:20:41 | 2002-12-02 20:29:46 | 80e0f273b2067d40277b49ff842bb9e3 | o    |                  |          | c79a8f8f08596baa84bb02c88884426d | mydomain.com | f322c94b8b2fbe557d43ab3ac9e05b3a | admin | 1          | America/Los_Angeles |
595 </screen>
596             </para>
597             <para>
598                 The third from last field shows that Joe has been assigned admin privileges.
599             </para>
600             <para>
601                 At this point Joe can login to our server, but since he is the only user, there is
602                 not much he can do. We can now add additional users using the serctl script, or now
603                 is a good time to look at installing serweb, which will allow users to subscribe to
604                 our service.
605             </para>
606         </section>
607         <section>
608             <title>More on serctl</title>
609             <para>
610                 The script serctl can be used to manage users, access control lists, in memory
611                 contacts, and to monitor server health.  Executing serctl with no arguments will
612                 produce this output:
613             </para>
614             <para>
615                 <screen format="linespecific">
616 usage:
617            * subscribers *
618  add &lt;username&gt; &lt;password&gt; &lt;email&gt; .. add a new subscriber (*)
619  passwd &lt;username&gt; &lt;passwd&gt; ......... change user's password (*)
620  rm &lt;username&gt; ...................... delete a user (*)
621  mail &lt;username&gt; .................... send an email to a user
622  alias show [&lt;alias&gt;] ............... show aliases
623  alias rm &lt;alias&gt; ................... remove an alias
624  alias add &lt;alias&gt; &lt;uri&gt; ............ add an aliases
625
626            * access control lists *
627  acl show [&lt;username&gt;] .............. show user membership
628  acl grant &lt;username&gt; &lt;group&gt; ....... grant user membership (*)
629  acl revoke &lt;username&gt; [&lt;group&gt;] .... grant user membership(s) (*)
630
631            * usrloc *
632  ul show [&lt;username&gt;]................ show in-RAM online users
633  ul rm &lt;username&gt; ................... delete user's UsrLoc entries
634  ul add &lt;username&gt; &lt;uri&gt; ............ introduce a permanent UsrLoc entry
635  showdb [&lt;username&gt;] ................ show online users flushed in DB
636
637                    * control and diagnostic *
638  moni ... show internal status     start .... start ser
639  ps ..... show running processes    stop ..... stop ser
640  fifo ... send raw FIFO commands   restart .. restart ser
641  ping &lt;uri&gt; .. ping a URI (OPTIONS)
642  cisco_restart &lt;uri&gt; .. restart a Cisco phone (NOTIFY)
643
644    Commands labeled with (*) will prompt for a MySQL password.
645    If the variable PW is set, the password will not be prompted.
646
647      ACL privileges are: local ld int voicemail free-pstn
648 </screen>
649             </para>
650         </section>
651         <section>
652             <title>Adding and deleting users with serctl</title>
653             <para>
654                 User account management is performed with these commands:
655             </para>
656             <screen format="linespecific">
657 serctl add
658 serctl password
659 serctl rm
660 </screen>
661             <para>
662                 The contents of the in memory cache can be managed with the ul argument.  Care must
663                 be taken to with these commands.  For example:
664             </para>
665             <screen format="linespecific">
666 serctl ul rm joe
667 </screen>
668             <para>
669                 Will remove the current contact information about Joe from memory
670             </para>
671             <para>
672                 Whereas <quote>serctl rm joe</quote> will delete joe's account.
673             </para>
674         </section>
675         <section>
676             <title>Examining in memory cache with serctl</title>
677             <para>
678                 The command <quote>serctl ul show</quote> will list any currently registered
679                 clients.  The output will look like this:
680             </para>
681             <para>
682                 <screen format="linespecific">
683 ===Domain list===
684 ---Domain---
685 name : 'location'
686 size : 512
687 table: 0x402ee6d0
688 d_ll {
689     n    : 2
690     first: 0x402f1a74
691     last : 0x402f089c
692 }
693 lock : 0
694
695 ...Record(0x402f1a74)...
696 domain: 'location'
697 aor   : 'test'
698 ~~~Contact(0x402f708c)~~~
699 domain : 'location'
700 aor    : 'test'
701 Contact: 'sip:test@192.168.0.100:5060'
702 Expires: 2501
703 q      :       0.00
704 Call-ID: '000a8a93-d4660017-4571a6cd-658ac1bf@192.168.0.100'
705 CSeq   : 101
706 State  : CS_SYNC
707 next   : (nil)
708 prev   : (nil)
709 ~~~/Contact~~~~
710 .../Record...
711 ...Record(0x402f089c)...
712 domain: 'location'
713 aor   : 'joe'
714 ~~~Contact(0x402f0924)~~~
715 domain : 'location'
716 aor    : 'joe'
717 Contact: 'sip:192.168.0.101:14354'
718 Expires: 432
719 q      :       0.00
720 Call-ID: 'e8d93059-e46e-4fd9-958b-ccb36a1cf245@192.168.0.101'
721 CSeq   : 11
722 State  : CS_SYNC
723 next   : (nil)
724 prev   : (nil)
725 ~~~/Contact~~~~
726 .../Record...
727
728 ---/Domain---
729 ===/Domain list===
730 </screen>
731             </para>
732         </section>
733         <section>
734             <title>Examining server status</title>
735             <para>
736                 Two commands can be used to check the health of the server.  The first command
737                 serctl ps returns a list of all &ser; related processes, the ip address and the port
738                 they are listening on.  For example:
739             </para>
740             <para>
741                 <screen format="linespecific">
742 [root@gateway /root]# serctl ps
743 0       31029   attendant
744 1       31033   receiver child=0 sock=0 @ 127.0.0.1::5060
745 2       31034   receiver child=1 sock=0 @ 127.0.0.1::5060
746 3       31035   receiver child=2 sock=0 @ 127.0.0.1::5060
747 4       31036   receiver child=3 sock=0 @ 127.0.0.1::5060
748 5       31037   receiver child=0 sock=1 @ 192.168.0.1::5060
749 6       31038   receiver child=1 sock=1 @ 192.168.0.1::5060
750 7       31039   receiver child=2 sock=1 @ 192.168.0.1::5060
751 8       31040   receiver child=3 sock=1 @ 192.168.0.1::5060
752 9       31049   fifo server
753 10      31072   timer
754 </screen>
755             </para>
756             <para>
757                 The second command, serctl monitor, shows the server version, uptime, pending and
758                 completed transactions, and the number of major category responses the server has
759                 sent.  Another example:
760             </para>
761             <para>
762                 <screen format="linespecific">
763 [cycle #: 1; if constant make sure server lives and fifo is on]
764 Server: Sip EXpress router (0.8.11 (i386/linux)
765 Now: Wed Dec  4 10:13:02 2002
766 Up Since: Mon Dec  2 21:21:11 2002
767 Up time: 132711 [sec]
768
769 Transaction Statistics
770 Current: 0 (2 waiting) Total: 46 (0 local)
771 Replied localy: 37
772 Completion status 6xx: 0, 5xx: 0, 4xx: 23, 3xx: 0,2xx: 22
773
774 Stateless Server Statistics
775 200: 101 202: 0 2xx: 0
776 300: 0 301: 0 302: 0 3xx: 0
777 400: 0 401: 0 403: 0 404: 132 407: 0 408: 0 483: 1 4xx: 0
778 500: 0 5xx: 0
779 6xx: 0
780 xxx: 0
781 failures: 0
782
783 UsrLoc Stats
784 Domain Registered Expired
785 'location' 2 2
786 </screen>
787             </para>
788         </section>
789     </chapter>
790     <chapter>
791         <title>Installing SERweb</title>
792         <para>
793             The SERweb package can be downloaded from <ulink
794                 url="ftp://ftp.berlios.de/ser/latest/serweb"></ulink>
795         </para>
796         <para>
797             The pages associated with SERweb provide a starting point to customize your &sip; user
798             account management tools.
799         </para>
800         <section>
801             <title><acronym>PHP</acronym> configuration</title>
802                 <para>
803                 Go to <acronym>PHP</acronym> configuration file in /etc/php.ini and change
804                 <quote>register_globals = Off</quote> to <quote>On</quote>
805             </para>
806         </section>
807         <section>
808             <title>Installing SERweb default configuration</title>
809             <para>
810                 If you are installing this package on a server that does not host any other web
811                 pages, you can simply extract the files to the document directory of your web
812                 server.  This presumes that you have a working Web Server.
813             </para>
814         </section>
815         <section>
816             <title>Installing SERweb custom file locations</title>
817             <para>
818                 In case your server performs multiple functions, and you want to just add the SERweb
819                 tools to an existing web site, we will need to make changes to a number of the php
820                 files.  The following examples are from an Apache 2.0 on RedHat.
821             </para>
822             <para>
823                 Unzip the files into a temporary directory, such as /root/serweb.  The directory
824                 will contain these files:
825             </para>
826             <para>
827                 <screen format="linespecific">
828 -rw-rw-r--    1 827      2020        18561 Sep 25 16:31 COPYING
829 drwxr-xr-x    2 827      2020         1024 Nov 27 16:43 CVS
830 -rw-rw-r--    1 827      2020          529 Sep 25 16:29 README
831 drwxr-xr-x    7 827      2020         1024 Nov 27 22:24 html
832 drwxr-xr-x    3 827      2020         2048 Sep 26 10:26 phplib
833 </screen>
834             </para>
835             <para>
836                 On the Linux RedHat Version 8 root directory on web server is /var/www/html/
837             </para>
838             <para>
839                 Move the html directory to the root of your web server:
840             </para>
841             <screen format="linespecific">
842 mv html /var/www/html/htdocs/serweb
843 </screen>
844             <para>
845                 Move the phplib directory to your web server application directory:
846             </para>
847             <screen format="linespecific">
848 mv phplib /var/www/html/phplib
849 </screen>
850             <para>
851                 Following files must be updated with this <quote>new</quote> path to the libraries:
852             </para>
853             <screen format="linespecific">
854 ./admin/prepend.php
855 ./user_interface/prepend.php
856 ./user_interface/reg/prepend.php
857 </screen>
858             <para>
859                 For these files the variable: $_PHPLIB[<quote>libdir</quote>] =
860                 <quote>../../phplib/</quote>; becomes $_PHPLIB[<quote>libdir</quote>] =
861                 <quote>../../../phplib/</quote>;
862             </para>
863             <para>
864                 In the ./admin directory edit the files acl.php, index.php, and users.php will need
865                 their path to the forms library updated.  For this example, add ../ to the existing
866                 line
867             </para>
868             <screen format="linespecific">
869 :require <quote>../../../phplib/oohforms.inc</quote>;
870 </screen>
871             <para>
872                 In the ./user_interface directory the following files need the same change:
873             </para>
874             <para>
875                 accounting.php, find_user.php, index.php, missed_calls.php, my_account.php,
876                 phonebook.php, send_im.php, notification_subscription.php
877             </para>
878             <para>
879                 Next these files in ./user_interface/reg need the same change, with an additional
880                 ../:
881             </para>
882             <para>
883                 Finish.php, get_pass.php, index.php
884             </para>
885             <para>
886                 The last changes occur in the config.php file to provide the location for graphic
887                 files, style sheets and time zone information.  Update the following variables:
888             </para>
889             <screen format="linespecific">
890                 $this->root_path=<quote>/serweb/</quote>;
891                 $this->fifo_server = <quote>/tmp/ser_fifo</quote>;
892                 $this->zonetab_file =   <quote>/usr/share/zoneinfo/zone.tab</quote>;
893                 //TZ zone descriptions file, usually: /usr/share/zoneinfo/zone.tab
894             </screen>
895             <para>
896                 Find two variables: <quote> $this->mail_forgot_pass=</quote>,<quote>
897                 $this->mail_register=</quote> and change line
898                 http://oook/~iptel/user_interface/reg/confirmation.php?nr=#confirm#\n\n
899             </para>
900             <para>
901                 with line
902             </para>
903             <para>
904                 http://<quote>.$_SERVER['HTTP_HOST'].</quote>/htdocs/serweb/user_interface/reg/confirmation.php?nr=#confirm#\n\n
905             </para>
906             <para>
907                 This will insure sending a registration feedback mail to SIP server using its &ip;
908                 address
909             </para>
910         </section>
911         <section>
912             <title>Modifying SERweb configuration general</title>
913             <para>
914                 We need to update /usr/local/apache/htdocs/serweb/config.php to represent our realm.
915                 The following variables need to be changed to our domain:
916             </para>
917             <para>
918                 <screen format="linespecific">
919 $this->realm=<quote>mydomain.com</quote>;
920 $this->domainname=<quote> mydomain.com</quote>;
921 $this->web_contact=<quote>sip:JoeUser@ mydomain.com</quote>;
922 //address of pseudo sender
923 </screen>
924                 </para>
925             <screen format="linespecific">
926 $this->default_domain=<quote> mydomain.com</quote>;
927 $this->mail_header_from=<quote>Registration@ mydomain.com</quote>;
928 </screen>
929             <para>
930             </para>
931             <para>
932                 Additionally we will want to modify the section for Terms and Conditions, either
933                 replacing it with appropriate language for our services, or at least replacing
934                 iptel.org with our domain information.
935             </para>
936         </section>
937     </chapter>
938     <chapter>
939         <title>Issues and Limitation</title>
940         <para>
941             Since one of the design goals behind &sip; is to decentralize the intelligence in
942             communications handling, a basic tenant is that SIP clients need to be able to
943             communicate directly with each other. The problem is that many clients find themselves
944             either behind a firewall or in a NAT fronted address space. When a client registers
945             with the SIP server, it tells the server what it is using for an &ip; address, and that
946             address may not be accessible to the public.
947         </para>
948         <section>
949             <title>More on &nat;</title>
950             <para>
951                 There are a couple of ways that we can overcome the problem that &nat; introduces.
952                 Some &sip; client providers are building in options into their products that allow the
953                 user to identify the &ip; address that their phone will appear as to the public.  This
954                 is a nice simple approach, but presumes that the person installing the client knows
955                 what that IP address is, and that it doesn't change.  Cisco has built this feature
956                 into their 79XX series &sip; phones.
957             </para>
958             <para>
959                 A second solution that is working its way through the standards process is called
960                 <quote>Simple Traversal of &udp; through &nat;</quote>, or <acronym>STUN</acronym>.
961                 A <acronym>STUN</acronym> equipped client is configured to send a who-am-I packet to
962                 a known server on the public network.  That server will respond with the &ip;
963                 address that the client appears to be communicating from, and the client can then
964                 use that address to register with the &sip; server.  Phones that leverage
965                 <acronym>STUN</acronym> include: Snom 100, kphone, and sipc .
966             </para>
967         </section>
968         <section>
969             <title>Firewalls</title>
970             <para>
971                 &sip; clients also present an interesting challenge to configuring a firewall.  During
972                 registration the &sip; client will be assigned a &udp; port in the range of 16384 to
973                 32768.  Our firewall administrators will not happily open up all of those ports to
974                 all of the internal systems, on the chance that a &sip; connection may be needed.
975             </para>
976             <para>
977                 This is where the concept of a Firewall Control Protocol, or <acronym>FCP</acronym>,
978                 comes into play.  The design idea is that when a &sip; client registers, a
979                 <acronym>FCP</acronym> agent, or server if you prefer, will dynamically insert a new
980                 rule into the firewall policy to permit that client to participate in &sip;
981                 conversations.
982                 </para>
983         </section>
984         </chapter>
985     <chapter>
986         <title>Diagnostics and tools</title>
987         <para>
988             Detailed information about the communications between clients and the &sip; server is
989             needed to isolate problems.  Two tools that can be used to gather such information are
990             sipsak and ngrep.
991         </para>
992         <section>
993             <title>ngrep</title>
994             <para>
995                 Ngrep is a capable of listening in on network traffic and filtering it in much the
996                 same way as grep can locate patterns in files.  To monitor the communications
997                 between a client, joe, and the server the following command would be run on the
998                 server:
999             </para>
1000             <screen format="linespecific">
1001 ngrep  -n 5060 -d eth0 joe
1002 </screen>
1003             <para>
1004                 Since &sip; communications are <acronym>ASCII</acronym> based, all events such as
1005                 REGISTER, INVITE, SUBSCRIBE, etc. are captured.  The output of ngrep can identify
1006                 problems with &sip; addresses, or client identity.
1007             </para>
1008             <para>
1009                 Ngrep should be part of most modern distributions, or can be downloaded from <ulink
1010                 url="http://sourceforge.net/projects/ngrep/"></ulink>
1011             </para>
1012         </section>
1013         <section>
1014             <title>Sipsak</title>
1015             <para>
1016                 Sipsak can be used to determine if your server is responding to requests, and provide information on
1017                 how your server would route SIP connections.  Sipsak and basic documentation on its use can be
1018                 downloaded from <ulink url="http://sipsak.berlios.de"></ulink>
1019             </para>
1020         </section>
1021     </chapter>
1022     <chapter>
1023         <title>Client Configuration</title>
1024         <section>
1025             <title>Microsoft Messenger 4.6</title>
1026             <para>
1027                 Microsoft Messenger 4.6 can be configured as a &sip; client by selecting Tools\Options\Accounts and
1028                 selecting Communications Service for the account sign in.  Clear the check boxes for .NET Passport
1029                 and Exchange Account.  Check the Communications Service account and enter your &sip; account name.
1030                 Click on Advanced and select Configure settings.  Enter the &ip; address of your server, or hostname
1031                 and choose &udp;.
1032             </para>
1033         </section>
1034         <section>
1035             <title>Cisco 79XX phones</title>
1036             <para>
1037                 Cisco has complete documentation on how to convert a 79XX series phone to use &sip;.
1038                 The basic steps are:
1039             </para>
1040             <section>
1041                 <title>Configure a <acronym>DHCP</acronym> service that provides</title>
1042                 <para>
1043                     <itemizedlist>
1044                         <listitem>
1045                             <para>
1046                                 &ip; address
1047                             </para>
1048                         </listitem>
1049                         <listitem>
1050                             <para>
1051                                 Subnet mask
1052                             </para>
1053                         </listitem>
1054                         <listitem>
1055                             <para>
1056                                 Default gateway
1057                             </para>
1058                         </listitem>
1059                         <listitem>
1060                             <para>
1061                                 <acronym>DNS</acronym> server addresses
1062                             </para>
1063                         </listitem>
1064                         <listitem>
1065                             <para>
1066                                 <acronym>TFTP</acronym> server address
1067                             </para>
1068                         </listitem>
1069                     </itemizedlist>
1070                 </para>
1071             </section>
1072             <section>
1073                 <title>On the <acronym>TFTP</acronym> server load these files</title>
1074                 <para>
1075                     <itemizedlist>
1076                         <listitem>
1077                             <para>
1078                                 OS79XX - Identifies which firmware the phone should load with no
1079                                 extension. Example: P0S3-04-1-00
1080                             </para>
1081                         </listitem>
1082                         <listitem>
1083                             <para>
1084                                 P0S3-04-1-00.bin - The firmware image
1085                             </para>
1086                         </listitem>
1087                         <listitem>
1088                             <para>
1089                                 SIPDefault.cnf - Site wide configuration options
1090                             </para>
1091                         </listitem>
1092                         <listitem>
1093                             <para>
1094                                 SIPmacaddress.cnf - Phone specific settings, including login name
1095                                 and password.  Example: SIP000A8A93D466.cnf
1096                             </para>
1097                         </listitem>
1098                         <listitem>
1099                             <para>
1100                                 RINGLIST.DAT, ringer1.pcm, ringer2.pcm - ring tones
1101                             </para>
1102                         </listitem>
1103                     </itemizedlist>
1104                 </para>
1105                 <para>
1106                     Each time the phone is powered on it will tftp download OS79XX and determine if
1107                     it needs a firmware update.  If no update is needed the next step is to download
1108                     SIPDefault.cnf, SIPmacaddress.cnf, and optionally a dial plan, ringlist and ring
1109                     tones.
1110                 </para>
1111                 <para>
1112                     Calls can be placed to other registered &sip; clients, or to a &pstn; number
1113                     provided there is &pstn; gateway identified in the &ser; configuration file.
1114                 </para>
1115             </section>
1116         </section>
1117     </chapter>
1118     <chapter>
1119         <title>&pstn; connectivity</title>
1120         <para>
1121             Passing calls that originate from a &sip; client to the &pstn; is a simple matter of
1122             permitting &ser; to relay the session to an established &pstn; gateway.  Calls that start
1123             out on the &pstn; and need to be directed to a &sip; client requires that the &pstn; gateway
1124             be aware of where to direct the call.
1125         </para>
1126         <section>
1127             <title>Cisco Dial-peer</title>
1128             <para>
1129                 The Cisco gateway needs to have a &pstn; interface, such as FXO ports or a VXB-2TE1+
1130                 card, and depending on the model of Cisco device an upgraded IOS revision.  The
1131                 dial-peer itself is simple:
1132             </para>
1133             <para>
1134                 dial-peer voice 999 voip
1135             </para>
1136             <para>
1137                 destination-pattern 555999.  ** Associate the number range 555-9990 to 9999 with our
1138                 SIP server
1139             </para>
1140             <para>
1141                 session protocol sipv2 ** Set this dial-peer to use &sip; instead of Cisco protocols
1142                 </para>
1143                 <para>
1144                 session target sip-server ** Send the call to our &sip; server.  See &sip;-UA below
1145             </para>
1146             <para>
1147                 codec g711ulaw ** Set the default codec to 711-Ulaw (common codec between clients)
1148             </para>
1149             <para>
1150                 ! 
1151             </para>
1152             <para>
1153                 sip-ua
1154             </para>
1155             <para>
1156                 sip-server ipv4:192.168.0.1 ** &ip; address of our &sip; server
1157             </para>
1158         </section>
1159         <section>
1160             <title>Relaying &pstn; in ser.cfg</title>
1161             <para>
1162                 The following is an extremely simple sample of how to relay a call from a &sip; client
1163                 to the &pstn;
1164             </para>
1165             <para>
1166                 <screen format="linespecific">
1167 # attempt handoff to PSTN
1168 if (uri=~<quote>^sip:9[0-9]*@mydomain.com</quote>) {  ##  This assumes that the caller is
1169     log(<quote>Forwarding to PSTN\n</quote>);      ##  registered in our realm
1170     t_relay_to( <quote>192.168.0.2</quote>, <quote>5060</quote>);  ##  Our Cisco router
1171     break;
1172 };
1173 </screen>
1174             </para>
1175         </section>
1176     </chapter>
1177     <chapter>
1178         <title>&sip; Status Codes</title>
1179         <para>
1180             The following are the &sip; status codes as of &rfc3261;
1181         </para>
1182         
1183         <para>
1184             <table><title>1XX-2XX Informational</title>
1185                 <tgroup cols="2">
1186                     <tbody>
1187                         <row>
1188                             <entry>
1189                                 100 
1190                             </entry>
1191                             <entry>
1192                                 Trying
1193                             </entry>
1194                         </row>
1195                         <row>
1196                             <entry>
1197                                 180 
1198                             </entry>
1199                             <entry>
1200                                 Ringing
1201                             </entry>
1202                         </row>
1203                         <row>
1204                             <entry>
1205                                 181 
1206                             </entry>
1207                             <entry>
1208                                 Call Is Being Forwarded
1209                             </entry>
1210                         </row>
1211                         <row>
1212                             <entry>
1213                                 182 
1214                             </entry>
1215                             <entry>
1216                                 Queued
1217                             </entry>
1218                         </row>
1219                         <row>
1220                             <entry>
1221                                 183 
1222                             </entry>
1223                             <entry>
1224                                 Session Progress
1225                             </entry>
1226                         </row>
1227                         <row>
1228                             <entry>
1229                                 200 
1230                             </entry>
1231                             <entry>
1232                                 OK
1233                             </entry>
1234                         </row>
1235                         <row>
1236                             <entry>
1237                                 202 
1238                             </entry>
1239                             <entry>
1240                                 OK
1241                             </entry>
1242                         </row>
1243                     </tbody>
1244                 </tgroup>
1245             </table>
1246         </para>
1247         
1248         <para>
1249             <table><title>3XX Redirection</title>
1250                 <tgroup cols='2'>
1251                     <tbody>
1252                         <row>
1253                             <entry>
1254                                 300 
1255                             </entry>
1256                             <entry>
1257                                 Multiple Choices
1258                             </entry>
1259                         </row>
1260                         <row>
1261                             <entry>
1262                                 301 
1263                             </entry>
1264                             <entry>
1265                                 Moved Permanently
1266                             </entry>
1267                         </row>
1268                         <row>
1269                             <entry>
1270                                 303 
1271                             </entry>
1272                             <entry>
1273                                 See Other
1274                             </entry>
1275                         </row>
1276                         <row>
1277                             <entry>
1278                                 305 
1279                             </entry>
1280                             <entry>
1281                                 Use Proxy
1282                             </entry>
1283                         </row>
1284                         <row>
1285                             <entry>
1286                                 380 
1287                             </entry>
1288                             <entry>
1289                                 Alternative Service
1290                             </entry>
1291                         </row>
1292                     </tbody>
1293                 </tgroup>
1294             </table>
1295         </para>
1296         
1297         <para>
1298             <table><title>4XX Client-Error</title>
1299                 <tgroup cols='2'>
1300                     <tbody>
1301                         <row>
1302                             <entry>
1303                                 400 
1304                             </entry>
1305                             <entry>
1306                                 Bad Request
1307                             </entry>
1308                         </row>
1309                         <row>
1310                             <entry>
1311                                 401 
1312                             </entry>
1313                             <entry>
1314                                 Unauthorized
1315                             </entry>
1316                         </row>
1317                         <row>
1318                             <entry>
1319                                 402 
1320                             </entry>
1321                             <entry>
1322                                 Payment Required
1323                             </entry>
1324                         </row>
1325                         <row>
1326                             <entry>
1327                                 403 
1328                             </entry>
1329                             <entry>
1330                                 Forbidden
1331                             </entry>
1332                         </row>
1333                         <row>
1334                             <entry>
1335                                 404 
1336                             </entry>
1337                             <entry>
1338                                 Not Found
1339                             </entry>
1340                         </row>
1341                         <row>
1342                             <entry>
1343                                 405 
1344                             </entry>
1345                             <entry>
1346                                 Method Not Allowed
1347                             </entry>
1348                         </row>
1349                         <row>
1350                             <entry>
1351                                 406 
1352                             </entry>
1353                             <entry>
1354                                 Not Acceptable
1355                             </entry>
1356                         </row>
1357                         <row>
1358                             <entry>
1359                                 407 
1360                             </entry>
1361                             <entry>
1362                                 Proxy Authentication Required
1363                             </entry>
1364                         </row>
1365                         <row>
1366                             <entry>
1367                                 408 
1368                             </entry>
1369                             <entry>
1370                                 Request Timeout
1371                             </entry>
1372                         </row>
1373                         <row>
1374                             <entry>
1375                                 409 
1376                             </entry>
1377                             <entry>
1378                                 Conflict
1379                             </entry>
1380                         </row>
1381                         <row>
1382                             <entry>
1383                                 410 
1384                             </entry>
1385                             <entry>
1386                                 Gone
1387                             </entry>
1388                         </row>
1389                         <row>
1390                             <entry>
1391                                 411 
1392                             </entry>
1393                             <entry>
1394                                 Length Required
1395                             </entry>
1396                         </row>
1397                         <row>
1398                             <entry>
1399                                 413 
1400                             </entry>
1401                             <entry>
1402                                 Request Entity Too Large
1403                             </entry>
1404                         </row>
1405                         <row>
1406                             <entry>
1407                                 414 
1408                             </entry>
1409                             <entry>
1410                                 Request-URI Too Large
1411                             </entry>
1412                         </row>
1413                         <row>
1414                             <entry>
1415                                 415 
1416                             </entry>
1417                             <entry>
1418                                 Unsupported Media Type
1419                             </entry>
1420                         </row>
1421                         <row>
1422                             <entry>
1423                                 420 
1424                             </entry>
1425                             <entry>
1426                                 Bad Extension
1427                             </entry>
1428                         </row>
1429                         <row>
1430                             <entry>
1431                                 480 
1432                             </entry>
1433                             <entry>
1434                                 Temporarily not available
1435                             </entry>
1436                         </row>
1437                         <row>
1438                             <entry>
1439                                 481 
1440                             </entry>
1441                             <entry>
1442                                 Call Leg/Transaction does not exist
1443                             </entry>
1444                         </row>
1445                         <row>
1446                             <entry>
1447                                 482 
1448                             </entry>
1449                             <entry>
1450                                 Loop Detected
1451                             </entry>
1452                         </row>
1453                         <row>
1454                             <entry>
1455                                 483 
1456                             </entry>
1457                             <entry>
1458                                 Too Many Hops
1459                             </entry>
1460                         </row>
1461                         <row>
1462                             <entry>
1463                                 484 
1464                             </entry>
1465                             <entry>
1466                                 Address Incomplete
1467                             </entry>
1468                         </row>
1469                         <row>
1470                             <entry>
1471                                 485 
1472                             </entry>
1473                             <entry>
1474                                 Ambiguous
1475                             </entry>
1476                         </row>
1477                         <row>
1478                             <entry>
1479                                 486 
1480                             </entry>
1481                             <entry>
1482                                 Busy Here
1483                             </entry>
1484                         </row>
1485                         <row>
1486                             <entry>
1487                                 487 
1488                             </entry>
1489                             <entry>
1490                                 Request Terminated
1491                             </entry>
1492                         </row>
1493                         <row>
1494                             <entry>
1495                                 488 
1496                             </entry>
1497                             <entry>
1498                                 Not Acceptable Here
1499                             </entry>
1500                         </row>
1501                         <row>
1502                             <entry>
1503                                 489 
1504                             </entry>
1505                             <entry>
1506                                 Bad Event
1507                             </entry>
1508                         </row>
1509                         <row>
1510                             <entry>
1511                                 491 
1512                             </entry>
1513                             <entry>
1514                                 Request Pending
1515                             </entry>
1516                         </row>
1517                         <row>
1518                             <entry>
1519                                 493 
1520                             </entry>
1521                             <entry>
1522                                 Undecipherable
1523                             </entry>
1524                         </row>
1525                     </tbody>
1526                 </tgroup>
1527             </table>
1528         </para>
1529         
1530         <para>
1531             <table><title>5XX Server-Error</title>
1532                 <tgroup cols='2'>
1533                     <tbody>
1534                         <row>
1535                             <entry>
1536                                 500 
1537                             </entry>
1538                             <entry>
1539                                 Internal Server Error
1540                             </entry>
1541                         </row>
1542                         <row>
1543                             <entry>
1544                                 501 
1545                             </entry>
1546                             <entry>
1547                                 Not Implemented
1548                             </entry>
1549                         </row>
1550                         <row>
1551                             <entry>
1552                                 502 
1553                             </entry>
1554                             <entry>
1555                                 Bad Gateway
1556                             </entry>
1557                         </row>
1558                         <row>
1559                             <entry>
1560                                 503 
1561                             </entry>
1562                             <entry>
1563                                 Service Unavailable
1564                             </entry>
1565                         </row>
1566                         <row>
1567                             <entry>
1568                                 504 
1569                             </entry>
1570                             <entry>
1571                                 Gateway Time-out
1572                             </entry>
1573                         </row>
1574                         <row>
1575                             <entry>
1576                                 505 
1577                             </entry>
1578                             <entry>
1579                                 SIP Version not supported
1580                             </entry>
1581                         </row>
1582                         <row>
1583                             <entry>
1584                                 513 
1585                             </entry>
1586                             <entry>
1587                                 Message Too Large
1588                             </entry>
1589                         </row>
1590                         <row>
1591                             <entry>
1592                                 580 
1593                             </entry>
1594                             <entry>
1595                                 Precondition Failure
1596                             </entry>
1597                         </row>
1598                     </tbody>
1599                 </tgroup>
1600             </table>
1601         </para>
1602         
1603         <para>
1604             <table><title>6XX Global-Failure</title>
1605                 <tgroup cols='2'>
1606                     <tbody>
1607                         <row>
1608                             <entry>
1609                                 600 
1610                             </entry>
1611                             <entry>
1612                                 Busy Everywhere
1613                             </entry>
1614                         </row>
1615                         <row>
1616                             <entry>
1617                                 603 
1618                             </entry>
1619                             <entry>
1620                                 Decline
1621                             </entry>
1622                         </row>
1623                         <row>
1624                             <entry>
1625                                 604 
1626                             </entry>
1627                             <entry>
1628                                 Does Note Exist Anywhere
1629                             </entry>
1630                         </row>
1631                         <row>
1632                             <entry>
1633                                 606 
1634                             </entry>
1635                             <entry>
1636                                 Not Acceptable
1637                             </entry>
1638                         </row>
1639                     </tbody>
1640                 </tgroup>
1641             </table>
1642         </para>
1643     </chapter>
1644 </book>