浏览代码

- reindented

Jan Janak 17 年之前
父节点
当前提交
35a884d10a
共有 42 个文件被更改,包括 3419 次插入3408 次删除
  1. 117 102
      db/schema/aliases.xml
  2. 485 481
      db/schema/attr_types.xml
  3. 21 21
      db/schema/contact_attrs.xml
  4. 10 10
      db/schema/cpl.xml
  5. 155 170
      db/schema/credentials.xml
  6. 27 26
      db/schema/customers.xml
  7. 144 157
      db/schema/domain.xml
  8. 129 140
      db/schema/domain_attrs.xml
  9. 63 62
      db/schema/domain_settings.xml
  10. 25 25
      db/schema/extra_attrs.xml
  11. 195 206
      db/schema/global_attrs.xml
  12. 14 11
      db/schema/grp.xml
  13. 8 8
      db/schema/gw_grp.xml
  14. 360 359
      db/schema/i18n-cs.xml
  15. 103 102
      db/schema/i18n-en.xml
  16. 22 17
      db/schema/i18n.xml
  17. 38 38
      db/schema/ipmatch.xml
  18. 16 16
      db/schema/lcr.xml
  19. 146 146
      db/schema/location.xml
  20. 434 436
      db/schema/missed_calls.xml
  21. 73 70
      db/schema/offline_winfo.xml
  22. 8 8
      db/schema/pdt.xml
  23. 24 24
      db/schema/phonebook.xml
  24. 58 51
      db/schema/presentity.xml
  25. 71 69
      db/schema/presentity_contact.xml
  26. 51 47
      db/schema/presentity_extensions.xml
  27. 55 51
      db/schema/presentity_notes.xml
  28. 63 63
      db/schema/rls_subscription.xml
  29. 32 32
      db/schema/rls_vs.xml
  30. 28 28
      db/schema/rls_vs_names.xml
  31. 14 14
      db/schema/sd_attrs.xml
  32. 90 90
      db/schema/ser.xml
  33. 22 22
      db/schema/silo.xml
  34. 18 18
      db/schema/speed_dial.xml
  35. 10 10
      db/schema/trusted.xml
  36. 39 37
      db/schema/tuple_extensions.xml
  37. 36 36
      db/schema/tuple_notes.xml
  38. 39 39
      db/schema/uri.xml
  39. 34 34
      db/schema/uri_attrs.xml
  40. 15 15
      db/schema/user_attrs.xml
  41. 6 5
      db/schema/version.xml
  42. 121 112
      db/schema/watcherinfo.xml

+ 117 - 102
db/schema/aliases.xml

@@ -1,109 +1,124 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
-  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+		  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
 
-<!ENTITY % entities SYSTEM "entities.xml">
-%entities;
+		  <!ENTITY % entities SYSTEM "entities.xml">
+		  %entities;
 
-]>
+		  ]>
 
 <table>
-    <name>aliases</name>
-    <version>6</version>
-    <description>
-	  This table is used to implement group aliases. Group aliases are SIP
-	  URIs that resolve to multiple destination SIP URIs. The proxy server
-	  then can determine whether it should use serial or paralell forking.
-    </description>
-	
-    <column id="username">
-	  <name>username</name>
-	  <type>string</type>
-	  <default></default>
-	  <size>&user_len;</size>
-    </column>
-    <column id="domain">
-	  <name>domain</name>
-	  <type>string</type>
-	  <default></default>
-	  <size>&domain_len;</size>
-    </column>
-    <column id="contact">
-	  <name>contact</name>
-	  <type>string</type>
-	  <default></default>
-	  <size>&uri_len;</size>
-    </column>
-	<column id="server_id">
-	  <name>server_id</name>
-	  <type>int</type>
-	  <default>0</default>
-	  <description>
-		The ID of the SIP server instance responsible for the contact.
-	  </description>
-	</column>
-	<column>
-	  <name>received</name>
-	  <type>string</type>
-      <null/>
-	  <default><null/></default>
-	  <size>&uri_len;</size>
-    </column>
-    <column>
-	  <name>expires</name>
-	  <type>datetime</type>
-	  <default>1970-01-01 00:00:00</default>
-    </column>
-    <column>
-	  <name>q</name>
-	  <type>float</type>
-	  <default>1.0</default>
-    </column>
-    <column>
-	  <name>callid</name>
-	  <type>string</type>
-	  <default>default_callid</default>
-	  <size>&uri_len;</size>
-    </column>
-    <column>
-	  <name>cseq</name>
-	  <type>unsigned int</type>
-	  <default>42</default>
-    </column>
-    <column>
-	  <name>last_modified</name>
-	  <type>datetime</type>
-	  <default>1970-01-01 00:00:00</default>
-    </column>
-    <column>
-	  <name>replicate</name>
-	  <type>unsigned int</type>
-	  <default>0</default>
-    </column>
-    <column>
-	  <name>state</name>
-	  <type>unsigned int</type>
-	  <default>0</default>
-    </column>
-    <column>
-	  <name>flags</name>
-	  <type>unsigned int</type>
-	  <default>0</default>
-    </column>
-    <column>
-	  <name>user_agent</name>
-	  <type>string</type>
-	  <default></default>
-	  <size>64</size>
-    </column>
-    <index>
-	  <name>main_key</name>
-	  <colref linkend="username"/>
-	  <colref linkend="domain"/>
-	  <colref linkend="contact"/>
-    </index>
-    <index>
-	  <name>aliases_contact</name>
-	  <colref linkend="contact"/>
-    </index>
+  <name>aliases</name>
+  <version>6</version>
+  <description>
+	This table is used to implement group aliases. Group aliases are SIP URIs
+	that resolve to multiple destination SIP URIs. The proxy server then can
+	determine whether it should use serial or paralell forking.
+  </description>
+  
+  <column id="username">
+	<name>username</name>
+	<type>string</type>
+	<default></default>
+	<size>&user_len;</size>
+  </column>
+
+  <column id="domain">
+	<name>domain</name>
+	<type>string</type>
+	<default></default>
+	<size>&domain_len;</size>
+  </column>
+
+  <column id="contact">
+	<name>contact</name>
+	<type>string</type>
+	<default></default>
+	<size>&uri_len;</size>
+  </column>
+
+  <column id="server_id">
+	<name>server_id</name>
+	<type>int</type>
+	<default>0</default>
+	<description>
+	  The ID of the SIP server instance responsible for the contact.
+	</description>
+  </column>
+
+  <column>
+	<name>received</name>
+	<type>string</type>
+    <null/>
+	<default><null/></default>
+	<size>&uri_len;</size>
+  </column>
+
+  <column>
+	<name>expires</name>
+	<type>datetime</type>
+	<default>1970-01-01 00:00:00</default>
+  </column>
+
+  <column>
+	<name>q</name>
+	<type>float</type>
+	<default>1.0</default>
+  </column>
+
+  <column>
+	<name>callid</name>
+	<type>string</type>
+	<default>default_callid</default>
+	<size>&uri_len;</size>
+  </column>
+
+  <column>
+	<name>cseq</name>
+	<type>unsigned int</type>
+	<default>42</default>
+  </column>
+
+  <column>
+	<name>last_modified</name>
+	<type>datetime</type>
+	<default>1970-01-01 00:00:00</default>
+  </column>
+
+  <column>
+	<name>replicate</name>
+	<type>unsigned int</type>
+	<default>0</default>
+  </column>
+
+  <column>
+	<name>state</name>
+	<type>unsigned int</type>
+	<default>0</default>
+  </column>
+
+  <column>
+	<name>flags</name>
+	<type>unsigned int</type>
+	<default>0</default>
+  </column>
+
+  <column>
+	<name>user_agent</name>
+	<type>string</type>
+	<default></default>
+	<size>64</size>
+  </column>
+
+  <index>
+	<name>main_key</name>
+	<colref linkend="username"/>
+	<colref linkend="domain"/>
+	<colref linkend="contact"/>
+  </index>
+
+  <index>
+	<name>aliases_contact</name>
+	<colref linkend="contact"/>
+  </index>
 </table>

+ 485 - 481
db/schema/attr_types.xml

@@ -1,565 +1,569 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE table PUBLIC "-//iptel.org//DTD DBSchema V1.0//EN"
-  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
-
+		  "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd" [
+		  
 <!ENTITY % entities SYSTEM "entities.xml">
 %entities;
 
 ]>
 
 <table role="serweb">
-    <name>attr_types</name>
-    <version>4</version>
-    <description>
-	Each attribute, identified by name, has associated set of
-	properties and constraints. This table contains types and
-	constraints for all attributes known to SER and SERWeb.
-    </description>
-    <column id="at.name">
+  <name>attr_types</name>
+  <version>4</version>
+  <description>
+	Each attribute, identified by name, has associated set of properties and
+	constraints. This table contains types and constraints for all attributes
+	known to SER and SERWeb.
+  </description>
+
+  <column id="at.name">
 	<name>name</name>
 	<type>string</type>
 	<size>32</size>
 	<description>
-	    Name of attribute.
+	  Name of attribute.
 	</description>
-    </column>
-    <column role="serweb" id="at.rich_t">
+  </column>
+
+  <column role="serweb" id="at.rich_t">
 	<name>rich_type</name>
 	<type>string</type>
 	<default>string</default>
 	<size>32</size>
 	<description>
-	    Type specification used by SERWeb. Rich type is more expressive
-	    than raw type.
+	  Type specification used by SERWeb. Rich type is more expressive
+	  than raw type.
 	</description>
-    </column>
-    <column id="at.type">
+  </column>
+
+  <column id="at.type">
 	<name>raw_type</name>
 	<type>int</type>
 	<default>2</default>
 	<description>
-	    The type of attribute. It can be either integer value (type is 0), or
-	    string value (type is 2).
+	  The type of attribute. It can be either integer value (type is 0), or
+	  string value (type is 2).
 	</description>
-    </column>
-    <column role="serweb" id="at.type_spec">
+  </column>
+
+  <column role="serweb" id="at.type_spec">
 	<name>type_spec</name>
 	<type>string</type>
 	<size>255</size>
 	<default><null/></default>
 	<null/>
 	<description>
-	    Exact type specification, this is used by SERWeb only.
+	  Exact type specification, this is used by SERWeb only.
 	</description>
-    </column>
+  </column>
 
-	<column role="serweb" id="at.desc">
+  <column role="serweb" id="at.desc">
 	<name>description</name>
 	<type>string</type>
 	<size>255</size>
 	<default><null/></default>
 	<null/>
 	<description>
-	    Description of attribute, this is used by SERWeb only.
+	  Description of attribute, this is used by SERWeb only.
 	</description>
-    </column>
+  </column>
 
-	<column role="serweb" id="at.d_flags">
+  <column role="serweb" id="at.d_flags">
 	<name>default_flags</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-	    Default flags of attribute, this is used by SERWeb only.
+	  Default flags of attribute, this is used by SERWeb only.
 	</description>
-    </column>
-	
-	<column role="serweb" id="at.flags">
+  </column>
+  
+  <column role="serweb" id="at.flags">
 	<name>flags</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-	    Various flags. Meaning of bits in flags field is this:
-	      10 - multivalue  (if is set, attribute may contain multiple values)
-	      11 - fill_on_reg (attribute should be set when user is registrating)
-	      12 - required    (attribute should not be empty)
+	  Various flags. Meaning of bits in flags field is this:
+	  10 - multivalue  (if is set, attribute may contain multiple values)
+	  11 - fill_on_reg (attribute should be set when user is registrating)
+	  12 - required    (attribute should not be empty)
 	</description>
-    </column>
+  </column>
 
-	<column role="serweb" id="at.prior">
+  <column role="serweb" id="at.prior">
 	<name>priority</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-	    Field of flags describeing where the attribute may be used (user, domain, global,...)
-	    Meaning of bits is this:
-	     4 - uri
-	     8 - user
-	    16 - domain
-	    30 - global
+	  Field of flags describeing where the attribute may be used (user, domain, global,...)
+	  Meaning of bits is this:
+	  4 - uri
+	  8 - user
+	  16 - domain
+	  30 - global
 	</description>
-    </column>
+  </column>
 
-    <column role="serweb" id="at.access">
-        <name>access</name>
+  <column role="serweb" id="at.access">
+    <name>access</name>
 	<name db="oracle">attr_access</name>
 	<type>int</type>
-        <default>0</default>
-        <description>
-	    Access rights to attribute. Meaning values is this:
-	        0 - full access (read and write)
-		1 - read only for users (read and write for admins)
-		3 - admins only (read and write), no access for users
-        </description>
-    </column>
+    <default>0</default>
+    <description>
+	  Access rights to attribute. Meaning values is this:
+	  0 - full access (read and write)
+	  1 - read only for users (read and write for admins)
+	  3 - admins only (read and write), no access for users
+    </description>
+  </column>
 
-	<column role="serweb" id="at.order">
+  <column role="serweb" id="at.order">
 	<name>ordering</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-		When attributes are displayed in serweb, they are sorted by this field. 
-		This is used by SERWeb only.
+	  When attributes are displayed in serweb, they are sorted by this field.
+	  This is used by SERWeb only.
 	</description>
-    </column>
-	
-	<column role="serweb" id="at.grp">
+  </column>
+  
+  <column role="serweb" id="at.grp">
 	<name>grp</name>
 	<type>string</type>
 	<size>32</size>
 	<default>other</default>
 	<description>
-		When attributes are displayed in serweb, they could be grouped together by this field. 
-		This is used by SERWeb only.
+	  When attributes are displayed in serweb, they could be grouped together
+	  by this field.  This is used by SERWeb only.
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>upt_idx1</name>
 	<colref linkend="at.name"/>
 	<unique/>
-    </index>
+  </index>
 
-	<row-identificator>
-		<colref linkend="at.name"/>
-	</row-identificator>
+  <row-identificator>
+	<colref linkend="at.name"/>
+  </row-identificator>
 
-	<row vendor-controlled="1">
-		<value col="at.name">uid</value>
-		<value col="at.type">2</value>
-		<value col="at.d_flags">1</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">did</value>
-		<value col="at.type">2</value>
-		<value col="at.d_flags">1</value>
-	</row>
-    
-	<row vendor-controlled="1">
-		<value col="at.name">datetime_created</value>        
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">creation time</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.prior">65792</value>
-		<value col="at.order">0</value>
-		<value col="at.access">21</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">asserted_id</value>        
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">asserted identity</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">200</value>
-		<value col="at.access">1</value>
-	</row>
-	 
-	<row vendor-controlled="1">
-		<value col="at.name">fr_timer</value>    
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">@ff_fr_timer</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.prior">1073807616</value>
-		<value col="at.order">140</value>
-	</row>
-    
-	<row vendor-controlled="1">
-		<value col="at.name">fr_inv_timer</value>
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">@ff_fr_inv_timer</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.prior">1073807616</value>
-		<value col="at.order">150</value>
-	</row>
-    
-	<row vendor-controlled="1">
-		<value col="at.name">gflags</value>     
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">global flags</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.prior">1073741824</value>
-		<value col="at.order">0</value>
-	</row>
-		
-	<row vendor-controlled="1">
-		<value col="at.name">digest_realm</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">digest realm</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">4096</value>
-		<value col="at.prior">65536</value>
-		<value col="at.order">0</value>
-	</row>
-    
-	<row vendor-controlled="1">
-		<value col="at.name">acl</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">access control list of user</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">1024</value>
-		<value col="at.prior">0</value>
-		<value col="at.order">0</value>
-	</row>
-     
-	<row vendor-controlled="1">
-		<value col="at.name">first_name</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">@ff_first_name</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">2048</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">10</value>
-		<value col="at.grp">general</value>
-	</row>
+  <row vendor-controlled="1">
+	<value col="at.name">uid</value>
+	<value col="at.type">2</value>
+	<value col="at.d_flags">1</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">did</value>
+	<value col="at.type">2</value>
+	<value col="at.d_flags">1</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">datetime_created</value>        
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">creation time</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.prior">65792</value>
+	<value col="at.order">0</value>
+	<value col="at.access">21</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">asserted_id</value>        
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">asserted identity</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">200</value>
+	<value col="at.access">1</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">fr_timer</value>    
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">@ff_fr_timer</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.prior">1073807616</value>
+	<value col="at.order">140</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">fr_inv_timer</value>
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">@ff_fr_inv_timer</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.prior">1073807616</value>
+	<value col="at.order">150</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">gflags</value>     
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">global flags</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.prior">1073741824</value>
+	<value col="at.order">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">digest_realm</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">digest realm</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">4096</value>
+	<value col="at.prior">65536</value>
+	<value col="at.order">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">acl</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">access control list of user</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">1024</value>
+	<value col="at.prior">0</value>
+	<value col="at.order">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">first_name</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">@ff_first_name</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">2048</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">10</value>
+	<value col="at.grp">general</value>
+  </row>
 
-	<row vendor-controlled="1">
-		<value col="at.name">last_name</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">@ff_last_name</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">2048</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">20</value>
-		<value col="at.grp">general</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">email</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">email_adr</value>
-		<value col="at.desc">@ff_email</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">6144</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">30</value>
-		<value col="at.grp">general</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">timezone</value>   
-		<value col="at.type">2</value>
-		<value col="at.rich_t">timezone</value>
-		<value col="at.desc">@ff_timezone</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">2048</value>
-		<value col="at.prior">1073807616</value>
-		<value col="at.order">60</value>
-		<value col="at.grp">general</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_allow_find</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">boolean</value>
-		<value col="at.desc">@ff_allow_lookup_for_me</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">110</value>
-		<value col="at.grp">privacy</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">lang</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">lang</value>
-		<value col="at.desc">@ff_language</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073807616</value>
-		<value col="at.order">50</value>
-		<value col="at.grp">general</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_show_status</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">boolean</value>
-		<value col="at.desc">@ff_status_visibility</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073742080</value>
-		<value col="at.order">100</value>
-		<value col="at.grp">privacy</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_admin</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">admin of domain</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">1024</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_owner</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">owner of domain</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_domain_default_flags</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">@ff_domain_def_f</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">4096</value>
-		<value col="at.prior">1073741824</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_deleted_ts</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">deleted timestamp</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">phone</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">@ff_phone</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">2048</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">40</value>
-		<value col="at.grp">general</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_acl_control</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">acl control</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">1024</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_credential_default_flags</value>
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">@ff_credential_def_f</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">4096</value>
-		<value col="at.prior">1073741824</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_uri_default_flags</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">@ff_uri_def_f</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">4096</value>
-		<value col="at.prior">1073741824</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_is_admin</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">boolean</value>
-		<value col="at.desc">admin privilege</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_is_hostmaster</value>      
-		<value col="at.type">0</value>
-		<value col="at.rich_t">boolean</value>
-		<value col="at.desc">hostmaster privilege</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_confirmation</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">registration confirmation</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_pending_ts</value>      
-		<value col="at.type">2</value>
-		<value col="at.rich_t">string</value>
-		<value col="at.desc">registration timestamp</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-	</row>
+  <row vendor-controlled="1">
+	<value col="at.name">last_name</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">@ff_last_name</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">2048</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">20</value>
+	<value col="at.grp">general</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">email</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">email_adr</value>
+	<value col="at.desc">@ff_email</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">6144</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">30</value>
+	<value col="at.grp">general</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">timezone</value>   
+	<value col="at.type">2</value>
+	<value col="at.rich_t">timezone</value>
+	<value col="at.desc">@ff_timezone</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">2048</value>
+	<value col="at.prior">1073807616</value>
+	<value col="at.order">60</value>
+	<value col="at.grp">general</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_allow_find</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">boolean</value>
+	<value col="at.desc">@ff_allow_lookup_for_me</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">110</value>
+	<value col="at.grp">privacy</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">lang</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">lang</value>
+	<value col="at.desc">@ff_language</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073807616</value>
+	<value col="at.order">50</value>
+	<value col="at.grp">general</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_show_status</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">boolean</value>
+	<value col="at.desc">@ff_status_visibility</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073742080</value>
+	<value col="at.order">100</value>
+	<value col="at.grp">privacy</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_admin</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">admin of domain</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">1024</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_owner</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">owner of domain</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_domain_default_flags</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">@ff_domain_def_f</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">4096</value>
+	<value col="at.prior">1073741824</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_deleted_ts</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">deleted timestamp</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">phone</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">@ff_phone</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">2048</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">40</value>
+	<value col="at.grp">general</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_acl_control</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">acl control</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">1024</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_credential_default_flags</value>
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">@ff_credential_def_f</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">4096</value>
+	<value col="at.prior">1073741824</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_uri_default_flags</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">@ff_uri_def_f</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">4096</value>
+	<value col="at.prior">1073741824</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_is_admin</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">boolean</value>
+	<value col="at.desc">admin privilege</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_is_hostmaster</value>      
+	<value col="at.type">0</value>
+	<value col="at.rich_t">boolean</value>
+	<value col="at.desc">hostmaster privilege</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_confirmation</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">registration confirmation</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_pending_ts</value>      
+	<value col="at.type">2</value>
+	<value col="at.rich_t">string</value>
+	<value col="at.desc">registration timestamp</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+  </row>
 
