Aastra prime rate xml applicationLast edited on Feb 25, 2012

Prime rate

I wanted to have a way of seeing the current prime rate of the National Bank Of Canada every day. Instead of having a bookmark or a RSS reader, I figured it might be useful to have that information displayed on the idle screen of my a57i phone. This application is a good example to figure out how to write an Idle screen application. I haved added the url of my application in the "Poll" field under the "Action URI" page. That way, the application is downloaded every 3600 seconds and the idle screen is then refreshed. This application also includes the current outside temperature taken from the ministry of environment webpage.



Aastra contact list xml applicationLast edited on Feb 25, 2012

Contact directory

The Aastra 571 does not provide a phonebook button. This is not a problem since this can be done with the assignment of an XML application on a soft button. My contacts are all stored in a MYSQL database. This contact list is maintained on a page on my intranet website. You can see how usefull it would be to have that list accessible on all IP phones in the house. This application will do the trick.



Aastra ALI xml applicationLast edited on Feb 25, 2012

ALI request

These are not real ALI queries but for a non-critical application, it can do just about the same. Whitepages.com provide an API for making phone lookup and reverse lookups. All you need to do is go on the site and register to get a key that will allow you to execute 1500 queries each day. Executing this application while on an active call (with the Aastra phone of course) will allow you to retrieve the address of the calling party if callerID is available. At first, I wanted to have that application executed automatically when an incomming call comes in on the phone. I know this is possible with Action URIs but I never took the time to finish this.



Aastra 411 xml applicationLast edited on Feb 25, 2012

411 directory

canada411 has changed their webpage. This script does no longer work. I will try to update it when I get more time.
This application allows you to make 411 queries directly from an Aastra phone's XML browser. Basically, all it does is prompt the user for the name of a person and the city he lives in. Then a query is made on canada411.ca and the result is parsed and displayed on the phone. Of course, if canada411 change their output format, this application may not work correctly. I assigned soft button to access this application directly from the idle screen.



SpeedTouch 780 ConfigurationLast edited on Feb 25, 2012

The speedtouch 780 is a DSL modem combined with a 4 port managed switch/router, 1 FXO and 2 FXS. One great thing about this modem is that it is possible to telnet on the device and get access to a CLI. Using the CLI, one can achieve great things with this piece of hardware.

The specs will say that the FXO is a "Full-Mode" FXO. I don't know what they mean by that, but I was very disapointed when I used it. The FXO does not register itself with a PBX. Meaning that it is impossible to use it for placing outgoing calls or to receive calls using Asterisk (for example). You can setup a dialplan (in the device) that will allow certain numbers to be dialed directly on the FXO (i.e: 911) using the FXS ONLY! The FXO can also be used as a Fallback (for the FXS only) if registration with the PBX failed. It is then impossible to use the ST780 for PSTN access with Asterisk. For that purpose, I am using a SPA3102


This is just a sample of what I have. You will find the things I found to be the most usefull.


Before configuring this, make sure no one has a lease. In this example I am adding a pool named LAN_private. The addresses will be assigned on the interface LocalNetwork. Specifying the interface is very usefull when using several VLANs.

:dhcp server lease flush
:dhcp server pool config name=LAN_private intf=LocalNetwork poolstart= poolend= gateway= leasetime=21600 primdns= secdns=


This was hard to figure out. The way I am setup, I have two different VLANs. One which is the default VLAN (untagged) and the other one is tagged with ID 3. I have a Dell PowerConnect 3348 switch which has 24 port that belong in the untagged VLAN and the other 24 in VLAN3. Traffic comming from/goint to the switch for the untagged VLAN is plugged on ethernet port 1 of the st780. Traffic for VLAN 3 is also connected to ethernet port 1. The trunk comming from the switch thus transports both VLANs. I have two different DHCP pools for each VLAN so that they can be assigned different addresses in two distinct subnets.

I don't fully understand all this. All I know is that it works. I have searched everywhere and only found bits of information about that particular setup. I figured everything out by trying different stuff until it worked and trying to understand how to connect the dots between different setup I saw on other sites. Please feel free to contact me to inform me of any mistake I did here or to give me advices.

; Create vlan #3 named vlan3
:eth vlan add name=vlan3 vid=3

