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

T

toxa

@toxa
Unfollow Follow
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Send events to connected users from FOP2Callbacks.pm
    T toxa
    Support

    Thank you again. Works great now.


  • Send events to connected users from FOP2Callbacks.pm
    T toxa
    Support

    Thanks for your help, I got it to work with FOP2Callbacks.pm (didn't manage to send any events from plugin).
    I have some problems with substitutions in the popup link though. Only #{CLIDNUM} and #{CLIDNAME} work, both #{UNIQUEID} and #{EXTEN} substitute undefined.

    WIP code for Asterisk 13 and FOP2 2.29 (wasn't tested thoroughly):

    #. . .
    sub __prep_chan {
    	my $chan = shift(@_);
    	
    	$chan =~ s/^(.*)-.*/$1/;
    	$chan = uc($chan);
    	
    	return $chan;
    }
    
    sub amiCommand {
    
    	# Received an event from Asterisk Manager Interfase
    
    	$command  = shift;
    
    	if($command eq "DIALEND") {
    		%event = @_;
    		if($event{'DialStatus'} eq 'ANSWER') {
    			my $dst_chan = __prep_chan($event{'DestChannel'});
    			my $src_chan = __prep_chan($event{'Channel'});
    			my $uid = $event{'Uniqueid'};
    			
    			my $return = "";
    			my @allreturn = ();
    			
    			$return = "Action: UserEvent\r\n";
    			$return .= "UserEvent: CustomPopup\r\n";
    			$return .= "Uniqueid: $uid\r\n";
    			$return .= "Channel: $dst_chan\r\n";
    			$return .= "Family: notifyconnect\r\n";
    			$return .= "Value: $src_chan\r\n";
    			$return .= "\r\n";
    			
    			push @allreturn, $return;
    			return @allreturn;
    		}
    	}
    
    #. . .
    }
    

  • Send events to connected users from FOP2Callbacks.pm
    T toxa
    Support

    Hello.

    I'm trying to make FOP2 chrome app to open URL upon answering any call (not just queue calls) with FOP2Callbacks.pm. I see that FOP2Callbacks.pm is mostly aimed at executing AMI actions, is it possible to send events to connected users from FOP2Callbacks.pm?
    What I'm aiming for is making fop2_server to send notification to client on receiving the BridgeEnter event (like it does on receiving the AgentConnect event).

  • 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