-	<row vendor-controlled="1">
-		<value col="at.name">sw_require_confirm</value>
-		<value col="at.type">0</value>
-		<value col="at.rich_t">boolean</value>
-		<value col="at.desc">@ff_reg_confirmation</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073807360</value>
-		<value col="at.order">120</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_uname_assign_mode</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">list</value>
-		<value col="at.desc">@ff_uname_assign_mode</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073807360</value>
-		<value col="at.order">122</value>
-		<value col="at.type_spec">a:3:{s:4:"fcfs";s:23:"first come first served";s:5:"email";s:18:"email verification";s:9:"adminonly";s:10:"admin only";}</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">sw_send_missed</value>
-		<value col="at.type">0</value>
-		<value col="at.rich_t">boolean</value>
-		<value col="at.desc">@ff_send_daily_missed_calls</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073807616</value>
-		<value col="at.order">130</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">uid_format</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">list</value>
-		<value col="at.desc">@ff_uid_format</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073741824</value>
-		<value col="at.order">160</value>
-		<value col="at.type_spec">a:3:{i:0;s:14:"username@realm";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">did_format</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">list</value>
-		<value col="at.desc">@ff_did_format</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">1073741824</value>
-		<value col="at.order">170</value>
-		<value col="at.type_spec">a:3:{i:0;s:11:"domain name";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}</value>
-	</row>
-	
-	<row vendor-controlled="1">
-		<value col="at.name">contact_email</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">email_adr</value>
-		<value col="at.desc">@ff_contact_email</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">4096</value>
-		<value col="at.prior">1073807360</value>
-		<value col="at.order">0</value>
-		<value col="at.grp">general</value>
-	</row>
+  <row vendor-controlled="1">
+	<value col="at.name">sw_require_confirm</value>
+	<value col="at.type">0</value>
+	<value col="at.rich_t">boolean</value>
+	<value col="at.desc">@ff_reg_confirmation</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073807360</value>
+	<value col="at.order">120</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_uname_assign_mode</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">list</value>
+	<value col="at.desc">@ff_uname_assign_mode</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073807360</value>
+	<value col="at.order">122</value>
+	<value col="at.type_spec">a:3:{s:4:"fcfs";s:23:"first come first served";s:5:"email";s:18:"email verification";s:9:"adminonly";s:10:"admin only";}</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">sw_send_missed</value>
+	<value col="at.type">0</value>
+	<value col="at.rich_t">boolean</value>
+	<value col="at.desc">@ff_send_daily_missed_calls</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073807616</value>
+	<value col="at.order">130</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">uid_format</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">list</value>
+	<value col="at.desc">@ff_uid_format</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073741824</value>
+	<value col="at.order">160</value>
+	<value col="at.type_spec">a:3:{i:0;s:14:"username@realm";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">did_format</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">list</value>
+	<value col="at.desc">@ff_did_format</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">1073741824</value>
+	<value col="at.order">170</value>
+	<value col="at.type_spec">a:3:{i:0;s:11:"domain name";i:1;s:21:"integer (incremental)";i:2;s:15:"UUID by RFC4122";}</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">contact_email</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">email_adr</value>
+	<value col="at.desc">@ff_contact_email</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">4096</value>
+	<value col="at.prior">1073807360</value>
+	<value col="at.order">0</value>
+	<value col="at.grp">general</value>
+  </row>
 
-								      
-	<row vendor-controlled="1">
-		<value col="at.name">fwd_busy_target</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">sip_adr</value>
-		<value col="at.desc">@attr_fwd_busy_target</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">50</value>
-	</row>
-								      
-	<row vendor-controlled="1">
-		<value col="at.name">fwd_noanswer_target</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">sip_adr</value>
-		<value col="at.desc">@attr_fwd_noanswer_target</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">55</value>
-	</row>
-								      
-	<row vendor-controlled="1">
-		<value col="at.name">fwd_always_target</value>
-		<value col="at.type">2</value>
-		<value col="at.rich_t">sip_adr</value>
-		<value col="at.desc">@attr_fwd_always_target</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">256</value>
-		<value col="at.order">60</value>
-	</row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">fwd_busy_target</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">sip_adr</value>
+	<value col="at.desc">@attr_fwd_busy_target</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">50</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">fwd_noanswer_target</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">sip_adr</value>
+	<value col="at.desc">@attr_fwd_noanswer_target</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">55</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">fwd_always_target</value>
+	<value col="at.type">2</value>
+	<value col="at.rich_t">sip_adr</value>
+	<value col="at.desc">@attr_fwd_always_target</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">256</value>
+	<value col="at.order">60</value>
+  </row>
 
-								      
-	<row vendor-controlled="1">
-		<value col="at.name">domain_data_version</value>
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">Version of data in domain table</value>
-		<value col="at.d_flags">33</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-		<value col="at.order">0</value>
-	</row>
+  
+  <row vendor-controlled="1">
+	<value col="at.name">domain_data_version</value>
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">Version of data in domain table</value>
+	<value col="at.d_flags">33</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+	<value col="at.order">0</value>
+  </row>
 
-	<row vendor-controlled="1">
-		<value col="at.name">sw_highest_alias_number</value>
-		<value col="at.type">0</value>
-		<value col="at.rich_t">int</value>
-		<value col="at.desc">highest assigned alias number</value>
-		<value col="at.d_flags">32</value>
-		<value col="at.flags">0</value>
-		<value col="at.prior">0</value>
-		<value col="at.order">0</value>
-	</row>
+  <row vendor-controlled="1">
+	<value col="at.name">sw_highest_alias_number</value>
+	<value col="at.type">0</value>
+	<value col="at.rich_t">int</value>
+	<value col="at.desc">highest assigned alias number</value>
+	<value col="at.d_flags">32</value>
+	<value col="at.flags">0</value>
+	<value col="at.prior">0</value>
+	<value col="at.order">0</value>
+  </row>
 
 </table>

+ 21 - 21
db/schema/contact_attrs.xml

@@ -8,56 +8,56 @@
 ]>
 
 <table>
-    <name>contact_attrs</name>
-    <version>1</version>
+  <name>contact_attrs</name>
+  <version>1</version>
 
-    <column id="contactattrs.uid">
+  <column id="contactattrs.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
-    
-	<column id="contactattrs.contact">
+  </column>
+  
+  <column id="contactattrs.contact">
 	<name>contact</name>
 	<type>string</type>
 	<size>&uri_len;</size>
-    </column>
+  </column>
 
-    <column id="contactattrs.name">
+  <column id="contactattrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
-    </column>
+  </column>
 
-    <column id="contactattrs.value">
+  <column id="contactattrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
-    </column>
+  </column>
 
-    <column id="contactattrs.flags">
+  <column id="contactattrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags (SER_LOAD and such).
+	  Various flags (SER_LOAD and such).
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<unique/>
 	<name>contactattrs_idx</name>
-        <colref linkend="contactattrs.uid"/>
-        <colref linkend="contactattrs.contact"/>
-		<colref linkend="contactattrs.name"/>
-    </index>
+    <colref linkend="contactattrs.uid"/>
+    <colref linkend="contactattrs.contact"/>
+	<colref linkend="contactattrs.name"/>
+  </index>
 
 </table>

+ 10 - 10
db/schema/cpl.xml

@@ -8,31 +8,31 @@
 ]>
 
 <table id="cpl" xmlns:xi="http://www.w3.org/2001/XInclude">
-    <name>cpl</name>
-    <version>2</version>
+  <name>cpl</name>
+  <version>2</version>
 
-    <column id="cpl.uid">
+  <column id="cpl.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>cpl_xml</name>
 	<type>binary</type>
 	<null/>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>cpl_bin</name>
 	<type>binary</type>
 	<null/>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>cpl_key</name>
 	<unique/>
 	<colref linkend="cpl.uid"/>
-    </index>
+  </index>
 </table>

+ 155 - 170
db/schema/credentials.xml

@@ -8,268 +8,253 @@
 ]>
 
 <table xmlns:db="http://docbook.org/ns/docbook">
-    <name>credentials</name>
-    <version>7</version>
-    <description>
+  <name>credentials</name>
+  <version>7</version>
+  <description>
 	Credentials table maps credentials, identified by username and realm to
-	users identified by uid. Credentials can be used in digest
-	authentication in SIP and/or authentication in SERWeb. In most
-	situations credentials for digest authentication and SERWeb
-	authentication are same. There are cases, however, where seperate
-	credentials for SERWeb and separate credentials for digest
-	authentication may be needed. One such example are setups where
-	subscribers get HW user agents with locked configuration and thay do
-	not know the password and are not allowed to change it. If they should
-	be able to authenticate in SERWeb then they need different credentials
-	with different password.
-    </description>
+	users identified by uid. Credentials can be used in digest authentication
+	in SIP and/or authentication in SERWeb. In most situations credentials for
+	digest authentication and SERWeb authentication are same. There are cases,
+	however, where seperate credentials for SERWeb and separate credentials
+	for digest authentication may be needed. One such example are setups where
+	subscribers get HW user agents with locked configuration and thay do not
+	know the password and are not allowed to change it. If they should be able
+	to authenticate in SERWeb then they need different credentials with
+	different password.
+  </description>
 
-    <column id="credentials.auth_username">
+  <column id="credentials.auth_username">
 	<name>auth_username</name>
 	<type>string</type>
 	<size>&user_len;</size>
 	<description>
-	    Credentials username. In digest authentication this is the username
-	    configured in user agents, in SERWeb this is the login username.
+	  Credentials username. In digest authentication this is the username
+	  configured in user agents, in SERWeb this is the login username.
 	</description>
-    </column>
+  </column>
 
-    <column id="credentials.did">
+  <column id="credentials.did">
 	<name>did</name>
 	<type>string</type>
 	<size>&id_len;</size>
-        <default>_default</default>
+    <default>_default</default>
 	<description>
-	    DID of the virtual domain the username belongs to.
+	  DID of the virtual domain the username belongs to.
 	</description>
-    </column>
+  </column>
 
-    <column id="credentials.realm">
+  <column id="credentials.realm">
 	<name>realm</name>
 	<type>string</type>
 	<size>&realm_len;</size>
 	<description>
-	    Credentials realm. In digest authentication this is the value of
-	    digest realm attribute, in SERWeb this is the part after @ in login
-	    username.
+	  Credentials realm. In digest authentication this is the value of digest
+	  realm attribute, in SERWeb this is the part after @ in login username.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>password</name>
 	<type>string</type>
 	<default></default>
 	<size>28</size>
 	<description>
-	    Plain text password of the subscriber, can be used for both digest
-	    (SER) and SERWeb authentication.
+	  Plain text password of the subscriber, can be used for both digest (SER)
+	  and SERWeb authentication.
 	</description>
-    </column>
+  </column>
 
-    <column id="credentials.flags">
+  <column id="credentials.flags">
 	<name>flags</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-	    Flags that identify where this particular instance of credentials
-	    can be used. If FOR_SER flag is set then the credentials can be
-	    used in digest authentication in SIP. If FOR_SERWEB is set then the
-	    credentials can be used for authentication in SERWeb. Meaning of
-	    flags is summarized in the table below.
-	    <db:note>
+	  Flags that identify where this particular instance of credentials can be
+	  used. If FOR_SER flag is set then the credentials can be used in digest
+	  authentication in SIP. If FOR_SERWEB is set then the credentials can be
+	  used for authentication in SERWeb. Meaning of flags is summarized in the
+	  table below.
+	  <db:note>
 		<db:simpara>
-		    Note that several flags below have no meaning in this table
-		    and are only presented for completeness, because the flags
-		    column has identical meaning of flags across most tables in
-		    the database.
+		  Note that several flags below have no meaning in this table and are
+		  only presented for completeness, because the flags column has
+		  identical meaning of flags across most tables in the database.
 		</db:simpara>
-	    </db:note>
-	    <db:table><db:title>possible credentials flags</db:title>
+	  </db:note>
+	  <db:table><db:title>possible credentials flags</db:title>
 		<db:tgroup cols="4">
-		    <db:thead>
+		  <db:thead>
 			<db:row>
-			    <db:entry>Bit</db:entry>
-			    <db:entry>Hex value</db:entry>
-			    <db:entry>Flag</db:entry>
-			    <db:entry>Description</db:entry>
+			  <db:entry>Bit</db:entry>
+			  <db:entry>Hex value</db:entry>
+			  <db:entry>Flag</db:entry>
+			  <db:entry>Description</db:entry>
 			</db:row>
-		    </db:thead>
-		    <db:tbody>
+		  </db:thead>
+		  <db:tbody>
 			<db:row>
-			    <db:entry>0</db:entry>
-			    <db:entry>0x00000001</db:entry>
-			    <db:entry>FOR_SER</db:entry>
-			    <db:entry>
-				If set then SER will load the row (not
-				applicable in this table).
-			    </db:entry>
+			  <db:entry>0</db:entry>
+			  <db:entry>0x00000001</db:entry>
+			  <db:entry>FOR_SER</db:entry>
+			  <db:entry>
+				If set then SER will load the row (not applicable in this
+				table).
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>1</db:entry>
-			    <db:entry>0x00000002</db:entry>
-			    <db:entry>DISABLED</db:entry>
-			    <db:entry>
-				The data represented by the row is temporarily
-				disabled, which means it stays in the database
-				but no applications use it.
-			    </db:entry>
+			  <db:entry>1</db:entry>
+			  <db:entry>0x00000002</db:entry>
+			  <db:entry>DISABLED</db:entry>
+			  <db:entry>
+				The data represented by the row is temporarily disabled, which
+				means it stays in the database but no applications use it.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>2</db:entry>
-			    <db:entry>0x00000004</db:entry>
-			    <db:entry>CANONICAL</db:entry>
-			    <db:entry>
-				The URI or domain name is canonical. When
-				displaying the URI of the user or name of a
-				domain then this entry should be used.  Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>2</db:entry>
+			  <db:entry>0x00000004</db:entry>
+			  <db:entry>CANONICAL</db:entry>
+			  <db:entry>
+				The URI or domain name is canonical. When displaying the URI
+				of the user or name of a domain then this entry should be
+				used.  Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>3</db:entry>
-			    <db:entry>0x00000008</db:entry>
-			    <db:entry>ALLOWED_TO</db:entry>
-			    <db:entry>
-				The URI represented by this row can be used in
-				The Request-URI or To header field. In other
-				words the user will be reachable under this URI
-				and can use it as an alias. Not applicable in
+			  <db:entry>3</db:entry>
+			  <db:entry>0x00000008</db:entry>
+			  <db:entry>ALLOWED_TO</db:entry>
+			  <db:entry>
+				The URI represented by this row can be used in The Request-URI
+				or To header field. In other words the user will be reachable
+				under this URI and can use it as an alias. Not applicable in
 				this table.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>4</db:entry>
-			    <db:entry>0x00000010</db:entry>
-			    <db:entry>ALLOWED_FROM</db:entry>
-			    <db:entry>
-				The user identified by uid can use this URI in
-				From header field. Not applicable in this
-				table.
-			    </db:entry>
+			  <db:entry>4</db:entry>
+			  <db:entry>0x00000010</db:entry>
+			  <db:entry>ALLOWED_FROM</db:entry>
+			  <db:entry>
+				The user identified by uid can use this URI in From header
+				field. Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>5</db:entry>
-			    <db:entry>0x00000020</db:entry>
-			    <db:entry>FOR_SERWEB</db:entry>
-			    <db:entry>
-				The data represented by the row is for
-				SERWeb. This is currently used in credentials
-				table only where the flags allows to keep
-				different credentials for digest authentication
-				in SIP and for SERWeb authentication. Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>5</db:entry>
+			  <db:entry>0x00000020</db:entry>
+			  <db:entry>FOR_SERWEB</db:entry>
+			  <db:entry>
+				The data represented by the row is for SERWeb. This is
+				currently used in credentials table only where the flags
+				allows to keep different credentials for digest authentication
+				in SIP and for SERWeb authentication. Not applicable in this
+				table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>6</db:entry>
-			    <db:entry>0x00000040</db:entry>
-			    <db:entry>PENDING</db:entry>
-			    <db:entry>
-				The account owning the piece of data has not
-				been activated yet. Not applicable in this
-				table, this is mainly used in credentials
-				table.
-			    </db:entry>
+			  <db:entry>6</db:entry>
+			  <db:entry>0x00000040</db:entry>
+			  <db:entry>PENDING</db:entry>
+			  <db:entry>
+				The account owning the piece of data has not been activated
+				yet. Not applicable in this table, this is mainly used in
+				credentials table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>7</db:entry>
-			    <db:entry>0x00000100</db:entry>
-			    <db:entry>DELETED</db:entry>
-			    <db:entry>
+			  <db:entry>7</db:entry>
+			  <db:entry>0x00000100</db:entry>
+			  <db:entry>DELETED</db:entry>
+			  <db:entry>
 				The row has been scheduled for deletion.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>8</db:entry>
-			    <db:entry>0x00000200</db:entry>
-			    <db:entry>CALLER_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the caller. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>8</db:entry>
+			  <db:entry>0x00000200</db:entry>
+			  <db:entry>CALLER_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				caller. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>9</db:entry>
-			    <db:entry>0x00000400</db:entry>
-			    <db:entry>CALLEE_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the callee. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>9</db:entry>
+			  <db:entry>0x00000400</db:entry>
+			  <db:entry>CALLEE_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				callee. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
-		    </db:tbody>
+		  </db:tbody>
 		</db:tgroup>
-	    </db:table>
+	  </db:table>
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>ha1</name>
 	<type>string</type>
 	<size>32</size>
 	<description>
-	    For digest authentication only. This is the H(A1) value calculated
-	    as per RFC2617. The value contains an MD5 hash of string
-	    concatenated from username,realm, and password: MD5(username:realm:password).
+	  For digest authentication only. This is the H(A1) value calculated as
+	  per RFC2617. The value contains an MD5 hash of string concatenated from
+	  username,realm, and password: MD5(username:realm:password).
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>ha1b</name>
 	<type>string</type>
 	<default></default>
 	<size>32</size>
 	<description>
-	    Similar to ha1, but username@domain is used as username. This is
-	    necessary for user agents that put username@domain into digest
-	    username attribute. This is often useful in multi-domain setups
-	    because it allows users to explicitly specify the domain they wish
-	    to sign in.
+	  Similar to ha1, but username@domain is used as username. This is
+	  necessary for user agents that put username@domain into digest username
+	  attribute. This is often useful in multi-domain setups because it allows
+	  users to explicitly specify the domain they wish to sign in.
 	</description>
-    </column>
+  </column>
 
-    <column id="credentials.uid">
+  <column id="credentials.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
 	<description>
-	    This is the UID (User ID) identifier of the user the
-	    credentials are assigned to. Each uid can have multiple
-	    credentials assigned. UIDs of subscribers with no credentials
-	    assigned do not appear in this table.
+	  This is the UID (User ID) identifier of the user the credentials are
+	  assigned to. Each uid can have multiple credentials assigned. UIDs of
+	  subscribers with no credentials assigned do not appear in this table.
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>cred_idx</name>
 	<colref linkend="credentials.auth_username"/>
 	<colref linkend="credentials.did"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<colref linkend="credentials.uid"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>did_idx</name>
 	<colref linkend="credentials.did"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>realm_idx</name>
 	<colref linkend="credentials.realm"/>
-    </index>
+  </index>
 </table>

+ 27 - 26
db/schema/customers.xml

@@ -8,68 +8,69 @@
 ]>
 
 <table role="serweb">
-    <name>customers</name>
-    <version>1</version>
+  <name>customers</name>
+  <version>1</version>
 
-    <description>
-	Customers - domain owners (among others that's the party to be billed for having a domain).
-	Customers are entities that describe the commercial owners of domains.
-    </description>
-    <column id="cu.cid">
+  <description>
+	Customers - domain owners (among others that's the party to be billed for
+	having a domain).  Customers are entities that describe the commercial
+	owners of domains.
+  </description>
+  <column id="cu.cid">
 	<name>cid</name>
 	<type>unsigned int</type>
 	<type db="mysql">INT AUTO_INCREMENT</type>
 	<type db="postgres">SERIAL</type>
 	<type db="dbtext">int,auto</type>
 	<description>
-	    Unique id of the customer. The value is auto generated by the databsae
-	    server.
+	  Unique id of the customer. The value is auto generated by the databsae
+	  server.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>name</name>
 	<type>string</type>
 	<size>128</size>
 	<description>
-	    Name of the customer.
+	  Name of the customer.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>address</name>
 	<type>string</type>
 	<size>255</size>
 	<null/>
 	<description>
-	    Address of the customer.
+	  Address of the customer.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>phone</name>
 	<type>string</type>
 	<size>64</size>
 	<null/>
 	<description>
-	    Phone number of the customer.
+	  Phone number of the customer.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>email</name>
 	<type>string</type>
 	<size>255</size>
 	<null/>
 	<description>
-	    Email address of the customer.
-        </description>
-    </column>
-							    
+	  Email address of the customer.
+    </description>
+  </column>
+  
 
-    <index>
+  <index>
 	<name>cu_idx</name>
 	<unique/>
 	<colref linkend="cu.cid"/>
-    </index>
+  </index>
 </table>

+ 144 - 157
db/schema/domain.xml

@@ -8,211 +8,198 @@
 ]>
 
 <table xmlns:db="http://docbook.org/ns/docbook">
-    <name>domain</name>
-    <version>2</version>
+  <name>domain</name>
+  <version>2</version>
 
-    <description>
+  <description>
 	<db:para>
-	    Domain table is used in multi-domain setups where single SER
-	    instance is responsible for multiple domains at the same time. Each
-	    virtual domain has a unique identifier called DID. This is a string
-	    that uniquely identifies the domain. In smaller setups DID will be
-	    same as the domain part used in SIP URIs, that is for virtual
-	    domain iptel.org will have DID "iptel.org".
+	  Domain table is used in multi-domain setups where single SER instance is
+	  responsible for multiple domains at the same time. Each virtual domain
+	  has a unique identifier called DID. This is a string that uniquely
+	  identifies the domain. In smaller setups DID will be same as the domain
+	  part used in SIP URIs, that is for virtual domain iptel.org will have
+	  DID "iptel.org".
 	</db:para>
 	<db:para>
-	    DIDs are not limited to domain names that can appear in SIP
-	    URIs. Domain names are subject to change over time and, especially
-	    in setups with large number of domains hosted on a single SIP proxy
-	    server, a different format for DIDs (not based on the domain name)
-	    might be more convenient.
+	  DIDs are not limited to domain names that can appear in SIP URIs. Domain
+	  names are subject to change over time and, especially in setups with
+	  large number of domains hosted on a single SIP proxy server, a different
+	  format for DIDs (not based on the domain name) might be more convenient.
 	</db:para>
 	<db:para>
-	    Each virtual domain has one or more domain names
-	    assigned. Typically all domain names and IP addresses that resolve
-	    to the SIP proxy responsible for the domain should be listed in
-	    this table. Virtual domain iptel.org, for example, would contain
-	    domain names: "iptel.org", "sip.iptel.org", "proxy.iptel.org",
-	    "195.37.77.101".
+	  Each virtual domain has one or more domain names assigned. Typically all
+	  domain names and IP addresses that resolve to the SIP proxy responsible
+	  for the domain should be listed in this table. Virtual domain iptel.org,
+	  for example, would contain domain names: "iptel.org", "sip.iptel.org",
+	  "proxy.iptel.org", "195.37.77.101".
 	</db:para>
-    </description>
+  </description>
 
-    <column id="domain.did">
+  <column id="domain.did">
 	<name>did</name>
 	<type>string</type>
 	<size>&id_len;</size>
 	<description>
-	    Unique identifier of the domain.
+	  Unique identifier of the domain.
 	</description>
-    </column>
+  </column>
 
-    <column id="domain.domain">
+  <column id="domain.domain">
 	<name>domain</name>
 	<type>string</type>
 	<size>&domain_len;</size>
 	<description>
-	    Domain name.
+	  Domain name.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags. The meaning of bits in the flags field is described
-	    in the table below. 
-	    <db:note>
+	  Various flags. The meaning of bits in the flags field is described
+	  in the table below. 
+	  <db:note>
 		<db:simpara>
-		    Note that several flags below have no meaning in this table
-		    and are only presented for completeness, because the flags
-		    column has identical meaning of flags across most tables in
-		    the database.
+		  Note that several flags below have no meaning in this table and are
+		  only presented for completeness, because the flags column has
+		  identical meaning of flags across most tables in the database.
 		</db:simpara>
-	    </db:note>
-	    <db:table><db:title>possible domain flags</db:title>
+	  </db:note>
+	  <db:table><db:title>possible domain flags</db:title>
 		<db:tgroup cols="4">
-		    <db:thead>
+		  <db:thead>
 			<db:row>
-			    <db:entry>Bit</db:entry>
-			    <db:entry>Hex value</db:entry>
-			    <db:entry>Flag</db:entry>
-			    <db:entry>Description</db:entry>
+			  <db:entry>Bit</db:entry>
+			  <db:entry>Hex value</db:entry>
+			  <db:entry>Flag</db:entry>
+			  <db:entry>Description</db:entry>
 			</db:row>
