PbxTableUsers

The PbxTableUsers protocol is available on AppWebsocket connections to innovaphone PBX objects, if the object is enabled for the TableUsers. It allows the App to replicate the User Objects from the PBX using the Replicator.

General structure

{
    "api": "PbxTableUsers",
    "src": string,
    "mt": string,
    }

api
To address this interface the value "PbxTableUsers" has t0 be used for the api property
src
The AppWebsocket src mechanism is supported on the interface. So a src property may be used
mt
The message type identifies the requested operation

In general operatios are performed by sending a message with a message type <name> to the PBX. The result is retured with a message with message type <name>Result.

Replicator Messages Tables Examples

Tables

users

Table with the user data

ReplicationStringguidGlobally unique identifier
ReplicationStringh323Username
ReplicationStringpwdPassword
ReplicationStringcnCommon name
ReplicationStringdnDisplay name
ReplicationStringapps-myList of the apps displayed on the home screen
ReplicationStringconfigConfig template
ReplicationStringnodeNode
ReplicationStringlocLocation
ReplicationBoolhideHide from LDAP
ReplicationStringe164Phone number
ReplicationTristatecfprCall forward based on Presence
ReplicationTristatet-cfprCall forward based on Presence inherited from the config template
ReplicationStringpseudoPseudo information of the object
ReplicationBoolh323-emailIf true, the email is the username
ReplicationStringappsList of the apps that the user has rights to access
ReplicationBoolfaxIf true, the user has a fax license

emails

Table with the emails of the users

ReplicationStringemailEmail

allows

Table with the visibility filters defined for the user

ReplicationStringnameFilter name
ReplicationStringgrpIf true, the name is a group name
ReplicationBoolvisibleVisible
ReplicationBoolonlineOnline
ReplicationBoolpresencePresence
ReplicationBoolotfOn the phone
ReplicationBoolnotePresence note
ReplicationBooldialogCalls
ReplicationBoolidsCalls with id

t-allows (depricated)

Table with the visibility filters defined on the config templates. Do not use anymore, this does not work together with the new replication alogoritm, which only replicates changes after reconnect.

ReplicationStringnameFilter name
ReplicationStringgrpIf true, the name is a group name
ReplicationBoolvisibleVisible
ReplicationBoolonlineOnline
ReplicationBoolpresencePresence
ReplicationBoolotfOn the phone
ReplicationBoolnotePresence note
ReplicationBooldialogCalls
ReplicationBoolidsCalls with id

grps

Table with the users groups

ReplicationStringnameGroup name
ReplicationStringmodeMode
ReplicationStringdynDynamic

devices

Table with the users devices

ReplicationStringhwHardware ID
ReplicationStringtextName
ReplicationStringappApp
ReplicationBooladminPBX Pwd
ReplicationBoolno-filterNo IP Filter
ReplicationBooltlsTLS only
ReplicationBoolno-mobNo Mobility
ReplicationBooltrustedReverse Proxy
ReplicationBoolsregSingle Reg.
ReplicationBoolmrMedia Relay
ReplicationStringvoipConfig VOIP
ReplicationStringgk-idGatekeeper ID
ReplicationStringprimPrimary gatekeeper

cds

Table with the users call diversions

ReplicationStringtypeDiversion type (cfu, cfb or cfnr)
ReplicationStringboolBoolean object
ReplicationBoolbool-notNot flag (boolean object)
ReplicationStringe164Phone number
ReplicationStringh323Username
ReplicationStringsrcFilters data on XML format

forks

Table with the users forks

ReplicationStringe164Phone number
ReplicationStringh323Username
ReplicationStringboolBoolean object
ReplicationBoolbool-notNot flag (boolean object)
ReplicationStringmobilityMobility object
ReplicationStringappApp
ReplicationUnsigneddelayDelay
ReplicationStringhwDevice
ReplicationBooloffDisable
ReplicationBoolcwCall-Waiting
ReplicationUnsignedminMin-Alert
ReplicationUnsignedmaxMax-Alert

wakeups

Table with the users wakeups

ReplicationUnsignedhHour
ReplicationUnsignedmMinute
ReplicationUnsignedsSecond
ReplicationStringname
ReplicationStringnum
ReplicationUnsignedretry
ReplicationBoolmult
ReplicationUnsignedto
ReplicationStringfallback
ReplicationStringboolBoolean object
ReplicationBoolbool-notNot flag (boolean object)

Examples

ReplicateUpdate

After the user object has been edited on the PBX side, a ReplicateUpdate message is sent to the app instance including all the user object data. An example of how the message would look like is this one:


{
    "mt":"ReplicateUpdate",
    "api":"PbxTableUsers",
    "columns":
    {
        "guid":"c9ebcc5914bd5e01c8020090334106ee",
        "h323":"user0",
        "pwd":"05a14fa93ec663b04deaf54277b1eb874612793587f0b287",
        "cn":"User0",
        "apps-my":"apps,usersadmin,profile,phone,users,users2,softphone,devices,pbxmanager",
        "config":"Config",
        "node":"root",
        "loc":"master",
        "hide":false,
        "e164":"201",
        "emails":[
            {
                "email":"user0@example.com"
            }
        ],
        "allows":[
            {
                "name":"@test1.com",
                "presence":true,
                "visible":true
            },
            {
                "name":"@test2.com",
                "presence":true,
                "visible":true
            }
        ],
        "t-allows":[
            {
                "name":"@test1.com",
                "online":true,
                "presence":true,
                "visible":true
            }
        ],
        "grps":[
            {
                "name":"group1",
                "mode":"active",
                "dyn":"in"
            }
        ],
        "devices":[
            {
                "hw":"Swphone_user0",
                "text":"softphone",
                "app":"softphone",
                "tls":true,
                "sreg":true
            }
        ],
        "cds":[
            {
                "type":"cfnr",
                "bool":"booltest",
                "e164":"203"
            },
            {
                "type":"cfb",
                "h323":"test",
                "src":"<src type=\"do\"><ep ext=\"false\" fwd=\"fwd\" /></src>"
            }
        ],
        "forks":[
            {
                "e164":"9999",
                "bool":"booltest",
                "bool-not":true,
                "mobility":"Mobility",
                "delay":30,
                "hw":"Smartphone",
                "app":"rcc",
                "cw":true,
                "min":1,
                "max":10
            }
        ]
    }
}

ReplicateStart for specific object types

It is possible to replicate PBX object of other types than User Objects. Therefore a ReplicateStart message is extended by the property pseudo which is an array of types that should be replicated. In the example below the PBX objects of type Waiting Queue are replicated.


{
    "mt": "ReplicateStart",
    "api": "PbxTableUsers",
    "columns": {
        "cn": {
            "update": true
        },
        "guid": {},
        "h323": {
            "update": true
        },
        "pseudo": {
            "update": true
        }
    },
    "pseudo": [
        "waiting"
    ]
}