<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN" 
  "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [

<!ENTITY % entities SYSTEM "entities.xml">
%entities;

]>

<table id="speed_dial" xmlns:db="http://docbook.org/ns/docbook">
    <name>speed_dial</name>
    <version>2</version>
    <type db="mysql">&MYSQL_TABLE_TYPE;</type>
    <description>
        <db:para>This table is used by the speeddial module to provide on-server speed dial facilities. More information about the speeddial module can be found at: &KAMAILIO_MOD_DOC;speeddial.html
        </db:para>
    </description>

    <column id="id">
        <name>id</name>
        <type>unsigned int</type>
        <size>&table_id_len;</size>
        <autoincrement/>
        <primary/>
        <type db="dbtext">int,auto</type>
        <description>unique ID</description>
    </column>

    <column id="username">
        <name>&USERCOL;</name>
        <type>string</type>
        <size>&user_len;</size>
        <default/>
        <description>Username / phone number</description>
        <natural/>
    </column>

    <column id="domain">
        <name>domain</name>
        <type>string</type>
        <size>&domain_len;</size>
        <default/>
        <description>Domain name</description>
        <natural/>
    </column>

    <column id="sd_username">
        <name>sd_username</name>
        <type>string</type>
        <size>&user_len;</size>
        <default/>
        <description>Speed dial username</description>
    </column>

    <column id="sd_domain">
        <name>sd_domain</name>
        <type>string</type>
        <size>&domain_len;</size>
        <default/>
        <description>Speed dial domain</description>
    </column>

    <column>
        <name>new_uri</name>
        <type>string</type>
        <size>&uri_len;</size>
        <default/>
        <description>New URI</description>
    </column>

    <column>
        <name>fname</name>
        <type>string</type>
        <size>&user_len;</size>
        <default/>
        <description>First name</description>
    </column>

    <column>
        <name>lname</name>
        <type>string</type>
        <size>&user_len;</size>
        <default/>
        <description>Last name</description>
    </column>

    <column>
        <name>description</name>
        <type>string</type>
        <size>&user_len;</size>
        <default/>
        <description>Description</description>
    </column>

    <index>
        <name>speed_dial_idx</name>
        <colref linkend="username"/>
        <colref linkend="domain"/>
        <colref linkend="sd_domain"/>
        <colref linkend="sd_username"/>
        <unique/>
    </index>
</table>
