Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. checkdir.php

checkdir.php

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 284 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    R
    rhartmann
    wrote on last edited by
    #1

    I am having an issue getting the checkdir.php to pop up a window on connect.

    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&name=$clidname&queue=$fromqueue&agent=$exten')";
    
        }
    
        return 0;   // We do not want regular notifications
    }
    

    I am getting the debug contents in my /tmp/popup.txt

    Array
    (
        [poptype] => connect
        [clidnum] => MTUxMzMyODg0MzY=
        [clidname] => TnVyc2U6Q2VsbCBQaG9uZSAgIE9I
        [exten] => 2004
        [fromqueue] => Nurse 302
        [UNIQUEID] => 1479837388.2057
    )
    

    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

    [QUEUE/302]
    type=queue
    Label=Nurse 302
    Extension=302
    context=from-support-srvcs
    

    NOTE: that the cidname and num have not been decoded as they are a print out from the $ALLVAR[] array

    I was hoping that this would pop up in my minibrowser plugin like when i add the popup url to the preferences section.

    http://192.168.1.1/popup.php?callerid=#{CLIDNUM}&callername=#{CLIDNAME}&UNIQUEID=#{UNIQUEID}&QUEUE=#{FROMQUEUE}&AGENT=#{EXTEN}
    

    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

    here is the output i am getting when using the popupurl in preferences
    Array
    (
    [callerid] => 18885551212
    [callername] => Nurse:Cell Phone OH
    [UNIQUEID] => 1479837733.2063
    [QUEUE] => Nurse 302
    [AGENT] => undefined
    )

    As you can see in this example there is no EXTEN variable getting saved.

    Not sure where to go from here debug wise.

    ~ron

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Exten is passed only to checkdir.php, the next FOP2 release will pass it also to the configured url in preferences.

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      Powered by NodeBB Contributors
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups