I’m not sure that the conf file is the major issue.
I’ve been taking a look at the code this afternoon and it’s looking to me as if there may be an issue with the script looking up the daynight table in the asterisk database. If I query the database from the asterisk commandline I can see the 3 day/night indexes and their values in the database… however when the script runs, as far as I can tell it’s not returning any indexes.
In daynight.php on line 75 it makes the call
$array_night=Aastra_manage_daynight_Asterisk(‘get_all’,‘’);
but if I do a count($array_night) immediately afterwards I get 0 when I’m assuming I should get 3.
I’m going to take a closer peek at the function that’s getting called, but this is starting to ramp quickly toward the top of my programming skill level.
Add this to the top of the file and it will work. Without this then the phones fail to parse the DB for the indexes.
[ALL]
List of users having the global day/night application separated by a comma or ALL
appli=ALL
It comes down to before Aastra abandon these sample scripts they never finished the logic. I know because we had to finish all the logic on our commercial PBX customers to get it working for them with our End Point Manager.
This will atleast get it working for you but the downside is any phone with the app will be able to see and toggle all indexes. Not ideal but the app will work.
Have to do some more testing in the morning when I’m onsite, but what I found is that the daynight table in mysql was empty and that’s what seemed to be causing the script to throw the error message… I populated it with this content
mysql> select * from daynight;
±----±---------------±------+
| ext | dmode | dest |
±----±---------------±------+
| 0 | fc_description | NIGHT |
| 1 | fc_description | NIGHT |
| 2 | fc_description | NIGHT |
±----±---------------±------+
and the script seems to fire ok even without your addition to the config file. No clue if that’s the proper data or not for the SQL table… but it seems to have made things happy.