-		    </db:thead>
-		    <db:tbody>
+		  </db:thead>
+		  <db:tbody>
 			<db:row>
-			    <db:entry>0</db:entry>
-			    <db:entry>0x00000001</db:entry>
-			    <db:entry>FOR_SER</db:entry>
-			    <db:entry>
-				If set then SER will load the row (not
-				applicable in this table).
-			    </db:entry>
+			  <db:entry>0</db:entry>
+			  <db:entry>0x00000001</db:entry>
+			  <db:entry>FOR_SER</db:entry>
+			  <db:entry>
+				If set then SER will load the row (not applicable in this
+				table).
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>1</db:entry>
-			    <db:entry>0x00000002</db:entry>
-			    <db:entry>DISABLED</db:entry>
-			    <db:entry>
-				The data represented by the row is temporarily
-				disabled, which means it stays in the database
-				but no applications use it.
-			    </db:entry>
+			  <db:entry>1</db:entry>
+			  <db:entry>0x00000002</db:entry>
+			  <db:entry>DISABLED</db:entry>
+			  <db:entry>
+				The data represented by the row is temporarily disabled, which
+				means it stays in the database but no applications use it.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>2</db:entry>
-			    <db:entry>0x00000004</db:entry>
-			    <db:entry>CANONICAL</db:entry>
-			    <db:entry>
-				The URI or domain name is canonical. When
-				displaying the URI of the user or name of a
-				domain then this entry should be used.  Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>2</db:entry>
+			  <db:entry>0x00000004</db:entry>
+			  <db:entry>CANONICAL</db:entry>
+			  <db:entry>
+				The URI or domain name is canonical. When displaying the URI
+				of the user or name of a domain then this entry should be
+				used.  Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>3</db:entry>
-			    <db:entry>0x00000008</db:entry>
-			    <db:entry>ALLOWED_TO</db:entry>
-			    <db:entry>
-				The URI represented by this row can be used in
-				The Request-URI or To header field. In other
-				words the user will be reachable under this URI
-				and can use it as an alias. Not applicable in
+			  <db:entry>3</db:entry>
+			  <db:entry>0x00000008</db:entry>
+			  <db:entry>ALLOWED_TO</db:entry>
+			  <db:entry>
+				The URI represented by this row can be used in The Request-URI
+				or To header field. In other words the user will be reachable
+				under this URI and can use it as an alias. Not applicable in
 				this table.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>4</db:entry>
-			    <db:entry>0x00000010</db:entry>
-			    <db:entry>ALLOWED_FROM</db:entry>
-			    <db:entry>
-				The user identified by uid can use this URI in
-				From header field. Not applicable in this
-				table.
-			    </db:entry>
+			  <db:entry>4</db:entry>
+			  <db:entry>0x00000010</db:entry>
+			  <db:entry>ALLOWED_FROM</db:entry>
+			  <db:entry>
+				The user identified by uid can use this URI in From header
+				field. Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>5</db:entry>
-			    <db:entry>0x00000020</db:entry>
-			    <db:entry>FOR_SERWEB</db:entry>
-			    <db:entry>
-				The data represented by the row is for
-				SERWeb. This is currently used in credentials
-				table only where the flags allows to keep
-				different credentials for digest authentication
-				in SIP and for SERWeb authentication. Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>5</db:entry>
+			  <db:entry>0x00000020</db:entry>
+			  <db:entry>FOR_SERWEB</db:entry>
+			  <db:entry>
+				The data represented by the row is for SERWeb. This is
+				currently used in credentials table only where the flags
+				allows to keep different credentials for digest authentication
+				in SIP and for SERWeb authentication. Not applicable in this
+				table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>6</db:entry>
-			    <db:entry>0x00000040</db:entry>
-			    <db:entry>PENDING</db:entry>
-			    <db:entry>
-				The account owning the piece of data has not
-				been activated yet. Not applicable in this
-				table, this is mainly used in credentials
-				table.
-			    </db:entry>
+			  <db:entry>6</db:entry>
+			  <db:entry>0x00000040</db:entry>
+			  <db:entry>PENDING</db:entry>
+			  <db:entry>
+				The account owning the piece of data has not been activated
+				yet. Not applicable in this table, this is mainly used in
+				credentials table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>7</db:entry>
-			    <db:entry>0x00000100</db:entry>
-			    <db:entry>DELETED</db:entry>
-			    <db:entry>
+			  <db:entry>7</db:entry>
+			  <db:entry>0x00000100</db:entry>
+			  <db:entry>DELETED</db:entry>
+			  <db:entry>
 				The row has been scheduled for deletion.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>8</db:entry>
-			    <db:entry>0x00000200</db:entry>
-			    <db:entry>CALLER_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the caller. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>8</db:entry>
+			  <db:entry>0x00000200</db:entry>
+			  <db:entry>CALLER_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				caller. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>9</db:entry>
-			    <db:entry>0x00000400</db:entry>
-			    <db:entry>CALLEE_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the callee. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>9</db:entry>
+			  <db:entry>0x00000400</db:entry>
+			  <db:entry>CALLEE_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				callee. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
-		    </db:tbody>
+		  </db:tbody>
 		</db:tgroup>
-	    </db:table>
+	  </db:table>
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>domain_idx</name>
 	<unique/>
 	<colref linkend="domain.domain"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>did_idx</name>
 	<colref linkend="domain.did"/>
-    </index>
+  </index>
 
-	<verbatim db="mysql" id="func.todomain">
-	  <create>
-<![CDATA[
+  <verbatim db="mysql" id="func.todomain">
+	<create>
+	  <![CDATA[
 drop function if exists todomain;
 delimiter //
 create function todomain (pdid varchar(64)) returns varchar(128) 
@@ -226,15 +213,15 @@ end
 //
 delimiter ;
 ]]>
-	  </create>
-	  <destroy>
-drop function if exists todomain;
-	  </destroy>
-	</verbatim>
+	</create>
+	<destroy>
+	  drop function if exists todomain;
+	</destroy>
+  </verbatim>
 
-	<verbatim db="mysql" id="func.todid">
-	  <create>
-<![CDATA[
+  <verbatim db="mysql" id="func.todid">
+	<create>
+	  <![CDATA[
 drop function if exists todid;
 delimiter //
 create function todid (pdomain varchar(128)) returns varchar(64) 
@@ -248,9 +235,9 @@ end
 //
 delimiter ;
 ]]>
-	  </create>
-	  <destroy>
-drop function if exists todid;
-	  </destroy>
-	</verbatim>
+	</create>
+	<destroy>
+	  drop function if exists todid;
+	</destroy>
+  </verbatim>
 </table>

+ 129 - 140
db/schema/domain_attrs.xml

@@ -8,215 +8,204 @@
 ]>
 
 <table xmlns:db="http://docbook.org/ns/docbook">
-    <name>domain_attrs</name>
-    <version>1</version>
-    <description>
-	Each domain can have several attribute-value pairs assigned. They are
-	used to store additional information about the domain, such as digest
-	realm to be used when challenging users, language settings for the
-	domain, time zone, and so on. The AVPs (attribute-value pairs) are
-	stored in this table. Domain attributes have lower priority then user
-	attributes, thus the values from this table will only be used if no
-	user-specific attribute with the same name does not exist. Lists of
-	domain attributes are managed by domain module of SER.
-    </description>
+  <name>domain_attrs</name>
+  <version>1</version>
+  <description>
+	Each domain can have several attribute-value pairs assigned. They are used
+	to store additional information about the domain, such as digest realm to
+	be used when challenging users, language settings for the domain, time
+	zone, and so on. The AVPs (attribute-value pairs) are stored in this
+	table. Domain attributes have lower priority then user attributes, thus
+	the values from this table will only be used if no user-specific attribute
+	with the same name does not exist. Lists of domain attributes are managed
+	by domain module of SER.
+  </description>
 
-    <column id="domain_attrs.did">
+  <column id="domain_attrs.did">
 	<name>did</name>
 	<type>string</type>
 	<size>&id_len;</size>
 	<null/>
 	<description>
-	    DID (Domain ID) of the virtual domain that owns the attribute.
+	  DID (Domain ID) of the virtual domain that owns the attribute.
 	</description>
-    </column>
+  </column>
 
-    <column id="domain_attrs.name">
+  <column id="domain_attrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
 	<description>
-	    Attribute name. This should be one of the names listed in
-	    attr_types table.
+	  Attribute name. This should be one of the names listed in attr_types
+	  table.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-	    Attribute type. This should be the value of type column from
-	    attr_types table with same name.
+	  Attribute type. This should be the value of type column from attr_types
+	  table with same name.
 	</description>
-    </column>
+  </column>
 
-    <column id="domain_attrs.value">
+  <column id="domain_attrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
 	<description>
-	    Value of the attribute.
+	  Value of the attribute.
 	</description>
-    </column>
+  </column>
 
-    <column id="domain_attrs.flags">
+  <column id="domain_attrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags. The meaning of bits in the flags field is described
-	    in the table below. 
-	    <db:note>
+	  Various flags. The meaning of bits in the flags field is described in
+	  the table below.
+	  <db:note>
 		<db:simpara>
-		    Note that several flags below have no meaning in this table
-		    and are only presented for completeness, because the flags
-		    column has identical meaning of flags across most tables in
-		    the database.
+		  Note that several flags below have no meaning in this table and are
+		  only presented for completeness, because the flags column has
+		  identical meaning of flags across most tables in the database.
 		</db:simpara>
-	    </db:note>
-	    <db:table><db:title>possible domain_attrs flags</db:title>
+	  </db:note>
+	  <db:table><db:title>possible domain_attrs flags</db:title>
 		<db:tgroup cols="4">
-		    <db:thead>
+		  <db:thead>
 			<db:row>
-			    <db:entry>Bit</db:entry>
-			    <db:entry>Hex value</db:entry>
-			    <db:entry>Flag</db:entry>
-			    <db:entry>Description</db:entry>
+			  <db:entry>Bit</db:entry>
+			  <db:entry>Hex value</db:entry>
+			  <db:entry>Flag</db:entry>
+			  <db:entry>Description</db:entry>
 			</db:row>
-		    </db:thead>
-		    <db:tbody>
+		  </db:thead>
+		  <db:tbody>
 			<db:row>
-			    <db:entry>0</db:entry>
-			    <db:entry>0x00000001</db:entry>
-			    <db:entry>FOR_SER</db:entry>
-			    <db:entry>
-				If set then SER will load the row (not
-				applicable in this table).
-			    </db:entry>
+			  <db:entry>0</db:entry>
+			  <db:entry>0x00000001</db:entry>
+			  <db:entry>FOR_SER</db:entry>
+			  <db:entry>
+				If set then SER will load the row (not applicable in this
+				table).
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>1</db:entry>
-			    <db:entry>0x00000002</db:entry>
-			    <db:entry>DISABLED</db:entry>
-			    <db:entry>
-				The data represented by the row is temporarily
-				disabled, which means it stays in the database
-				but no applications use it.
-			    </db:entry>
+			  <db:entry>1</db:entry>
+			  <db:entry>0x00000002</db:entry>
+			  <db:entry>DISABLED</db:entry>
+			  <db:entry>
+				The data represented by the row is temporarily disabled, which
+				means it stays in the database but no applications use it.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>2</db:entry>
-			    <db:entry>0x00000004</db:entry>
-			    <db:entry>CANONICAL</db:entry>
-			    <db:entry>
-				The URI or domain name is canonical. When
-				displaying the URI of the user or name of a
-				domain then this entry should be used.  Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>2</db:entry>
+			  <db:entry>0x00000004</db:entry>
+			  <db:entry>CANONICAL</db:entry>
+			  <db:entry>
+				The URI or domain name is canonical. When displaying the URI
+				of the user or name of a domain then this entry should be
+				used.  Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>3</db:entry>
-			    <db:entry>0x00000008</db:entry>
-			    <db:entry>ALLOWED_TO</db:entry>
-			    <db:entry>
-				The URI represented by this row can be used in
-				The Request-URI or To header field. In other
-				words the user will be reachable under this URI
-				and can use it as an alias. Not applicable in
+			  <db:entry>3</db:entry>
+			  <db:entry>0x00000008</db:entry>
+			  <db:entry>ALLOWED_TO</db:entry>
+			  <db:entry>
+				The URI represented by this row can be used in The Request-URI
+				or To header field. In other words the user will be reachable
+				under this URI and can use it as an alias. Not applicable in
 				this table.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>4</db:entry>
-			    <db:entry>0x00000010</db:entry>
-			    <db:entry>ALLOWED_FROM</db:entry>
-			    <db:entry>
-				The user identified by uid can use this URI in
-				From header field. Not applicable in this
-				table.
-			    </db:entry>
+			  <db:entry>4</db:entry>
+			  <db:entry>0x00000010</db:entry>
+			  <db:entry>ALLOWED_FROM</db:entry>
+			  <db:entry>
+				The user identified by uid can use this URI in From header
+				field. Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>5</db:entry>
-			    <db:entry>0x00000020</db:entry>
-			    <db:entry>FOR_SERWEB</db:entry>
-			    <db:entry>
-				The data represented by the row is for
-				SERWeb. This is currently used in credentials
-				table only where the flags allows to keep
-				different credentials for digest authentication
-				in SIP and for SERWeb authentication. Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>5</db:entry>
+			  <db:entry>0x00000020</db:entry>
+			  <db:entry>FOR_SERWEB</db:entry>
+			  <db:entry>
+				The data represented by the row is for SERWeb. This is
+				currently used in credentials table only where the flags
+				allows to keep different credentials for digest authentication
+				in SIP and for SERWeb authentication. Not applicable in this
+				table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>6</db:entry>
-			    <db:entry>0x00000040</db:entry>
-			    <db:entry>PENDING</db:entry>
-			    <db:entry>
-				The account owning the piece of data has not
-				been activated yet. Not applicable in this
-				table, this is mainly used in credentials
-				table.
-			    </db:entry>
+			  <db:entry>6</db:entry>
+			  <db:entry>0x00000040</db:entry>
+			  <db:entry>PENDING</db:entry>
+			  <db:entry>
+				The account owning the piece of data has not been activated
+				yet. Not applicable in this table, this is mainly used in
+				credentials table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>7</db:entry>
-			    <db:entry>0x00000100</db:entry>
-			    <db:entry>DELETED</db:entry>
-			    <db:entry>
+			  <db:entry>7</db:entry>
+			  <db:entry>0x00000100</db:entry>
+			  <db:entry>DELETED</db:entry>
+			  <db:entry>
 				The row has been scheduled for deletion.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>8</db:entry>
-			    <db:entry>0x00000200</db:entry>
-			    <db:entry>CALLER_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the caller. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>8</db:entry>
+			  <db:entry>0x00000200</db:entry>
+			  <db:entry>CALLER_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				caller. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>9</db:entry>
-			    <db:entry>0x00000400</db:entry>
-			    <db:entry>CALLEE_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the callee. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>9</db:entry>
+			  <db:entry>0x00000400</db:entry>
+			  <db:entry>CALLEE_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				callee. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
-		    </db:tbody>
+		  </db:tbody>
 		</db:tgroup>
-	    </db:table>	    
+	  </db:table>	    
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>domain_attr_idx</name>
 	<unique/>
 	<colref linkend="domain_attrs.did"/>
 	<colref linkend="domain_attrs.name"/>
 	<colref linkend="domain_attrs.value"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>domain_did</name>
 	<colref linkend="domain_attrs.did"/>
 	<colref linkend="domain_attrs.flags"/>
-    </index>
+  </index>
 
 </table>

+ 63 - 62
db/schema/domain_settings.xml

@@ -8,106 +8,107 @@
 ]>
 
 <table xmlns:db="http://docbook.org/ns/docbook"
-    role="serweb">
-    <name>domain_settings</name>
-    <version>1</version>
+       role="serweb">
+  <name>domain_settings</name>
+  <version>1</version>
 
-    <description>
+  <description>
 	Domain specific files and their older versions.
-    </description>
-    <column id="ds.did">
+  </description>
+  <column id="ds.did">
 	<name>did</name>
 	<type>string</type>
 	<size>&id_len;</size>
-        <description>
-            Unique identifier of the domain.
-        </description>
-    </column>
+    <description>
+      Unique identifier of the domain.
+    </description>
+  </column>
 
-    <column id="ds.filename">
+  <column id="ds.filename">
 	<name>filename</name>
 	<type>string</type>
 	<size>255</size>
 	<description>
-	    Name of file (within domain directory)
+	  Name of file (within domain directory)
 	</description>
-    </column>
+  </column>
 
-    <column id="ds.version">
+  <column id="ds.version">
 	<name>version</name>
 	<type>unsigned int</type>
 	<description>
-	    Version of file
+	  Version of file
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>timestamp</name>
 	<type>unsigned int</type>
 	<null/>
 	<description>
-	   Timestamp of creation this version of file 
+	  Timestamp of creation this version of file 
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>content</name>
 	<type>binary</type>
 	<null/>
 	<description>
-	    Content of file
+	  Content of file
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>flags</name>
-        <type>unsigned int</type>
+    <type>unsigned int</type>
 	<default>0</default>
-        <description>
-	    Flags which describes some special meanings of rows. Meaning of flags is summarized in the table below.
-            <db:table><db:title>possible domain_settings flags</db:title>
-                <db:tgroup cols="4">
-                    <db:thead>
-                        <db:row>
-                           <db:entry>Bit</db:entry>
-                           <db:entry>Hex value</db:entry>
-                           <db:entry>Flag</db:entry>
-                           <db:entry>Description</db:entry>
-                        </db:row>
-                    </db:thead>
-                    <db:tbody>
-                        <db:row>
-                           <db:entry>7</db:entry>
-                           <db:entry>0x00000001</db:entry>
-                           <db:entry>DELETED</db:entry>
-                           <db:entry>
-                               File has been deleted.
-                           </db:entry>
-                        </db:row>
-                        <db:row>
-                           <db:entry>13</db:entry>
-                           <db:entry>0x00000002</db:entry>
-                           <db:entry>DIR</db:entry>
-                           <db:entry>
-			       This is a directory.
-                           </db:entry>
-                        </db:row>
-                    </db:tbody>
-                </db:tgroup>
-            </db:table>
+    <description>
+	  Flags which describes some special meanings of rows. Meaning of flags is
+	  summarized in the table below.
+      <db:table><db:title>possible domain_settings flags</db:title>
+        <db:tgroup cols="4">
+          <db:thead>
+            <db:row>
+              <db:entry>Bit</db:entry>
+              <db:entry>Hex value</db:entry>
+              <db:entry>Flag</db:entry>
+              <db:entry>Description</db:entry>
+            </db:row>
+          </db:thead>
+          <db:tbody>
+            <db:row>
+              <db:entry>7</db:entry>
+              <db:entry>0x00000001</db:entry>
+              <db:entry>DELETED</db:entry>
+              <db:entry>
+                File has been deleted.
+              </db:entry>
+            </db:row>
+            <db:row>
+              <db:entry>13</db:entry>
+              <db:entry>0x00000002</db:entry>
+              <db:entry>DIR</db:entry>
+              <db:entry>
+			    This is a directory.
+              </db:entry>
+            </db:row>
+          </db:tbody>
+        </db:tgroup>
+      </db:table>
 	</description>
-    </column>
-    
-    <index>
+  </column>
+  
+  <index>
 	<name>ds_id</name>
 	<unique/>
 	<colref linkend="ds.did"/>
 	<colref linkend="ds.filename"/>
 	<colref linkend="ds.version"/>
-    </index>
-    <index>
+  </index>
+  <index>
 	<name>ds_df</name>
 	<colref linkend="ds.did"/>
 	<colref linkend="ds.filename"/>
-    </index>
+  </index>
 </table>

+ 25 - 25
db/schema/extra_attrs.xml

@@ -8,53 +8,53 @@
 ]>
 
 <table>
-    <name>extra_attrs</name>
-    <version>1</version>
+  <name>extra_attrs</name>
+  <version>1</version>
 
-    <column id="extra_attrs.id">
+  <column id="extra_attrs.id">
 	<name>id</name>
 	<type>string</type>
 	<size>256</size>
-    </column>
+  </column>
 
-    <column id="extra_attrs.name">
+  <column id="extra_attrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
-    </column>
+  </column>
 
-    <column id="extra_attrs.value">
+  <column id="extra_attrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
-    </column>
+  </column>
 
-    <column id="extra_attrs.flags">
+  <column id="extra_attrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags (SER_LOAD and such).
+	  Various flags (SER_LOAD and such).
 	</description>
-    </column>
-
-    <index> 
-		<!-- 
-		Note: we don't need unique index, but some databases require it.
-		We need only non-unique index accordind id because of reading.
-		-->
-		<unique/>
-		<name>userattrs_idx</name>
-		<colref linkend="extra_attrs.id"/>
-		<colref linkend="extra_attrs.name"/>
-		<colref linkend="extra_attrs.value"/>
-    </index>
+  </column>
+
+  <index> 
+	<!-- 
+		 Note: we don't need unique index, but some databases require it.
+		 We need only non-unique index accordind id because of reading.
+	  -->
+	<unique/>
+	<name>userattrs_idx</name>
+	<colref linkend="extra_attrs.id"/>
+	<colref linkend="extra_attrs.name"/>
+	<colref linkend="extra_attrs.value"/>
+  </index>
 
 </table>

+ 195 - 206
db/schema/global_attrs.xml

@@ -8,274 +8,263 @@
 ]>
 
 <table xmlns:db="http://docbook.org/ns/docbook">
-    <name>global_attrs</name>
-    <version>1</version>
-    <description>
+  <name>global_attrs</name>
+  <version>1</version>
+  <description>
 	The table contains value for global attributes. Global attributes are
-	often used to implement default value for attributes that are not
-	present in domain or user attributes.
-    </description>
+	often used to implement default value for attributes that are not present
+	in domain or user attributes.
+  </description>
 
-    <column id="global_attrs.name">
+  <column id="global_attrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
 	<description>
-	    Attribute name. This should be one of the names listed in
-	    attr_types table.
+	  Attribute name. This should be one of the names listed in attr_types
+	  table.
 	</description>
-    </column>
+  </column>
 
-    <column id="global_attrs.type">
+  <column id="global_attrs.type">
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
 	<description>
-	    Attribute type. This should be the value of type column from
-	    attr_types table with same name.
+	  Attribute type. This should be the value of type column from attr_types
+	  table with same name.
 	</description>
-    </column>
+  </column>
 
-    <column id="global_attrs.value">
+  <column id="global_attrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
 	<description>
-	    Value of the attribute.
+	  Value of the attribute.
 	</description>
-    </column>
+  </column>
 
-    <column id="global_attrs.flags">
+  <column id="global_attrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags. The meaning of bits in the flags field is described
-	    in the table below. 
-	    <db:note>
+	  Various flags. The meaning of bits in the flags field is described in
+	  the table below.
+	  <db:note>
 		<db:simpara>
-		    Note that several flags below have no meaning in this table
-		    and are only presented for completeness, because the flags
-		    column has identical meaning of flags across most tables in
-		    the database.
+		  Note that several flags below have no meaning in this table and are
+		  only presented for completeness, because the flags column has
+		  identical meaning of flags across most tables in the database.
 		</db:simpara>
