Aastra Telecom XML scripts for Trixbox
Version 1.1
All files in this distribution are Copyright 2007 Aastra Telecom Ltd unless otherwise specified.

The scripts are only intended to illustrate the functionality available 
using XML with the range of Aastra Telecom IP phones and come with no warranty.
See License.txt for License Agreement information.

www.aastratelecom.com


Table of Contents
-----------------
1. Installing the Aastra XML scripts RPM
2. XML script features
	Voice Mail - vmail.php
	DND Server Side (do not disturb) - dnd.php
	Call forward Server Side - cfwd.php
	Directory of phones registered on trixbox - directory.php
	SugarCRM directory - sugarCRM.php
	Speed Dial - speed.php
	Call Park - park.php
	RSS feeds - rss.php
	Horoscope - horoscope.php
	Ask Google - google.php
	Stock Quotes - stock.php
	Local Weather - weather.php
	World Clock - clock.php

3. Sample configuration files
	480i, 480i CT, 55i, 57i and 57iCT
	9133i
	53i
 
1. Installing the Aastra Telecom XML scripts RPM.
-------------------------------------------------

Download and install the rpm from trixbox.org using yum:

  yum install aastra-xml-scripts

Alternatively receive the update using the trixbox package manager.

 
2. XML script features
----------------------

XXXXXXXXXXXXX is the IP address or the name of your Trixbox
The XML applications can be configured as a key on the phone or as a menu accessible through the 
"Services" key (480i/480iCT/55i/57i/57iCT).

Voice Mail
++++++++++
The visual voice mail feature displays the current voice messages currently stored by Asterisk 
Mail. The User has the ability to delete, view the details or play the message using the XML 
browser. This application is not available on the 9112i/9933i/53i.
    uri		http://XXXXXXXXXXXXX/aastra/vmail.php?ext=$$SIPUSERNAME$$
    configuration	softkey (state idle)

DND Server Side
+++++++++++++++
The User can set and unset the do not disturb feature on the server using softkeys on the phone.
When DND is set server side, the call is never presented to the Phone.
    uri		http://XXXXXXXXXXXXX/aastra/dnd.php?user=$$SIPUSERNAME$$&key=YYYYYY
			where YYYYY is the name of the key (example: softkey3 for 480i/480iCT/55i/57i/57iCT
			prgkey2 for 9133i/53i)
    configuration	softkey (state idle)


Call forward Server Side
++++++++++++++++++++++++
The User can set and unset call forwarding on the server using softkeys on the phone.
When CFWD is set server side, the call is never presented to the Phone
    uri		http://XXXXXXXXXXXXX/aastra/cfwd.php?user=$$SIPUSERNAME$$&key=YYYYYY
			where YYYYY is the name of the key (example: softkey3 for 480i/480iCT/55i/57i/57iCT
			prgkey2 for 9112i/9133i/53i)
    configuration	softkey (state idle)

Directory
+++++++++
The Directory feature lists all the users currently registered on the trixbox.
Selecting a member from the directory will call that extension.
This application is not available for 9112i/9133i and on the 53i, you must go off-hook or press "Enter" 
to dial the selected number.
    uri		http://XXXXXXXXXXXXX/aastra/directory.php
    configuration	softkey (state idle/connected) or menu

SugarCRM Directory
++++++++++++++++++
The SugarCRM directory feature allows a search of the contacts stored in the SugarCRM database and 
then call them.
This application is not available for 9112i/9133i and on the 53i, you must go off-hook or press "Enter"
to dial the selected number.
    uri		http://XXXXXXXXXXXXX/aastra/sugarCRM.php
    configuration	softkey (state idle/connected) or menu

Speed Dial
++++++++++
This application allows the user to store 15 names with 4 numbers attached to each name in 
order to quickly dial the contact. The data are stored on the server.
This application is not available for 9112i/9133i/53i.
    uri		http://XXXXXXXXXXXXX/aastra/speed.php
    configuration	softkey (state idle/connected) or menu

Call Park
+++++++++
The Call Park feature lists all calls currently in the parking lot. Selecting the 
call in parking lot will retrieve the call.
Call Park must be correctly set up on both the server and phone to use this feature.
This application is not available for 9112i/9133i and on the 53i, you must go off-hook or press "Enter"
to dial the selected number.
    uri		http://XXXXXXXXXXXXX/aastra/park.php
    configuration	softkey (state idle)

RSS feeds
+++++++++
This application allows you to read any RSS feed from the Web. Each RSS feed is configured in a 
configuration file. Some sample files are provided for CNN, ESPN, rssweather.com and others. To 
avoid too much internet traffic, the data are cached on the server. You can easily add other RSS 
feeds by creating a configuration file, "sample.rss" file contains details on the parameters to 
configure.
    uri		http://XXXXXXXXXXXXX/aastra/rss.php?source=YYYYY
			where YYYYY is the RSS feed you want to see configured in a .rss config file
    configuration	menu
			softkey (state any)

Horoscope
+++++++++
This application provides a weekly horoscope provided by www.dailyhoroscope.com. The data are cached 
on the server.
    uri		http://XXXXXXXXXXXXX/aastra/horoscope.php
    configuration	menu
			softkey (state any)

