<?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[Presence box DND integration plugin code suggestion]]></title><description><![CDATA[<p dir="auto">Here's recommended code for <a href="http://presencedndfpbx.pl" rel="nofollow ugc">presencedndfpbx.pl</a> (I apologize if this is not the place for this).</p>
<p dir="auto">Added devstate stuff to trigger BLF keys, etc.</p>
<pre><code># For setting DND
$Client_Pre_Command_Handler{'presencedndfpbx'}{'setastdb'} = sub {
    my @allreturn = ();
    my $origen   = shift;
    my $destino  = shift;
    my $contexto = shift;
    my $socket   = shift;
    my $return   = '';
    my ($key,$exten,$data) = split(/~/,$destino);
    if($key eq "fop2state") {
        if($data ne "") {
            $return  = "Action: DBPut\r\n";
            $return .= "Family: DND\r\n";
            $return .= "Key: $exten\r\n";
            $return .= "Val: YES\r\n";
            $return .= "\r\n";
            push @allreturn, $return;

            $return  = "Action: Command\r\n";
            $return .= "Command: devstate change Custom:DEVDND$exten BUSY\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
            $return  = "Action: Command\r\n";
            $return .= "Command: devstate change Custom:DND$exten BUSY\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
        } else {
            $return  = "Action: DBDel\r\n";
            $return .= "Family: DND\r\n";
            $return .= "Key: $exten\r\n";
            $return .= "\r\n";
            push @allreturn, $return;

            $return  = "Action: Command\r\n";
            $return .= "Command: devstate change Custom:DEVDND$exten NOT_INUSE\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
            $return  = "Action: Command\r\n";
            $return .= "Command: devstate change Custom:DND$exten NOT_INUSE\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
        }
    }
    return @allreturn;
};
</code></pre>
]]></description><link>http://localhost:4567/topic/1719/presence-box-dnd-integration-plugin-code-suggestion</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 07:48:35 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/1719.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Feb 2014 22:28:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Presence box DND integration plugin code suggestion on Thu, 13 Feb 2014 14:39:32 GMT]]></title><description><![CDATA[<p dir="auto">Thank you! The plugin was updated with these changes.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/7447</link><guid isPermaLink="true">http://localhost:4567/post/7447</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Thu, 13 Feb 2014 14:39:32 GMT</pubDate></item></channel></rss>