-	    </db:note>
-	    <db:table><db:title>possible global_attrs flags</db:title>
+	  </db:note>
+	  <db:table><db:title>possible global_attrs flags</db:title>
 		<db:tgroup cols="4">
-		    <db:thead>
+		  <db:thead>
 			<db:row>
-			    <db:entry>Bit</db:entry>
-			    <db:entry>Hex value</db:entry>
-			    <db:entry>Flag</db:entry>
-			    <db:entry>Description</db:entry>
+			  <db:entry>Bit</db:entry>
+			  <db:entry>Hex value</db:entry>
+			  <db:entry>Flag</db:entry>
+			  <db:entry>Description</db:entry>
 			</db:row>
-		    </db:thead>
-		    <db:tbody>
+		  </db:thead>
+		  <db:tbody>
 			<db:row>
-			    <db:entry>0</db:entry>
-			    <db:entry>0x00000001</db:entry>
-			    <db:entry>FOR_SER</db:entry>
-			    <db:entry>
+			  <db:entry>0</db:entry>
+			  <db:entry>0x00000001</db:entry>
+			  <db:entry>FOR_SER</db:entry>
+			  <db:entry>
 				If set then SER will load the row (not
 				applicable in this table).
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>1</db:entry>
-			    <db:entry>0x00000002</db:entry>
-			    <db:entry>DISABLED</db:entry>
-			    <db:entry>
-				The data represented by the row is temporarily
-				disabled, which means it stays in the database
-				but no applications use it.
-			    </db:entry>
+			  <db:entry>1</db:entry>
+			  <db:entry>0x00000002</db:entry>
+			  <db:entry>DISABLED</db:entry>
+			  <db:entry>
+				The data represented by the row is temporarily disabled, which
+				means it stays in the database but no applications use it.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>2</db:entry>
-			    <db:entry>0x00000004</db:entry>
-			    <db:entry>CANONICAL</db:entry>
-			    <db:entry>
-				The URI or domain name is canonical. When
-				displaying the URI of the user or name of a
-				domain then this entry should be used.  Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>2</db:entry>
+			  <db:entry>0x00000004</db:entry>
+			  <db:entry>CANONICAL</db:entry>
+			  <db:entry>
+				The URI or domain name is canonical. When displaying the URI
+				of the user or name of a domain then this entry should be
+				used.  Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>3</db:entry>
-			    <db:entry>0x00000008</db:entry>
-			    <db:entry>ALLOWED_TO</db:entry>
-			    <db:entry>
-				The URI represented by this row can be used in
-				The Request-URI or To header field. In other
-				words the user will be reachable under this URI
-				and can use it as an alias. Not applicable in
+			  <db:entry>3</db:entry>
+			  <db:entry>0x00000008</db:entry>
+			  <db:entry>ALLOWED_TO</db:entry>
+			  <db:entry>
+				The URI represented by this row can be used in The Request-URI
+				or To header field. In other words the user will be reachable
+				under this URI and can use it as an alias. Not applicable in
 				this table.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>4</db:entry>
-			    <db:entry>0x00000010</db:entry>
-			    <db:entry>ALLOWED_FROM</db:entry>
-			    <db:entry>
-				The user identified by uid can use this URI in
-				From header field. Not applicable in this
-				table.
-			    </db:entry>
+			  <db:entry>4</db:entry>
+			  <db:entry>0x00000010</db:entry>
+			  <db:entry>ALLOWED_FROM</db:entry>
+			  <db:entry>
+				The user identified by uid can use this URI in From header
+				field. Not applicable in this table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>5</db:entry>
-			    <db:entry>0x00000020</db:entry>
-			    <db:entry>FOR_SERWEB</db:entry>
-			    <db:entry>
-				The data represented by the row is for
-				SERWeb. This is currently used in credentials
-				table only where the flags allows to keep
-				different credentials for digest authentication
-				in SIP and for SERWeb authentication. Not
-				applicable in this table.
-			    </db:entry>
+			  <db:entry>5</db:entry>
+			  <db:entry>0x00000020</db:entry>
+			  <db:entry>FOR_SERWEB</db:entry>
+			  <db:entry>
+				The data represented by the row is for SERWeb. This is
+				currently used in credentials table only where the flags
+				allows to keep different credentials for digest authentication
+				in SIP and for SERWeb authentication. Not applicable in this
+				table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>6</db:entry>
-			    <db:entry>0x00000040</db:entry>
-			    <db:entry>PENDING</db:entry>
-			    <db:entry>
-				The account owning the piece of data has not
-				been activated yet. Not applicable in this
-				table, this is mainly used in credentials
-				table.
-			    </db:entry>
+			  <db:entry>6</db:entry>
+			  <db:entry>0x00000040</db:entry>
+			  <db:entry>PENDING</db:entry>
+			  <db:entry>
+				The account owning the piece of data has not been activated
+				yet. Not applicable in this table, this is mainly used in
+				credentials table.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>7</db:entry>
-			    <db:entry>0x00000100</db:entry>
-			    <db:entry>DELETED</db:entry>
-			    <db:entry>
+			  <db:entry>7</db:entry>
+			  <db:entry>0x00000100</db:entry>
+			  <db:entry>DELETED</db:entry>
+			  <db:entry>
 				The row has been scheduled for deletion.
-			    </db:entry>
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>8</db:entry>
-			    <db:entry>0x00000200</db:entry>
-			    <db:entry>CALLER_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the caller. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>8</db:entry>
+			  <db:entry>0x00000200</db:entry>
+			  <db:entry>CALLER_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				caller. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
 			<db:row>
-			    <db:entry>9</db:entry>
-			    <db:entry>0x00000400</db:entry>
-			    <db:entry>CALLEE_DELETED</db:entry>
-			    <db:entry>
-				The accounting record has been scheduled for
-				deletion by the callee. The row can be deleted
-				once both the caller and callee schedule the
-				record for deletion. A single record can be
-				shared by two users and thus both of them must
-				schedule it for deletion before it can be
-				physically deleted.
-			    </db:entry>
+			  <db:entry>9</db:entry>
+			  <db:entry>0x00000400</db:entry>
+			  <db:entry>CALLEE_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				callee. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
 			</db:row>
-		    </db:tbody>
+		  </db:tbody>
 		</db:tgroup>
-	    </db:table>	    
+	  </db:table>	    
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>global_attrs_idx</name>
 	<unique/>
 	<colref linkend="global_attrs.name"/>
 	<colref linkend="global_attrs.value"/>
-    </index>
+  </index>
 
-	<row-identificator>
-		<colref linkend="global_attrs.name"/>
-	</row-identificator>
+  <row-identificator>
+	<colref linkend="global_attrs.name"/>
+  </row-identificator>
 
-	<row vendor-controlled="1">
-		<value col="global_attrs.name">sw_domain_default_flags</value>
-		<value col="global_attrs.type">0</value>
-		<value col="global_attrs.value">33</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-	<row vendor-controlled="1">
-		<value col="global_attrs.name">sw_credential_default_flags</value>
-		<value col="global_attrs.type">0</value>
-		<value col="global_attrs.value">33</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-	<row vendor-controlled="1">
-		<value col="global_attrs.name">sw_uri_default_flags</value>
-		<value col="global_attrs.type">0</value>
-		<value col="global_attrs.value">57</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
+  <row vendor-controlled="1">
+	<value col="global_attrs.name">sw_domain_default_flags</value>
+	<value col="global_attrs.type">0</value>
+	<value col="global_attrs.value">33</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="global_attrs.name">sw_credential_default_flags</value>
+	<value col="global_attrs.type">0</value>
+	<value col="global_attrs.value">33</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row vendor-controlled="1">
+	<value col="global_attrs.name">sw_uri_default_flags</value>
+	<value col="global_attrs.type">0</value>
+	<value col="global_attrs.value">57</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
 
-	<row vendor-controlled="1">
-		<value col="global_attrs.name">sw_uname_assign_mode</value>
-		<value col="global_attrs.type">2</value>
-		<value col="global_attrs.value">fcfs</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-        <row vendor-controlled="1">
-                <value col="global_attrs.name">domain_data_version</value>
-                <value col="global_attrs.type">0</value>
-                <value col="global_attrs.value">0</value>
-                <value col="global_attrs.flags">33</value>
-        </row>
-									
-	<row>
-		<value col="global_attrs.name">sw_show_status</value>
-		<value col="global_attrs.type">0</value>
-		<value col="global_attrs.value">1</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-	<row>
-		<value col="global_attrs.name">sw_require_conf</value>
-		<value col="global_attrs.type">0</value>
-		<value col="global_attrs.value">1</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-	<row>
-		<value col="global_attrs.name">lang</value>
-		<value col="global_attrs.type">2</value>
-		<value col="global_attrs.value">en</value>
-		<value col="global_attrs.flags">33</value>
-	</row>
-		
-	<row>
-		<value col="global_attrs.name">sw_timezone</value>
-		<value col="global_attrs.type">2</value>
-		<value col="global_attrs.value">Europe/Prague</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-	<row>
-		<value col="global_attrs.name">uid_format</value>
-		<value col="global_attrs.type">2</value>
-		<value col="global_attrs.value">0</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-		
-	<row>
-		<value col="global_attrs.name">did_format</value>
-		<value col="global_attrs.type">2</value>
-		<value col="global_attrs.value">0</value>
-		<value col="global_attrs.flags">32</value>
-	</row>
-								
+  <row vendor-controlled="1">
+	<value col="global_attrs.name">sw_uname_assign_mode</value>
+	<value col="global_attrs.type">2</value>
+	<value col="global_attrs.value">fcfs</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row vendor-controlled="1">
+    <value col="global_attrs.name">domain_data_version</value>
+    <value col="global_attrs.type">0</value>
+    <value col="global_attrs.value">0</value>
+    <value col="global_attrs.flags">33</value>
+  </row>
+  
+  <row>
+	<value col="global_attrs.name">sw_show_status</value>
+	<value col="global_attrs.type">0</value>
+	<value col="global_attrs.value">1</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row>
+	<value col="global_attrs.name">sw_require_conf</value>
+	<value col="global_attrs.type">0</value>
+	<value col="global_attrs.value">1</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row>
+	<value col="global_attrs.name">lang</value>
+	<value col="global_attrs.type">2</value>
+	<value col="global_attrs.value">en</value>
+	<value col="global_attrs.flags">33</value>
+  </row>
+  
+  <row>
+	<value col="global_attrs.name">sw_timezone</value>
+	<value col="global_attrs.type">2</value>
+	<value col="global_attrs.value">Europe/Prague</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row>
+	<value col="global_attrs.name">uid_format</value>
+	<value col="global_attrs.type">2</value>
+	<value col="global_attrs.value">0</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
+  <row>
+	<value col="global_attrs.name">did_format</value>
+	<value col="global_attrs.type">2</value>
+	<value col="global_attrs.value">0</value>
+	<value col="global_attrs.flags">32</value>
+  </row>
+  
 </table>

+ 14 - 11
db/schema/grp.xml

@@ -8,30 +8,33 @@
 ]>
 
 <table>
-    <name>grp</name>
-    <version>3</version>
-    
-    <column id="grp.uid">
+  <name>grp</name>
+  <version>3</version>
+  
+  <column id="grp.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<default></default>
 	<size>&user_len;</size>
-    </column>
-    <column id="grp.grp">
+  </column>
+
+  <column id="grp.grp">
 	<name>grp</name>
 	<type>string</type>
 	<default></default>
 	<size>64</size>
-    </column>
-    <column>
+  </column>
+
+  <column>
 	<name>last_modified</name>
 	<type>datetime</type>
 	<default>1970-01-01 00:00:00</default>
-    </column>
-    <index>
+  </column>
+
+  <index>
 	<name>grp_idx</name>
 	<colref linkend="grp.uid"/>
 	<colref linkend="grp.grp"/>
-    </index>
+  </index>
 </table>

+ 8 - 8
db/schema/gw_grp.xml

@@ -8,26 +8,26 @@
 ]>
 
 <table>
-    <name>gw_grp</name>
-    <version>2</version>
+  <name>gw_grp</name>
+  <version>2</version>
 
-    <column id="gw_grp.id">
+  <column id="gw_grp.id">
 	<name>grp_id</name>
 	<type>int</type>
 	<type db="mysql">INT AUTO_INCREMENT</type>
 	<type db="postgres">SERIAL</type>
 	<type db="dbtext">int,auto</type>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>grp_name</name>
 	<type>string</type>
 	<size>64</size>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>gwgrp_idx</name>
 	<unique/>
 	<colref linkend="gw_grp.id"/>
-    </index>
+  </index>
 </table>

+ 360 - 359
db/schema/i18n-cs.xml

@@ -6,520 +6,521 @@
 %entities;
 
 ]>
+
 <data>
-    <row>
+  <row>
 	<value col="i18n.code">100</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Navazuji spojeni</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">180</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Vyzvani</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">181</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Hovor je presmerovan</value>
-    </row>
+  </row>
 
-    <row>
+  <row>
 	<value col="i18n.code">182</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Jste v poradi</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">183</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Probiha navazovani spojeni</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">200</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Uspesne provedeno</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">202</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Bude vyrizeno pozdeji</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">300</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Existuje vice moznosti</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">301</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Trvale presmerovano</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">302</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Docasne presmerovano</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">305</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Pouzijte jiny server</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">380</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Alternativni sluzba</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">400</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Chyba protokolu</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">401</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Overeni totoznosti</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">402</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Placena sluzba</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">403</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Zakazano</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">404</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nenalezeno</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">405</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nepovoleny prikaz</value>
-    </row>    
-    <row>
+  </row>    
+  <row>
 	<value col="i18n.code">406</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Neni povoleno</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">407</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Server vyzaduje overeni totoznosti</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">408</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Casovy limit vyprsel</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">410</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nenalezeno</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">413</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Prilis dlouhy identifikator</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">414</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Request-URI je prilis dlouhe</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">415</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nepodporovany typ dat</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">416</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nepodporovany typ identifikatoru</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">420</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Neplatne cislo linky</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">421</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Zadejte cislo linky</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">423</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Prilis kratky interval</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">480</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Docasne nedostupne</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">481</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Spojeni nenalezeno</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">482</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Zprava se zacyklila</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">483</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Prilis mnoho kroku</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">484</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Neuplna adresa</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">485</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nejednoznacne</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">486</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Volany je zaneprazdnen</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">487</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Prikaz predcasne ukoncen</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">488</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nebylo akceptovano</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">491</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Cekam na odpoved</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">493</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nelze dekodovat</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">500</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Interni chyba serveru</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">501</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Neni implementovano</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">502</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Chybna brana</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">503</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Sluzba neni dostupna</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">504</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Casovy limit serveru vyprsel</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">505</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nepodporovana verze protokolu</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">513</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Zprava je prilis dlouha</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">600</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Uzivatel je zaneprazdnen</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">603</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Odmitnuto</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">604</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Neexistujici uzivatel nebo sluzba</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">606</value>
 	<value col="i18n.lang">cs_CZ.ascii</value>
 	<value col="i18n.nr">Nelze akceptovat</value>
-    </row>
+  </row>
 
-<!--
+  <!--
 
-    <row>
-	<value col="i18n.code">100</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Navazuji spojeni</value>
-    </row>
-    <row>
-	<value col="i18n.code">180</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Vyzvani</value>
-    </row>
-    <row>
-	<value col="i18n.code">181</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Hovor je presmerovan</value>
-    </row>
-    <row>
-	<value col="i18n.code">182</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Jste v poradi</value>
-    </row>
-    <row>
-	<value col="i18n.code">183</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Probiha navazovani spojeni</value>
-    </row>
-    <row>
-	<value col="i18n.code">200</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Uspesne provedeno</value>
-    </row>
-    <row>
-	<value col="i18n.code">202</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Bude vyrizeno pozdeji</value>
-    </row>
-    <row>
-	<value col="i18n.code">300</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Existuje vice moznosti</value>
-    </row>
-    <row>
-	<value col="i18n.code">301</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Trvale presmerovano</value>
-    </row>
-    <row>
-	<value col="i18n.code">302</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Docasne presmerovano</value>
-    </row>
-    <row>
-	<value col="i18n.code">305</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Pouzijte jiny server</value>
-    </row>
-    <row>
-	<value col="i18n.code">380</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Alternativni sluzba</value>
-    </row>
-    <row>
-	<value col="i18n.code">400</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Chyba protokolu</value>
-    </row>
-    <row>
-	<value col="i18n.code">401</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Overeni totoznosti</value>
-    </row>
-    <row>
-	<value col="i18n.code">402</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Placena sluzba</value>
-    </row>
-    <row>
-	<value col="i18n.code">403</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Zakazano</value>
-    </row>
-    <row>
-	<value col="i18n.code">404</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nenalezeno</value>
-    </row>
-    <row>
-	<value col="i18n.code">405</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nepovoleny prikaz</value>
-    </row>    
-    <row>
-	<value col="i18n.code">406</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Neni povoleno</value>
-    </row>
-    <row>
-	<value col="i18n.code">407</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Server vyzaduje overeni totoznosti</value>
-    </row>
-    <row>
-	<value col="i18n.code">408</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Casovy limit vyprsel</value>
-    </row>
-    <row>
-	<value col="i18n.code">410</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nenalezeno</value>
-    </row>
-    <row>
-	<value col="i18n.code">413</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Prilis dlouhy identifikator</value>
-    </row>
-    <row>
-	<value col="i18n.code">414</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Request-URI je prilis dlouhe</value>
-    </row>
-    <row>
-	<value col="i18n.code">415</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nepodporovany typ dat</value>
-    </row>
-    <row>
-	<value col="i18n.code">416</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nepodporovany typ identifikatoru</value>
-    </row>
-    <row>
-	<value col="i18n.code">420</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Neplatne cislo linky</value>
-    </row>
-    <row>
-	<value col="i18n.code">421</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Zadejte cislo linky</value>
-    </row>
-    <row>
-	<value col="i18n.code">423</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Prilis kratky interval</value>
-    </row>
-    <row>
-	<value col="i18n.code">480</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Docasne nedostupne</value>
-    </row>
-    <row>
-	<value col="i18n.code">481</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Spojeni nenalezeno</value>
-    </row>
-    <row>
-	<value col="i18n.code">482</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Zprava se zacyklila</value>
-    </row>
-    <row>
-	<value col="i18n.code">483</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Prilis mnoho kroku</value>
-    </row>
-    <row>
-	<value col="i18n.code">484</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Neuplna adresa</value>
-    </row>
-    <row>
-	<value col="i18n.code">485</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nejednoznacne</value>
-    </row>
-    <row>
-	<value col="i18n.code">486</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Volany je zaneprazdnen</value>
-    </row>
-    <row>
-	<value col="i18n.code">487</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Prikaz predcasne ukoncen</value>
-    </row>
-    <row>
-	<value col="i18n.code">488</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nebylo akceptovano</value>
-    </row>
-    <row>
-	<value col="i18n.code">491</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Cekam na odpoved</value>
-    </row>
-    <row>
-	<value col="i18n.code">493</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nelze dekodovat</value>
-    </row>
-    <row>
-	<value col="i18n.code">500</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Interni chyba serveru</value>
-    </row>
-    <row>
-	<value col="i18n.code">501</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Neni implementovano</value>
-    </row>
-    <row>
-	<value col="i18n.code">502</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Chybna brana</value>
-    </row>
-    <row>
-	<value col="i18n.code">503</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Sluzba neni dostupna</value>
-    </row>
-    <row>
-	<value col="i18n.code">504</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Casovy limit serveru vyprsel</value>
-    </row>
-    <row>
-	<value col="i18n.code">505</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nepodporovana verze protokolu</value>
-    </row>
-    <row>
-	<value col="i18n.code">513</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Zprava je prilis dlouha</value>
-    </row>
-    <row>
-	<value col="i18n.code">600</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Uzivatel je zaneprazdnen</value>
-    </row>
-    <row>
-	<value col="i18n.code">603</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Odmitnuto</value>
-    </row>
-    <row>
-	<value col="i18n.code">604</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Neexistujici uzivatel nebo sluzba</value>
-    </row>
-    <row>
-	<value col="i18n.code">606</value>
-	<value col="i18n.lang">cs_CZ.iso-8859-2</value>
-	<value col="i18n.nr">Nelze akceptovat</value>
-    </row>
--->
+      <row>
+		<value col="i18n.code">100</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Navazuji spojeni</value>
+      </row>
+      <row>
+		<value col="i18n.code">180</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Vyzvani</value>
+      </row>
+      <row>
+		<value col="i18n.code">181</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Hovor je presmerovan</value>
+      </row>
+      <row>
+		<value col="i18n.code">182</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Jste v poradi</value>
+      </row>
+      <row>
+		<value col="i18n.code">183</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Probiha navazovani spojeni</value>
+      </row>
+      <row>
+		<value col="i18n.code">200</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Uspesne provedeno</value>
+      </row>
+      <row>
+		<value col="i18n.code">202</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Bude vyrizeno pozdeji</value>
+      </row>
+      <row>
+		<value col="i18n.code">300</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Existuje vice moznosti</value>
+      </row>
+      <row>
+		<value col="i18n.code">301</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Trvale presmerovano</value>
+      </row>
+      <row>
+		<value col="i18n.code">302</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Docasne presmerovano</value>
+      </row>
+      <row>
+		<value col="i18n.code">305</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Pouzijte jiny server</value>
+      </row>
+      <row>
+		<value col="i18n.code">380</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Alternativni sluzba</value>
+      </row>
+      <row>
+		<value col="i18n.code">400</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Chyba protokolu</value>
+      </row>
+      <row>
+		<value col="i18n.code">401</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Overeni totoznosti</value>
+      </row>
+      <row>
+		<value col="i18n.code">402</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Placena sluzba</value>
+      </row>
+      <row>
+		<value col="i18n.code">403</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Zakazano</value>
+      </row>
+      <row>
+		<value col="i18n.code">404</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nenalezeno</value>
+      </row>
+      <row>
+		<value col="i18n.code">405</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nepovoleny prikaz</value>
+      </row>    
+      <row>
+		<value col="i18n.code">406</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Neni povoleno</value>
+      </row>
+      <row>
+		<value col="i18n.code">407</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Server vyzaduje overeni totoznosti</value>
+      </row>
+      <row>
+		<value col="i18n.code">408</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Casovy limit vyprsel</value>
+      </row>
+      <row>
+		<value col="i18n.code">410</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nenalezeno</value>
+      </row>
+      <row>
+		<value col="i18n.code">413</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Prilis dlouhy identifikator</value>
+      </row>
+      <row>
+		<value col="i18n.code">414</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Request-URI je prilis dlouhe</value>
+      </row>
+      <row>
+		<value col="i18n.code">415</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nepodporovany typ dat</value>
+      </row>
+      <row>
+		<value col="i18n.code">416</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nepodporovany typ identifikatoru</value>
+      </row>
+      <row>
+		<value col="i18n.code">420</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Neplatne cislo linky</value>
+      </row>
+      <row>
+		<value col="i18n.code">421</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Zadejte cislo linky</value>
+      </row>
+      <row>
+		<value col="i18n.code">423</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Prilis kratky interval</value>
+      </row>
+      <row>
+		<value col="i18n.code">480</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Docasne nedostupne</value>
+      </row>
+      <row>
+		<value col="i18n.code">481</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Spojeni nenalezeno</value>
+      </row>
+      <row>
+		<value col="i18n.code">482</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Zprava se zacyklila</value>
+      </row>
+      <row>
+		<value col="i18n.code">483</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Prilis mnoho kroku</value>
+      </row>
+      <row>
+		<value col="i18n.code">484</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Neuplna adresa</value>
+      </row>
+      <row>
+		<value col="i18n.code">485</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nejednoznacne</value>
+      </row>
+      <row>
+		<value col="i18n.code">486</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Volany je zaneprazdnen</value>
+      </row>
+      <row>
+		<value col="i18n.code">487</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Prikaz predcasne ukoncen</value>
+      </row>
+      <row>
+		<value col="i18n.code">488</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nebylo akceptovano</value>
+      </row>
+      <row>
+		<value col="i18n.code">491</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Cekam na odpoved</value>
+      </row>
+      <row>
+		<value col="i18n.code">493</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nelze dekodovat</value>
+      </row>
+      <row>
+		<value col="i18n.code">500</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Interni chyba serveru</value>
+      </row>
+      <row>
+		<value col="i18n.code">501</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Neni implementovano</value>
+      </row>
+      <row>
+		<value col="i18n.code">502</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Chybna brana</value>
+      </row>
+      <row>
+		<value col="i18n.code">503</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Sluzba neni dostupna</value>
+      </row>
+      <row>
+		<value col="i18n.code">504</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Casovy limit serveru vyprsel</value>
+      </row>
+      <row>
+		<value col="i18n.code">505</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nepodporovana verze protokolu</value>
+      </row>
+      <row>
+		<value col="i18n.code">513</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Zprava je prilis dlouha</value>
+      </row>
+      <row>
+		<value col="i18n.code">600</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Uzivatel je zaneprazdnen</value>
+      </row>
+      <row>
+		<value col="i18n.code">603</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Odmitnuto</value>
+      </row>
+      <row>
+		<value col="i18n.code">604</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Neexistujici uzivatel nebo sluzba</value>
+      </row>
+      <row>
+		<value col="i18n.code">606</value>
+		<value col="i18n.lang">cs_CZ.iso-8859-2</value>
+		<value col="i18n.nr">Nelze akceptovat</value>
+      </row>
+	  -->
 </data>