Ask Google
++++++++++
Just ask a question to Google and get the most relevant answer. Go to http://www.google.com/sms
for more details. Movie schedules, translation, weather, area code, flight status...
exemple "AA 048" to get flight status of American Airlines flight 48
        "972" to get the cities covered by area code 972
        "translate bread in French"
        "1 euro in USD"
        ...
    uri		http://XXXXXXXXXXXXX/aastra/google.php
    configuration	menu
			softkey (state any)

Stock Quotes
++++++++++++
This application allows the user to lookup the value of your favorite stocks. The last request 
is stored on the server.
    uri		http://XXXXXXXXXXXXX/aastra/stock.php
    configuration	menu
			softkey (state any)

Local Weather
+++++++++++++
This application allows the get the weather forecast of any city identified by its zip code. The
last request is stored on the server.
    uri		http://XXXXXXXXXXXXX/aastra/weather.php
    configuration	menu
			softkey (state any)


World Clock
+++++++++++
This application allows the user to access to 140 cities worldwide. This application is not 
available for 9112i/9133i/53i.
    uri		http://XXXXXXXXXXXXX/aastra/clock.php
    configuration	menu
			softkey (state any)
 
Action URI scripts
++++++++++++++++++
In addition the action URI scripts onhook.php and register.php are used to enhance the
functionality of the other scripts.


3.Sample Configuration Files
----------------------------

Sample configuration file for Aastra 480i, 480i CT, 55i, 57i and 57i CT
-----------------------------------------------------------------------

XXXXXXXXXXXXX is the IP address or the name of your Trixbox
The XML applications menu will show up when you press the "Services" key or softkey.

# XML services
xml application URI: http://XXXXXXXXXXXXX/aastra/menu.php?source=all
xml application post list: XXXXXXXXXXXXX
xml application title: XML Applications

# Action URI
action uri registered: http://XXXXXXXXXXXXX/aastra/register.php?user=$$SIPUSERNAME$$&dndkey=softkey5&cfkey=softkey4
action uri incoming: http://XXXXXXXXXXXXX/aastra/incoming.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$
action uri onhook: http://XXXXXXXXXXXXX/aastra/onhook.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$

# Softkeys
softkey1 type: xml
softkey1 label: Directory
softkey1 value: http://XXXXXXXXXXXXX/aastra/directory.php
softkey1 states: idle connected

softkey2 type: xml
softkey2 label: Contacts
softkey2 value: http://XXXXXXXXXXXXX/aastra/sugarCRM.php
softkey2 states: idle connected

softkey3 type: xml
softkey3 label: Speed Dial
softkey3 value: http://XXXXXXXXXXXXX/aastra/speed.php
softkey3 states: idle connected

softkey4 type: xml
softkey4 label: Call Fwd
softkey4 value: http://XXXXXXXXXXXXX/aastra/cfwd.php?user=$$SIPUSERNAME$$&key=softkey4
softkey4 states: idle

softkey5 type: xml
softkey5 label: DND
softkey5 value: http://XXXXXXXXXXXXX/aastra/dnd.php?user=$$SIPUSERNAME$$&key=softkey5
softkey5 states: idle

softkey6 type: xml
softkey6 label: Parkd Calls
softkey6 value: http://XXXXXXXXXXXXX/aastra/park.php
softkey6 states: idle

softkey7 type: xml
softkey7 label: Voice Mail
softkey7 value: http://XXXXXXXXXXXXX/aastra/vmail.php?ext=$$SIPUSERNAME$$
softkey7 states: idle

softkey8 type: xml
softkey8 label: Ask Google
softkey8 value: http://XXXXXXXXXXXXX/aastra/google.php

softkey9 type: xml
softkey9 label: Weather
softkey9 value: http://XXXXXXXXXXXXX/aastra/weather.php


Sample configuration file for Aastra 9133i
------------------------------------------

XXXXXXXXXXXXX is the IP address or the name of your Trixbox

# Action URI
action uri registered: http://XXXXXXXXXXXXX/aastra/register.php?user=$$SIPUSERNAME$$

# System Softkeys
prgkey1 type: park
prgkey1 value: asterisk;70
# 70 is the extension number of the "parking lot" configurable with freePBX.

prgkey2 type: xml
prgkey2 value: http://XXXXXXXXXXXXX/aastra/cfwd.php?user=$$SIPUSERNAME$$

prgkey3 type: xml
prgkey3 value: http://XXXXXXXXXXXXX/aastra/dnd.php?user=$$SIPUSERNAME$$

prgkey4 type: xml
prgkey4 value: http://XXXXXXXXXXXXX/aastra/google.php

prgkey5 type: xml
prgkey5 value: http://XXXXXXXXXXXXX/aastra/weather.php


Sample configuration file for Aastra 53i
------------------------------------------

XXXXXXXXXXXXX is the IP address or the name of your Trixbox

# Action URI
action uri registered: http://XXXXXXXXXXXXX/aastra/register.php?user=$$SIPUSERNAME$$&dndkey=prgkey5&cfkey=prgkey4

# System Softkeys
prgkey3 type: park
prgkey3 value: asterisk;70
# 70 is the extension number of the "parking lot" configurable with freePBX.

prgkey4 type: xml
prgkey4 value: http://XXXXXXXXXXXXX/aastra/cfwd.php?user=$$SIPUSERNAME$$&key=prgkey4

prgkey5 type: xml
prgkey5 value: http://XXXXXXXXXXXXX/aastra/dnd.php?user=$$SIPUSERNAME$$&key=prgkey5

prgkey6 type: xml
prgkey6 value: http://XXXXXXXXXXXXX/aastra/directory.php