Copyright 2010-2017 Obihai Technology, Inc.
185
OBiPhone XML Applications
With a proprietary XML-formatted scripting language, OBi1000 series IP Phones expose an API to allow third party
developers to create apps (i.e. small utility applications) to be downloaded and executed on the phones. We refer to
this scripting language as the OBiPhone XML. On the surface the syntax of this language is very similar to those
supported by other brands of IP phones. In fact it is more than likely that scripts writtern for these other phones can
run as-is on the OBi1000 to produce similar results. At a deeper level, however, OBiPhone XML encompasses rich
syntaxes that put a lot of the features available specifically on the OBi1000 phones at the fingertips of the XML App
developers.
Although an XML App may be implemented as a single XML script, it typically includes multiple scripts that are executed
in sequence to achieve the desired behavior. The execution of an app starts with the first XML script (a.k.a. the
“landing” script). Depending on the interaction with the user and other related events happending on the phone,
further scripts will be invoked and executed and, eventually, the app exits. The server where the scripts are generated
or stored is referred to as the (XML) App Server.
There are two models in which the phone starts the execution of an XML app: a) The pull model where the phone pulls
the landing script from a pre-configured URL triggered by some event on the phone (such as user pressing a feature
key), and b) The push model where the App Server pushes the script to the phone for execution. The method
supported by the phone for pulling is HTTP/HTTPS GET. The method supported by the phone for pushing is SIP Notify
with the Event: obixml and Content-Type: application/obixml.
Action URLs
–
Pull Model
The OBi1000 phones support the pull model by accepting the configuration of the app URL into the phone to associate
with a soft key or a feature key, such that when the key is pressed, the corresponding script will be downloaded from
the given URL and executed. To be specific, this URL is called an Action URL.
Action URL Feature Key
To invoke an Action URL with a feature key, the feature must be setup with the function
Action URL
, and the URL
of the landing script must be specified in the Number field of that feature key. The Name field of the feature may also
be configured with a friendly name to be displayed on screen to identify the functionality of the script. For example:
-
Function =
Action URL
-
Number =
http://xmlapp-
server.obihai.com:8080/xml/testmain.xml?user=jsmith&model=1032
-
Name =
Main Menu
Action URL Soft Key
To invoke an Action URL with a soft key, include a soft key with the id
acturl
in a soft key set parameter, with the
URL specified in a url attribute. For example, the default Home soft key set is:
redial,cfa,dnd,missed|lines
. We can replace the 4
th
soft key with an action url (all one
–
line):
redial,cfa,dn
d,acturl;url=”http://10.1.1.123/test.xml?user=abc&model=1032”;label=”Main
Menu”
Note that the value of the url attribute MUST be XML-escapled (e.g. & must be specified as &)
SIP Notify
–
Push Model
As it is typically not feasible for the App Server to send HTTP requests to the phone, OBi1000 only accepts server
pushed XML via SIP NOTIFY requests sent to it over one of the enabled SP
n
service channel. The SIP NOTIFY must have
the Event: obixml with the Content-Type: application/obixml.