Changeset 46
- Timestamp:
- 06/21/07 19:01:52 (1 year ago)
- Files:
-
- trunk/ming-source/comunicator.pl (modified) (2 diffs)
- trunk/ming-source/operator_panel.pl (modified) (2 diffs)
- trunk/op_server.cfg (modified) (1 diff)
- trunk/op_server.pl (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ming-source/comunicator.pl
r4 r46 140 140 _global.restrict = numeroboton; 141 141 _global.mybutton = numeroboton; 142 var myresa = eval('_root.resaltado'+_global.restrict);143 myresa._visible = true;144 return;145 142 } 146 143 … … 155 152 156 153 if (_root.context == boton_contexto) { 157 colaEvento(boton_numero,comando,textofinal); 154 if(_global.restrict != undefined) { 155 if(_global.restrict == boton_numero) { 156 colaEvento(boton_numero,comando,textofinal); 157 } 158 } else { 159 colaEvento(boton_numero,comando,textofinal); 160 } 158 161 } 159 162 // endif root.context trunk/ming-source/operator_panel.pl
r43 r46 9405 9405 // Un solo click 9406 9406 if (clip._name.substring(0, 7) != "casilla") { 9407 if (_global.meetmemember[numeroclip]>0) { 9408 if (_global.authorized == true) { 9407 if (_global.authorized == true) { 9408 if (_root.context.length>0) { 9409 boton_numero_con_contexto = numeroclip+"@"+context; 9410 } else { 9411 boton_numero_con_contexto = numeroclip; 9412 } 9413 if (_global.meetmemember[numeroclip]>0) { 9409 9414 var statusclid = eval("rectangulo"+numeroclip+".statusprint"+numeroclip); 9410 if (_root.context.length>0) {9411 boton_numero_con_contexto = numeroclip+"@"+context;9412 } else {9413 boton_numero_con_contexto = numeroclip;9414 }9415 9415 if (_global.meetmemute[numeroclip]>0) { 9416 9416 logea("envio meetmemute"); … … 9425 9425 } 9426 9426 } else { 9427 // Not authorized 9428 envia_comando("bogus", 0, 0); 9429 logea("no esta autorizado"); 9430 } 9427 logea("no es meetmemember, empiezo record"); 9428 envia_comando("startmonitor",numeroclip,numeroclip); 9429 } 9431 9430 } else { 9432 logea("no es meetmemember"); 9433 } 9431 // Not authorized 9432 envia_comando("bogus", 0, 0); 9433 logea("no esta autorizado"); 9434 } 9434 9435 } else { 9435 logea("single click en led no hace nada ");9436 logea("single click en led no hace nada "+clip._name); 9436 9437 } 9437 9438 } trunk/op_server.cfg
r43 r46 230 230 ;attendant_failure_redirect_to = 6${EXTEN}@${CONTEXT} 231 231 232 ; It is possible to start monitoring a conversation 233 ; by single clicking on the arrow for a button 234 ; FOP will use a filename and format based on the 235 ; following two paramters: 236 237 ;monitor_filename = FOP-${CLIDNUM}-${LINK}-${UNIQUEID} 238 ;monitor_format = gsm 239 240 232 241 ; You can have panel contexts with their own 233 242 ; button layout and configuration. The following entry trunk/op_server.pl
r45 r46 38 38 my %datos = (); 39 39 my %chanvar = (); 40 my %monitoring = (); 40 41 my %passvar = (); 41 42 my %sesbot = (); … … 570 571 } 571 572 573 if ( !defined $config->{GENERAL}{monitor_filename} ) { 574 $config->{GENERAL}{monitor_filename} = "\${UNIQUEID}"; 575 } 576 577 if ( !defined $config->{GENERAL}{monitor_format} ) { 578 $config->{GENERAL}{monitor_format} = "wav"; 579 } 580 572 581 if ( !defined $clid_privacy ) { 573 582 $clid_privacy = 0; … … 2070 2079 log_debug( "$heading borro cache_hit($indice_cache)", 128 ) if DEBUG; 2071 2080 delete $cache_hit{$indice_cache}; 2081 delete $monitoring{$canalsesion}; 2072 2082 if ( keys(%cache_hit) ) { 2073 2083 for ( keys %cache_hit ) { … … 2891 2901 elsif ( $evento =~ /^OriginateFailure$/ ) { $evento = "originatefailure"; } 2892 2902 elsif ( $evento =~ /^ChannelReload$/ ) { $evento = "channelreload"; } 2903 elsif ( $evento =~ /^response-/ ) { $evento = "monitor"; } 2893 2904 else { log_debug( "$heading No event match ($evento)", 32 ); } 2894 2905 … … 2909 2920 } 2910 2921 2911 if ( $evento eq "channelreload" ) { 2922 if ( $evento eq "monitor" ) { 2923 my $botinro = ""; 2924 ( undef, $estado_final, undef ) = split( /-/, $hash_temporal{ActionID}, 3 ); 2925 ( $canal, undef ) = separate_session_from_channel( $hash_temporal{Channel} ); 2926 $canalid = $hash_temporal{Channel}; 2927 $estado_final =~ tr/A-Z/a-z/; 2928 } 2929 elsif ( $evento eq "channelreload" ) { 2912 2930 2913 2931 # Event: ChannelReload … … 4940 4958 $parked{"$server^$hash_temporal{'Channel'}"} = $parksl; 4941 4959 $evento = ""; #NEW 4942 print "park PARK/$parksl|park|[$textid]$timeout|$hash_temporal{'Timeout'}-$server|$hash_temporal{'Channel'}\n";4943 4960 } 4944 4961 elsif ( $evento eq "newcallerid" ) { … … 4966 4983 4967 4984 if ( $evento ne "" ) { 4968 log_debug( "$heading Event $evento, canal '$canal' ", 32 ) if DEBUG;4985 log_debug( "$heading Event $evento, canal '$canal', estadofinal $estado_final", 32 ) if DEBUG; 4969 4986 4970 4987 # De acuerdo a los datos de la extension genera … … 6689 6706 || $bloque_final =~ /Message: Mailbox/ 6690 6707 || $bloque_final =~ /SIP-CanReinvite/ 6708 || $bloque_final =~ /ActionID: monitor-/ 6691 6709 || $bloque_final =~ /Message: Timeout/ ) 6692 6710 { … … 6699 6717 $block_count++; 6700 6718 $bloque[$block_count]{Event} = "sippeerentrylong"; 6719 } 6720 elsif ( $p =~ /ActionID: monitor-/ ) { 6721 my ( undef, $quemonitor, $quecana ) = split( /-/, $p, 3 ); 6722 $block_count++; 6723 $bloque[$block_count]{Event} = "response-$quemonitor"; 6724 $bloque[$block_count]{Channel} = $quecana; 6701 6725 } 6702 6726 my $my_event = ""; … … 6853 6877 my $res = syswrite( $socket, $encriptadofinal, $largo ); 6854 6878 6855 select( undef, undef, undef, 0.0.1);6879 select( undef, undef, undef, 0.01 ); 6856 6880 6857 6881 if ( defined $res && $res > 0 ) { … … 7306 7330 ($destino) = split( /\&/, $destino ); 7307 7331 log_debug( "$heading El boton de destino es $destino en el server $destin_server", 64 ) if DEBUG; 7308 print("$heading El boton de destino es $destino en el server $destin_server\n");7309 7332 } 7310 7333 } … … 7412 7435 } 7413 7436 7414 if ( $accion eq "cortar" ) { 7437 if ( $accion =~ /^startmonitor/ ) { 7438 my $buton_number = $datosflash; 7439 foreach my $ses ( @{ $sesbot{$buton_number} } ) { 7440 my $monaction = ""; 7441 my $extracomand = ""; 7442 if ( !defined( $monitoring{$ses} ) ) { 7443 log_debug( "$heading START MONITOR $ses -- ($origin_server $origin_channel)", 1 ); 7444 my $unique = find_uniqueid( $ses, $origin_server ); 7445 my ( $filename, $format ) = compute_monitoring_filename( $unique, $panelcontext ); 7446 $monaction = "Monitor"; 7447 $monitoring{$ses} = 1; 7448 $extracomand .= "File: $filename\r\n"; 7449 $extracomand .= "Format: $format\r\n"; 7450 $extracomand .= "Mix: 1\r\n"; 7451 } 7452 else { 7453 log_debug( "$heading STOP MONITOR $ses", 1 ); 7454 $monaction = "StopMonitor"; 7455 delete $monitoring{$ses}; 7456 } 7457 $comando = "Action: $monaction\r\n"; 7458 $comando .= "Channel: $ses\r\n"; 7459 $comando .= "ActionID: monitor-$monaction-$ses\r\n"; 7460 $comando .= $extracomand . "\r\n"; 7461 send_command_to_manager( $comando, $p[ $button_server{$datosflash} ], 7462 0, $astmanproxy_servers[ $button_server{$datosflash} ] ); 7463 } 7464 } 7465 elsif ( $accion eq "cortar" ) { 7415 7466 my $buton_number = $datosflash; 7416 7467 log_debug( "$heading Will try to hangup channel para el boton $buton_number", 16 ) if DEBUG; … … 7713 7764 } 7714 7765 $tab = substr( $tab, 0, -1 ) if DEBUG; 7766 } 7767 7768 sub compute_monitoring_filename { 7769 my $unique = shift; 7770 my $panelcontext = shift; 7771 my $filename = ""; 7772 my $format = ""; 7773 my @return; 7774 my %hasha; 7775 7776 if ( !defined( $config->{$panelcontext}{monitor_filename} ) ) { 7777 $filename = $config->{GENERAL}{monitor_filename}; 7778 } 7779 else { 7780 $filename = $config->{$panelcontext}{monitor_filename}; 7781 } 7782 if ( !defined( $config->{$panelcontext}{monitor_format} ) ) { 7783 $format = $config->{GENERAL}{monitor_format}; 7784 } 7785 else { 7786 $format = $config->{$panelcontext}{monitor_format}; 7787 } 7788 7789 while ( my ( $key, $val ) = each( %{ $datos{$unique} } ) ) { 7790 $key =~ tr/a-z/A-Z/; 7791 if ( $key eq "CALLERID" ) { 7792 $key = "CLID"; 7793 } 7794 elsif ( $key eq "CALLERIDNUM" ) { 7795 $key = "CLIDNUM"; 7796 } 7797 elsif ( $key eq "CALLERIDNAME" ) { 7798 $key = "CLIDNAME"; 7799 } 7800 elsif ( $key eq "UNIQUEID" ) { 7801 my ( $realunique, undef ) = split( /-/, $val, 2 ); 7802 $val = $realunique; 7803 } 7804 $hasha{$key} = $val; 7805 } 7806 $filename =~ s/\${CLIDNAME}/$hasha{CLIDNAME}/gi; 7807 $filename =~ s/\${CLIDNUM}/$hasha{CLIDNUM}/gi; 7808 $filename =~ s/\${CLID}/$hasha{CLID}/gi; 7809 $filename =~ s/\${UNIQUEID}/$hasha{UNIQUEID}/gi; 7810 $filename =~ s/\${CHANNEL}/$hasha{CHANNEL}/gi; 7811 $filename =~ s/\${LINK}/$hasha{LINK}/gi; 7812 $filename =~ s/\//-/gi; 7813 push @return, $filename; 7814 push @return, $format; 7815 return @return; 7715 7816 } 7716 7817 … … 7964 8065 for $interno ( keys %botonpermanenttext ) { 7965 8066 if ( $botonpermanenttext{$interno} ne "" ) { 7966 print "permanente $interno -$botonpermanenttext{$interno}-\n";7967 8067 send_status_to_flash( $socket, "$interno|settext|$botonpermanenttext{$interno}", 0 ); 7968 8068 } … … 8564 8664 $match++; 8565 8665 } 8566 if ( $key eq "Server" && $val eq $server) {8666 if ( $key eq "Server" && ( $val eq $server || $server eq "-1" ) ) { 8567 8667 $match++; 8568 8668 }
