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. Auto Answer on Conference action button

Auto Answer on Conference action button

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 114 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.
  • A
    A
    avayax
    wrote on last edited by
    #1

    Any chance that you could enable auto answer via header when using the conference action button?
    It doesn't work there. "Call Pickup", "Pickup from Park" and "Queue "work fine now.

    1 Reply Last reply
    0
    • A
      A
      avayax
      wrote on last edited by
      #2

      Is this something you could add in a future release?
      Auto Answer already works on listen and listen/whisper, and I believe the conference action button is the same as listen/whisper, isn't it?

      Thank you for considering this.

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

        Edit /var/www/html/fop2/admin/plugins/conferencebutton.pl and change this function:

        $Client_Post_Command_Handler{'conferencebutton'}{'customconference'} = 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 $extension_to_dial = $destino;
        
            if ( !main::hasPermChannel( $socket, "dial", $mychannel ) && !main::hasPerm( $socket, "all" ) ) {
                # No 'dial' permission, abort action
                print "No permissions for conference\n";
                return @allreturn;
            }
        
            my @orivariables;
            my $autoanswer         = main::get_btn_config( "$contexto", $origen, 'AUTOANSWER');
            my $autoanswer_header  = main::get_btn_config( "$contexto", $origen, 'AUTOANSWERHEADER');
            my $originate_variable = main::get_btn_config( "$contexto", $origen, 'ORIGINATEVARIABLES');
        
            if ( $autoanswer_header ne "" && $autoanswer == 1) {
                push @orivariables, $autoanswer_header;
            }
            if ( $originate_variable ne "" ) {
                push @orivariables, $originate_variable;
            }
        
            my $orivariable = join( ',', @orivariables );
        
            my $return  = "Action: Originate\r\n";
            $return .= "Channel: Local/$extension_to_dial\@from-internal\r\n";
            $return .= "Application: ChanSpy\r\n";
            $return .= "Data: $mychannel,BEq\r\n";
            $return .= "Variable: $orivariable\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
            return @allreturn;
        };
        

        Then restart FOP2 and test it out.. if it works fine I will update the plugin and release a new version.

        Best regards,

        1 Reply Last reply
        0
        • A
          A
          avayax
          wrote on last edited by
          #4

          This is my /var/www/html/fop2/admin/plugins/conferencebutton/conferencebutton.pl now.
          Auto answer doesn't work.

          $Client_Post_Command_Handler{'conferencebutton'}{'customconference'} = 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 $extension_to_dial = $destino;

          if ( !main::hasPermChannel( $socket, "dial", $mychannel ) && !main::hasPerm( $socket, "all" ) ) {
              # No 'dial' permission, abort action
              print "No permissions for conference\n";
              return @allreturn;
          }
          
          my @orivariables;
          my $autoanswer         = main::get_btn_config( "$contexto", $origen, 'AUTOANSWER');
          my $autoanswer_header  = main::get_btn_config( "$contexto", $origen, 'AUTOANSWERHEADER');
          my $originate_variable = main::get_btn_config( "$contexto", $origen, 'ORIGINATEVARIABLES');
          
          if ( $autoanswer_header ne "" && $autoanswer == 1) {
              push @orivariables, $autoanswer_header;
          }
          if ( $originate_variable ne "" ) {
              push @orivariables, $originate_variable;
          }
          
          my $orivariable = join( ',', @orivariables );
          
          my $return  = "Action: Originate\r\n";
          $return .= "Channel: Local/$extension_to_dial\@from-internal\r\n";
          $return .= "Application: ChanSpy\r\n";
          $return .= "Data: $mychannel,BEq\r\n";
          $return .= "Variable: $orivariable\r\n";
          $return .= "\r\n";
          push @allreturn, $return;
          return @allreturn;
          

          };

          $Client_Pre_Command_Handler{'conferencebutton'}{'ping'} = sub {
          print "pong pong conferencebutton!\n";
          };

          $AMI_Event_Handler{'conferencebutton'}{'QUEUEMEMBER'} = sub {
          my $event = shift;

          #my @keys =  keys %$event;
          #foreach my $key (@keys) {
          #    print "$key = ".${$event}{$key}."\n";
          #}
          #print "\n";
          

          };

          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