Changeset 62

Show
Ignore:
Timestamp:
11/23/07 17:51:23 (1 year ago)
Author:
root
Message:

add SpyExt? command and drop action to arrow

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ming-source/operator_panel.pl

    r61 r62  
    83838383                                }; 
    83848384 
     8385                flechi.onEnterFrame = function() { 
     8386                    if(this.hitTest(clip_arrastrado)) { 
     8387                        this._xscale = arrow_scale * 1.5; 
     8388                        this._yscale = arrow_scale * 1.5; 
     8389                        this.hitted = 1; 
     8390                        _global.flechahit = this; 
     8391                    } else { 
     8392                        if(this.hitted == 1) { 
     8393                            this.hitted = 0; 
     8394                            _global.flechahit = undefined; 
     8395                        } 
     8396                    } 
     8397                    if(this.hitted == 0) { 
     8398                        this._xscale = arrow_scale; 
     8399                        this._yscale = arrow_scale; 
     8400                        this.hitted = -1; 
     8401                    } 
     8402                }; 
     8403 
     8404 
     8405 
    83858406                                 
    83868407//                              createCircle(cual,12*(arrow_scale/100),arrow_margin_left,arrow_margin_top-offsetboton+1,'0xff0000'); 
     
    99529973                } 
    99539974        }  
     9975//NICOX 
     9976        if (_global.flechahit != undefined) { 
     9977                var sobrecito = eval("rectangulo"+destino+".flecha"+destino); 
     9978                if(sobrecito._visible == true) { 
     9979                        logea("como esta sobrecito: "+flecha._visible); 
     9980                        destino = ExtraeNumeroClip(_global.flechahit); 
     9981                        logea("transfiero "+origen+" a destino voicemail "+destino); 
     9982                        logea("_global.flechahit = "+_global.flechahit); 
     9983                        envia_comando("tospy", origen, destino); 
     9984                        done = 1; 
     9985                } 
     9986        }  
     9987 
    99549988        if (destino!="" && origen!=destino && done!=1) { 
    99559989                if (f_origen==1 && f_destino==0) { 
  • trunk/op_server.pl

    r60 r62  
    147147my %mailbox; 
    148148my %tovoicemail; 
     149my %tospy; 
    149150my %instancias; 
    150151my %agent_to_channel; 
     
    14221423            $tovoicemail{$indicevm} = $tmphash{voicemailext}; 
    14231424        } 
     1425        if ( defined( $tmphash{spyext} ) ) { 
     1426            my $indicespy = $lastposition{ $tmphash{panel_context} }; 
     1427            if ( $tmphash{panel_context} ne "" ) { 
     1428                $indicespy .= "\@$tmphash{panel_context}"; 
     1429            } 
     1430            $tospy{$indicespy} = $tmphash{spyext}; 
     1431        } 
     1432  
    14241433        $/ = "\0"; 
    14251434    } 
     
    74037412            } 
    74047413 
    7405             if ( $accion =~ /^tovoicemail/ ) { 
    7406  
     7414            if ( $accion =~ /^tospy/ ) { 
    74077415                my @cuales_transferir = get_transfer_channel( $origin_channel, $datosflash ); 
    74087416                my $cuantos           = @cuales_transferir; 
    74097417 
    7410                 if ( !defined( $tovoicemail{$btn_destino} ) ) { 
    7411  
    7412                     # If there is no voicemail extension defined, change it to a standard 
     7418                               if ( !defined( $tospy{$btn_destino} ) ) { 
     7419 
     7420                    # If there is no spy extension defined, change it to a standard 
    74137421                    # trasnfer 
    74147422                    if ( $cuantos > 0 ) { 
     
    74207428                } 
    74217429                else { 
    7422  
    74237430                    my $keyext  = "$origin_server^$origin_channel"; 
    7424                     my $exttran = $tovoicemail{$btn_destino}; 
     7431                    my $exttran = $tospy{$btn_destino}; 
    74257432                    my ( $extx, $contextx ) = split( /\@/, $exttran, 2 ); 
    74267433 
     
    74467453                    $tab = substr( $tab, 0, -1 ) if DEBUG; 
    74477454                    return; 
    7448                 } 
    7449             } 
    7450             if ( $accion =~ /^voicemail/ ) { 
     7455 
     7456                                } 
     7457 
     7458                        } elsif ( $accion =~ /^tovoicemail/ ) { 
     7459 
     7460                my @cuales_transferir = get_transfer_channel( $origin_channel, $datosflash ); 
     7461                my $cuantos           = @cuales_transferir; 
     7462 
     7463                if ( !defined( $tovoicemail{$btn_destino} ) ) { 
     7464 
     7465                    # If there is no voicemail extension defined, change it to a standard 
     7466                    # trasnfer 
     7467                    if ( $cuantos > 0 ) { 
     7468                        $accion = "transferir"; 
     7469                    } 
     7470                    else { 
     7471                        $accion = "originate"; 
     7472                    } 
     7473                } 
     7474                else { 
     7475 
     7476                    my $keyext  = "$origin_server^$origin_channel"; 
     7477                    my $exttran = $tovoicemail{$btn_destino}; 
     7478                    my ( $extx, $contextx ) = split( /\@/, $exttran, 2 ); 
     7479 
     7480                    if ( $cuantos > 0 ) { 
     7481                        $comando = "Action: Redirect\r\n"; 
     7482                        $comando .= "Channel: $cuales_transferir[0]\r\n"; 
     7483                        $comando .= "Exten: $extx\r\n"; 
     7484                        $comando .= "ActionID: 1234\r\n"; 
     7485                        $comando .= "Context: $contextx\r\n"; 
     7486                        $comando .= "Priority: 1\r\n\r\n"; 
     7487                    } 
     7488                    else { 
     7489                        $comando = "Action: Originate\r\n"; 
     7490                        $comando .= "Channel: $origin_channel\r\n"; 
     7491                        $comando .= "Exten: $extx\r\n"; 
     7492                        $comando .= "ActionID: 1234\r\n"; 
     7493                        $comando .= "Context: $contextx\r\n"; 
     7494                        $comando .= "Priority: 1\r\n\r\n"; 
     7495                    } 
     7496                    send_command_to_manager( $comando, $p[ $button_server{$datosflash} ], 
     7497                        0, $astmanproxy_servers[ $button_server{$datosflash} ] ); 
     7498 
     7499                    $tab = substr( $tab, 0, -1 ) if DEBUG; 
     7500                    return; 
     7501                } 
     7502            } elsif ( $accion =~ /^voicemail/ ) { 
    74517503                my $vext     = ""; 
    74527504                my $vcontext = "";