<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Device and User mode status updating]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">Running FreePBX 2.9.0.7 on FreePBX distro 1.86.29.55<br />
and fop2_server version 2.23</p>
]]></description><link>http://localhost:4567/topic/926/device-and-user-mode-status-updating</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 10:17:37 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/926.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Oct 2011 22:36:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Device and User mode status updating on Thu, 12 Dec 2013 00:35:44 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot..everything is fine now.<br />
Here is a code:</p>
<p dir="auto">// start replaced by Sipk;<br />
set_queue_hint($user, $device);<br />
if (version_compare(get_var("ASTVERSION"), "1.8.21.0", "ge")) {<br />
$user_event_body = ""UserDeviceAdded,Data: {$user}\\,{$device}"";<br />
} else if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {<br />
$user_event_body = ""UserDeviceAdded|Data: {$user}\,{$device}"";<br />
} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {<br />
$user_event_body = "UserDeviceAdded,"Data: {$user}\\,{$device}"";<br />
} else {<br />
$user_event_body = ""UserDeviceAdded|Data: {$user},{$device}"";<br />
}<br />
// end replaced by Sipk;</p>
<p dir="auto">// start replaced by Sipk;<br />
if(version_compare(get_var("ASTVERSION"), "1.8.21.0", "ge")) {<br />
$user_event_body = ""UserDeviceRemoved,Data: {$current_user}\\,{$device}"";<br />
} else if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {<br />
$user_event_body = ""UserDeviceRemoved|Data: {$current_user}\,{$device}"";<br />
} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {<br />
$user_event_body = "UserDeviceRemoved,"Data: {$current_user}\\,{$device}"";<br />
} else {<br />
$user_event_body = ""UserDeviceRemoved|Data: {$current_user},{$device}"";<br />
}</p>
<p dir="auto">// end replaced by Sipk;</p>
]]></description><link>http://localhost:4567/post/4087</link><guid isPermaLink="true">http://localhost:4567/post/4087</guid><dc:creator><![CDATA[sipk]]></dc:creator><pubDate>Thu, 12 Dec 2013 00:35:44 GMT</pubDate></item><item><title><![CDATA[Reply to Device and User mode status updating on Wed, 11 Dec 2013 03:39:29 GMT]]></title><description><![CDATA[<p dir="auto">It was fixed in 2.11</p>
<p dir="auto"><a href="http://code.freepbx.org/viewrep/FreePBX_SVN/modules/branches/2.11/core/agi-bin/user_login_out.agi?r1=&amp;r2=16285" rel="nofollow ugc">http://code.freepbx.org/viewrep/FreePBX ... =&amp;r2=16285</a></p>
<p dir="auto">Shows the changes made, you should be able to use those changes on any version.</p>
]]></description><link>http://localhost:4567/post/4086</link><guid isPermaLink="true">http://localhost:4567/post/4086</guid><dc:creator><![CDATA[wtsexton]]></dc:creator><pubDate>Wed, 11 Dec 2013 03:39:29 GMT</pubDate></item><item><title><![CDATA[Reply to Device and User mode status updating on Sat, 07 Dec 2013 02:50:57 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Got it working by modifying the agi.</p>
<p dir="auto">Seems when they switched to 1.8 in the distro they neglected to update the agi scripts.</p>
</blockquote>
<p dir="auto">I have the same problem and asterisk/freepbx versions<br />
what exactly did you modifyed in agi?</p>
<p dir="auto">I'm trying to do this:</p>
<p dir="auto">set_hint($user, $new_devices);<br />
if(version_compare(get_var("ASTVERSION"), "1.6.1", "ge")) {<br />
$user_event_body = ""UserDeviceAdded|Data: {$user}\,{$device}"";<br />
} else if(version_compare(get_var("ASTVERSION"), "1.6.0", "ge")) {<br />
$user_event_body = "UserDeviceAdded,"Data: {$user}\\,{$device}"";<br />
} else {<br />
$user_event_body = ""UserDeviceAdded|Data: {$user},{$device}"";<br />
}<br />
//Added for FOP2 by<br />
$user_event_body = ""UserDeviceAdded,Data: {$user}\\,{$device}"";</p>
<pre><code>$agi-&gt;exec("UserEvent", $user_event_body);
</code></pre>
<p dir="auto">but still have the problem.</p>
]]></description><link>http://localhost:4567/post/4085</link><guid isPermaLink="true">http://localhost:4567/post/4085</guid><dc:creator><![CDATA[sipk]]></dc:creator><pubDate>Sat, 07 Dec 2013 02:50:57 GMT</pubDate></item><item><title><![CDATA[Reply to Device and User mode status updating on Tue, 18 Oct 2011 17:51:24 GMT]]></title><description><![CDATA[<p dir="auto">Got it working by modifying the agi.</p>
<p dir="auto">Seems when they switched to 1.8 in the distro they neglected to update the agi scripts.</p>
]]></description><link>http://localhost:4567/post/4084</link><guid isPermaLink="true">http://localhost:4567/post/4084</guid><dc:creator><![CDATA[wtsexton]]></dc:creator><pubDate>Tue, 18 Oct 2011 17:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to Device and User mode status updating on Tue, 18 Oct 2011 03:10:29 GMT]]></title><description><![CDATA[<p dir="auto">There is a bug in the user_login_out.agi in FreePBX that sents an incorrectly formatted UserEvent. I am not sure if that bug was fixed. The problem has to do with Asterisk versions and the way you must format parameters, the version comparison is incorrect and sends 1.4 format over asterisk 1.8.</p>
<p dir="auto">Look at the last posts in this thread:</p>
<p dir="auto"><a href="http://forum.fop2.com/esotalk/index.php/129&amp;p=519&amp;hilit=out.agi#p476" rel="nofollow ugc">View Post 129&amp;p=519&amp;hilit=out.agi#p476</a></p>
]]></description><link>http://localhost:4567/post/4083</link><guid isPermaLink="true">http://localhost:4567/post/4083</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 18 Oct 2011 03:10:29 GMT</pubDate></item></channel></rss>