Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
borderStylesolid
titleXML Contact Example
<phonebooks>
    <contacts group_name="PBX Directory" id="0">
        <contact
            server_uuid="abcdefg123"
            id="104"
            prefix="Mr"
            first_name="Robert"
            second_name="Davis"
            last_name="Jones"
            suffix="III"
            contact_type="sip"
            organization="Digium"
            job_title="Direction Manager"
            location="East Texas"
            notes="A rapscallion"
            account_id="104"
            subscribe_to="sip:104@1.2.3.4"
            picture="https://server.example.com/photos/myphoto.png"
        >
            <emails>
                <email address="rdj@mycompany.com" label="Work" primary="1" />
            </emails>
            <actions>
                <action id="primary" dial="104" dial_prefix="800555" label="Extension" name="Office" />
                <action id="send_to_vm" dial="104" dial_prefix="" label="Voicemail" name="Dial Voicemail">
                    <headers>
                        <header key="X-Digium-Call-Feature" value="feature_send_to_vm" />
                        <header key="Diversion" value="&lt;sip:%_ACCOUNT_USERNAME_%@%_ACCOUNT_SERVER_%:%_ACCOUNT_PORT_%&gt;;reason=&quot;send_to_vm&quot;" />
                    </headers>
                </action>
             </actions>
        </contact>
     </contacts>
    <contacts group_name="Default" id="Default">
    ....
    </contacts>
    <contacts group_name="Family Members" id="anythingyouwant">
    ....
    </contacts>
</phonebooks>

...

Option

Values

Description

server_uuidstringOptional. Specifies the uuid of the server to which this contact is attached. If this is a contact on a DPMA-enabled server, this should be the same as the server_uuid of that server. If server_uuid is set for contacts, it must also be set in the DPMA general section. If it is only set in one location (contact or general) instead of both, forwarding of voicemails to contacts is not permitted.

id

string

Sets a unique identifier for the contact, used by blf_item definitions

prefix

string

Sets the prefix title for a contact, e.g. "Mr."

first_name

string

Specifies the first name for a contact

second_name

string

Specifies a second name for a contact

last_name

string

Specifies a final name for a contact

suffix

string

Sets a suffix for a contact, e.g. "Jr."

contact_type

sip, special, zap, virtual and many more

Specifies the type of contact. SIP contacts are subscribed to for device and user presence, so this type should be used for DPMA-configured contacts. Special contacts are subscribed to for device presence only, so this type should be used for all other contacts that require any state awareness. Zap contacts are Switchvox-configured DAHDI-based contacts. Virtual contacts correspond to Switchvox virtual extensions. A full listing of contact_types may be found here - http://developers.digium.com/switchvox/wiki/index.php/Extension_Types

organization

string

Sets an organization for a contact

job_title

string

Specifies a job title for a contact

location

string

Sets a location for a contact, e.g. "Las Vegas"

notes

string

Allows for provision of notes about a contact

account_id

string

If the contact is associated with a contact local to the system, the PJSIP endpoint name for a contact

subscribe_to

SIP URI

If the contact is to have a SIP subscription associated with it, the SIP URI

pictureURLSpecifies the location of the photo for the contact
Warning

Make sure to include definitions for both first_name and last_name in your contacts XML file, even if one of them is to be blank. Failure to do so will lead to irregular sorting inside the phone's Contacts application.

...

Option
Values
Description
idunique idA unique identifier for this display_rule, e.g. 0, 1, 2, etc.
action_idA valid action as defined in the phone's Contacts fileSets the action_id for the display rule to act upon
phone_stateidle, hold, transfer, incoming/transfer, incoming, connected, dialing, calling, failedDefines the state of the local phone during which the rule will be acting. If not specified in a rule, all states are matched. Note that this list of states differs from the larger list of states available for BLF key action mappings.
target_statusunknown, idle, on_hold, ringing, on_the_phone, on_hold_ringingOptional. Sets the status of the subscribed to contact that must be matched for this display rule to be in effect
showBooleanIf set to yes, shows a particular action; if set to no, hides the action. To hide an action for all states and only show it for some states, first declare the action to have a false show, then declare it to have a true show for only a particular state or states.

Voicemail Forwarding

Digium phones have a Voicemail application that allows the forwarding of voicemails to a Contact.  When a user engages the forward function from within the Voicemail application, the user is then presented with a filtered list of contacts to whom forwarding is possible.  The filtered list of contacts is defined by the set of contacts that are contained on a server with the same server_uuid as the current phone, that are of the type 'sip', 'zap', or 'virtual,' and that have an account_id that matches the target voicemail box.

Contact Photos

Digium's D80 telephone can display photos for contacts within its Rapid Dial application and Drawer as well as the photo for the phone's local user within the Navigation drawer.  Photos should be in PNG format, 150 pixels wide, and 200 pixels high.  To find the local match the D80 will compare its own account_id from its account configuration to the account_ids of its loaded contacts for a match, and display the appropriate photo.