<?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[User logOFF/ON (*11/*12) does not update status (solved)]]></title><description><![CDATA[<p dir="auto">After logon (using *11 in FreePBX) buttons are not updated.</p>
<p dir="auto">If I however restart the fop2 service again, it will show correct state.</p>
<p dir="auto">Same happens when a user loggoff (with *12), I need to restart fop2 service to show correct state.</p>
<p dir="auto">Tried 'service fop2 reload', but -HUP signal does not solve this either.</p>
<p dir="auto">As of now using we use a  crontab entry like :</p>
<pre><code># For some reasons fop2 does not detect change in user logon/logoff
0,15,30,45  * * * * /sbin/service fop2 restart
</code></pre>
<p dir="auto">But this is not very nice.</p>
<p dir="auto">I am using Asterisk 1.6.1.6</p>
]]></description><link>http://localhost:4567/topic/122/user-logoff-on-11-12-does-not-update-status-solved</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 07:48:03 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/122.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Sep 2009 09:26:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to User logOFF/ON (*11/*12) does not update status (solved) on Sat, 10 Oct 2009 12:55:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi Eirik,</p>
<p dir="auto">Great you've found the root of the problem! It seems to be a FreePBX bug, it would be good to submit a patch there. I do not think it would be wise to polute fop code with workaround for bugs. It makes it hard to mantain and also less efficient. This is clearly a bug in the .agi due to Asterisk 1.6 delimiter change behaviour.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/570</link><guid isPermaLink="true">http://localhost:4567/post/570</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Sat, 10 Oct 2009 12:55:06 GMT</pubDate></item><item><title><![CDATA[Reply to User logOFF/ON (*11/*12) does not update status (solved) on Wed, 07 Oct 2009 20:21:46 GMT]]></title><description><![CDATA[<p dir="auto">After your advice, looking for ' UserDeviceAdded', in 'user_login_out.agi' <strong>fop2 seems to be OK.</strong></p>
<p dir="auto">This is what shows up on telnet to port:</p>
<pre><code>Event: UserEvent
Privilege: user,all
UserEvent: UserDeviceRemoved|Data: 378
115
</code></pre>
<p dir="auto">This is not correct as the UserEvent with data passed is all merged into one string. I guess this is the reason why why your fop2 event parser does not capture this. You might want to make your parser also to support this odd string.</p>
<p dir="auto">Code in ' 'user_login_out.agi'' is</p>
<pre><code>agi-&gt;exec("UserEvent", "\"UserDeviceRemoved|Data: {$current_user},{$device}\"");
</code></pre>
<p dir="auto">Note that pipe '|'. Asterisk seems to have broken handling of pipe '|' as delimiter. Using ',' as delimiter soved it. So this will work:</p>
<pre><code>// $agi-&gt;exec("UserEvent", "\"UserDeviceAdded|Data: {$user},{$device}\"");
    $agi-&gt;exec("UserEvent", "\"UserDeviceAdded,Data: {$user},{$device}\"");
</code></pre>
<p dir="auto">and ...</p>
<pre><code> 
$agi-&gt;exec("UserEvent", "\"UserDeviceRemoved,Data: {$current_user},{$device}\"");
</code></pre>
<p dir="auto">Thank you for your support yesterday, it helped me in the right direction.</p>
<p dir="auto">I will perform some more stress testing to verify, but for now this fixed my problems.</p>
]]></description><link>http://localhost:4567/post/569</link><guid isPermaLink="true">http://localhost:4567/post/569</guid><dc:creator><![CDATA[eirlund]]></dc:creator><pubDate>Wed, 07 Oct 2009 20:21:46 GMT</pubDate></item><item><title><![CDATA[Reply to User logOFF/ON (*11/*12) does not update status (solved) on Tue, 06 Oct 2009 22:18:20 GMT]]></title><description><![CDATA[<p dir="auto">I am using FreePBX 2.6.0.RC2.1.</p>
<p dir="auto">I will try to catch up online.</p>
<p dir="auto">I did try to bypass the problem by restarting fop2 after each user login/out with</p>
<pre><code>system("/usr/bin/sudo /sbin/service fop2 restart", $retval);
</code></pre>
<p dir="auto">inside a modified version of  user_login_out.agi, but this cause some other problem with sudo and access rigts after restart of service, and is very ugly..</p>
<p dir="auto">Is there any particular debug info I can give you ? What state messages or hints are you relying on from Asterisk to set the fop2 states ?</p>
<p dir="auto">When is the next released planned ?</p>
]]></description><link>http://localhost:4567/post/568</link><guid isPermaLink="true">http://localhost:4567/post/568</guid><dc:creator><![CDATA[eirlund]]></dc:creator><pubDate>Tue, 06 Oct 2009 22:18:20 GMT</pubDate></item><item><title><![CDATA[Reply to User logOFF/ON (*11/*12) does not update status (solved) on Sun, 04 Oct 2009 13:39:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi Eirik,</p>
<p dir="auto">Are you using trixbox? You need to add a special permission to the asterisk manager user, I believe the permission is named "hud", or you can add the "all" permission too (in /etc/asterisk/manager.conf). If you are not using trixbox, then it seems like a fop2 bug. In that case try to catch me online so I can work on the fix before releasing the next version.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/567</link><guid isPermaLink="true">http://localhost:4567/post/567</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Sun, 04 Oct 2009 13:39:36 GMT</pubDate></item></channel></rss>