Day/Night Display
$100 for guiding me in setting of some sort of visual confirmation of day night status of DAYNIGHT database on 57is.
I was able to set it up in Polycoms a while back with a lot of help by calling Polycom browser to call this script
<?php
echo ''."\n";
echo ''."\n";
exec( "asterisk -r -x 'DATABASE GET DAYNIGHT C0'", $response);
foreach( $response as $index)
echo $index . "";
echo ''."\n";
echo ''."\n";
?>
I would love somebody with aastra knowledge to post implementation and tutorial for dummies like me on how to display it on the mai phone scrren and update it every 20-30 sec.
alexis
We are in the middle of building an aastra specific endpoint manager. It does everything on the fly from the asterisk database. This includes the bility for users to change buttons on the fly and use XMl to push the config to the phone. We are also integratin all the XML script stuff that is included by Aastra. The bottom line is: It rocks! We are just finishing up the admin interface so an admin can setup standard button layouts to users before provisioning the phones for them. And we have started to build out auto-provisioning the phones so they prompt a user for their extension and VM password, and then reboot with their config. We are about 2 months away from having a finished product, but we are going to sell it for very cheap. Not sure about pricing yet, but if you use Aastra phones it will be well worth your while to buy it. We are also working on a free version to give back to the community. We just added the Day/Night XML functionality yesterday. It even queries for the particular day night function you labeled it so if you have multiple destinations, it will let you know what mode you are currently in...
Hang in there, it isn't too far away...
Rick
Done. Been waiting for an excuse to do this project...and $100 is as good of an excuse as any. Check your PM. Works on Aastra 9133i and 5i series...tested working on 9133i, 55i, 57i which I have access to. Button "Night Mode" lights up BLF when FreePBX night mode slot (definable) is in Night Mode. Phone has a message "Night Mode" on the LCD display, in addition to lit BLF. When in day mode, message goes away and BLF light goes off.
Ethan Schroeder
ethan dot schroeder at schmoozecom.com
Absolutely, once the bounty is paid. Throw a bounty at it, and I'll develop any other kind of Aasta XML app you can dream of. Unfortunately, my time isn't free, but then again, that's why there's a "bounty system"...just no bounties on my head or anything like that ;)
I'll even license it so Aastra or Trixbox can put it in the aastra-xml-scripts package.
Zip me an email with requests.
Ethan Schroeder
Ethan dot Schroeder at schmoozecom.com
rneubauer, Where will we be able to purchase/get your scripts when done?
Can you email when finished, or are you looking for any Beta sites?
Thanks
-Mike Donato
mdonato@sitetechllc.com
Dear Community,
You should throw a big "Thank You" at alexis who true to his word paid the bounty. It's people like alexis that make sure you have cool toys to deploy for you and your customers. If you use this, you should PM him and zip him $10 or $25 to help offset his expenditure.
That said, here are the instructions for obtaining and installing the Day/Night button on Aastra phones.
1.) First make sure you have the latest Aastra firmware on your phone. yum update aastra-ipphone and restart the phone(s).
2.) Download daynight.php to /var/www/html/aastra (If you don't have an aastra directory, that means you have not installed the aastra-xml-scripts package, yum install aastra-xml-scripts)
wget http://test2.schmoozecom.com/daynight.txt -O /var/www/html/aastra/daynight.php
To configure as a programmable key (9133i or 5i). If you have a 5i series phone, you can optionally skip to next set of instructions for adding a soft key instead.
a.) Go to the web interface of the phone, add a button of type XML
http://your.ip.address/aastra/daynight.php?user=$$SIPUSERNAME$$&key=prgkey6&daynight_index=0
b.) Note above, the prgkey6 and daynight_index=0 variables. You need to change prgkey6 to be whatever button number you are setting up and daynight_index=0 referrs to the FreePBX Day/Night index you chose in the web interface (0-9). Don't modify the user= variable. Aastra automatically does this substituion for you. It's probably not even necessary, but keep it there anyway.
To configure as a soft key on 5i Series (including 55i/57i/57ict):
a.) Go to the web interface of the phone, add a soft button of type XML
http://your.ip.address/aastra/daynight.php?user=$$SIPUSERNAME$$&key=softkey1&daynight_index=0
Name it "Night Mode" so the user knows that when the LED is lit, they are in Night Mode.
b.) Note above, the softkey1 and daynight_index=0 variables. You need to change softkey1 to be whatever button number you are setting up and daynight_index=0 refers to the FreePBX Day/Night index you chose in the web interface (0-9). Don't modify the user= variable. Aastra automatically does this substitution for you. It's probably not even necessary, but keep it there anyway.
Other notes:
*Buttons are not "always aware". Therefore if Day/Night mode changes outside of the phone that the button is on, the BLF will not update. It will however recover and tell you what mode it switched it to on the PBX upon pressing the button.
These "updates" are exactly the same problem as the DND button on the aastra phones. If you change the DND for that user elsewhere, the phone isn't going to update (until one of the event hooks is executed). Aastra has specifically designed "events" for this issue. The current events are "startup", "register","on hook", "offhook", "incoming", and "outgoing". These are fairly self-explanatory. It is outside the scope of these instructions to set these parameters up. Theoretically, this can update the day/night status when the phone registers, anytime there is an incoming call or outgoing call, etc, etc. There is also a theoretical way to use XML push to specific phones, but that is *way* outside the scope of these instructions.
*Programmably changing LEDs on the 9133i (and 480i) is currently impossible with the their current firmwares. Why, I do not know since they are there just like the 5i series of phones with LCD/BLF lights. When night mode is enabled on these phones, it will say "Night Mode" for the first line of the LCD. LED works on the 5i series of phones.
And remember, I love Aastra phones and will take on any future Aastra-related bounty.
Sincerely,
Ethan Schroeder
Ethan dot Schroeder at schmoozecom.com
P.S. Watch out today or tomorrow for my release of the Asterisk Voice Recognition Company Directory. Cool stuff there!
P.P.S. If you really, really need help on any of these items, email me after the FreePBX Open Telephony Training at the end of the month. I think there is one registration spot left, but that may be gone now. There's another event coming up real soon, so stay tuned. You'll see this and more cool stuff at the events.
I did get XML push working to update the status of phones automatically. It's basically a php script you would need to put on a cron. It does an HTTP post to the phone and instructs it to check it's status versus the server and update itself accordingly. As the script is "proof-of-concept", it only has support for one phone, which needs to be explicitly referenced by IP address, which key is to be updated, as well as the FreePBX Day/Night index (0-9). It wouldn't be terribly hard to adapt it for multiple phones. Message me if you want it.
Hey Ethan, I added this to the wiki:
http://www.trixbox.org/wiki/additional-scripts-and-tricks
left all credits and notes as is.
I have a 962 with the 932 side console, and I looked into it and believe it to not be possible. I even scoured their entire documentation. The Linksys just isn't configurable enough.
You would have to patch Asterisk for devstate, write some wild stuff, and do a blf+sd on the 932. It would be a major pain and probably wouldn't be worth the money you would need to throw at it
If it is important to your customer, an Aastra 55/57i + side console would probably be a better solution. We've tried to put 962/932's in for receptionist consoles, and they just didn't allow us the fine-tuned configuration that the Aastras do for Asterisk.
For the cannot display message....
First, verify I assume you have the aastra-xml-scripts package installed.
Second, tail -f /etc/httpd/logs/error_log then press the button. If you don't receive an error,
tail -f /etc/httpd/logs/access_log and press the button again. You should at least see that the phone accessed your web server. If not, you have a phone configuration issue.
Post back with your results and I'll try to help you along.
Thanks for the help ethan, it looks like I need to fly to one of your seminars.
I have the aastra-xml-scripts package installed via trixbox packages only, do not know if there are other actions which I need to take.
I guess tail means to append that to the xml button value, I did so as shown below, same result.
I have no subdirectories in /etc/httpd/ and there is a log file there that I do not know how to view.
here is my config for one test phone, the phone work great.
Nathan
Open Dental Software
Just a cog in the machine
upgrade file name: 57i.st
upgrade ip address: 192.168.0.209
aastra md5: b6607f555309f9bc55a9bcef0ae89d87
model: 57i
firmware md5: 03223a9b3ba453c9ded7933c191e3997
softkey1 line: 1
softkey2 line: 1
softkey3 line: 1
softkey4 type: xml
softkey4 label: DNITE
softkey4 value: "http://192.168.0.197/aastra/daynight.php?user=$$SIPUSERNAME$$&key=softkey4&daynight_index=0 -f /etc/httpd/logs/access_log"
softkey4 line: 1
softkey5 line: 1
softkey5 states: "connected incoming outgoing busy"
topsoftkey5 type: xml
topsoftkey5 label: NightMode
topsoftkey5 value: "http://192.168.0.197/aastra/daynight.php?user=$$SIPUSERNAME$$&key=softkey5&daynight_index=0 -f /etc/httpd/logs/error_log"
topsoftkey5 line: 1
line2 ring tone: 1
alert internal: 2
time server1: 192.168.0.197
time zone name: US-Pacific
dhcp: 0
ip: 192.168.0.109
tftp server: 192.168.0.209
sip dial plan: "x+#|xx+*|1xxxxxxxxxx"
sip auth name: 109
sip password: tmp123
sip user name: 109
sip display name: Nathan
sip screen name: Nathan
sip proxy ip: 192.168.0.197
sip proxy port: 5060
sip registrar ip: 192.168.0.197
sip registrar port: 5060
sip bla number: 109
sip intercom type: 2
sip intercom prefix code: *80
sip intercom allow barge in: 0
xml application post list: 192.168.0.197
auto resync time: 17:30
auto resync mode: 1
Try this:
tail -f /var/log/httpd/error_log
press the button, the control-C to exit
tail -f /var/log/httpd/access_log
press the button, then control-C to exit
Post the results
P.S. The next training is in Vegas in May. It's going to be awesome, and I'm hoping to have more Aastra XML applications completed by then as an exclusive for attendees!
I also noticed an error in your configuration. You have the day/night button as topsoftkey5, yet you are defining the key in the URL as softkey5. These have to match.
Also, I guess I wasn't clear about the tail -f command. You run this command from the Linux command line and it shows you the output of log files, so take that out of your configurations, run the commands on the command line and post your output.
Yeah, I will be sure to sign up if I can swing the date. the access log looks right, the error log says the daynight.php path not found or unable to stat. Well, I had saved it as daynight.txt, give me a friggin break.
I have renamed it, now try. that is FANTASTIC, nice script.
Thanks for the tip on how to look at those logs.
Nathan
Open Dental Software
Just a cog in the machine

Member Since:
2007-03-14