Reference8:PBX Configuration API

From innovaphone-wiki

Jump to: navigation, search
Image:Tools clipart.png FIXME: Work in progress, still very incomplete
Image:Tools clipart.png FIXME: Shouldn't we rather advice to use SOAP/Admin?

Starting with v6 a new Web User Interface has been implemented to configure the PBX. The same interface can be used by applications for configuration. The interface is based on the mechanism used by web forms. This means a string containing a list of named arguments is sent to the PBX and the PBX returns an XML document.

There are different ways to send the argument list to the PBX: HTTP GET, HTTP POST, SOAP.

Contents

Transport Methods

HTTP GET

The arguments are sent as part of the URL. The URL to be used has the following form:

<ip>/<PBX-Entity>/ADMIN/mod_cmd_login.xml?argument1=value1&argument2=value2&...

Example

 192.168.0.1/PBX0/ADMIN/mod_cmd_login.xml?cmd=submit-object&cn=Test&e164=111&h323=test

HTTP POST

to be done

SOAP

to be done

mod cmd

The commands can also be sent via the command processor, which can be accessed with telnet or the update script or a '!' URL on the browser. The format of the command is in this case

!mod cmd <PBX-Entity>/ADMIN <command> /argument1 value1 /argument2 value2 ...

The first argument is implicitly cmd.

Example

!mod cmd PBX0/ADMIN submit-object /cn Test /e164 111 /h323 test

Arguments

In general the sequence of the arguments is not importent except in some cases in which a list of configuration items can be sent, with each item being described by multiple arguments.

cmd

The argument cmd is used to identify which command shall be executed. Depending on the argument cmd other arguments are available.

xsl

This argument is put as reference to an XSL file into the XML file returned.

guid

Hexstring containing the GUID of an object to be changed. This argument may be ommitted only if a new object shall be created. A value of * indicates that the argument cn shall be used to identify the object instead.

cn

The Long Name of an object. Used to identify an existing object if guid is set to *

cmd=submit-object

Used to create/change/delete objects.

h323 The name of the object
e164 The number of the object
gi Configures the group for which group indications are sent to the registered endpoints
rej-ext If set to on, the Reject external Calls property is set
phone-config If set to on, the PBX stores the config for phones registered to this object
pseudo This argument defines the type of object to be set. If omitted a user object is created

pseudo=waiting

...

cmd=submit-groups

Used to change group membership configuration of a user. With a single command the complete list of group memberships is sent, which replaces the existing list of group memberships.

A single group membership is configured with the following arguments in exactly this order. For multiple group memberships this can be repeated.

grp-name Name of the group
grp-active If this argument is set to on the group membership is set to active
grp-dyn If this argument is set to in, the group membership is dynamic with preset to be in the group, if this argument is set to out the group membership is dynamic with preset to be not in the group. If this argument is missing or empty, the group membership is static
grp-add Marks the end of the group membership definition, must be present

cmd=submit-forks

Used to change forking configuration of a user. With a single command the complete list of forking destinations is sent, which replaces the existing list of forking destinatios.

A single forking destination is configured with the following arguments in exactly this order. For multiple forking destinations this can be repeated.

e164 Forking destination number
h323 Forking destination name
mobility Long Name of a mobility object associated with this forking destination
hw Device id used on SOAP to control calls with this forking destination
delay Delay for calls sent out to the forking destination
fork Indicates the end of the forking destination configuration

Examples

Change an existing Object

The command submit-object can be used to change an existing PBX Object. If you already know the guid of the object, you can use it to refer to the desired object. Otherwise use guid=* and refer to the object by using cn (known as Long Name):

 /PBX0/ADMIN/mod_cmd_login.xml?cmd=submit-object&cn=MyObjectsLongName&h323=SomeChangedName&guid=*
Personal tools