;Add the OBC interface in vlan3. disabling untagging will prevent the switch from stripping 
; off the tag of the incomming frame on that interface. I think that the OBC interface is the interface
; on which the router resides. If you don't add this interface in the VLAN, you won't be able to ping to router.
:eth bridge vlan ifadd name=vlan3 intf=OBC untagged=disabled

;Add the ethernet port 1 in the vlan #3. We want to preserve the VLAN tag. Untagged frames will be assigned
; the default VLAN (VLAN ID 0)
:eth bridge vlan ifadd name=vlan3 intf=ethport1 untagged=disabled

; Unttaged egress traffic on ethport1 will be tagged with VLAN ID "default" (0)
:eth bridge ifconfig intf=ethport1 vlan=default

; Create a new ethernet logical interface
:eth ifadd intf=eth_vlan3

; frames transmitted through this interface will be tagged with vlan3
:eth ifconfig intf=eth_vlan3 dest=bridge vlan=vlan3

;enable the interface (put it up)
:eth ifattach intf=eth_vlan3

; when using this ip interface, transmit using vlan3 logical ethernet interface. I'm not sure why I have to use the group "lan".
;  if I don't use that group, it doesn't work.
:ip ifadd intf=ip_vlan3 dest=eth_vlan3 group=lan

:ip ifattach intf=ip_vlan3

; when using this subnet, use vlan3 ip interface. 
:ip ipadd intf=ip_vlan3 addr=

; Add a second DHCP pool for the 2nd vlan
:dhcp relay add name=relay_vlan3
:dhcp relay ifconfig intf=ip_vlan3 relay=enabled maxhops=4 trusted=disabled
:dhcp relay modify name=relay_vlan3 addr = intf =ip_vlan3 giaddr =

I might be wrong here, but this is the way I understand it: When a frame comes in on an ethernet interface, it VLAN ID is looked at and the frame is forwarded to every ethernet port that belongs to that VLAN. When transmitting a packet on the subnet, the IP interface ip_vlan3 will be used. ip_vlan3 uses the logical ethernet interface eth_vlan3. When a frame is transmitted on eth_vlan3, it will be tagged with VLAN vlan3. Since ethport1 is a member of vlan3, the frame will be forwarded on it.

Port Forwarding

This is one of the easyest thing. No explanation needed here

nat mapadd intf=Internet inside_addr= inside_port=5060-5062 outside_port=5060-5062


My st780 is setup to register both FXS ports on my Asterisk PBX.

; Disable the service already provided by the device
:connection appconfig application=SIP SIP_ALG=disabled
:voice config digitrelay=rfc2833 rtp_portrange=10000-10100

;FIRST: delete current profiles
:voice profile add SIP_URI=username username=username password=your_password voiceport=FXS1

; is the address of the PBX
:voice sip config useragentdomain= primproxyaddr= primregaddr=
:service system modify name=VOIP_SIP state=enabled port=5060

;allow 2000ms between each DTMF before assuming that dialing is completed.
:voice fxsport config interdigitOpen=2000 interdigit=2000

; When a call comes in on the FXO, don't forward it anywhere. You could forward it to one of the FXS, but
;  not to your PBX unfortunately 
:voice fxoport config incfxodest=none

; the voice interface should use the ip interface ip_vlan3
:voice config intf = ip_vlan3

; any number between 3 and 14 digits long must be forwarded to the PBX without being altered. If VOIP cannot be accessed, (PBX down, 
power failure, ...) use FXO
:voice dialplan add prefix=0-8 defaultport=Voip fallbackport=FXO priority=Low fallback=enabled minimumdigits=3 maximumdigits=14 posofmodify=0 remnumdigits=0 rescan=no action=none

; 911 must be forwarded on the FXO directly
:voice dialplan add prefix=911 defaultport=FXO fallbackport=FXO priority=High fallback=enabled minimumdigits=3 maximumdigits=3 posofmodify=0 remnumdigits=0 rescan=no action=none

The other day, my PBX was down. I noticed that every outgoing calls were automatically sent on the FXO instead of the PBX. This is the way I want it (because of the "fallback" option). The odd thing was that incomming calls were not forwarded from the FXO to the FXS. This is one thing I will have to figure out.