Device and User mode status updating
I've got a number of devices and users set up for adhoc which all appear to be working. Phone monitoring extensions show the extensions when logged in and not when not logged in. However FOP2 will only show the changes if the daemon is restarted each time someone logs in or out. Looking for a little guidance on what to look for.
Running FreePBX 2.9.0.7 on FreePBX distro 1.86.29.55
and fop2_server version 2.23
Running FreePBX 2.9.0.7 on FreePBX distro 1.86.29.55
and fop2_server version 2.23
Comments
Look at the last posts in this thread:
View Post 129&p=519&hilit=out.agi#p476
Seems when they switched to 1.8 in the distro they neglected to update the agi scripts.
I have the same problem and asterisk/freepbx versions
what exactly did you modifyed in agi?
I'm trying to do this:
set_hint($user, $new_devices);
if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {
$user_event_body = "\"UserDeviceAdded|Data: {$user}\\,{$device}\"";
} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {
$user_event_body = "UserDeviceAdded,\"Data: {$user}\\\\,{$device}\"";
} else {
$user_event_body = "\"UserDeviceAdded|Data: {$user},{$device}\"";
}
//Added for FOP2 by
$user_event_body = "\"UserDeviceAdded,Data: {$user}\\\\,{$device}\"";
$agi->exec("UserEvent", $user_event_body);
but still have the problem.
http://code.freepbx.org/viewrep/FreePBX ... =&r2=16285
Shows the changes made, you should be able to use those changes on any version.
Here is a code:
// start replaced by Sipk;
set_queue_hint($user, $device);
if (version_compare(get_var("ASTVERSION"), "1.8.21.0", "ge")) {
$user_event_body = "\"UserDeviceAdded,Data: {$user}\\\\,{$device}\"";
} else if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {
$user_event_body = "\"UserDeviceAdded|Data: {$user}\\,{$device}\"";
} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {
$user_event_body = "UserDeviceAdded,\"Data: {$user}\\\\,{$device}\"";
} else {
$user_event_body = "\"UserDeviceAdded|Data: {$user},{$device}\"";
}
// end replaced by Sipk;
// start replaced by Sipk;
if(version_compare(get_var("ASTVERSION"), "1.8.21.0", "ge")) {
$user_event_body = "\"UserDeviceRemoved,Data: {$current_user}\\\\,{$device}\"";
} else if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {
$user_event_body = "\"UserDeviceRemoved|Data: {$current_user}\\,{$device}\"";
} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {
$user_event_body = "UserDeviceRemoved,\"Data: {$current_user}\\\\,{$device}\"";
} else {
$user_event_body = "\"UserDeviceRemoved|Data: {$current_user},{$device}\"";
}
// end replaced by Sipk;