Selaa lähdekoodia

- Description of acc table and its columns

Jan Janak 20 vuotta sitten
vanhempi
commit
8ebe79ae06
1 muutettua tiedostoa jossa 125 lisäystä ja 1 poistoa
  1. 125 1
      db/schema/acc.xml

+ 125 - 1
db/schema/acc.xml

@@ -7,109 +7,233 @@
 
 
 ]>
 ]>
 
 
-<table xmlns:my="http://iptel.org/dbschema/mysql">
+<table xmlns:db="http://docbook.org/ns/docbook" xmlns:my="http://iptel.org/dbschema/mysql">
     <name>acc</name>
     <name>acc</name>
+    <description>
+	<db:para>
+	    Acc table is used for accounting purposes. 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 placed
+	    calls.
+	</db:para>
+	<db:para>
+	    SER records sucessful transactions (those replied with a 2xx final
+	    response) into this table. SER never reads or updates rows in the
+	    table, it only inserts new rows into the table. This table can
+	    potentially get big. There will be 1-3 rows per call, depending on
+	    the configuration of SER. 
+	</db:para>
+	<db:para>
+	    SERWeb queries the table when displaying the list of placed calls
+	    of a subscriber. 
+	</db:para>
+    </description>
     <version>2</version>
     <version>2</version>
+
     <column>
     <column>
 	<name>caller_UUID</name>
 	<name>caller_UUID</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uuid_len;</size>
 	<size>&uuid_len;</size>
+	<description>
+	    The UUID of the user identified by From header field (the
+	    initiator of the transaction).
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>callee_UUID</name>
 	<name>callee_UUID</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uuid_len;</size>
 	<size>&uuid_len;</size>
+	<description>
+	    The UUID of the user identified by the Request-URI (intended recipient of the
+	    transaction).
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>sip_from</name>
 	<name>sip_from</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&hf_len;</size>
 	<size>&hf_len;</size>
+	<description>
+	    The body of the From header field, including display name and all
+	    parameters URI and header field parameters.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>sip_to</name>
 	<name>sip_to</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&hf_len;</size>
 	<size>&hf_len;</size>
+	<description>
+	    The body of the To header field, including display name and all
+	    parameters URI and header field parameters.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>sip_status</name>
 	<name>sip_status</name>
 	<type>string</type>
 	<type>string</type>
 	<size>128</size>
 	<size>128</size>
+	<description>
+	    The status code of the final SIP reply that finished the
+	    transaction being accounted.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>sip_method</name>
 	<name>sip_method</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&method_len;</size>
 	<size>&method_len;</size>
+	<description>
+	    The method of the SIP request that created the transaction being
+	    accounted.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>i_uri</name>
 	<name>i_uri</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uri_len;</size>
 	<size>&uri_len;</size>
+	<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>
+
     <column>
     <column>
 	<name>o_uri</name>
 	<name>o_uri</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uri_len;</size>
 	<size>&uri_len;</size>
+	<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>
+
     <column>
     <column>
 	<name>from_uri</name>
 	<name>from_uri</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uri_len;</size>
 	<size>&uri_len;</size>
+	<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>
+
     <column>
     <column>
 	<name>to_uri</name>
 	<name>to_uri</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uri_len;</size>
 	<size>&uri_len;</size>
+	<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>
+
     <column id="sip_callid">
     <column id="sip_callid">
 	<name>sip_callid</name>
 	<name>sip_callid</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&uri_len;</size>
 	<size>&uri_len;</size>
+	<description>
+	    The value of the Call-ID header field. This value uniquely
+	    identifies a call.
+	</description>
     </column>
     </column>
+
     <column id="username">
     <column id="username">
 	<name>username</name>
 	<name>username</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&user_len;</size>
 	<size>&user_len;</size>
+	<description>
+	    The value of username attribute from digest credentials. If a message does
+	    not contain digest credentials then From header field username is used.
+	</description>
     </column>
     </column>
+
     <column id="domain">
     <column id="domain">
 	<name>domain</name>
 	<name>domain</name>
 	<type>string</type>
 	<type>string</type>
 	<size>&domain_len;</size>
 	<size>&domain_len;</size>
+	<description>
+	    In multi-domain setups (SER handling more than one virtual domain)
+	    this is the domain the transaction was processed in.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>fromtag</name>
 	<name>fromtag</name>
 	<type>string</type>
 	<type>string</type>
 	<size>128</size>
 	<size>128</size>
+	<description>
+	    The value of the tag parameter in From header field.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>totag</name>
 	<name>totag</name>
 	<type>string</type>
 	<type>string</type>
 	<size>128</size>
 	<size>128</size>
+	<description>
+	    The value of the tag parameter in To header field.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>time</name>
 	<name>time</name>
 	<type>datetime</type>
 	<type>datetime</type>
 	<default>1970-01-01 00:00:00</default>
 	<default>1970-01-01 00:00:00</default>
+	<description>
+	    The time of the completion of the transaction (the time of
+	    forwarding of the final reply upstream by SER).
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>timestamp</name>
 	<name>timestamp</name>
 	<type>datetime</type>
 	<type>datetime</type>
 	<default>1970-01-01 00:00:00</default>
 	<default>1970-01-01 00:00:00</default>
+	<description>
+	    Timestamp auto-generated by the database server.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>caller_deleted</name>
 	<name>caller_deleted</name>
 	<type>char</type>
 	<type>char</type>
 	<default>0</default>
 	<default>0</default>
+	<description>
+	    A flag that will be set to 1 when the caller deleted this record in
+	    his accounting list in SERWeb. The row can be deleted from acc
+	    table once both caller_deleted and callee_delete flags are set to 1.
+	</description>
     </column>
     </column>
+
     <column>
     <column>
 	<name>callee_deleted</name>
 	<name>callee_deleted</name>
 	<type>char</type>
 	<type>char</type>
 	<default>0</default>
 	<default>0</default>
+	<description>
+	    A flag that will be set to 1 when the caller deleted this record in
+	    his accounting list in SERWeb. The row can be deleted from acc
+	    table once both caller_deleted and callee_delete flags are set to 1.
+	</description>
     </column>
     </column>
+
     <index>
     <index>
 	<name>acc_user</name>
 	<name>acc_user</name>
 	<colref linkend="username"/>
 	<colref linkend="username"/>
 	<colref linkend="domain"/>
 	<colref linkend="domain"/>
     </index>
     </index>
+
     <index>
     <index>
 	<name>sip_callid</name>
 	<name>sip_callid</name>
 	<colref linkend="sip_callid"/>
 	<colref linkend="sip_callid"/>