+ 103 - 102
db/schema/i18n-en.xml

@@ -6,261 +6,262 @@
 %entities;
 
 ]>
+
 <data>
-    <row>
+  <row>
 	<value col="i18n.code">100</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Trying</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">180</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Ringing</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">181</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Call Is Being Forwarded</value>
-    </row>
+  </row>
 
-    <row>
+  <row>
 	<value col="i18n.code">182</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Queued</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">183</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Session Progress</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">200</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">OK</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">202</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Pending</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">300</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Multiple Choices</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">301</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Moved Permanently</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">302</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Moved Temporarily</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">305</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Use Proxy</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">380</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Alternative Service</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">400</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Bad Request</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">401</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Unauthorized</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">402</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Payment Required</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">403</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Forbidden</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">404</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Not Found</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">405</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Method Not Allowed</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">406</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Not Acceptable</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">407</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Proxy Authentication Required</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">408</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Request Timeout</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">410</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Gone</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">413</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Request Entity Too Large</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">414</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Request-URI Too Long</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">415</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Unsupported Media Type</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">416</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Unsupported URI Scheme</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">420</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Bad Extension</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">421</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Extension Required</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">423</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Interval Too Brief</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">480</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Temporarily Unavailable</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">481</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Call/Transaction Does Not Exist</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">482</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Loop Detected</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">483</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Too Many Hops</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">484</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Address Incomplete</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">485</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Ambiguous</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">486</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Busy Here</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">487</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Request Terminated</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">488</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Not Acceptable Here</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">491</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Request Pending</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">493</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Undecipherable</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">500</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Server Internal Error</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">501</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Not Implemented</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">502</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Bad Gateway</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">503</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Service Unavailable</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">504</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Server Time-out</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">505</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Version Not Supported</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">513</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Message Too Large</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">600</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Busy Everywhere</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">603</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Decline</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">604</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Does Not Exist Anywhere</value>
-    </row>
-    <row>
+  </row>
+  <row>
 	<value col="i18n.code">606</value>
 	<value col="i18n.lang">en_US.ascii</value>
 	<value col="i18n.nr">Not Acceptable</value>
-    </row>
+  </row>
 </data>

+ 22 - 17
db/schema/i18n.xml

@@ -8,42 +8,47 @@
 ]>
 
 <table xmlns:xi="http://www.w3.org/2001/XInclude">
-    <name>i18n</name>
-    <version>1</version>
-    
-    <column id="i18n.code">
+  <name>i18n</name>
+  <version>1</version>
+  
+  <column id="i18n.code">
 	<name>code</name>
 	<type>int</type>
-    </column>
-    <column>
+  </column>
+
+  <column>
 	<name>reason_re</name>
 	<type>string</type>
 	<size>255</size>
 	<default><null/></default>
 	<null/>
-    </column>
-    <column id="i18n.lang">
+  </column>
+
+  <column id="i18n.lang">
 	<name>lang</name>
 	<type>string</type>
 	<size>32</size>
-    </column>
-    <column id="i18n.nr">
+  </column>
+
+  <column id="i18n.nr">
 	<name>new_reason</name>
 	<type>string</type>
 	<size>255</size>
 	<null/>
-    </column>
-    <index>
+  </column>
+
+  <index>
 	<name>i18n_idx</name>
 	<colref linkend="i18n.code"/>
-    </index>
-    <index>
+  </index>
+
+  <index>
 	<name>i18n_uniq_idx</name>
 	<unique/>
 	<colref linkend="i18n.code"/>
 	<colref linkend="i18n.lang"/>
-    </index>
+  </index>
 
-    <xi:include href="i18n-en.xml" xpointer="xpointer(data/row)"/>
-    <xi:include href="i18n-cs.xml" xpointer="xpointer(data/row)"/>
+  <xi:include href="i18n-en.xml" xpointer="xpointer(data/row)"/>
+  <xi:include href="i18n-cs.xml" xpointer="xpointer(data/row)"/>
 </table>

+ 38 - 38
db/schema/ipmatch.xml

@@ -8,43 +8,43 @@
 ]>
 
 <table role="permissions" xmlns:db="http://docbook.org/ns/docbook">
-	<name>ipmatch</name>
-	<version>1</version>
-
-	<column id="ipmatch.ip">
-	    <name>ip</name>
-	    <type>string</type>
-	    <size>50</size>
-	    <default></default>
-	</column>
-
-	<column id="ipmatch.avp_val">
-	    <name>avp_val</name>
-	    <type>string</type>
-	    <size>30</size>
-	    <default><null/></default>
-	    <null/>
-	</column>
-
-	<column id="ipmatch.mark">
-	    <name>mark</name>
-	    <type>unsigned int</type>
-	    <size>10</size>
-	    <default>1</default>
-	</column>
-
-	<column id="ipmatch.flags">
-	    <name>flags</name>
-	    <type>unsigned int</type>
-	    <size>10</size>
-	    <default>0</default>
-	</column>
-
-	<index>
-	    <unique/>
-	    <name>ipmatch_idx</name>
-	    <colref linkend="ipmatch.ip"/>
-	    <colref linkend="ipmatch.mark"/>
-	</index>
+  <name>ipmatch</name>
+  <version>1</version>
+
+  <column id="ipmatch.ip">
+	<name>ip</name>
+	<type>string</type>
+	<size>50</size>
+	<default></default>
+  </column>
+
+  <column id="ipmatch.avp_val">
+	<name>avp_val</name>
+	<type>string</type>
+	<size>30</size>
+	<default><null/></default>
+	<null/>
+  </column>
+
+  <column id="ipmatch.mark">
+	<name>mark</name>
+	<type>unsigned int</type>
+	<size>10</size>
+	<default>1</default>
+  </column>
+
+  <column id="ipmatch.flags">
+	<name>flags</name>
+	<type>unsigned int</type>
+	<size>10</size>
+	<default>0</default>
+  </column>
+
+  <index>
+	<unique/>
+	<name>ipmatch_idx</name>
+	<colref linkend="ipmatch.ip"/>
+	<colref linkend="ipmatch.mark"/>
+  </index>
 
 </table>

+ 16 - 16
db/schema/lcr.xml

@@ -8,46 +8,46 @@
 ]>
 
 <table>
-    <name>lcr</name>
-    <version>1</version>
+  <name>lcr</name>
+  <version>1</version>
 
-    <column id="lcr.prefix">
+  <column id="lcr.prefix">
 	<name>prefix</name>
 	<type>string</type>
 	<size>16</size>
-    </column>
+  </column>
 
-    <column id="lcr.from_uri">
+  <column id="lcr.from_uri">
 	<name>from_uri</name>
 	<type>string</type>
 	<default>%</default>
 	<size>&uri_len;</size>
-    </column>
+  </column>
 
-    <column id="lcr.grp_id">
+  <column id="lcr.grp_id">
 	<name>grp_id</name>
 	<type>int</type>
 	<null/>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>priority</name>
 	<type>int</type>
 	<null/>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>lcr_idx1</name>
 	<colref linkend="lcr.prefix"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>lcr_idx2</name>
 	<colref linkend="lcr.from_uri"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>lcr_idx3</name>
 	<colref linkend="lcr.grp_id"/>
-    </index>
+  </index>
 </table>

+ 146 - 146
db/schema/location.xml

@@ -8,151 +8,151 @@
 ]>
 
 <table id="location">
-    <name>location</name>
-    <version>9</version>
+  <name>location</name>
+  <version>9</version>
 
-    <description>
-	  Location table contains contacts registered by users. This table
-	  implement the user location database. It maps UID to a set of contacts
-	  registered by the user represented by the UID.
-    </description>
-    <column id="location.uid">
-	  <name>uid</name>
-	  <name db="oracle">uuid</name>
-	  <type>string</type>
-	  <size>&id_len;</size>
-	  <description>
-	    UID (Unique user ID) of the user who owns the contact.
-	  </description>
-    </column>
-	
-    <column id="location.aor">
-	  <name>aor</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <description>
-        Address of record.
-	  </description>
-    </column>
-	
-	
-    <column id="location.contact">
-	  <name>contact</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <description>
-	    The SIP URI from Contact header field of REGISTER message.
-	  </description>
-    </column>
-	
-	<column id="server_id">
-	  <name>server_id</name>
-	  <type>int</type>
-	  <default>0</default>
-	  <description>
-		The ID of the SIP server instance responsible for the contact.
-	  </description>
-	</column>
-	   
-    <column>
-	  <name>received</name>
-	  <type>string</type>
-      <null/>
-	  <size>&uri_len;</size>
-	  <description>
-	    URI containing the source IP, source port, destination IP, destination
-	    port, and transport protocol of the packet containing the REGISTER
-	    request that created the contact. This is mainly used for NAT
-	    traversal. The format of this column is
-	    sip:&lt;src_ip&gt;:&lt;src_port&gt;;dstip=&lt;dst_ip&gt;;dstport=&lt;dst_port&gt;.
-	  </description>
-    </column>
-	
-	<column id="location.expires">
-	  <name>expires</name>
-	  <type>datetime</type>
-	  <default>1970-01-01 00:00:00</default>
-	  <description>
-	    Expiry date and time of the contact. In UTC.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>q</name>
-	  <type>float</type>
-	  <default>1.0</default>
-	  <description>
-	    Preference of the contact among all contacts with the same UID.  See
-	    RFC3261 for more details. The format of this value is floating point
-	    number in a range from 0 to 1.0. Value of -1.0 has a special meaning,
-	    it means that the user agent provided no q parameter and the proxy
-	    server should use implementation specific value.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>callid</name>
-	  <type>string</type>
-	  <null/>
-	  <size>&uri_len;</size>
-	  <description>
-	    The value of the Call-ID header field from the REGISTER message that
-	    created the contact.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>cseq</name>
-	  <type>unsigned int</type>
-	  <null/>
-	  <description>
-	    CSeq number from the REGISTER message that created the contact.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>flags</name>
-	  <type>unsigned int</type>
-	  <default>0</default>
-	  <description>
-	    Various flags from the SER configuration script.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>user_agent</name>
-	  <type>string</type>
-	  <size>64</size>
-	  <null/>
-	  <description>
-	    The user agent string from the REGISTER message that created the
-	    contact. This is the identification of the user agent that is
-	    registering the contact.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>instance</name>
-	  <type>string</type>
-      <null/>
-	  <size>&uri_len;</size>
-	  <description>
-	    The value of sip.instance parameter from the REGISTER request.
-	  </description>
-    </column>
-	
-    <index>
-	  <name>location_key</name>
-	  <unique/>
-	  <colref linkend="location.uid"/>
-	  <colref linkend="location.contact"/>
-    </index>
-    <index>
-	  <name>location_contact</name>
-	  <colref linkend="location.contact"/>
-    </index>
-	<index>
-	  <name>location_expires</name>
-	  <colref linkend="location.expires"/>
-    </index>
+  <description>
+	Location table contains contacts registered by users. This table implement
+	the user location database. It maps UID to a set of contacts registered by
+	the user represented by the UID.
+  </description>
+  <column id="location.uid">
+	<name>uid</name>
+	<name db="oracle">uuid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<description>
+	  UID (Unique user ID) of the user who owns the contact.
+	</description>
+  </column>
+  
+  <column id="location.aor">
+	<name>aor</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<description>
+      Address of record.
+	</description>
+  </column>
+  
+  
+  <column id="location.contact">
+	<name>contact</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<description>
+	  The SIP URI from Contact header field of REGISTER message.
+	</description>
+  </column>
+  
+  <column id="server_id">
+	<name>server_id</name>
+	<type>int</type>
+	<default>0</default>
+	<description>
+	  The ID of the SIP server instance responsible for the contact.
+	</description>
+  </column>
+  
+  <column>
+	<name>received</name>
+	<type>string</type>
+    <null/>
+	<size>&uri_len;</size>
+	<description>
+	  URI containing the source IP, source port, destination IP, destination
+	  port, and transport protocol of the packet containing the REGISTER
+	  request that created the contact. This is mainly used for NAT
+	  traversal. The format of this column is
+	  sip:&lt;src_ip&gt;:&lt;src_port&gt;;dstip=&lt;dst_ip&gt;;dstport=&lt;dst_port&gt;.
+	</description>
+  </column>
+  
+  <column id="location.expires">
+	<name>expires</name>
+	<type>datetime</type>
+	<default>1970-01-01 00:00:00</default>
+	<description>
+	  Expiry date and time of the contact. In UTC.
+	</description>
+  </column>
+  
+  <column>
+	<name>q</name>
+	<type>float</type>
+	<default>1.0</default>
+	<description>
+	  Preference of the contact among all contacts with the same UID.  See
+	  RFC3261 for more details. The format of this value is floating point
+	  number in a range from 0 to 1.0. Value of -1.0 has a special meaning, it
+	  means that the user agent provided no q parameter and the proxy server
+	  should use implementation specific value.
+	</description>
+  </column>
+  
+  <column>
+	<name>callid</name>
+	<type>string</type>
+	<null/>
+	<size>&uri_len;</size>
+	<description>
+	  The value of the Call-ID header field from the REGISTER message that
+	  created the contact.
+	</description>
+  </column>
+  
+  <column>
+	<name>cseq</name>
+	<type>unsigned int</type>
+	<null/>
+	<description>
+	  CSeq number from the REGISTER message that created the contact.
+	</description>
+  </column>
+  
+  <column>
+	<name>flags</name>
+	<type>unsigned int</type>
+	<default>0</default>
+	<description>
+	  Various flags from the SER configuration script.
+	</description>
+  </column>
+  
+  <column>
+	<name>user_agent</name>
+	<type>string</type>
+	<size>64</size>
+	<null/>
+	<description>
+	  The user agent string from the REGISTER message that created the
+	  contact. This is the identification of the user agent that is
+	  registering the contact.
+	</description>
+  </column>
+  
+  <column>
+	<name>instance</name>
+	<type>string</type>
+    <null/>
+	<size>&uri_len;</size>
+	<description>
+	  The value of sip.instance parameter from the REGISTER request.
+	</description>
+  </column>
+  
+  <index>
+	<name>location_key</name>
+	<unique/>
+	<colref linkend="location.uid"/>
+	<colref linkend="location.contact"/>
+  </index>
+  <index>
+	<name>location_contact</name>
+	<colref linkend="location.contact"/>
+  </index>
+  <index>
+	<name>location_expires</name>
+	<colref linkend="location.expires"/>
+  </index>
 </table>

+ 434 - 436
db/schema/missed_calls.xml

@@ -8,447 +8,445 @@
 ]>
 
 <table xmlns:db="http://docbook.org/ns/docbook">
-    <name>missed_calls</name>
-    <description>
-	  <db:para>
-	    SER stores accounting records in missed_calls table. When configured
-	    to account transactions, SER will write one row per transaction into
-	    this table. The table is never read by SER, SER only writes into this
-	    table. SERWeb can query the table to display the list of missed
-	    calls. Only transactions that finished with a negative reply (3xx,
-	    4xx, 5xx) are written to this table.
-	  </db:para>
-	  <db:para>
-	    SERWeb queries the table when displaying the list of missed calls of a
-	    user.
-	  </db:para>
-    </description>
-    <version>4</version>
-	
-    <column id="mc.id">
-	  <name>id</name>
-	  <type>int</type>
-	  <type db="mysql">INT AUTO_INCREMENT</type>
-	  <type db="postgres">SERIAL</type>
-	  <type db="dbtext">int,auto</type>
-	  <description>
-	    ID that uniquely identifies each row. This is automaticaly generated
-	    by the database server. This id is useful for post processing.
-	  </description>
-    </column>
+  <name>missed_calls</name>
+  <description>
+	<db:para>
+	  SER stores accounting records in missed_calls table. When configured to
+	  account transactions, SER will write one row per transaction into this
+	  table. The table is never read by SER, SER only writes into this
+	  table. SERWeb can query the table to display the list of missed
+	  calls. Only transactions that finished with a negative reply (3xx, 4xx,
+	  5xx) are written to this table.
+	</db:para>
+	<db:para>
+	  SERWeb queries the table when displaying the list of missed calls of a
+	  user.
+	</db:para>
+  </description>
+  <version>4</version>
+  
+  <column id="mc.id">
+	<name>id</name>
+	<type>int</type>
+	<type db="mysql">INT AUTO_INCREMENT</type>
+	<type db="postgres">SERIAL</type>
+	<type db="dbtext">int,auto</type>
+	<description>
+	  ID that uniquely identifies each row. This is automaticaly generated by
+	  the database server. This id is useful for post processing.
+	</description>
+  </column>
 
