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. Variable BLINDTRANSFER is empty

Variable BLINDTRANSFER is empty

Scheduled Pinned Locked Moved Support
7 Posts 2 Posters 149 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.
  • S
    S
    secathor
    wrote on last edited by
    #1

    Does it exist an solution for this ?

    When we do an blind transfer from the phone, Asterisk set BLINDTRANSFER variable automaticly.
    But when we do an transfer from FOP2 panel, the BLINDTRANSFER variable was not set

    From : http://forum.fop2.com/3497-no-blindtransfer-set/0
    I have try to edit FOP2Callbacks.pm
    But after modification, FOP2 won't start

    From : http://forum.fop2.com/4165-fop2-la-variable-blindtransfer-llega-vac-a/0#p11614
    But don't seem to have solution ?

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

      You can write a plugin or modify an existing plugin code and insert this into the server (.pl) side:

      $Client_Pre_Command_Handler{'sampleplugin'}{'blindxfer'} = sub {
          my @allreturn;
          my $origen     = shift;
          my $destino    = shift;
          my $contexto   = shift;
          my $socket     = shift;
          my $mychannel      = main::get_btn_config( "$contexto", $origen, 'MAINCHANNEL');
          my $activechannel  = main::get_active_chan($mychannel);
          my $bridgechannel  = main::get_active_link($mychannel);
      
          $return  = "Action: Setvar\r\n";
          $return .= "Channel: $bridgechannel\r\n";
          $return .= "Variable: BLINDTRANSFER\r\n";
          $return .= "Value: $activechannel\r\n";
          $return .= "\r\n";
      
          push @allreturn, $return;
      
          return @allreturn;
      }
      

      You will have to change 'sampleplugin' with the name of your own plugin or the plugin you are injecting this code to... This will intercept the blind transfer action and will get active and bridged channels and set the variable BLINDTRANSFER.

      Best regards,

      1 Reply Last reply
      0
      • S
        S
        secathor
        wrote on last edited by
        #3

        Where I put this Perl script ?

        Inside new file in directory /usr/local/fop2 ?
        Or inside new file in new directory in /var/www/html/fop2/admin/plugins ?

        I have try both, nothing seem to work, does I need to do something more to activate the script ?

        Thanks you

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

          This function must be added to the .pl side of a plugin. You can either write a full plugin (look at the sampleplugin included in the fop2 tarball. Or you can look for any other plugin you might have already installed (in folder /var/www/html/fop2/admin/plugins/xxxx), and insert that block at the end of the xxxx.pl file, and replacing 'sampleplugin' string with the name of the plugin directory, so if you add it to the clock plugin in /var/www/html/fop2/admin/plugins/clock/clock.pl, then change sampleplugin to clock in the above source.

          1 Reply Last reply
          0
          • S
            S
            secathor
            wrote on last edited by
            #5

            Thank you

            I read file /plugins/README from the tarball

            I have create folder /var/www/html/fop2/admin/plugins/myblindvalue
            Create file plugin.xml (used one from sample plugin)
            Create file myblindvalue.pl and copy your script with remplacing 'sampleplugin' by 'myblindvalue'

            Edit /usr/local/fop2/fop2.cfg, and add line
            plugin=myblindvalue:/var/www/html/fop2/admin/plugins/myblindvalue
            And add to my user
            user=119:password:all::myblindvalue

            I also add the clock plugin

            The clock work but the myblindvalue plugin won't work

            I have start FOP2 with all debug (/usr/local/fop2/fop2_server -X 511 -l /var/log/fop2)
            And if I search for "Setvar" in the log file. I only found line for variable PICKUPMARK

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

              Are you using the FOP2 Manager for configuring users and stuff? If so, you should not need to add any plugin=xxx lines in fop2.cfg, nor modify user=xxx lines.

              Just asking, as having #exec in fop2.cfg (for FOP2 Manager), and manual entries won't work.

              If you do use the FOP2 Manager and have the #exec autoconfig_users.sh at the end, then remove the plugin=xx and user=xx entries you created and just log into the FOP2 Manager, select the Plugins tab, your new plugin should show, be sure to check the global checkbox if its not set. Then restart FOP2 and try again.

              1 Reply Last reply
              0
              • S
                S
                secathor
                wrote on last edited by
                #7

                I have removed all config files in /usr/local/fop2/ and copied default files from fop2 tarball
                I also put the perl script in "clock.pl" of the clock plugins (/var/www/html/fop2/admin/plugins/clock/) and use FOP2 Manager to enable clock

                Now, it's work !

                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