Changeset 5

Show
Ignore:
Timestamp:
03/14/07 20:12:29 (2 years ago)
Author:
root
Message:

Update documentation. Make settext to be persistent overriding callerid values sent by regular states. Do not default to state up for events without state

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/README

    r1 r5  
    6868  (if you are reading this you probably already done that) 
    6969 
    70 1) Copy the files in the 'flash' or 'dhtml' subdirectory to a suitable place  
     702) Copy the files in the 'flash' or 'dhtml' subdirectory to a suitable place  
    7171   on your web server. If your web root is /var/www/html, you can create a  
    72    subdirectory 'panel' and copy the files there.  
     72   subdirectory 'panel' and copy the files there. The base files required 
     73   for the flash client are index.html and operator_panel.swf, you can also 
     74   copy the help files for your language. 
    7375 
    7476   There are several ways (index files) to load the flash applet, try them 
    7577   out. You can modify the file help-xx.html files to your liking. 
    7678 
    77 2) Edit op_server.cfg and change the appropriate parameters for your setup.  
     79   The dhtml panel allows you to use javascript/dhtml to desing your own 
     80   layout. But the client is limited to monitoring (you cannot perform 
     81   actions yet) 
     82 
     833) Edit op_server.cfg and change the appropriate parameters for your setup.  
    7884 
    7985   "flash_dir" parameter must be the exact location of the directory where 
    80    the html and swf files are placed. 
     86   the html and swf files are placed (where you copied the files from step 
     87   2 above) 
    8188 
    82     The rest of the parameters are well commented in the cfg file 
     89   The rest of the parameters are well commented in the cfg file, basically 
     90   you have to set the manager host, user and password. (Be sure to enable 
     91   the manager in /etc/asterisk/manager.conf) 
    8392 
    84 3) Edit op_buttons.cfg to suit your needs. The file is commented and its 
     934) Edit op_buttons.cfg to suit your needs. The file is commented and its 
    8594   self explanatory. 
    8695 
    87 4) Edit op_style.cfg to suit your needs. You can change the button size and 
     965) Edit op_style.cfg to suit your needs. You can change the button size and 
    8897   colors, icon placement and size, etc. DO NOT modify the variable names, 
    8998   just the value after the equal sign and DO NOT use spaces. With proper 
     
    122131------- 
    123132 
    124 The op_server.pl must run on the same computer as the web server 
     133The op_server.pl must run on the same computer as the web server, but not 
     134necesarily on the machine where asterisk is installed. 
    125135 
    126136When started, it writes the file 'variables.txt' to the http directory where 
  • trunk/RECIPES

    r1 r5  
    1515in extensions.conf: 
    1616 
    17 exten => *78,1,UserEvent(ASTDB|Family: dnd^Value: On) 
    18 exten => *78,2,SetVar(temp=${CHANNEL}) 
    19 exten => *78,3,Cut(temp=temp,,1) 
    20 exten => *78,4,DBPut(dnd/${temp}=On) 
    21 exten => *78,5,Hangup 
     17exten => *78,1,Set(DB(dnd/${CUT(CHANNEL|-|1)})=Break) 
     18exten => *78,n,UserEvent(ASTDB|Channel: ${CHANNEL}^Family: dnd^Value: Break) 
     19exten => *78,n,Hangup 
    2220 
    23 exten => *79,1,UserEvent(ASTDB|Family: dnd^Value: ^) 
    24 exten => *79,2,SetVar(temp=${CHANNEL}) 
    25 exten => *79,3,Cut(temp=temp,,1) 
    26 exten => *79,4,DBDel(dnd/${temp}) 
    27 exten => *79,5,Hangup 
     21exten => *79,1,Set(DB(dnd/${CUT(CHANNEL|-|1)})=) 
     22exten => *79,n,UserEvent(ASTDB|Channel: ${CHANNEL}^Family: dnd^Value: ^) 
     23exten => *79,n,Hangup 
    2824 
    2925in op_astdb.cfg: 
     26 
    3027[dnd] 
    31 settext=DND: ${value} 
    32 setalpha=70 
     28settext=DND: ${value}| 
     29fopledcolor=0x001020^0|0x00A000^0 
     30 
     31in op_buttons.cfg 
     32 
     33[SIP/1234] 
     34.. 
     35astdbkey=SIP/1234 
    3336 
    3437RECIPE 2 
     
    4346 
    4447[rxfax] 
    45 exten => s,1,SetVar(FAXFILE=/var/spool/fax/fax-${TIMESTAMP}.tif) 
    46 exten => s,2,SetVar(LOCALSTATIONID=My Company) 
     48exten => s,1,Set(FAXFILE=/var/spool/fax/fax-${TIMESTAMP}.tif) 
     49exten => s,2,Set(LOCALSTATIONID=My Company) 
    4750exten => s,3,UserEvent(Newexten|Channel: FAX/FAX-${UNIQUEID}^State: Up^Uniqueid: 1234) 
    4851exten => s,4,rxfax(${FAXFILE}) 
  • trunk/extensions.conf.sample

    r1 r5  
    2424 
    2525 
    26 # Example on setting DND state from the dialplan 
    27 # *78 Sets DND ON 
    28 # *79 Sets DND OFF 
    29 # 
    30 # This example only sets the dnd db value and 
    31 # signals FOP to display the status on the button 
    32 # you might have to add a check in your stdext 
    33 # macro to honour the DND status 
    34  
    35 exten => *78,1,UserEvent(ASTDB|Family: dnd^State: On) 
    36 exten => *78,2,SetVar(temp=${CHANNEL}) 
    37 exten => *78,3,Cut(temp=temp,,1) 
    38 exten => *78,4,DBPut(dnd/${temp}=On) 
    39 exten => *78,5,Hangup 
    40  
    41 exten => *79,1,UserEvent(ASTDB|Family: dnd^State: ^) 
    42 exten => *79,2,SetVar(temp=${CHANNEL}) 
    43 exten => *79,3,Cut(temp=temp,,1) 
    44 exten => *79,4,DBDel(dnd/${temp}) 
    45 exten => *79,5,Hangup 
    46  
  • trunk/ming-source/operator_panel.pl

    r4 r5  
    74947494 
    74957495                                if (comando == "settext") { 
     7496                                        _global.ipboton[boton_numero]=textofinal; 
    74967497                                        setclid(statusclid,textofinal); 
    74977498                                } 
  • trunk/op_server.pl

    r4 r5  
    3434use POSIX qw(setsid EWOULDBLOCK); 
    3535 
    36 my $FOP_VERSION    = "SVNVERSION"; 
     36my $FOP_VERSION    = "trunk-r4"; 
    3737my %datos          = (); 
    3838my %sesbot         = (); 
     
    6060my %botonmeetme                = (); 
    6161my %botonclid                  = (); 
     62my %botonpermanenttext         = (); 
    6263my %botonqueue                 = (); 
    6364my %botonqueue_count           = (); 
     
    10511052            $tmphash{alarm} = "0"; 
    10521053 
    1053                
     1054       
    10541055        if ( !defined( $tmphash{url} ) ) { 
    10551056            $tmphash{url} = "0"; 
     
    12591260 
    12601261        @positions = unique(@positions); 
    1261                  
     1262 
    12621263        if ( defined( $tmphash{groupcount} ) ) { 
    12631264            my $count = @positions; 
     
    15931594                if ( $contextoboton eq $contexto_iterate ) { 
    15941595                    $key =~ s/(\d+)\@.+/$1/g; 
    1595                     print VARIABLES "&alarm$key=$base64_url\n"; 
    1596                 } 
    1597             } 
    1598         } 
    1599   
     1596                    print VARIABLES "&alarm$key=$base64_url\n"; 
     1597                } 
     1598            } 
     1599        } 
     1600 
    16001601        if ( !defined( $style_variables{$contextlower} ) ) { 
    16011602            $style_variables{$contextlower} = $style_variables{"general"}; 
     
    48064807        # Look for attendant_pending and perform a redirect of the 
    48074808        # hold channel to the same meetme room to complete the transfer 
    4808  
    48094809        my $canalid = $hash_temporal{Channel}; 
    48104810        my $room    = ""; 
     
    48484848        if ( exists( $datos{$unico_id} ) ) { 
    48494849            $datos{$unico_id}{'State'} = "Down"; 
     4850            $hash_temporal{'State'} = "Down"; 
    48504851            log_debug( "$heading POPULATES datos($unico_id){ State } = down", 128 ) if DEBUG; 
    4851         } 
    4852         else { 
    4853             $hash_temporal{'State'} = "Down"; 
    48544852        } 
    48554853 
     
    49804978            } 
    49814979 
    4982             if ( exists( $datos{$unico_id}{'State'} ) ) { 
    4983                 log_debug( "$heading EXISTE datos($unico_id){state}", 32 ) if DEBUG; 
    4984                 $state = $datos{$unico_id}{'State'}; 
    4985            
     4980            #if ( exists( $datos{$unico_id}{'State'} ) ) { 
     4981            #    log_debug( "$heading EXISTE datos($unico_id){state}", 32 ) if DEBUG; 
     4982            #    $state = $datos{$unico_id}{'State'}; 
     4983            #
    49864984 
    49874985            if ( exists( $datos{$unico_id}{'Callerid'} ) ) { 
     
    58535851                            else { 
    58545852                                $botonled{$interno} = $cambia_el_led; 
    5855                                 if ($ren_agentlogin || $ren_cbacklogin) { 
     5853                                if ( $ren_agentlogin || $ren_cbacklogin ) { 
    58565854                                    $botonlabel{$interno} = $dos; 
    58575855                                } 
     
    58945892                                    } 
    58955893                                    else { 
     5894 
    58965895                                        # print "PERO ES DISTINTO\n$val\n$mcola|$dos\n\n"; 
    58975896                                    } 
     
    59115910                        elsif ( $quehace eq "settext" ) { 
    59125911                            if ( !defined( $group_count{$interno} ) ) { 
    5913                                 $botonclid{$interno} = $dos; 
     5912                                $botonpermanenttext{$interno} = $dos; 
    59145913                                push @respuestas, "$interno|settext|$dos"; 
    59155914                            } 
     
    79307929        for $interno ( keys %estadoboton ) { 
    79317930 
    7932             #if ( $estadoboton{$interno} !~ /^free/ ) { 
    79337931            if ( $estadoboton{$interno} =~ /^busy/ ) { 
    79347932                send_status_to_flash( $socket, "$interno|state|busy", 0 ); 
     
    79417939            } 
    79427940            if ( defined( $botonclid{$interno} ) ) { 
     7941                my $texti = ""; 
    79437942                if ( $botonclid{$interno} ne "" ) { 
    79447943                    send_status_to_flash( $socket, "$interno|settext|$botonclid{$interno}", 0 ); 
     
    79467945            } 
    79477946 
    7948             #} 
    7949         } 
     7947        } 
     7948        if ( keys(%botonpermanenttext) ) { 
     7949            for $interno ( keys %botonpermanenttext ) { 
     7950                if ( $botonpermanenttext{$interno} ne "" ) { 
     7951                    send_status_to_flash( $socket, "$interno|settext|$botonpermanenttext{$interno}", 0 ); 
     7952                } 
     7953            } 
     7954        } 
     7955 
    79507956        if ( keys(%botonlinked) ) { 
    79517957            for $interno ( keys %botonlinked ) {