<?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[checkdir.php]]></title><description><![CDATA[<p dir="auto">I am having an issue getting the checkdir.php to pop up a window on connect.</p>
<pre><code>function custom_popup($ALLVAR) {

    // For Asternic Tag Call
    if($ALLVAR['poptype']=="ringing") {

        // RINGING NOTIFICATION

    } else {

        // AGENT CONNECT NOTIFICATION

        $clidnum   = $ALLVAR['clidnum'];
        $clidname  = $ALLVAR['clidname'];
        $fromqueue = $ALLVAR['fromqueue'];
        $exten     = $ALLVAR['exten'];
        $clidname = base64_decode($ALLVAR['clidname']);
        $clidnum  = base64_decode($ALLVAR['clidnum']);
        file_put_contents('/tmp/popup.txt', print_r($ALLVAR, true));

        header("Content-type: text/javascript");
        echo "window.open('http://192.168.1.1/popup.php?callerid=$clidnum&amp;name=$clidname&amp;queue=$fromqueue&amp;agent=$exten')";

    }

    return 0;   // We do not want regular notifications
}
</code></pre>
<p dir="auto">I am getting the debug contents in my /tmp/popup.txt</p>
<pre><code>Array
(
    [poptype] =&gt; connect
    [clidnum] =&gt; MTUxMzMyODg0MzY=
    [clidname] =&gt; TnVyc2U6Q2VsbCBQaG9uZSAgIE9I
    [exten] =&gt; 2004
    [fromqueue] =&gt; Nurse 302
    [UNIQUEID] =&gt; 1479837388.2057
)
</code></pre>
<p dir="auto">NOTE: [fromqueue] is showing the Queue's LABEL (as defined in the button config) , is there a way to get the Queue's Extension instead</p>
<pre><code>[QUEUE/302]
type=queue
Label=Nurse 302
Extension=302
context=from-support-srvcs
</code></pre>
<p dir="auto">NOTE: that the cidname and num have not been decoded as they are a print out from the $ALLVAR[] array</p>
<p dir="auto">I was hoping that this would pop up in my minibrowser plugin like when i add the popup url to the preferences section.</p>
<pre><code>http://192.168.1.1/popup.php?callerid=#{CLIDNUM}&amp;callername=#{CLIDNAME}&amp;UNIQUEID=#{UNIQUEID}&amp;QUEUE=#{FROMQUEUE}&amp;AGENT=#{EXTEN}
</code></pre>
<p dir="auto">I switched from adding the info in the fop panel preferences URL POPUP because I am unable to get the Extension number that took the call to be passed and i need to be able to pass that to my popup.php</p>
<p dir="auto">here is the output i am getting when using the popupurl in preferences<br />
Array<br />
(<br />
[callerid] =&gt; 18885551212<br />
[callername] =&gt; Nurse:Cell Phone   OH<br />
[UNIQUEID] =&gt; 1479837733.2063<br />
[QUEUE] =&gt; Nurse 302<br />
[AGENT] =&gt; undefined<br />
)</p>
<p dir="auto">As you can see in this example there is no EXTEN variable getting saved.</p>
<p dir="auto">Not sure where to go from here debug wise.</p>
<p dir="auto">~ron</p>
]]></description><link>http://localhost:4567/topic/2404/checkdir.php</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 16:36:51 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/2404.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Nov 2016 18:07:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to checkdir.php on Thu, 01 Dec 2016 22:24:04 GMT]]></title><description><![CDATA[<p dir="auto">Exten is passed only to checkdir.php, the next FOP2 release will pass it also to the configured url in preferences.</p>
]]></description><link>http://localhost:4567/post/10506</link><guid isPermaLink="true">http://localhost:4567/post/10506</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Thu, 01 Dec 2016 22:24:04 GMT</pubDate></item></channel></rss>