<?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[Presense change question]]></title><description><![CDATA[<p dir="auto">I have a call center that uses a queue in FreePBX.  If an agent changes the presence status to anything but "Available" in FOP2, it sets the presence to Do Not Disturb.  This repesents some issues in FreePBX as to how the call is routed under my configuration.</p>
<p dir="auto">I found the options for editing the presence.js file to list different options, however, is there a way to PAUSE the agent using that availability setting instead of setting them to DND?</p>
<p dir="auto">Thanks</p>
<p dir="auto">-peter</p>
]]></description><link>https://forum.fop2.com/topic/1590/presense-change-question</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 18:43:19 GMT</lastBuildDate><atom:link href="https://forum.fop2.com/topic/1590.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Sep 2013 21:40:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Presense change question on Thu, 19 Sep 2013 10:15:38 GMT]]></title><description><![CDATA[<p dir="auto">There is a way to change behavior and use queue pauses instead of DND, by modyfing <a href="http://FOP2Callbacks.pm" rel="nofollow ugc">FOP2Callbacks.pm</a> and creating a custom context in Asterisk. It is not that simple to do, but neither that complicated. There is no standard recipe as queues and members can vary from installation to installation, and so your custom context must match your setup. Basically, in <a href="http://FOP2Callbacks.pm" rel="nofollow ugc">FOP2Callbacks.pm</a> you intercept the change presence action and instead of setting and ASTDB entry for it, you originate a call to your custom context:</p>
<p dir="auto">In <a href="http://FOP2Callbacks.pm" rel="nofollow ugc">FOP2Callbacks.pm</a> flashcommand function:</p>
<pre><code>    if($command eq "setastdb") {

        # Pause Local/xxxx@from-queue/n

        $return = "Action: Originate\r\n";
        $return .= "Channel: Local/".$parameters[2].":".$parameters[3];
        $return .= "\@custom-logpause-freepbx\r\n";
        $return .= "Application: Noop\r\n";
        $return .= "\r\n";
        push @allreturn, $return;
        return @allreturn;

</code></pre>
<p dir="auto">And your custom-logpause context in the dialplan:</p>
<pre><code>[custom-logpause-freepbx]
exten =&gt; _X.,1,Verbose(Exten ${EXTEN})
exten =&gt; _X.,n,Set(ACLIDNUM=${CUT(EXTEN,:,1)})
exten =&gt; _X.,n,Set(PAUSECODE=${CUT(EXTEN,:,2)})
exten =&gt; _X.,n,Set(MIAGENTE=Local/${ACLIDNUM}@from-queue/n)
exten =&gt; _X.,n,Verbose(MIAGENTE  = ${MIAGENTE})
exten =&gt; _X.,n,Verbose(ACLIDNUM  = ${ACLIDNUM})
exten =&gt; _X.,n,Verbose(PAUSECODE = ${PAUSECODE})
exten =&gt; _X.,n,GotoIf($[ "x${PAUSECODE}" = "x" ]?unpause)
exten =&gt; _X.,n(pause),QueueLog(NONE,NONE,${MIAGENTE},PAUSE,${PAUSECODE})
exten =&gt; _X.,n,PauseQueueMember(,${MIAGENTE},,${PAUSECODE})
exten =&gt; _X.,n,Set(DB(PAUSECUSTOM/${ACLIDNUM})=${PAUSECODE}:${EPOCH})
exten =&gt; _X.,n,Goto(end)
exten =&gt; _X.,n(unpause),QueueLog(NONE,NONE,${MIAGENTE},UNPAUSE)
exten =&gt; _X.,n,UnPauseQueueMember(,${MIAGENTE})
exten =&gt; _X.,n,NoOp(${DB_DELETE(PAUSECUSTOM/${ACLIDNUM})})
exten =&gt; _X.,n(end),Verbose(Fin log pausa)
exten =&gt; _X.,n,Hangup
</code></pre>
]]></description><link>https://forum.fop2.com/post/6879</link><guid isPermaLink="true">https://forum.fop2.com/post/6879</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Thu, 19 Sep 2013 10:15:38 GMT</pubDate></item></channel></rss>