-	<column id="mc.server_id">
-	  <name>server_id</name>
-	  <type>int</type>
-	  <default>0</default>
-	  <description>
-		ID of the SIP server that generated the record.
-	  </description>
-	</column>
-		
-    <column id="mc.from_uid">
-	  <name>from_uid</name>
-	  <type>string</type>
-	  <size>&id_len;</size>
-	  <null/>
-	  <description>
-	    The UID (Unique ID) of the originator of transaction (the caller). For
-	    local users this will be one of UIDs from user_attrs table, for 3rd
-	    party users this column will be empty (as they have no uid assigned on
-	    the server).
-	  </description>
-    </column>
-    <column id="mc.to_uid">
-	  <name>to_uid</name>
-	  <type>string</type>
-	  <size>&id_len;</size>
-	  <null/>
-	  <description>
-	    This is the UID (Unique ID) of the target (the callee) of the
-	    request. For local users this will be one of UIDs from user_attrs
-	    table, for 3rd party users this column will be empty (as they have no
-	    uid assigned on the server).
-	  </description>
-    </column>
-	
-    <column>
-	  <name>to_did</name>
-	  <type>string</type>
-	  <size>&id_len;</size>
-	  <null/>
-	  <description>
-	    The unique identifier of destination domain in SER. This identifier is
-	    usualy based on the domain name present in the Request-URI of the SIP
-	    request. This value is empty for outbound requests to 3rd party
-	    domains.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>from_did</name>
-	  <type>string</type>
-	  <size>&id_len;</size>
-	  <null/>
-	  <description>
-	    The unique identifier of originating domain in SER. This identifier is
-	    usualy based on the domain name present in the From header field of
-	    the SIP request. This value is empty for inbound reqeusts from 3rd
-	    party domains.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>sip_from</name>
-	  <type>string</type>
-	  <size>&hf_len;</size>
-	  <null/>
-	  <description>
-	    The body of the From header field, including display name and all
-	    parameters URI and header field parameters.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>sip_to</name>
-	  <type>string</type>
-	  <size>&hf_len;</size>
-	  <null/>
-	  <description>
-	    The body of the To header field, including display name and all
-	    parameters URI and header field parameters.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>sip_status</name>
-	  <type>int</type>
-	  <null/>
-	  <description>
-	    The status code of the final SIP reply that finished the transaction
-	    being accounted.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>sip_method</name>
-	  <type>string</type>
-	  <size>&method_len;</size>
-	  <null/>
-	  <description>
-	    The method of the SIP request that created the transaction being
-	    accounted.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>in_ruri</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <null/>
-	  <description>
-	    Inbound Request-URI. This is the value of the Request-URI as received
-	    by SER from the previous (upstream) element (typically generated by
-	    the SIP phone of the caller).
-	  </description>
-    </column>
-	
-    <column>
-	  <name>out_ruri</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <null/>
-	  <description>
-	    Outbound Request-URI. This is the value of the Request-URI when the
-	    request leaves SER, i.e. after applying all the modifications and
-	    rewrites in the configuration file of SER. The next downstream element
-	    (typically the SIP phone of the callee) will see exactly this value of
-	    the Request-URI.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>from_uri</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <null/>
-	  <description>
-	    The SIP URI extracted from From header field. This is just the plain
-	    SIP URI without display name and header field parameters (if From
-	    header field contains angle brackets then this column contains the
-	    string between the angle brackets).
-	  </description>
-    </column>
-	
-    <column>
-	  <name>to_uri</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <null/>
-	  <description>
-	    The SIP URI extracted from To header field. This is just the plain SIP
-	    URI without display name and header field parameters (if To header
-	    field contains angle brackets then this column contains the string
-	    between the angle brackets).
-	  </description>
-    </column>
-	
-    <column id="mc.sip_callid">
-	  <name>sip_callid</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <null/>
-	  <description>
-	    The value of the Call-ID header field. This value uniquely
-	    identifies a call.
-	  </description>
-    </column>
-	
-    <column id="mc.sip_cseq">
-	  <name>sip_cseq</name>
-	  <type>int</type>
-	  <null/>
-	  <description>
-	    CSeq number.
-	  </description>
-    </column>
-	
-    <column id="mc.username">
-	  <name>digest_username</name>
-	  <type>string</type>
-	  <size>&user_len;</size>
-	  <null/>
-	  <description>
-	    The value of username attribute from authorized (verified by the
-	    server) digest credentials.
-	  </description>
-    </column>
-	
-    <column id="mc.realm">
-	  <name>digest_realm</name>
-	  <type>string</type>
-	  <size>&uri_len;</size>
-	  <null/>
-	  <description>
-	    The value of realm attribute from authorized (verified by the server)
-	    digest credentials.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>from_tag</name>
-	  <type>string</type>
-	  <size>128</size>
-	  <null/>
-	  <description>
-	    The value of the tag parameter in From header field.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>to_tag</name>
-	  <type>string</type>
-	  <size>128</size>
-	  <null/>
-	  <description>
-	    The value of the tag parameter in To header field.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>src_ip</name>
-	  <type>unsigned int</type>
-	  <null/>
-	  <description>
-	    The source IP address of the packet containing the SIP request that
-	    created the transaction.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>src_port</name>
-	  <type>unsigned short</type>
-	  <null/>
-	  <description>
-	    The source port of the packet containing the SIP request that created
-	    the transaction.
-	  </description>
-    </column>
+  <column id="mc.server_id">
+	<name>server_id</name>
+	<type>int</type>
+	<default>0</default>
+	<description>
+	  ID of the SIP server that generated the record.
+	</description>
+  </column>
+  
+  <column id="mc.from_uid">
+	<name>from_uid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<null/>
+	<description>
+	  The UID (Unique ID) of the originator of transaction (the caller). For
+	  local users this will be one of UIDs from user_attrs table, for 3rd
+	  party users this column will be empty (as they have no uid assigned on
+	  the server).
+	</description>
+  </column>
+  <column id="mc.to_uid">
+	<name>to_uid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<null/>
+	<description>
+	  This is the UID (Unique ID) of the target (the callee) of the
+	  request. For local users this will be one of UIDs from user_attrs table,
+	  for 3rd party users this column will be empty (as they have no uid
+	  assigned on the server).
+	</description>
+  </column>
+  
+  <column>
+	<name>to_did</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<null/>
+	<description>
+	  The unique identifier of destination domain in SER. This identifier is
+	  usualy based on the domain name present in the Request-URI of the SIP
+	  request. This value is empty for outbound requests to 3rd party domains.
+	</description>
+  </column>
+  
+  <column>
+	<name>from_did</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<null/>
+	<description>
+	  The unique identifier of originating domain in SER. This identifier is
+	  usualy based on the domain name present in the From header field of the
+	  SIP request. This value is empty for inbound reqeusts from 3rd party
+	  domains.
+	</description>
+  </column>
+  
+  <column>
+	<name>sip_from</name>
+	<type>string</type>
+	<size>&hf_len;</size>
+	<null/>
+	<description>
+	  The body of the From header field, including display name and all
+	  parameters URI and header field parameters.
+	</description>
+  </column>
+  
+  <column>
+	<name>sip_to</name>
+	<type>string</type>
+	<size>&hf_len;</size>
+	<null/>
+	<description>
+	  The body of the To header field, including display name and all
+	  parameters URI and header field parameters.
+	</description>
+  </column>
+  
+  <column>
+	<name>sip_status</name>
+	<type>int</type>
+	<null/>
+	<description>
+	  The status code of the final SIP reply that finished the transaction
+	  being accounted.
+	</description>
+  </column>
+  
+  <column>
+	<name>sip_method</name>
+	<type>string</type>
+	<size>&method_len;</size>
+	<null/>
+	<description>
+	  The method of the SIP request that created the transaction being
+	  accounted.
+	</description>
+  </column>
+  
+  <column>
+	<name>in_ruri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>
+	  Inbound Request-URI. This is the value of the Request-URI as received by
+	  SER from the previous (upstream) element (typically generated by the SIP
+	  phone of the caller).
+	</description>
+  </column>
+  
+  <column>
+	<name>out_ruri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>
+	  Outbound Request-URI. This is the value of the Request-URI when the
+	  request leaves SER, i.e. after applying all the modifications and
+	  rewrites in the configuration file of SER. The next downstream element
+	  (typically the SIP phone of the callee) will see exactly this value of
+	  the Request-URI.
+	</description>
+  </column>
+  
+  <column>
+	<name>from_uri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>
+	  The SIP URI extracted from From header field. This is just the plain SIP
+	  URI without display name and header field parameters (if From header
+	  field contains angle brackets then this column contains the string
+	  between the angle brackets).
+	</description>
+  </column>
+  
+  <column>
+	<name>to_uri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>
+	  The SIP URI extracted from To header field. This is just the plain SIP
+	  URI without display name and header field parameters (if To header field
+	  contains angle brackets then this column contains the string between the
+	  angle brackets).
+	</description>
+  </column>
+  
+  <column id="mc.sip_callid">
+	<name>sip_callid</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>
+	  The value of the Call-ID header field. This value uniquely identifies a
+	  call.
+	</description>
+  </column>
+  
+  <column id="mc.sip_cseq">
+	<name>sip_cseq</name>
+	<type>int</type>
+	<null/>
+	<description>
+	  CSeq number.
+	</description>
+  </column>
+  
+  <column id="mc.username">
+	<name>digest_username</name>
+	<type>string</type>
+	<size>&user_len;</size>
+	<null/>
+	<description>
+	  The value of username attribute from authorized (verified by the server)
+	  digest credentials.
+	</description>
+  </column>
+  
+  <column id="mc.realm">
+	<name>digest_realm</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>
+	  The value of realm attribute from authorized (verified by the server)
+	  digest credentials.
+	</description>
+  </column>
+  
+  <column>
+	<name>from_tag</name>
+	<type>string</type>
+	<size>128</size>
+	<null/>
+	<description>
+	  The value of the tag parameter in From header field.
+	</description>
+  </column>
+  
+  <column>
+	<name>to_tag</name>
+	<type>string</type>
+	<size>128</size>
+	<null/>
+	<description>
+	  The value of the tag parameter in To header field.
+	</description>
+  </column>
+  
+  <column>
+	<name>src_ip</name>
+	<type>unsigned int</type>
+	<null/>
+	<description>
+	  The source IP address of the packet containing the SIP request that
+	  created the transaction.
+	</description>
+  </column>
+  
+  <column>
+	<name>src_port</name>
+	<type>unsigned short</type>
+	<null/>
+	<description>
+	  The source port of the packet containing the SIP request that created
+	  the transaction.
+	</description>
+  </column>
 
-    <column>
+  <column>
 	<name>request_timestamp</name>
 	<type>datetime</type>
 	<description>
 	  The date and time of the request arrival to the proxy.
 	</description>
-    </column>
-	
-    <column>
-	  <name>response_timestamp</name>
-	  <type>datetime</type>
-	  <description>
-	    The date and time when the final response was sent out.
-	  </description>
-    </column>
-	
-    <column>
-	  <name>flags</name>
-	  <type>unsigned int</type>
-	  <default>0</default>
-	  <description>
-	    Various flags. The meaning of bits in the flags field is described in
-	    the table below.
-	    <db:note>
-		  <db:simpara>
-		    Note that several flags below have no meaning in this table and
-		    are only presented for completeness, because the flags column has
-		    identical meaning of flags across most tables in the database.
-		  </db:simpara>
-	    </db:note>
-	    <db:table><db:title>possible missed_calls flags</db:title>
-		  <db:tgroup cols="4">
-		    <db:thead>
-			  <db:row>
-			    <db:entry>Bit</db:entry>
-			    <db:entry>Hex value</db:entry>
-			    <db:entry>Flag</db:entry>
-			    <db:entry>Description</db:entry>
-			  </db:row>
-		    </db:thead>
-		    <db:tbody>
-			  <db:row>
-			    <db:entry>0</db:entry>
-			    <db:entry>0x00000001</db:entry>
-			    <db:entry>FOR_SER</db:entry>
-			    <db:entry>
-				  If set then SER will load the row (not applicable in this
-				  table).
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>1</db:entry>
-			    <db:entry>0x00000002</db:entry>
-			    <db:entry>DISABLED</db:entry>
-			    <db:entry>
-				  The data represented by the row is temporarily disabled,
-				  which means it stays in the database but no applications use
-				  it.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>2</db:entry>
-			    <db:entry>0x00000004</db:entry>
-			    <db:entry>CANONICAL</db:entry>
-			    <db:entry>
-				  The URI or domain name is canonical. When displaying the URI
-				  of the user or name of a domain then this entry should be
-				  used.  Not applicable in this table.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>3</db:entry>
-			    <db:entry>0x00000008</db:entry>
-			    <db:entry>ALLOWED_TO</db:entry>
-			    <db:entry>
-				  The URI represented by this row can be used in The
-				  Request-URI or To header field. In other words the user will
-				  be reachable under this URI and can use it as an alias. Not
-				  applicable in this table.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>4</db:entry>
-			    <db:entry>0x00000010</db:entry>
-			    <db:entry>ALLOWED_FROM</db:entry>
-			    <db:entry>
-				  The user identified by uid can use this URI in From header
-				  field. Not applicable in this table.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>5</db:entry>
-			    <db:entry>0x00000020</db:entry>
-			    <db:entry>FOR_SERWEB</db:entry>
-			    <db:entry>
-				  The data represented by the row is for SERWeb. This is
-				  currently used in credentials table only where the flags
-				  allows to keep different credentials for digest
-				  authentication in SIP and for SERWeb authentication. Not
-				  applicable in this table.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>6</db:entry>
-			    <db:entry>0x00000040</db:entry>
-			    <db:entry>PENDING</db:entry>
-			    <db:entry>
-				  The account owning the piece of data has not been activated
-				  yet. Not applicable in this table, this is mainly used in
-				  credentials table.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>7</db:entry>
-			    <db:entry>0x00000100</db:entry>
-			    <db:entry>DELETED</db:entry>
-			    <db:entry>
-				  The row has been scheduled for deletion.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>8</db:entry>
-			    <db:entry>0x00000200</db:entry>
-			    <db:entry>CALLER_DELETED</db:entry>
-			    <db:entry>
-				  The accounting record has been scheduled for deletion by the
-				  caller. The row can be deleted once both the caller and
-				  callee schedule the record for deletion. A single record can
-				  be shared by two users and thus both of them must schedule
-				  it for deletion before it can be physically deleted.
-			    </db:entry>
-			  </db:row>
-			  <db:row>
-			    <db:entry>9</db:entry>
-			    <db:entry>0x00000400</db:entry>
-			    <db:entry>CALLEE_DELETED</db:entry>
-			    <db:entry>
-				  The accounting record has been scheduled for deletion by the
-				  callee. The row can be deleted once both the caller and
-				  callee schedule the record for deletion. A single record can
-				  be shared by two users and thus both of them must schedule
-				  it for deletion before it can be physically deleted.
-			    </db:entry>
-			  </db:row>
-		    </db:tbody>
-		  </db:tgroup>
-	    </db:table>
-	  </description>
-    </column>
-    
-    <column>
-	  <name>attrs</name>
-	  <type>string</type>
-	  <size>255</size>
-	  <null/>
-	  <description>
-	    The value of selected attributes used during processing of the
-	    transaction/call on the server.
-	  </description>
-    </column>
-	
-    <index>
-	  <name>mc_id_key</name>
-	  <unique/>
-	  <colref linkend="mc.server_id"/>
-	  <colref linkend="mc.id"/>
-    </index>
-	
-    <index role="serweb">
-	  <name>mc_cid_key</name>
-	  <colref linkend="mc.sip_callid"/>
-    </index>
-	
-    <index role="serweb">
-	  <name>mc_to_uid</name>
-	  <colref linkend="mc.to_uid"/>
-    </index>
+  </column>
+  
+  <column>
+	<name>response_timestamp</name>
+	<type>datetime</type>
+	<description>
+	  The date and time when the final response was sent out.
+	</description>
+  </column>
+  
+  <column>
+	<name>flags</name>
+	<type>unsigned int</type>
+	<default>0</default>
+	<description>
+	  Various flags. The meaning of bits in the flags field is described in
+	  the table below.
+	  <db:note>
+		<db:simpara>
+		  Note that several flags below have no meaning in this table and are
+		  only presented for completeness, because the flags column has
+		  identical meaning of flags across most tables in the database.
+		</db:simpara>
+	  </db:note>
+	  <db:table><db:title>possible missed_calls flags</db:title>
+		<db:tgroup cols="4">
+		  <db:thead>
+			<db:row>
+			  <db:entry>Bit</db:entry>
+			  <db:entry>Hex value</db:entry>
+			  <db:entry>Flag</db:entry>
+			  <db:entry>Description</db:entry>
+			</db:row>
+		  </db:thead>
+		  <db:tbody>
+			<db:row>
+			  <db:entry>0</db:entry>
+			  <db:entry>0x00000001</db:entry>
+			  <db:entry>FOR_SER</db:entry>
+			  <db:entry>
+				If set then SER will load the row (not applicable in this
+				table).
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>1</db:entry>
+			  <db:entry>0x00000002</db:entry>
+			  <db:entry>DISABLED</db:entry>
+			  <db:entry>
+				The data represented by the row is temporarily disabled, which
+				means it stays in the database but no applications use it.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>2</db:entry>
+			  <db:entry>0x00000004</db:entry>
+			  <db:entry>CANONICAL</db:entry>
+			  <db:entry>
+				The URI or domain name is canonical. When displaying the URI
+				of the user or name of a domain then this entry should be
+				used.  Not applicable in this table.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>3</db:entry>
+			  <db:entry>0x00000008</db:entry>
+			  <db:entry>ALLOWED_TO</db:entry>
+			  <db:entry>
+				The URI represented by this row can be used in The Request-URI
+				or To header field. In other words the user will be reachable
+				under this URI and can use it as an alias. Not applicable in
+				this table.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>4</db:entry>
+			  <db:entry>0x00000010</db:entry>
+			  <db:entry>ALLOWED_FROM</db:entry>
+			  <db:entry>
+				The user identified by uid can use this URI in From header
+				field. Not applicable in this table.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>5</db:entry>
+			  <db:entry>0x00000020</db:entry>
+			  <db:entry>FOR_SERWEB</db:entry>
+			  <db:entry>
+				The data represented by the row is for SERWeb. This is
+				currently used in credentials table only where the flags
+				allows to keep different credentials for digest authentication
+				in SIP and for SERWeb authentication. Not applicable in this
+				table.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>6</db:entry>
+			  <db:entry>0x00000040</db:entry>
+			  <db:entry>PENDING</db:entry>
+			  <db:entry>
+				The account owning the piece of data has not been activated
+				yet. Not applicable in this table, this is mainly used in
+				credentials table.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>7</db:entry>
+			  <db:entry>0x00000100</db:entry>
+			  <db:entry>DELETED</db:entry>
+			  <db:entry>
+				The row has been scheduled for deletion.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>8</db:entry>
+			  <db:entry>0x00000200</db:entry>
+			  <db:entry>CALLER_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				caller. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
+			</db:row>
+			<db:row>
+			  <db:entry>9</db:entry>
+			  <db:entry>0x00000400</db:entry>
+			  <db:entry>CALLEE_DELETED</db:entry>
+			  <db:entry>
+				The accounting record has been scheduled for deletion by the
+				callee. The row can be deleted once both the caller and callee
+				schedule the record for deletion. A single record can be
+				shared by two users and thus both of them must schedule it for
+				deletion before it can be physically deleted.
+			  </db:entry>
+			</db:row>
+		  </db:tbody>
+		</db:tgroup>
+	  </db:table>
+	</description>
+  </column>
+  
+  <column>
+	<name>attrs</name>
+	<type>string</type>
+	<size>255</size>
+	<null/>
+	<description>
+	  The value of selected attributes used during processing of the
+	  transaction/call on the server.
+	</description>
+  </column>
+  
+  <index>
+	<name>mc_id_key</name>
+	<unique/>
+	<colref linkend="mc.server_id"/>
+	<colref linkend="mc.id"/>
+  </index>
+  
+  <index role="serweb">
+	<name>mc_cid_key</name>
+	<colref linkend="mc.sip_callid"/>
+  </index>
+  
+  <index role="serweb">
+	<name>mc_to_uid</name>
+	<colref linkend="mc.to_uid"/>
+  </index>
 </table>

+ 73 - 70
db/schema/offline_winfo.xml

@@ -8,85 +8,88 @@
 ]>
 
 <table role="presence">
-	
-	<name>offline_winfo</name>
-	
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-	<description>Table used to store information about subscriptions to
-	"offline presentities". Data here can be manipulated using
+  
+  <name>offline_winfo</name>
+  
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+  <description>
+	Table used to store information about subscriptions to "offline
+	presentities". Data here can be manipulated using
 	functions <function>store_winfo</function> and
-	<function>dump_stored_winfo</function>.</description>
+	<function>dump_stored_winfo</function>.
+  </description>
 
-	<column id="offline_winfo.uid">
-		<name>uid</name>
-		<name db="oracle">uuid</name>
-		<type>string</type>
-		<size>&id_len;</size>
-		<description>UID of presentity.</description>
-	</column>
+  <column id="offline_winfo.uid">
+	<name>uid</name>
+	<name db="oracle">uuid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+	<description>UID of presentity.</description>
+  </column>
 
-	<column>
-		<name>watcher</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-		<description>Watcher's URI.</description>
-	</column>
+  <column>
+	<name>watcher</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<description>Watcher's URI.</description>
+  </column>
 
-	<column>
-		<name>events</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Subscription event header (presence).</description>
-	</column>
+  <column>
+	<name>events</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Subscription event header (presence).</description>
+  </column>
 
-	<column>
-		<name>domain</name>
-		<type>string</type>
-		<size>&domain_len;</size>
-		<null/>
-		<description>Presence domain (<emphasis>registrar</emphasis> or
-		<emphasis>jabber</emphasis>).</description>
-	</column>
+  <column>
+	<name>domain</name>
+	<type>string</type>
+	<size>&domain_len;</size>
+	<null/>
+	<description>Presence domain (<emphasis>registrar</emphasis> or
+	  <emphasis>jabber</emphasis>).</description>
+  </column>
 
-	<column>
-		<name>status</name>
-		<type>string</type>
-		<size>32</size>
-		<null/>
-		<description>Subscription status.</description>
-	</column>
+  <column>
+	<name>status</name>
+	<type>string</type>
+	<size>32</size>
+	<null/>
+	<description>Subscription status.</description>
+  </column>
 
-	<column>
-		<name>created_on</name>
-		<type>datetime</type>
-		<default>2006-01-31 13:13:13</default>
-		<description>Time of row creation used to discard expired rows. Row
-		expires when its creation time is older than configured
-		value.</description>
-	</column>
+  <column>
+	<name>created_on</name>
+	<type>datetime</type>
+	<default>2006-01-31 13:13:13</default>
+	<description>
+	  Time of row creation used to discard expired rows. Row expires when its
+	  creation time is older than configured value.
+	</description>
+  </column>
 
-	<column>
-		<name>expires_on</name>
-		<type>datetime</type>
-		<default>2006-01-31 13:13:13</default>
-		<description>Time when row expires.</description>
-	</column>
+  <column>
+	<name>expires_on</name>
+	<type>datetime</type>
+	<default>2006-01-31 13:13:13</default>
+	<description>Time when row expires.</description>
+  </column>
 
-	<column id="offline_winfo.dbid">
-		<name>dbid</name>
-		<type>unsigned int</type>
-		<size>10</size>
-		<type db="mysql">INT(10) UNSIGNED AUTO_INCREMENT</type>
-		<type db="postgres">SERIAL</type>
-		<type db="dbtext">int,auto</type>
-		<description>Auto-generated key.</description>
-	</column>
+  <column id="offline_winfo.dbid">
+	<name>dbid</name>
+	<type>unsigned int</type>
+	<size>10</size>
+	<type db="mysql">INT(10) UNSIGNED AUTO_INCREMENT</type>
+	<type db="postgres">SERIAL</type>
+	<type db="dbtext">int,auto</type>
+	<description>Auto-generated key.</description>
+  </column>
 
-	<index>
-		<name>offline_winfo_key</name>
-		<colref linkend="offline_winfo.dbid"/>
-		<unique/>
-	</index>
+  <index>
+	<name>offline_winfo_key</name>
+	<colref linkend="offline_winfo.dbid"/>
+	<unique/>
+  </index>
 
 </table>

+ 8 - 8
db/schema/pdt.xml

@@ -8,24 +8,24 @@
 ]>
 
 <table>
-    <name>pdt</name>
-    <version>1</version>
+  <name>pdt</name>
+  <version>1</version>
 
-    <column id="pdt.prefix">
+  <column id="pdt.prefix">
 	<name>prefix</name>
 	<type>string</type>
 	<size>32</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>domain</name>
 	<type>string</type>
 	<size>&uri_len;</size>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>pdt_idx</name>
 	<unique/>
 	<colref linkend="pdt.prefix"/>
-    </index>
+  </index>
 </table>

+ 24 - 24
db/schema/phonebook.xml

@@ -8,70 +8,70 @@
 ]>
 
 <table role="serweb">
-    <name>phonebook</name>
-    <version>1</version>
+  <name>phonebook</name>
+  <version>1</version>
 
-    <description>
+  <description>
 	Phonebook entries of users.
-    </description>
-    <column id="pb.id">
+  </description>
+  <column id="pb.id">
 	<name>id</name>
 	<type>unsigned int</type>
 	<type db="mysql">INT AUTO_INCREMENT</type>
 	<type db="postgres">SERIAL</type>
 	<type db="dbtext">int,auto</type>
 	<description>
-	    Unique id of the row. The value is auto generated by the databsae
-	    server.
+	  Unique id of the row. The value is auto generated by the databsae
+	  server.
 	</description>
-    </column>
+  </column>
 
-    <column id="pb.uid">
+  <column id="pb.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
 	<description>
-	    UID (Unique ID) of the user who owns the entry.
+	  UID (Unique ID) of the user who owns the entry.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>fname</name>
 	<type>string</type>
 	<size>32</size>
 	<null/>
 	<description>
-	    First name of the phonebook contact.
+	  First name of the phonebook contact.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>lname</name>
 	<type>string</type>
 	<size>32</size>
 	<null/>
 	<description>
-	    Last name of the phonebook contact.
+	  Last name of the phonebook contact.
 	</description>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>sip_uri</name>
 	<type>string</type>
 	<size>&uri_len;</size>
 	<description>
-	    SIP URI of the phonebook contact.
+	  SIP URI of the phonebook contact.
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>pb_idx</name>
 	<unique/>
 	<colref linkend="pb.id"/>
-    </index>
-    <index>
+  </index>
+  <index>
 	<name>pb_uid</name>
 	<colref linkend="pb.uid"/>
-    </index>
+  </index>
 </table>

+ 58 - 51
db/schema/presentity.xml

@@ -8,64 +8,71 @@
 ]>
 
 <table role="presence">
