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.
Download
411.tar
Personal Directory
An annoying thing with that phone is that it is impossible to provision the phone directory automatically.
The good thing is, you can fill the list from the web page of the phone. So then, with wireshark I looked
at how this information is posted. All you need is the following script that will simulate a browser submitting
the list of numbers. You might wanna check the list of input fields ID, I am not sure if they will be the same
on each devices depending on firmware version.
$fields = Array("43311","43503","43439","44655","44591","44783","44719","44911","44847","45039",
"44975","44143","44079","44271","44207","44399","44335","44527","44463","37487","37423","37615",
"37551","37743","37679","37871","37807","36975","36911","37103","37039","37231","37167","37359",
"37295","38511","38447","38639","38575","38767","38703","38895","38831","37999","37935","38127",
"38063","38255","38191","38383","38319","39535","39471","39663","39599","39791","39727","39919",
"39855","39023","38959","39151","39087","39279","39215","39407","39343","40559","40495","40687",
"40623","40815","40751","40943","40879","40047","39983","40175","40111","40303","40239","40431",
"40367","33391","33327","33519","33455","33647","33583","33775","33711","32879","32815","33007",
"32943","33135","33071","33263","33199","34415");
$conn = mysql_connect("localhost","username","password");
mysql_select_db("dbname");
$query = "SELECT * FROM phonebook ORDER BY name;";
$result = mysql_query($query);
$i=0;
$list="";
$n = mysql_num_rows($result);
while ($record = mysql_fetch_assoc($result)) {
$name = $record['name'];
$phone = $record['phone'];
$name = urlencode($name);
$phone=urlencode($phone);
$field = $fields[$i];
$list .= "$field=n%3D$name%3Bp%3D$phone";
$i++;
if ($i<$n) $list .= "&";
}
system("wget --post-data '$list' http://192.168.0.107/pdir.spa -t 1");
Executing that script will fetch all entries in the mysql server and post them on the phone located at 192.168.0.107
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.
Download
aastraphonebook.tar