Changeset 72

Show
Ignore:
Timestamp:
04/07/08 17:31:37 (8 months ago)
Author:
root
Message:

Use asterisk 1.4 Agents manager command

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGES

    r2 r72  
     1Version .28 
     2 
     32008-03-30 [r70]   
     4 
     5        * Remove dhtmltooltip and replace with wz_tooltip 
     6 
     72008-02-19 [r69]   
     8 
     9        * Add sample crossdomain.xml file needed by some flash players 
     10 
     112008-01-28 [r68]   
     12 
     13        * New langague added 'gallego' 
     14 
     152007-12-04 [r67]   
     16 
     17        * Fix reverse transfer for park 
     18 
     192007-11-29 [r66]   
     20 
     21        * Add extra event for meetmejoin because sometimes there are no 
     22          newexten events when redirecting to meetme in attendant transfers 
     23 
     242007-11-29 [r65]   
     25 
     26        * Add support for channel in voicemailext, so you can use it to 
     27          launch a macro via local when double clicking on the mailbox icon 
     28 
     292007-11-29 [r64]   
     30 
     31        * Add parkexten and parktimeout to op_server.cfg and support for 
     32          Park command via manager together with updates for Asterisk 1.4 
     33          compatibility. 
     34 
     352007-11-29 [r63]   
     36 
     37        * Make it work with asterisk 1.4 originateresponse change (for 
     38          attendant transfers) 
     39 
     402007-11-23 [r62]   
     41 
     42        * add SpyExt command and drop action to arrow 
     43 
     442007-11-07 [r61]   
     45 
     46        * Honour label_extent when renaming label 
     47 
     482007-08-13 [r60]   
     49 
     50        * Fix 'waiting on queue' for normal buttons and some formatting 
     51          fixes 
     52 
     532007-08-06 [r59]   
     54 
     55        * Fix clidtext for queue summary buttons 
     56 
     572007-08-06 [r58]   
     58 
     59        * Add support for QUEUE_PRIO for queue join events 
     60 
     612007-08-06 [r57]   
     62 
     63        * Fix for groupcount and timers 
     64 
     652007-08-06 [r56]   
     66 
     67        * Fix timer issue 
     68 
     692007-08-02 [r55]   
     70 
     71        * Remove delay in syswrite because it makes asterisk 1.2.7 unhappy 
     72 
     732007-08-02 [r54]   
     74 
     75        * Example new buttons config for groupcount 
     76 
     772007-08-02 [r53]   
     78 
     79        * Ooops! Format clid fixed 
     80 
     812007-08-02 [r52]   
     82 
     83        * Ooops! Set version to SVNVERSION 
     84 
     852007-08-02 [r51]   
     86 
     87        * no_label_counter in op_buttons.cfg (prevents counting on multiple 
     88          position labels). Fixes on groupcount. Added count to 
     89          op_buttons.cfg to set number of sessions for group_count buttons 
     90 
     912007-07-17 [r50]   
     92 
     93        * Fix restrict for panel_context 
     94 
     952007-07-17 [r49]   
     96 
     97        * Fix flash client for multiple passvars values 
     98 
     992007-06-29 [r48]   
     100 
     101        * Added optional amportal.conf parsing 
     102 
     1032007-06-28 [r47]   
     104 
     105        * Added date variables replacement for monitor_filename (%Y %m %d 
     106          %h %i %s) 
     107 
     1082007-06-21 [r46]   
     109 
     110        * Add Monitoring to FOP actions by single clicking on the arrow 
     111 
     1122007-06-15 [r45]   
     113 
     114        * Add 1ms delay to syswrite, it makes some asterisk versions 
     115          happier 
     116 
     1172007-05-30 [r44]   
     118 
     119        * Add include support to op_server.cfg 
     120 
     1212007-05-14 [r43]   
     122 
     123        * Add passvars parameter to op_server.cfg to pass extra values to 
     124          popups 
     125 
     1262007-05-14 [r42]   
     127 
     128        * Support for patched valetparking 
     129 
     1302007-04-30 [r41]   
     131 
     132        * Fix for regexp buttons when coupled with Local channels 
     133 
     1342007-04-27 [r40]   
     135 
     136        * Remove AsyncGoto from channel name so parking with zap works 
     137          better. 
     138 
     1392007-04-27 [r39]   
     140 
     141        * More split optimizations 
     142 
     1432007-04-27 [r37-38]   
     144 
     145        * Proper debug instead of print 
     146 
     147        * Slight change to redhat init script in preparation of .spec 
     148 
     1492007-04-26 [r36]   
     150 
     151        * Russian language files. Thanks Eugene Malikov. 
     152 
     1532007-04-26 [r35]   
     154 
     155        * recompute_queues optimizations and some perl tidyup 
     156 
     1572007-04-26 [r34]   
     158 
     159        * More regexp optimizations and debugs 
     160 
     1612007-04-26 [r33]   
     162 
     163        * Remove unused vars and optimize erase_instances_for_trunk_buttons 
     164 
     1652007-04-26 [r32]   
     166 
     167        * Remove more unused vars 
     168 
     1692007-04-26 [r31]   
     170 
     171        * Remove unused var and optimize some regexps 
     172 
     1732007-04-24 [r30]   
     174 
     175        * Fix split contexto order. Replace nada with undef. Fix 
     176          recompute_queues states 
     177 
     1782007-04-23 [r29]   
     179 
     180        * Improve and optimize perl splits. Use warnings pragma instead of 
     181          -w. 
     182 
     1832007-04-19 [r28]   
     184 
     185        * Change nonblocking perl perl code (LINworks GmbH) 
     186 
     1872007-04-19 [r27]   
     188 
     189        * Improve perl code (LINworks GmbH) 
     190 
     1912007-04-19 [r26]   
     192 
     193        * Improve perl code (LINworks GmbH) 
     194 
     1952007-04-13 [r25]   
     196 
     197        * Fixed persistent clid-label for recompute queues 
     198 
     1992007-03-23 [r23-24]   
     200 
     201        * Fix on flash client for unregistration events 
     202 
     203        * Registration caching to not flood flash clients with repited 
     204          registered events. Changed debug level for digest_event_block and 
     205          try to make some sense out of it 
     206 
     2072007-03-23 [r22]   
     208 
     209        * Starting with digest_event_block clean ups 
     210 
     2112007-03-23 [r21]   
     212 
     213        * Fix voicemail count (ticket #1) 
     214 
     2152007-03-20 [r20]   
     216 
     217        * Fix Did/Trunk free routine and remove debug lines 
     218 
     2192007-03-20 [r19]   
     220 
     221        * Fix trunk matching for CLID and DID buttons 
     222 
     2232007-03-20 [r18]   
     224 
     225        * Add (experimental) DID buttons for matching FreePBX FROM_DID 
     226          lines 
     227 
     2282007-03-20 [r17]   
     229 
     230        * Trunkify CLID buttons 
     231 
     2322007-03-19 [r12]   
     233 
     234        * Make clid on busy buttons show up when 1st load instead of 
     235          permanent text 
     236 
     2372007-03-16 [r11]   
     238 
     239        * Add onData prototype (commented) into the flash client... will 
     240          experiment to see if it is faster than standard flash XML 
     241          processing 
     242 
     2432007-03-16 [r10]   
     244 
     245        * refactoring of digest_event_block, first pass... 
     246 
     2472007-03-16 [r9]   
     248 
     249        * If/elseif refactoring plus fixing newexten duplication in 
     250          procesabloque 
     251 
     2522007-03-16 [r8]   
     253 
     254        * Refactoring if-elseif, setting clid on newexten prio 1 for 
     255          showing dialed number. Changing settext to setclid 
     256 
     2572007-03-15 [r7]   
     258 
     259        * Set svn version to op_server.pl 
     260 
     2612007-03-15 [r6]  nicolas: 
     262 
     263        * Update docs 
     264 
     2652007-03-14 [r5]   
     266 
     267        * Update documentation. Make settext to be persistent overriding 
     268          callerid values sent by regular states. Do not default to state 
     269          up for events without state 
     270 
     2712007-03-14 [r4]   
     272 
     273        * Reorganize svn, remove compiled flash movies from repository 
     274 
     2752007-03-14 [r3]   
     276 
     277        * fix autosip crash after asterisk restart 
     278 
     279 
    1280Version .27 
    2281 
  • trunk/dhtml/index.php

    r70 r72  
    6262{ 
    6363$mouseov=" onmouseover='javascript:$(\"mcount$a\").style.display=\"block\";' onmouseout='javascript:$(\"mcount$a\").style.display=\"none\";' "; 
    64 $mouseov1 = " onMouseover=\"ddrivetip(this,'#f0a020', 180)\"; onMouseout=\"hideddrivetip()\" "; 
    65 $mouseov2 = " onMouseover=\"ddrivetip(this,'#f0a020', 180)\"; onMouseout=\"hideddrivetip()\" "; 
    6664$mouseov1 = " onMouseover=\"TagToTip('mwitip$a')\"; onMouseout=\"UnTip()\" "; 
    6765$mouseov2 = " onMouseover=\"TagToTip('phonetip$a')\"; onMouseout=\"UnTip()\" "; 
  • trunk/dhtml/js/operator.js

    r70 r72  
    1 info  = new Object(); 
    2 mwiinfo  = new Object(); 
    31Event.observe(window, 'load', init, false); 
    42 
     
    148146        } 
    149147 
     148    if(comando=="park") {  
     149        boton.className="park";  
     150        clid.innerHTML=texto;  
     151    }  
     152 
    150153        if(comando ==  "settext") { 
    151154                clid.innerHTML=texto; 
     
    157160        var i = textodecode.indexOf("\n"); 
    158161                textodecode = replace(textodecode,'\n','<BR>'); 
    159                 info["phone"+nro]=textodecode; 
    160162            $('phonetip'+nro).innerHTML=textodecode; 
    161163    } 
     
    216218        } 
    217219        if(comando == "voicemailcount") { 
    218                 mwiinfo["mwi"+nro]=texto; 
    219220            $('mwitip'+nro).innerHTML=texto; 
    220221        } 
  • trunk/op_server.pl

    r67 r72  
    29652965    elsif ( $evento =~ /^meetmeunmute/ )               { $evento = "meetmeunmute"; } 
    29662966    elsif ( $evento =~ /^Agentlogin/ )                 { $evento = "agentlogin"; } 
     2967    elsif ( $evento =~ /^Agents$/ )                    { $evento = "agents"; } 
    29672968    elsif ( $evento =~ /^RefreshQueue/ )               { $evento = "refreshqueue"; } 
    29682969    elsif ( $evento =~ /^Timeout/ )                    { $evento = "timeout"; } 
     
    36963697                delete $cache_hit{$kkey}; 
    36973698            } 
     3699        } 
     3700 
     3701    } 
     3702    elsif ( $evento eq "agents" ) { 
     3703 
     3704        #Event: Agents 
     3705        #Agent: 609 
     3706        #Name: Nicolas 
     3707        #Status: AGENT_LOGGEDOFF 
     3708        #LoggedInChan: n/a 
     3709        #LoggedInTime: 0 
     3710        #TalkingTo: n/a 
     3711        my $agent_number  = $hash_temporal{Agent}; 
     3712        my $agent_name    = $hash_temporal{Name}; 
     3713        my $agent_status  = $hash_temporal{Status}; 
     3714        my $agent_logchan = $hash_temporal{LoggedInChan}; 
     3715 
     3716        $agents_name{"$server^$agent_number"} = $agent_name; 
     3717        set_queueobject( $server, "AGENT/$agent_number", "name", $agent_name ); 
     3718 
     3719        if ( $agent_status eq "AGENT_IDLE" ) { 
     3720 
     3721            # Agent callback login, idle 
     3722            my $agevent = ""; 
     3723            if ( $agent_logchan =~ /.*\/.*-.*/ ) { 
     3724                $fake_bloque[$fakecounter]{"Event"}   = "Agentlogin"; 
     3725                $fake_bloque[$fakecounter]{"Channel"} = $agent_logchan; 
     3726            } 
     3727            else { 
     3728                $fake_bloque[$fakecounter]{"Event"}     = "Agentcallbacklogin"; 
     3729                $fake_bloque[$fakecounter]{"Loginchan"} = $agent_logchan; 
     3730            } 
     3731            $fake_bloque[$fakecounter]{"Agent"}  = $agent_number; 
     3732            $fake_bloque[$fakecounter]{"Name"}   = $agent_name; 
     3733            $fake_bloque[$fakecounter]{"Server"} = "$server"; 
     3734            $fakecounter++; 
     3735        } 
     3736        elsif ( $agent_status eq "AGENT_ONCALL" ) { 
     3737 
     3738            # Agent login 
     3739            $fake_bloque[$fakecounter]{Event}   = "Agentlogin"; 
     3740            $fake_bloque[$fakecounter]{Channel} = $agent_logchan; 
     3741            $fake_bloque[$fakecounter]{Agent}   = $agent_number; 
     3742            $fake_bloque[$fakecounter]{Server}  = $server; 
     3743            $fakecounter++; 
     3744        } 
     3745        elsif ( $agent_status eq "AGENT_LOGEDOFF" ) { 
     3746            $fake_bloque[$fakecounter]{Event}  = "Agentlogoff"; 
     3747            $fake_bloque[$fakecounter]{Agent}  = $agent_number; 
     3748            $fake_bloque[$fakecounter]{Server} = $server; 
     3749            $fake_bloque[$fakecounter]{Fake}   = 1; 
     3750            $fakecounter++; 
    36983751        } 
    36993752 
     
    81228175 
    81238176            if ( $showagents == 1 ) { 
    8124                 send_command_to_manager( "Action: Command\r\nActionId: agents\r\nCommand: show agents\r\n\r\n", $socket2 ); 
     8177 
     8178                #send_command_to_manager( "Action: Command\r\nActionId: agents\r\nCommand: show agents\r\n\r\n", $socket2 ); 
     8179                send_command_to_manager( "Action: Agents\r\n\r\n", $socket2 ); 
    81258180            } 
    81268181            if ( defined($member) ) { 
     
    84968551        } 
    84978552    } 
    8498     elsif ( $texto =~ "ActionID: agents" ) { 
    8499         log_debug( "$heading process agents", 16 ) if DEBUG; 
    8500         my $agent_number; 
    8501         my $agent_state; 
    8502         my $agent_name; 
    8503  
    8504         # Show Agents CLI command, generates fake events 
    8505  
    8506         foreach (@lineas) { 
    8507             $_ =~ s/\s+/ /g; 
    8508             /(\d+) \((.*)\) (.*) (\(.*\))/; 
    8509             if ( defined($1) ) { 
    8510                 $agent_number                         = $1; 
    8511                 $agent_name                           = $2; 
    8512                 $agent_state                          = $3; 
    8513                 $agents_name{"$server^$agent_number"} = $agent_name; 
    8514                 set_queueobject( $server, "AGENT/$agent_number", "name", $agent_name ); 
    8515             } 
    8516  
    8517             if ( defined($3) ) { 
    8518                 if ( $agent_state =~ /available at/ ) { 
    8519  
    8520                     # Agent callback login 
    8521                     $agent_state =~ s/.*'(.*)'.*/$1/g; 
    8522                     $bloque[$contador]{"Event"}     = "Agentcallbacklogin"; 
    8523                     $bloque[$contador]{"Loginchan"} = $agent_state; 
    8524                     $bloque[$contador]{"Agent"}     = $agent_number; 
    8525                     $bloque[$contador]{"Server"}    = "$server"; 
    8526                     $contador++; 
    8527                 } 
    8528  
    8529                 if ( $agent_state =~ /logged in on/ ) { 
    8530  
    8531                     # Agent login 
    8532                     $agent_state =~ s/\s+/ /g; 
    8533                     $agent_state =~ s/logged in on //g; 
    8534                     $agent_state =~ s/([^ ]*).*/$1/g; 
    8535  
    8536                     $bloque[$contador]{Event}   = "Agentlogin"; 
    8537                     $bloque[$contador]{Channel} = $agent_state; 
    8538                     $bloque[$contador]{Agent}   = $agent_number; 
    8539                     $bloque[$contador]{Server}  = $server; 
    8540                     $contador++; 
    8541                 } 
    8542                 if ( $agent_state =~ /not logged in/ ) { 
    8543                     $bloque[$contador]{Event}  = "Agentlogoff"; 
    8544                     $bloque[$contador]{Agent}  = $agent_number; 
    8545                     $bloque[$contador]{Server} = $server; 
    8546                     $bloque[$contador]{Fake}   = 1; 
    8547                     $contador++; 
    8548                 } 
    8549             } 
    8550         } 
    8551     } 
     8553 
     8554    #elsif ( $texto =~ "ActionID: agents" ) { 
     8555    #    log_debug( "$heading process agents", 16 ) if DEBUG; 
     8556    #    my $agent_number; 
     8557    #    my $agent_state; 
     8558    #    my $agent_name; 
     8559    # 
     8560    #        # Show Agents CLI command, generates fake events 
     8561    # 
     8562    #        foreach (@lineas) { 
     8563    #            $_ =~ s/\s+/ /g; 
     8564    #            /(\d+) \((.*)\) (.*) (\(.*\))/; 
     8565    #            if ( defined($1) ) { 
     8566    #                $agent_number                         = $1; 
     8567    #                $agent_name                           = $2; 
     8568    #                $agent_state                          = $3; 
     8569    #                $agents_name{"$server^$agent_number"} = $agent_name; 
     8570    #                set_queueobject( $server, "AGENT/$agent_number", "name", $agent_name ); 
     8571    #            } 
     8572    # 
     8573    #            if ( defined($3) ) { 
     8574    #                if ( $agent_state =~ /available at/ ) { 
     8575    # 
     8576    #                    # Agent callback login 
     8577    #                    $agent_state =~ s/.*'(.*)'.*/$1/g; 
     8578    #                    $bloque[$contador]{"Event"}     = "Agentcallbacklogin"; 
     8579    #                    $bloque[$contador]{"Loginchan"} = $agent_state; 
     8580    #                    $bloque[$contador]{"Agent"}     = $agent_number; 
     8581    #                    $bloque[$contador]{"Server"}    = "$server"; 
     8582    #                    $contador++; 
     8583    #                } 
     8584    # 
     8585    #                if ( $agent_state =~ /logged in on/ ) { 
     8586    # 
     8587    #                    # Agent login 
     8588    #                    $agent_state =~ s/\s+/ /g; 
     8589    #                    $agent_state =~ s/logged in on //g; 
     8590    #                    $agent_state =~ s/([^ ]*).*/$1/g; 
     8591    # 
     8592    #                    $bloque[$contador]{Event}   = "Agentlogin"; 
     8593    #                    $bloque[$contador]{Channel} = $agent_state; 
     8594    #                    $bloque[$contador]{Agent}   = $agent_number; 
     8595    #                    $bloque[$contador]{Server}  = $server; 
     8596    #                    $contador++; 
     8597    #                } 
     8598    #                if ( $agent_state =~ /not logged in/ ) { 
     8599    #                    $bloque[$contador]{Event}  = "Agentlogoff"; 
     8600    #                    $bloque[$contador]{Agent}  = $agent_number; 
     8601    #                    $bloque[$contador]{Server} = $server; 
     8602    #                    $bloque[$contador]{Fake}   = 1; 
     8603    #                    $contador++; 
     8604    #                } 
     8605    #            } 
     8606    #        } 
     8607    #    } 
    85528608    elsif ( $texto =~ /ActionID: astdb-/ ) { 
    85538609        log_debug( "$heading process astdb", 16 ) if DEBUG;