-	
-	<name>presentity</name>
-	<description>Table holding presentities for PA module. It is basic PA table,
-	most of other PA tables are related to this one.</description>
+  
+  <name>presentity</name>
+  <description>
+	Table holding presentities for PA module. It is basic PA table, most of
+	other PA tables are related to this one.
+  </description>
 
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-    
-	<column id="presentity.pres_id">
-		<name>pres_id</name>
-		<description>Generated presentity identifier unique across pdomains.</description>
-		<type>string</type>
-		<size>64</size>
-	</column>
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+  
+  <column id="presentity.pres_id">
+	<name>pres_id</name>
+	<description>Generated presentity identifier unique across pdomains.</description>
+	<type>string</type>
+	<size>64</size>
+  </column>
 
-	<column id="presentity.uri">
-		<name>uri</name>
-		<description>Presentity URI used when creating presentity.</description>
-		<type>string</type>
-		<size>&uri_len;</size>
-	</column>
+  <column id="presentity.uri">
+	<name>uri</name>
+	<description>Presentity URI used when creating presentity.</description>
+	<type>string</type>
+	<size>&uri_len;</size>
+  </column>
 
-	<column id="presentity.uid">
-		<name>uid</name>
-		<description>Presentity UID (unique user identification in SER).</description>
-		<name db="oracle">uuid</name>
-		<type>string</type>
-		<size>&id_len;</size>
-	</column>
+  <column id="presentity.uid">
+	<name>uid</name>
+	<description>Presentity UID (unique user identification in SER).</description>
+	<name db="oracle">uuid</name>
+	<type>string</type>
+	<size>&id_len;</size>
+  </column>
 
-	<column>
-		<name>pdomain</name>
-		<description><para>PA domain name. It represents separate "group" of
+  <column>
+	<name>pdomain</name>
+	<description>
+	  <para>PA domain name. It represents separate "group" of
 		presentities. There can be two pdomains now - named
-		<emphasis>registrar</emphasis> and <emphasis>jabber</emphasis>.</para></description>
-		<type>string</type>
-		<size>128</size>
-	</column>
-	
-	<!-- XCAP parameters has to be stored with presentity (each can
-	have other.	They are stored in serialized form (we don't need
-	to know what is within them). -->
-	<column>
-		<name>xcap_params</name>
-		<description><para>XCAP parameters (in serialized form) used to
+		<emphasis>registrar</emphasis> and <emphasis>jabber</emphasis>.</para>
+	</description>
+	<type>string</type>
+	<size>128</size>
+  </column>
+  
+  <!-- XCAP parameters has to be stored with presentity (each can
+	   have other.	They are stored in serialized form (we don't need
+	   to know what is within them). -->
+  <column>
+	<name>xcap_params</name>
+	<description>
+	  <para>XCAP parameters (in serialized form) used to
 		obtain authorization information.</para>
-		<para>Stored due to possibility to change user's XCAP parameters from script, but this is quite
-		ineffective and it will be thrown out because XCAP parameters are mostly
-		the same for all presentities.</para></description>
-		<type>binary</type>
-	</column>
+	  <para>Stored due to possibility to change user's XCAP parameters from
+		script, but this is quite ineffective and it will be thrown out
+		because XCAP parameters are mostly the same for all
+		presentities.</para>
+	</description>
+	<type>binary</type>
+  </column>
 
-	<!-- indexes/keys -->
+  <!-- indexes/keys -->
 
-	<index>
-		<name>presentity_key</name>
-		<colref linkend="presentity.pres_id"/>
-		<unique/>
-	</index>
+  <index>
+	<name>presentity_key</name>
+	<colref linkend="presentity.pres_id"/>
+	<unique/>
+  </index>
 
 </table>

+ 71 - 69
db/schema/presentity_contact.xml

@@ -9,82 +9,84 @@
 
 <table role="presence">
 
-	<name>presentity_contact</name>
-	<description>Table holding published tuples (NOT tuples generated by
-	registrations).</description>
-	
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-    
-	<!-- presentity ID -->
-	<column id="prescontact.pres_id">
-		<name>pres_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Presentity ID.</description>
-	</column>
+  <name>presentity_contact</name>
+  <description>
+	Table holding published tuples (NOT tuples generated by registrations).
+  </description>
+  
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+  
+  <!-- presentity ID -->
+  <column id="prescontact.pres_id">
+	<name>pres_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Presentity ID.</description>
+  </column>
 
-	<!-- basic status -->
-	<column>
-		<name>basic</name>
-		<type>int</type>
-		<size>3</size>
-		<description>Basic status as number. It can have values 0 (open) or 1
-		(closed).</description>
-	</column>
+  <!-- basic status -->
+  <column>
+	<name>basic</name>
+	<type>int</type>
+	<size>3</size>
+	<description>
+	  Basic status as number. It can have values 0 (open) or 1 (closed).
+	</description>
+  </column>
 
-	<column>
-		<name>expires</name>
-		<type>datetime</type>
-		<default>2004-05-28 21:32:15</default>
-		<description>Expiration value.</description>
-	</column>
+  <column>
+	<name>expires</name>
+	<type>datetime</type>
+	<default>2004-05-28 21:32:15</default>
+	<description>Expiration value.</description>
+  </column>
 
-	<column>
-		<name>priority</name>
-		<type>float</type>
-		<default>0.5</default>
-		<description>Contact priority value.</description>
-	</column>
+  <column>
+	<name>priority</name>
+	<type>float</type>
+	<default>0.5</default>
+	<description>Contact priority value.</description>
+  </column>
 
-	<column>
-		<name>contact</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-		<null/>
-		<description>Published contact information.</description>
-	</column>
+  <column>
+	<name>contact</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<null/>
+	<description>Published contact information.</description>
+  </column>
 
-	<!-- tuple ID -->
-	<column id="prescontact.tupleid">
-		<name>tupleid</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Generated tuple identification.</description>
-	</column>
+  <!-- tuple ID -->
+  <column id="prescontact.tupleid">
+	<name>tupleid</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Generated tuple identification.</description>
+  </column>
 
-	<!-- published with this entity tag (only published tuples are stored
-	into database) -->
-	<column>
-		<name>etag</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Entity tag used for tuple publication.</description>
-	</column>
+  <!-- published with this entity tag (only published tuples are stored
+	   into database) -->
+  <column>
+	<name>etag</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Entity tag used for tuple publication.</description>
+  </column>
 
-	<!-- tuple must published with ID (see PIDF spec.) -->
-	<column>
-		<name>published_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Tuple identification used in PUBLISH.</description>
-	</column>
+  <!-- tuple must published with ID (see PIDF spec.) -->
+  <column>
+	<name>published_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Tuple identification used in PUBLISH.</description>
+  </column>
 
-	<index>
-		<name>presid_index</name>
-		<colref linkend="prescontact.pres_id"/>
-		<colref linkend="prescontact.tupleid"/>
-		<unique/>
-	</index>
+  <index>
+	<name>presid_index</name>
+	<colref linkend="prescontact.pres_id"/>
+	<colref linkend="prescontact.tupleid"/>
+	<unique/>
+  </index>
 
 </table>

+ 51 - 47
db/schema/presentity_extensions.xml

@@ -9,56 +9,60 @@
 
 <table role="presence">
 
-	<name>presentity_extensions</name>
-	<description>Table holding extension elements (non-PIDF) published directly in
-	&lt;presence&gt;.</description>
-    
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-    
-	<column id="presextensions.dbid">
-		<name>dbid</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Generated ID used for unique identification.</description>
-	</column>
+  <name>presentity_extensions</name>
+  <description>
+	Table holding extension elements (non-PIDF) published directly in
+	&lt;presence&gt;.
+  </description>
+  
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+  
+  <column id="presextensions.dbid">
+	<name>dbid</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Generated ID used for unique identification.</description>
+  </column>
 
-	<!-- foreign key (presentity) -->
-	<column>
-		<name>pres_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Presentity ID for which is given extension element.</description>
-	</column>
+  <!-- foreign key (presentity) -->
+  <column>
+	<name>pres_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Presentity ID for which is given extension element.</description>
+  </column>
 
-	<!-- received in PUBLISH with this entity tag -->
-	<column>
-		<name>etag</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Entity tag used for note publication.</description>
-	</column>
+  <!-- received in PUBLISH with this entity tag -->
+  <column>
+	<name>etag</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Entity tag used for note publication.</description>
+  </column>
 
-	<!-- serialized XML element -->
-	<column>
-		<name>element</name>
-		<type>binary</type>
-		<description>Whole extension element in serialized form.</description>
-	</column>
+  <!-- serialized XML element -->
+  <column>
+	<name>element</name>
+	<type>binary</type>
+	<description>Whole extension element in serialized form.</description>
+  </column>
 
-	<!-- expiration time -->
-	<column>
-		<name>expires</name>
-		<type>datetime</type>
-		<default>2005-12-07 08:13:15</default>
-		<description>Expiration value of extension element i.e. value of Expires
-		header used in PUBLISH.</description>
-	</column>
+  <!-- expiration time -->
+  <column>
+	<name>expires</name>
+	<type>datetime</type>
+	<default>2005-12-07 08:13:15</default>
+	<description>
+	  Expiration value of extension element i.e. value of Expires header used
+	  in PUBLISH.
+	</description>
+  </column>
 
-	<index>
-		<name>presextensions_idx1</name>
-		<colref linkend="presextensions.dbid"/>
-		<unique/>
-	</index>
-    
+  <index>
+	<name>presextensions_idx1</name>
+	<colref linkend="presextensions.dbid"/>
+	<unique/>
+  </index>
+  
 </table>

+ 55 - 51
db/schema/presentity_notes.xml

@@ -9,62 +9,66 @@
 
 <table role="presence">
 
-	<name>presentity_notes</name>
-	<description>Table holding &lt;note&gt; elements published directly in
-	&lt;presence&gt; element i.e. notes related to whole presentity not only for
-	tuples.</description>
-    
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-    
-	<column id="presnotes.dbid">
-		<name>dbid</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Generated ID used for unique identification.</description>
-	</column>
+  <name>presentity_notes</name>
+  <description>
+	Table holding &lt;note&gt; elements published directly in &lt;presence&gt;
+	element i.e. notes related to whole presentity not only for
+	tuples.
+  </description>
+  
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+  
+  <column id="presnotes.dbid">
+	<name>dbid</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Generated ID used for unique identification.</description>
+  </column>
 
-	<!-- foreign key (presentity) -->
-	<column>
-		<name>pres_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Presentity ID for which is given note.</description>
-	</column>
+  <!-- foreign key (presentity) -->
+  <column>
+	<name>pres_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Presentity ID for which is given note.</description>
+  </column>
 
-	<column>
-		<name>etag</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Entity tag used for note publication.</description>
-	</column>
+  <column>
+	<name>etag</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Entity tag used for note publication.</description>
+  </column>
 
-	<column>
-		<name>note</name>
-		<type>string</type>
-		<size>128</size>
-		<description>String value of note element.</description>
-	</column>
+  <column>
+	<name>note</name>
+	<type>string</type>
+	<size>128</size>
+	<description>String value of note element.</description>
+  </column>
 
-	<column>
-		<name>lang</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Lang attribute value of note element.</description>
-	</column>
+  <column>
+	<name>lang</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Lang attribute value of note element.</description>
+  </column>
 
-	<column>
-		<name>expires</name>
-		<type>datetime</type>
-		<default>2005-12-07 08:13:15</default>
-		<description>Expiration value of note element i.e. value of Expires
-		header used in PUBLISH.</description>
-	</column>
+  <column>
+	<name>expires</name>
+	<type>datetime</type>
+	<default>2005-12-07 08:13:15</default>
+	<description>
+	  Expiration value of note element i.e. value of Expires header used in
+	  PUBLISH.
+	</description>
+  </column>
 
-	<index>
-		<name>pnotes_idx1</name>
-		<colref linkend="presnotes.dbid"/>
-		<unique/>
-	</index>
+  <index>
+	<name>pnotes_idx1</name>
+	<colref linkend="presnotes.dbid"/>
+	<unique/>
+  </index>
 
 </table>

+ 63 - 63
db/schema/rls_subscription.xml

@@ -8,69 +8,69 @@
 ]>
 
 <table role="presence" xmlns:db="http://docbook.org/ns/docbook">
-    <name>rls_subscription</name>
-    <version>1</version>
-    
-    <column id="rls_subscription.id">
-		<name>id</name>
-		<type>string</type>
-		<size>48</size>
-    </column>
-	
-	<column>
-		<name>doc_version</name>
-		<type>int</type>
-	</column>
-	
-    <column>
-		<name>dialog</name>
-		<type>binary</type>
-    </column>
-    
-	<column>
-		<name>expires</name>
-		<type>datetime</type>
-		<default>2005-12-02 09:00:13</default>
-    </column>
-	
-	<column>
-		<name>status</name>
-		<type>int</type>
-	</column>
-	
-	<column>
-		<name>contact</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-	</column>
+  <name>rls_subscription</name>
+  <version>1</version>
+  
+  <column id="rls_subscription.id">
+	<name>id</name>
+	<type>string</type>
+	<size>48</size>
+  </column>
+  
+  <column>
+	<name>doc_version</name>
+	<type>int</type>
+  </column>
+  
+  <column>
+	<name>dialog</name>
+	<type>binary</type>
+  </column>
+  
+  <column>
+	<name>expires</name>
+	<type>datetime</type>
+	<default>2005-12-02 09:00:13</default>
+  </column>
+  
+  <column>
+	<name>status</name>
+	<type>int</type>
+  </column>
+  
+  <column>
+	<name>contact</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+  </column>
 
-	<column>
-		<name>uri</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-	</column>
+  <column>
+	<name>uri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+  </column>
 
-	<column>
-		<name>package</name>
-		<type>string</type>
-		<size>128</size>
-	</column>
-	
-	<column>
-		<name>w_uri</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-	</column>
-	
-	<column>
-		<name>xcap_params</name>
-		<type>binary</type>
-	</column>
-	
-    <index>
-		<name>rls_subscription_key</name>
-		<colref linkend="rls_subscription.id"/>
-		<unique/>
-    </index>
-	
+  <column>
+	<name>package</name>
+	<type>string</type>
+	<size>128</size>
+  </column>
+  
+  <column>
+	<name>w_uri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+  </column>
+  
+  <column>
+	<name>xcap_params</name>
+	<type>binary</type>
+  </column>
+  
+  <index>
+	<name>rls_subscription_key</name>
+	<colref linkend="rls_subscription.id"/>
+	<unique/>
+  </index>
+  
 </table>

+ 32 - 32
db/schema/rls_vs.xml

@@ -8,37 +8,37 @@
 ]>
 
 <table role="presence" xmlns:db="http://docbook.org/ns/docbook">
-    <name>rls_vs</name>
-    <version>1</version>
-	
-	<!-- table holding information about virtual subscriptions created
-	in the context of resource list subscriptions -->
-    
-	<!-- id of virtual subscription (generated) -->
-    <column id="rls_vs.id">
-		<name>id</name>
-		<type>string</type>
-		<size>48</size>
-    </column>
-	
-	<!-- id of "parent" resource list subscription 
-	(related to rls_susbscription.id) -->
-    <column>
-		<name>rls_id</name>
-		<type>string</type>
-		<size>48</size>
-    </column>
-	
-	<column>
-		<name>uri</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-	</column>
+  <name>rls_vs</name>
+  <version>1</version>
+  
+  <!-- table holding information about virtual subscriptions created
+	   in the context of resource list subscriptions -->
+  
+  <!-- id of virtual subscription (generated) -->
+  <column id="rls_vs.id">
+	<name>id</name>
+	<type>string</type>
+	<size>48</size>
+  </column>
+  
+  <!-- id of "parent" resource list subscription 
+	   (related to rls_susbscription.id) -->
+  <column>
+	<name>rls_id</name>
+	<type>string</type>
+	<size>48</size>
+  </column>
+  
+  <column>
+	<name>uri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+  </column>
 
-    <index>
-		<name>rls_vs_key</name>
-		<colref linkend="rls_vs.id"/>
-		<unique/>
-    </index>
-	
+  <index>
+	<name>rls_vs_key</name>
+	<colref linkend="rls_vs.id"/>
+	<unique/>
+  </index>
+  
 </table>

+ 28 - 28
db/schema/rls_vs_names.xml

@@ -8,33 +8,33 @@
 ]>
 
 <table role="presence" xmlns:db="http://docbook.org/ns/docbook">
-    <name>rls_vs_names</name>
-    <version>1</version>
-	
-	<!-- table holding information about names of standalone
-	resources in list (i. e. standalone virtual subscriptions) 
+  <name>rls_vs_names</name>
+  <version>1</version>
+  
+  <!-- table holding information about names of standalone
+	   resources in list (i. e. standalone virtual subscriptions) 
 	-->
-    
-	<!-- id of "parent" virtual subscription (related to 
-	rls_vs.id) -->
-    <column>
-		<name>id</name>
-		<type>string</type>
-		<size>48</size>
-    </column>
-	
-	<column>
-		<name>name</name>
-		<type>string</type>
-		<size>64</size>
-		<null/> <!-- ? -->
-	</column>
-	
-	<column>
-		<name>lang</name>
-		<type>string</type>
-		<size>64</size>
-		<null/>
-	</column>
-	
+  
+  <!-- id of "parent" virtual subscription (related to 
+	   rls_vs.id) -->
+  <column>
+	<name>id</name>
+	<type>string</type>
+	<size>48</size>
+  </column>
+  
+  <column>
+	<name>name</name>
+	<type>string</type>
+	<size>64</size>
+	<null/> <!-- ? -->
+  </column>
+  
+  <column>
+	<name>lang</name>
+	<type>string</type>
+	<size>64</size>
+	<null/>
+  </column>
+  
 </table>

+ 14 - 14
db/schema/sd_attrs.xml

@@ -8,46 +8,46 @@
 ]>
 
 <table>
-    <name>sd_attrs</name>
-    <version>1</version>
+  <name>sd_attrs</name>
+  <version>1</version>
 
-    <column id="sdattrs.id">
+  <column id="sdattrs.id">
 	<name>id</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column id="sdattrs.name">
+  <column id="sdattrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
-    </column>
+  </column>
 
-    <column id="sdattrs.value">
+  <column id="sdattrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
-    </column>
+  </column>
 
-    <column id="sdattrs.flags">
+  <column id="sdattrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<unique/>
 	<name>sd_idx</name>
 	<colref linkend="sdattrs.id"/>
 	<colref linkend="sdattrs.name"/>
 	<colref linkend="sdattrs.value"/>
-    </index>
+  </index>
 
 </table>

+ 90 - 90
db/schema/ser.xml

@@ -8,113 +8,113 @@
 ]>
 
 <database xmlns:xi="http://www.w3.org/2001/XInclude">
-    <name>ser</name>
+  <name>ser</name>
 
-    <xi:include href="version.xml"/>
+  <xi:include href="version.xml"/>
 
-    <!-- Accounting related tables -->
-    <xi:include href="acc.xml"/>
-    <xi:include href="missed_calls.xml"/>
+  <!-- Accounting related tables -->
+  <xi:include href="acc.xml"/>
+  <xi:include href="missed_calls.xml"/>
 
-    <!-- Table that stores credentials for digest and serweb authentication -->
-    <xi:include href="credentials.xml"/>
+  <!-- Table that stores credentials for digest and serweb authentication -->
+  <xi:include href="credentials.xml"/>
 
-    <!-- Attribute types -->
-    <xi:include href="attr_types.xml"/>
+  <!-- Attribute types -->
+  <xi:include href="attr_types.xml"/>
 
-    <!-- Various attribute tables -->
-    <xi:include href="global_attrs.xml"/>
-    <xi:include href="domain_attrs.xml"/>
-    <xi:include href="user_attrs.xml"/>
-    <xi:include href="uri_attrs.xml"/>
+  <!-- Various attribute tables -->
+  <xi:include href="global_attrs.xml"/>
+  <xi:include href="domain_attrs.xml"/>
+  <xi:include href="user_attrs.xml"/>
+  <xi:include href="uri_attrs.xml"/>
 
-    <!-- Multi-domain support -->
-    <xi:include href="domain.xml"/>
+  <!-- Multi-domain support -->
+  <xi:include href="domain.xml"/>
 
-    <!-- Table containing text files, styles and other files specific for domain (used by serweb) -->
-    <xi:include href="domain_settings.xml"/>
+  <!-- Table containing text files, styles and other files specific for domain (used by serweb) -->
+  <xi:include href="domain_settings.xml"/>
 
-    <!-- User location database -->
-    <xi:include href="location.xml"/>
-    <xi:include href="contact_attrs.xml"/>
+  <!-- User location database -->
+  <xi:include href="location.xml"/>
+  <xi:include href="contact_attrs.xml"/>
 
-    <!-- Permissions module -->
-    <xi:include href="trusted.xml"/>
-    <xi:include href="ipmatch.xml"/>
+  <!-- Permissions module -->
+  <xi:include href="trusted.xml"/>
+  <xi:include href="ipmatch.xml"/>
 
