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

A

AkkerKid

@AkkerKid
Unfollow Follow
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Checkdir.php Load page on 'answer' instead of 'ringing'
    A AkkerKid
    Support

    It's still not working. I turned on "Event When Called:" and edited my checkdir.php to show the following:

    <?php
    require_once('config.php');
    function custom_popup($ALLVAR) {
    // For Asternic Tag Call
    if($ALLVAR['poptype']=="onconnect") {
    // RINGING NOTIFICATION
    $clidnum = $ALLVAR['clidnum'];
    $poptype = $ALLVAR['poptype'];
    $clidnum = base64_decode($ALLVAR['clidnum']);
    header("Content-type: text/javascript");
    echo "window.open('http://OurSugarCrmServer/crm/AsteriskSugDir.php?&search=$clidnum');\n";
    } else {}
    return 0;
    }
    exit;
    ?>

    The subtext of Event When Called is "When this option is set to YES, the following manager events will be generated: AgentCalled, AgentDump, AgentConnect and AgentComplete." So I also tried "AgentConnect" in the IF statement where "onconnect" is thinking maybe my Trixbox server uses non-standard outputs. That didn't work either. Also, when I make changes in this file, should I restart the server or will the changes take effect as soon as I save?


  • Checkdir.php Load page on 'answer' instead of 'ringing'
    A AkkerKid
    Support

    I'm trying to set FOP2 up so that only when a call is picked up, it'll open a certain web page. Currently the contents of the file are as follows:
    <?php
    require_once('config.php');
    function custom_popup($ALLVAR) {
    $clidnum = $ALLVAR['clidnum'];
    $clidname = $ALLVAR['clidname'];
    $fromqueue = $ALLVAR['fromqueue'];
    $exten = $ALLVAR['exten'];
    $poptype = $ALLVAR['poptype'];
    $clidname = base64_decode($ALLVAR['clidname']);
    $clidnum = base64_decode($ALLVAR['clidnum']);
    header("Content-type: text/javascript");
    echo "window.open('http://OurSugarCrmServer/crm/AsteriskSugDir.php?&search=$clidnum');\n";
    return 0; // We still want regular notifications
    }
    $ret = custom_popup($_GET);
    exit;
    Header( "X-JSON: ({ 'clidnum': '$clidnum', 'clidname': '$clidname', 'picture': '$picture', 'queue': '$fromqueue' })");
    ?>

    I'm no PHP coder, so I don't really know what to do at this point. I've tried changing the "If" section that was there from
    if($ALLVAR['poptype']=="ringing") {
    to
    if($ALLVAR['poptype']=="answered") {

    Of course it wasn't that easy. :roll:
    So instead I just got rid of that statement and created this line to help me figure out what other 'poptype' values there were:
    echo "window.open('http://$poptype');\n";
    That didn't do anything for me.
    I'm thinking I'll have to go further up the code tree to find whatever activates the checkdir.php file and set it to only use it when the call is answered instead of when it's ringing. I'm thinking that'll be the swf on the client though... Any Ideas?
    Thanks!
    --AkkerKid

  • 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