6731i XML Applications

gmiller001
Posts: 6
Member Since:
2009-02-24

I'm attempting to setup several of the XML applications on my Aastra 6731i phones. I'm running the current version of Trixbox with all available updates. I have gone through all of the documentation provided by Aastra regarding XML, but I can't seem to find much of anything that pertains to the 6731i phone specifically. In /var/www/html/aastra/asterisk/demo-user.prf, I do see some settings specific to the 6731i - however, these settings consume all of the programmable keys on the phone. If I understand the documentation correctly, I should be able to locate all of my XML applications under the Services key using the Global Menu application. So far, nothing I have tried will make this work completely. The closest I have come is by putting the following in my aastra.cfg file:

prgkey8 type: xml
prgkey8 value: http://192.168.101.10/aastra/menu/mymenu.php?menu_source=trixbox
xml application post list: 192.168.101.10
xml get timeout: 30
action uri registered: http://192.168.101.10/aastra/register.php?user=$$SIPUSERNAME$$
action uri incoming: http://192.168.101.10/aastra/incoming.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$
action uri onhook: http://192.168.101.10/aastra/onhook.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$
xml application title: "Applications"
xml application uri: http://192.168.101.10/aastra/menu/mymenu.php?menu_source=trixbox

The following is in my trixbox.menu file:

[RESERVED]
title=XML applications

[World Clock]
title=World Clock
info=Get the current date and time in the major cities in the world.
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/clock/clock.php
param=user

[Area Code]
title=Area Code
info=Get the list of the cities attached to a area code.
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/area/area.php

[Local Weather]
title=Local Weather
info=RSS feed to access weather for a given zip code
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/weather/weather.php
Aastra9112i=no
Aastra9133i=no
param=user

[SugarCRM]
title=SugarCRM
info=SugarCRM Contact Directory
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/asterisk/sugarCRM.php?user=$$SIPUSERNAME$$
param=user

[Parking]
title=Parking
info=Access to the parked calls on the platform
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/asterisk/park.php

[Speed Dial]
title=Speed Dial
info=Server side Speed Dial
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/directory/speed.php?user=$$SIPUSERNAME$$
param=user

Note that this configuration allows for the Services key to act strictly as an Applications key, and the only applications that show up on the phone are Area Code and Local Weather.

Does anyone have any suggestions for how I may make this work better? I do not want to have all of these apps consuming the programmable keys of the phone, if I can help it.

Thanks!



aastra1
Posts: 287
Member Since:
2006-11-06
User menu is stored in the context even if 6731i

First of all I wonder if you are using the 2.2.0 version of the XML scripts as what you put in aastra.cfg does not match the latest versions (register.php has been gone for a while also we have added the action uri poll), I suspect that you are running a pretty old version of the scripts.

This being said, you discovered a bug in mymenu.php when the phone has no softkey. With softkey phones, the user can select which XML application he wants so his choice is stored in its context file (/var/cache/aastra/xxx.context where xxx is the user extension). So you probably tried with a different menu but the phone will only display what's configured, this is why you don't see the applications you have added.

To make sure that I am right edit /var/cache/aastra/xxx.context and remove the [mymenu] entry, the other menus should show up.

Here is the fix for mymenu.php (if you are using 2.2.0)

51c51
< $config=Aastra_get_user_context($user,'mymenu');
---
> if(Aastra_is_softkeys_supported()) $config=Aastra_get_user_context($user,'mymenu');
67c67
<       $update=1;
---
>       if(Aastra_is_softkeys_supported()) $update=1;

Now let's fix your aastra.cfg again if you are using 2.2.0 (some parameters should be in MAC.cfg unless all your phones are 6731i)

prgkey8 type: xml
prgkey8 value: http://192.168.101.10/aastra/menu/mymenu.php?menu_source=trixbox&menu_user=$$SIPUSERNAME$$&user=$$SIPUSERNAME$$
xml application post list: 192.168.101.10
xml get timeout: 30
action uri registered: http://192.168.101.10/aastra/sync.php?user=$$SIPUSERNAME$$
action uri incoming: http://192.168.101.10/aastra/incoming.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$
action uri onhook: http://192.168.101.10/aastra/onhook.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$
xml application title: "Applications"
xml application uri: http://192.168.101.10/aastra/menu/mymenu.php?menu_source=trixbox&menu_user=$$SIPUSERNAME$$&user=$$SIPUSERNAME$$

By the way the 6731i does not support the custom XML menu behind the Services key, so the last 2 lines will not work.

Now for trixbox.menu

[RESERVED]
title=XML applications

[World Clock]
title=World Clock
info=Get the current date and time in the major cities in the world.
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/clock/clock.php
param=user

[Area Code]
title=Area Code
info=Get the list of the cities attached to a area code.
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/area/area.php

[Local Weather]
title=Local Weather
info=RSS feed to access weather for a given zip code
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/weather/weather.php
Aastra9112i=no
Aastra9133i=no
param=user

[SugarCRM]
title=SugarCRM
info=SugarCRM Contact Directory
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/asterisk/sugarCRM.php?user=$$SIPUSERNAME$$
param=user

[Parking]
title=Parking
info=Access to the parked calls on the platform
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/asterisk/park.php

[Speed Dial]
title=Speed Dial
info=Server side Speed Dial
uri=http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/directory/speed.php?user=$$SIPUSERNAME$$
param=user

In fact when you have param=user in the definition of a menu, the script is adding automatically the parameter to the uri using the value parsed when launched, this is why you have to add user=$$SIPUSERNAME$$ when you call the menu.

Also keep in mind that the scripts have been designed to be attached to keys, most of them will work fine as a menu but you may have problems with the XML applications that are changing the LED keys (DND, CFWD, Presence...) as the synchronization mechanism might fail.

I hope I am clear in my explanation, to fix your problem in the short term just edit the context file and delete the mymenu entry and change aastra.cfg and trixbox.menu as described but again make sure that you are running the 2.2.0 versions of the scripts.

Regards

aastra1

--

---
aastra1
Aastra XML scripts 2.3.0 now available



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.