-    <!-- Table containing phonebook (used by serweb -->
-    <xi:include href="phonebook.xml"/>
+  <!-- Table containing phonebook (used by serweb -->
+  <xi:include href="phonebook.xml"/>
 
-    <!-- Least Cost Routing related tables -->
-    <xi:include href="gw.xml"/>
-    <xi:include href="gw_grp.xml"/>
-    <xi:include href="lcr.xml"/>
+  <!-- Least Cost Routing related tables -->
+  <xi:include href="gw.xml"/>
+  <xi:include href="gw_grp.xml"/>
+  <xi:include href="lcr.xml"/>
 
-    <xi:include href="grp.xml"/>
+  <xi:include href="grp.xml"/>
 
-    <!-- Instant Messages Scheduled for later delivery -->
-    <xi:include href="silo.xml"/>
+  <!-- Instant Messages Scheduled for later delivery -->
+  <xi:include href="silo.xml"/>
 
-    <!-- The table mapping SIP URIs to subscribers -->
-    <xi:include href="uri.xml"/>
+  <!-- The table mapping SIP URIs to subscribers -->
+  <xi:include href="uri.xml"/>
 
-    <!-- Speeddial module -->
-    <xi:include href="speed_dial.xml"/>
-    <xi:include href="sd_attrs.xml"/>
+  <!-- Speeddial module -->
+  <xi:include href="speed_dial.xml"/>
+  <xi:include href="sd_attrs.xml"/>
 
-    <!-- Presence related tables -->
-    <xi:include href="presentity.xml"/>
-    <xi:include href="presentity_notes.xml"/>
-    <xi:include href="presentity_extensions.xml"/>
-    <xi:include href="presentity_contact.xml"/>
-    <xi:include href="watcherinfo.xml"/>
-    <xi:include href="tuple_notes.xml"/>
-    <xi:include href="tuple_extensions.xml"/>
-    <xi:include href="offline_winfo.xml"/>
-    
-	<!-- Resource-lists related tables -->
-    <xi:include href="rls_subscription.xml"/>
-    <xi:include href="rls_vs.xml"/>
-    <xi:include href="rls_vs_names.xml"/>
+  <!-- Presence related tables -->
+  <xi:include href="presentity.xml"/>
+  <xi:include href="presentity_notes.xml"/>
+  <xi:include href="presentity_extensions.xml"/>
+  <xi:include href="presentity_contact.xml"/>
+  <xi:include href="watcherinfo.xml"/>
+  <xi:include href="tuple_notes.xml"/>
+  <xi:include href="tuple_extensions.xml"/>
+  <xi:include href="offline_winfo.xml"/>
+  
+  <!-- Resource-lists related tables -->
+  <xi:include href="rls_subscription.xml"/>
+  <xi:include href="rls_vs.xml"/>
+  <xi:include href="rls_vs_names.xml"/>
 
-    <xi:include href="i18n.xml"/>
+  <xi:include href="i18n.xml"/>
 
-    <xi:include href="pdt.xml"/>
+  <xi:include href="pdt.xml"/>
 
-    <xi:include href="cpl.xml"/>
+  <xi:include href="cpl.xml"/>
 
-    <!-- Customers -->
-    <xi:include href="customers.xml"/>
+  <!-- Customers -->
+  <xi:include href="customers.xml"/>
 
-	<verbatim db="mysql" id="func.active">
-	  <create>
-<![CDATA[
+  <verbatim db="mysql" id="func.active">
+	<create>
+	  <![CDATA[
 drop function if exists active;
 create function active (flags int unsigned) returns bool DETERMINISTIC
     return not flags&194;
 ]]>
-	  </create>
-	  <destroy>
-drop function if exists active;
-	  </destroy>
-	</verbatim>
-
-	<verbatim db="mysql" id="func.canonical">
-	  <create>
-<![CDATA[
+	</create>
+	<destroy>
+	  drop function if exists active;
+	</destroy>
+  </verbatim>
+
+  <verbatim db="mysql" id="func.canonical">
+	<create>
+	  <![CDATA[
 drop function if exists canonical;
 create function canonical (flags int unsigned) returns bool DETERMINISTIC
     return flags&4 and active(flags);
 ]]>
-	  </create>
-	  <destroy>
-drop function if exists canonical;
-	  </destroy>
-	</verbatim>
-
-	<verbatim db="mysql" id="func.tostr">
-	  <create>
-<![CDATA[
+	</create>
+	<destroy>
+	  drop function if exists canonical;
+	</destroy>
+  </verbatim>
+
+  <verbatim db="mysql" id="func.tostr">
+	<create>
+	  <![CDATA[
 drop function if exists tostr;
 delimiter //
 create function tostr (flags int(10) unsigned) returns varchar(128)
@@ -168,17 +168,17 @@ end
 //
 delimiter ;
 ]]>
-	  </create>
-	  <destroy>
-drop function if exists tostr;
-	  </destroy>
-    </verbatim>
-
-    <!-- Include extra definitions if found, it is not
-         an error if they are not present, although it
-         would produce a warning
-      -->
-    <xi:include href="extra.xml" xpointer="xpointer(data/table)">
+	</create>
+	<destroy>
+	  drop function if exists tostr;
+	</destroy>
+  </verbatim>
+
+  <!-- Include extra definitions if found, it is not
+       an error if they are not present, although it
+       would produce a warning
+    -->
+  <xi:include href="extra.xml" xpointer="xpointer(data/table)">
 	<xi:fallback/>
-    </xi:include>
+  </xi:include>
 </database>

+ 22 - 22
db/schema/silo.xml

@@ -8,70 +8,70 @@
 ]>
 
 <table>
-    <name>silo</name>
-    <version>4</version>
+  <name>silo</name>
+  <version>4</version>
 
-    <column id="silo.mid">
+  <column id="silo.mid">
 	<name>mid</name>
 	<type>int</type>
 	<type db="mysql">INT AUTO_INCREMENT</type>
 	<type db="postgres">SERIAL</type>
 	<type db="dbtext">int,auto</type>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>from_hdr</name>
 	<type>string</type>
 	<size>255</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>to_hdr</name>
 	<type>string</type>
 	<size>255</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>ruri</name>
 	<type>string</type>
 	<size>&uri_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>inc_time</name>
 	<type>datetime</type>
 	<default>1970-01-01 00:00:00</default>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>exp_time</name>
 	<type>datetime</type>
 	<default>1970-01-01 00:00:00</default>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>ctype</name>
 	<type>string</type>
 	<default>text/plain</default>
 	<size>128</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>body</name>
 	<type>binary</type>
 	<default></default>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<unique/>
 	<name>silo_idx1</name>
 	<colref linkend="silo.mid"/>
-    </index>
+  </index>
 </table>

+ 18 - 18
db/schema/speed_dial.xml

@@ -8,58 +8,58 @@
 ]>
 
 <table>
-    <name>speed_dial</name>
-    <version>2</version>
+  <name>speed_dial</name>
+  <version>2</version>
 
-    <column id="sd.id">
+  <column id="sd.id">
 	<name>id</name>
 	<type>int</type>
 	<type db="mysql">INT AUTO_INCREMENT</type>
 	<type db="postgres">SERIAL</type>
 	<type db="dbtext">int,auto</type>
-    </column>
+  </column>
 
-    <column id="sd.uid">
+  <column id="sd.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column id="sd.dial_username">
+  <column id="sd.dial_username">
 	<name>dial_username</name>
 	<type>string</type>
 	<size>&user_len;</size>
-    </column>
+  </column>
 
-    <column id="sd.dial_did">
+  <column id="sd.dial_did">
 	<name>dial_did</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>new_uri</name>
 	<type>string</type>
 	<size>&uri_len;</size>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>speeddial_idx1</name>
 	<unique/>
 	<colref linkend="sd.uid"/>
 	<colref linkend="sd.dial_did"/>
 	<colref linkend="sd.dial_username"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<unique/>
 	<name>speeddial_id</name>
 	<colref linkend="sd.id"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>speeddial_uid</name>
 	<colref linkend="sd.uid"/>
-    </index>
+  </index>
 </table>

+ 10 - 10
db/schema/trusted.xml

@@ -8,32 +8,32 @@
 ]>
 
 <table>
-    <name>trusted</name>
-    <version>1</version>
+  <name>trusted</name>
+  <version>1</version>
 
-    <column id="trusted.src_ip">
+  <column id="trusted.src_ip">
 	<name>src_ip</name>
 	<type>string</type>
 	<size>39</size>
-    </column>
+  </column>
 
-    <column id="trusted.proto">
+  <column id="trusted.proto">
 	<name>proto</name>
 	<type>string</type>
 	<size>4</size>
-    </column>
+  </column>
 
-    <column id="trusted.from_pattern">
+  <column id="trusted.from_pattern">
 	<name>from_pattern</name>
 	<type>string</type>
 	<size>64</size>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<name>trusted_idx</name>
 	<unique/>
 	<colref linkend="trusted.src_ip"/>
 	<colref linkend="trusted.proto"/>
 	<colref linkend="trusted.from_pattern"/>
-    </index>
+  </index>
 </table>

+ 39 - 37
db/schema/tuple_extensions.xml

@@ -9,41 +9,43 @@
 
 <table role="presence">
 
-	<name>tuple_extensions</name>
-
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-	<description>Extension elements published within tuples.</description>
-
-	<!-- presentity ID -->
-	<column id="tuple_notes.pres_id">
-		<name>pres_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Presentity ID.</description>
-	</column>
-
-	<column id="tuple_notes.tupleid">
-		<name>tupleid</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Tuple identification.</description>
-	</column>
-
-	<!-- serialized XML element -->
-	<column>
-		<name>element</name>
-		<type>binary</type>
-		<description>Whole extension element in serialized form.</description>
-	</column>
-
-	<!-- 0 if it is not status extension, nonzero otherwise -->
-	<column>
-		<name>status_extension</name>
-		<type>int</type>
-		<size>1</size>
-		<description>Flag set to nonzero if element is nested in &lt;status&gt;,
-		otherwise is extension element nested in &lt;tuple&gt;.</description>
-	</column>
-    
+  <name>tuple_extensions</name>
+
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+  <description>Extension elements published within tuples.</description>
+
+  <!-- presentity ID -->
+  <column id="tuple_notes.pres_id">
+	<name>pres_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Presentity ID.</description>
+  </column>
+
+  <column id="tuple_notes.tupleid">
+	<name>tupleid</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Tuple identification.</description>
+  </column>
+
+  <!-- serialized XML element -->
+  <column>
+	<name>element</name>
+	<type>binary</type>
+	<description>Whole extension element in serialized form.</description>
+  </column>
+
+  <!-- 0 if it is not status extension, nonzero otherwise -->
+  <column>
+	<name>status_extension</name>
+	<type>int</type>
+	<size>1</size>
+	<description>
+	  Flag set to nonzero if element is nested in &lt;status&gt;,
+	  otherwise is extension element nested in &lt;tuple&gt;.
+	</description>
+  </column>
+  
 </table>

+ 36 - 36
db/schema/tuple_notes.xml

@@ -9,40 +9,40 @@
 
 <table role="presence">
 
-	<name>tuple_notes</name>
-	<description>Tuple related published notes.</description>
-
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-
-	<!-- presentity ID -->
-	<column id="tuple_notes.pres_id">
-		<name>pres_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Presentity ID.</description>
-	</column>
-
-	<column id="tuple_notes.tupleid">
-		<name>tupleid</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Tuple identification.</description>
-	</column>
-
-	<column>
-		<name>note</name>
-		<type>string</type>
-		<size>128</size>
-		<description>Note text.</description>
-	</column>
-
-	<column>
-		<name>lang</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Note language (possible note element
-		attribute).</description>
-	</column>
-    
+  <name>tuple_notes</name>
+  <description>Tuple related published notes.</description>
+
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+
+  <!-- presentity ID -->
+  <column id="tuple_notes.pres_id">
+	<name>pres_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Presentity ID.</description>
+  </column>
+
+  <column id="tuple_notes.tupleid">
+	<name>tupleid</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Tuple identification.</description>
+  </column>
+
+  <column>
+	<name>note</name>
+	<type>string</type>
+	<size>128</size>
+	<description>Note text.</description>
+  </column>
+
+  <column>
+	<name>lang</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Note language (possible note element
+	  attribute).</description>
+  </column>
+  
 </table>

+ 39 - 39
db/schema/uri.xml

@@ -8,67 +8,67 @@
 ]>
 
 <table>
-    <name>uri</name>
-    <version>3</version>
+  <name>uri</name>
+  <version>3</version>
 
-    <column id="uri.uid">
+  <column id="uri.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column id="uri.did">
+  <column id="uri.did">
 	<name>did</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column id="uri.username">
+  <column id="uri.username">
 	<name>username</name>
 	<type>string</type>
 	<size>&user_len;</size>
-    </column>
+  </column>
 
-    <column id="uri.flags">
+  <column id="uri.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags (is_from, is_to, is_disabled, is_canon).
+	  Various flags (is_from, is_to, is_disabled, is_canon).
 	</description>
-    </column>
+  </column>
 
-    <column id="uri.scheme">
-        <name>scheme</name>
+  <column id="uri.scheme">
+    <name>scheme</name>
 	<type>string</type>
 	<size>8</size>
 	<default>sip</default>
 	<description>
-	    URI scheme:
-	     - SIP  
-	     - SIPS 
-	     - TEL  
-	     - TELS 
+	  URI scheme:
+	  - SIP  
+	  - SIPS 
+	  - TEL  
+	  - TELS 
 	</description>
-    </column>
-														    
+  </column>
+  
 
-    <index>
+  <index>
 	<name>uri_idx1</name>
 	<colref linkend="uri.username"/>
 	<colref linkend="uri.did"/>
 	<colref linkend="uri.scheme"/>
-    </index>
+  </index>
 
-    <index>
+  <index>
 	<name>uri_uid</name>
 	<colref linkend="uri.uid"/>
-    </index>
+  </index>
 
-	<verbatim db="mysql" id="func.touri">
-	  <create>
-<![CDATA[
+  <verbatim db="mysql" id="func.touri">
+	<create>
+	  <![CDATA[
 drop function if exists touri;
 delimiter //
 create function touri (puid varchar(64)) returns varchar(128) 
@@ -84,15 +84,15 @@ end
 //
 delimiter ;
 ]]>
-	  </create>
-	  <destroy>
-drop function if exists touri;
-	  </destroy>
-	</verbatim>
+	</create>
+	<destroy>
+	  drop function if exists touri;
+	</destroy>
+  </verbatim>
 
-	<verbatim db="mysql" id="func.touid">
-	  <create>
-<![CDATA[
+  <verbatim db="mysql" id="func.touid">
+	<create>
+	  <![CDATA[
 drop function if exists touid;
 delimiter //
 create function touid (puri varchar(128)) returns varchar(128) 
@@ -120,9 +120,9 @@ end
 //
 delimiter ;
 ]]>
-	  </create>
-	  <destroy>
-	  </destroy>
-	</verbatim>
+	</create>
+	<destroy>
+	</destroy>
+  </verbatim>
 
 </table>

+ 34 - 34
db/schema/uri_attrs.xml

@@ -8,71 +8,71 @@
 ]>
 
 <table>
-    <name>uri_attrs</name>
-    <version>2</version>
+  <name>uri_attrs</name>
+  <version>2</version>
 
-    <column id="uriattrs.username">
+  <column id="uriattrs.username">
 	<name>username</name>
 	<type>string</type>
 	<size>&user_len;</size>
-    </column>
+  </column>
 
-    <column id="uriattrs.did">
-        <name>did</name>
-        <type>string</type>
-        <size>&id_len;</size>
-    </column>
-				
-    <column id="uriattrs.name">
+  <column id="uriattrs.did">
+    <name>did</name>
+    <type>string</type>
+    <size>&id_len;</size>
+  </column>
+  
+  <column id="uriattrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
-    </column>
+  </column>
 
-    <column id="uriattrs.value">
+  <column id="uriattrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
-    </column>
+  </column>
 
-    <column id="uriattrs.flags">
+  <column id="uriattrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags (SER_LOAD and such).
+	  Various flags (SER_LOAD and such).
 	</description>
-    </column>
+  </column>
 
-    <column id="uriattrs.scheme">
-        <name>scheme</name>
-        <type>string</type>
+  <column id="uriattrs.scheme">
+    <name>scheme</name>
+    <type>string</type>
 	<size>8</size>
-        <default>sip</default>
-        <description>
-            URI scheme:
-              - SIP  
-              - SIPS 
-              - TEL  
-              - TELS 
-        </description>
-    </column>
+    <default>sip</default>
+    <description>
+      URI scheme:
+      - SIP  
+      - SIPS 
+      - TEL  
+      - TELS 
+    </description>
+  </column>
 
-    <index>
+  <index>
 	<unique/>
 	<name>uriattrs_idx</name>
-        <colref linkend="uriattrs.username"/>
+    <colref linkend="uriattrs.username"/>
 	<colref linkend="uriattrs.did"/>
 	<colref linkend="uriattrs.name"/>
 	<colref linkend="uriattrs.value"/>
 	<colref linkend="uriattrs.scheme"/>
-    </index>
+  </index>
 
 </table>

+ 15 - 15
db/schema/user_attrs.xml

@@ -8,50 +8,50 @@
 ]>
 
 <table>
-    <name>user_attrs</name>
-    <version>3</version>
+  <name>user_attrs</name>
+  <version>3</version>
 
-    <column id="userattrs.uid">
+  <column id="userattrs.uid">
 	<name>uid</name>
 	<name db="oracle">uuid</name>
 	<type>string</type>
 	<size>&id_len;</size>
-    </column>
+  </column>
 
-    <column id="userattrs.name">
+  <column id="userattrs.name">
 	<name>name</name>
 	<type>string</type>
 	<size>&avp_name_len;</size>
-    </column>
+  </column>
 
-    <column id="userattrs.value">
+  <column id="userattrs.value">
 	<name>value</name>
 	<type>string</type>
 	<null/>
 	<size>&avp_val_len;</size>
-    </column>
+  </column>
 
-    <column>
+  <column>
 	<name>type</name>
 	<type>int</type>
 	<default>0</default>
-    </column>
+  </column>
 
-    <column id="userattrs.flags">
+  <column id="userattrs.flags">
 	<name>flags</name>
 	<type>unsigned int</type>
 	<default>0</default>
 	<description>
-	    Various flags (SER_LOAD and such).
+	  Various flags (SER_LOAD and such).
 	</description>
-    </column>
+  </column>
 
-    <index>
+  <index>
 	<unique/>
 	<name>userattrs_idx</name>
 	<colref linkend="userattrs.uid"/>
 	<colref linkend="userattrs.name"/>
 	<colref linkend="userattrs.value"/>
-    </index>
+  </index>
 
 </table>

+ 6 - 5
db/schema/version.xml

@@ -3,16 +3,17 @@
   "http://iptel.org/dbschema/dtd/1.0/dbschema.dtd">
 
 <table id="version" xmlns:xi="http://www.w3.org/2001/XInclude">
-    <name>version</name>
+  <name>version</name>
 
-    <column id="tn">
+  <column id="tn">
 	<name>table_name</name>
 	<type>string</type>
 	<size>32</size>
-    </column>
-    <column id="tv">
+  </column>
+
+  <column id="tv">
 	<name>table_version</name>
 	<type>unsigned int</type>
 	<default>0</default>
-    </column>
+  </column>
 </table>

+ 121 - 112
db/schema/watcherinfo.xml

@@ -8,118 +8,127 @@
 ]>
 
 <table role="presence">
-    <name>watcherinfo</name>
-	<description>Table holding information about watchers. Here are both
-	presence and presence.winfo watchers.</description>
-
-	<!-- related to the version of presence snapshot -->
-	<version>5</version>
-
-	<!-- watcher's URI -->
-	<column id="watcherinfo.w_uri">
-		<name>w_uri</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-		<description>Watcher's URI (From header uri used in first SUBSCRIBE
-		request).</description>
-	</column>
-
-	<!-- displayname information taken from From header -->
-	<column>
-		<name>display_name</name>
-		<type>string</type>
-		<size>128</size>
-	</column>
-
-	<!-- watcher's identification -->
-	<column id="watcherinfo.s_id">
-		<name>s_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Generated watcher's identification.</description>
-	</column>
-
-	<!-- event package: presence or presence.winfo -->
-	<column>
-		<name>package</name>
-		<type>string</type>
-		<size>32</size>
-		<default>presence</default>
-		<description>Watcher's event package - presence or
-		presence.winfo.</description>
-	</column>
-
-	<column>
-		<name>status</name>
-		<type>string</type>
-		<size>32</size>
-		<default>pending</default>
-		<description>Watcher's status as string (pending, active,
-		rejected, terminated or pending_terminated).</description>
-	</column>
-
-	<column>
-		<name>event</name>
-		<type>string</type>
-		<size>32</size>
-		<description>Event which lead to watcher's status (subscribe,
-		...).</description>
-	</column>
-
-	<column>
-		<name>expires</name>
-		<type>datetime</type>
-		<default>2005-12-07 08:13:15</default>
-		<description>Subscription expiration value.</description>
-	</column>
-
-	<column>
-		<name>accepts</name>
-		<type>int</type>
-		<description>MIME type used in NOTIFYs.</description>
-	</column>
-
-	<!-- foreign key (presentity) -->
-    <column>
-		<name>pres_id</name>
-		<type>string</type>
-		<size>64</size>
-		<description>Watched presentity identification.</description>
-    </column>
-
-	<column>
-		<name>server_contact</name>
-		<type>string</type>
-		<size>&uri_len;</size>
-		<description>Contact address used for resubscriptions.</description>
-	</column>
-
-	<column>
-		<name>dialog</name>
-		<type>binary</type>
-		<description>Serialized subscription dialog.</description>
-	</column>
-
-	<column>
-		<name>doc_index</name>
-		<type>int</type>
-		<description>Last index used in NOTIFY (some document formats use
-		numbers incremented in each NOTIFY).</description>
-	</column>
-
-	<index>
-		<name>wi_idx1</name>
-		<colref linkend="watcherinfo.s_id"/>
-		<unique/>
-	</index>
-
-	<!-- this index may help when reading from the database, 
-	but it is done only on startup thus this index is probably 
-	not needed -->
-	<!--
-	<index>
+  <name>watcherinfo</name>
+  <description>
+	Table holding information about watchers. Here are both presence and
+	presence.winfo watchers.
+  </description>
+  
+  <!-- related to the version of presence snapshot -->
+  <version>5</version>
+
+  <!-- watcher's URI -->
+  <column id="watcherinfo.w_uri">
+	<name>w_uri</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<description>
+	  Watcher's URI (From header uri used in first SUBSCRIBE request).
+	</description>
+  </column>
+
+  <!-- displayname information taken from From header -->
+  <column>
+	<name>display_name</name>
+	<type>string</type>
+	<size>128</size>
+  </column>
+
+  <!-- watcher's identification -->
+  <column id="watcherinfo.s_id">
+	<name>s_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Generated watcher's identification.</description>
+  </column>
+
+  <!-- event package: presence or presence.winfo -->
+  <column>
+	<name>package</name>
+	<type>string</type>
+	<size>32</size>
+	<default>presence</default>
+	<description>
+	  Watcher's event package - presence or presence.winfo.
+	</description>
+  </column>
+
+  <column>
+	<name>status</name>
+	<type>string</type>
+	<size>32</size>
+	<default>pending</default>
+	<description>
+	  Watcher's status as string (pending, active, rejected, terminated or
+	  pending_terminated).
+	</description>
+  </column>
+
+  <column>
+	<name>event</name>
+	<type>string</type>
+	<size>32</size>
+	<description>
+	  Event which lead to watcher's status (subscribe, ...).
+	</description>
+  </column>
+
+  <column>
+	<name>expires</name>
+	<type>datetime</type>
+	<default>2005-12-07 08:13:15</default>
+	<description>Subscription expiration value.</description>
+  </column>
+
+  <column>
+	<name>accepts</name>
+	<type>int</type>
+	<description>MIME type used in NOTIFYs.</description>
+  </column>
+
+  <!-- foreign key (presentity) -->
+  <column>
+	<name>pres_id</name>
+	<type>string</type>
+	<size>64</size>
+	<description>Watched presentity identification.</description>
+  </column>
+
+  <column>
+	<name>server_contact</name>
+	<type>string</type>
+	<size>&uri_len;</size>
+	<description>Contact address used for resubscriptions.</description>
+  </column>
+
+  <column>
+	<name>dialog</name>
+	<type>binary</type>
+	<description>Serialized subscription dialog.</description>
+  </column>
+
+  <column>
+	<name>doc_index</name>
+	<type>int</type>
+	<description>
+	  Last index used in NOTIFY (some document formats use numbers incremented
+	  in each NOTIFY).
+	</description>
+  </column>
+
+  <index>
+	<name>wi_idx1</name>
+	<colref linkend="watcherinfo.s_id"/>
+	<unique/>
+  </index>
+
+  <!-- this index may help when reading from the database, 
+	   but it is done only on startup thus this index is probably 
+	   not needed -->
+  <!--
+	  <index>
 		<name>wi_pres_idx</name>
 		<colref linkend="watcherinfo.pres_id"/>
-	</index>
-	-->
+	  </index>
+	  -->
 </table>