Changeset 8
- Timestamp:
- 03/15/07 21:46:57 (2 years ago)
- Files:
-
- trunk/ming-source/operator_panel.pl (modified) (1 diff)
- trunk/op_server.pl (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ming-source/operator_panel.pl
r5 r8 7724 7724 inicio_timer[boton_numero] = 0; 7725 7725 7726 if (_global.ipboton[boton_numero] != undefined) {7727 setclid(statusclid,_global.ipboton[boton_numero]);7728 } else {7726 //if (_global.ipboton[boton_numero] != undefined) { 7727 // setclid(statusclid,_global.ipboton[boton_numero]); 7728 //} else { 7729 7729 statusclid.text = ""; 7730 }7730 //} 7731 7731 7732 7732 flechita.gotoAndStop(3); trunk/op_server.pl
r7 r8 4473 4473 $sclidname1 = $saved_clidname{"$server^$channel2"}; 4474 4474 my $clid_with_format = format_clid( $clid1, $sclidname1, $clid_format ); 4475 push @return, "$canal1|set text|$clid_with_format|$uniqueid1|$channel1conses";4475 push @return, "$canal1|setclid|$clid_with_format|$uniqueid1|$channel1conses"; 4476 4476 } 4477 4477 if ( $clid2 ne "" && $channel1 ne "" ) { 4478 4478 $sclidname2 = $saved_clidname{"$server^$channel1"}; 4479 4479 my $clid_with_format = format_clid( $clid2, $sclidname2, $clid_format ); 4480 push @return, "$canal2|set text|$clid_with_format|$uniqueid2|$channel2conses";4480 push @return, "$canal2|setclid|$clid_with_format|$uniqueid2|$channel2conses"; 4481 4481 } 4482 4482 } … … 4553 4553 } 4554 4554 4555 # Directamente borra la sesion que se debe renombrar4556 #if ( ( $nuevo_nombre !~ /</ ) && ( $viejo_nombre !~ /</ ) ) {4557 4555 my @final = (); 4558 4556 … … 4624 4622 } 4625 4623 $evento = ""; #NEW 4626 } 4627 4628 if ( $evento eq "peerstatus" ) { 4624 } elsif ( $evento eq "peerstatus" ) { 4629 4625 my $tiempo = 0; 4630 4626 $canal = $hash_temporal{Peer}; … … 4655 4651 push @return, "$canal|$estado_final|$texto|$unico_id|$canalid"; 4656 4652 $evento = ""; 4657 } 4658 4659 if ( $evento eq "extensionstatus" ) { 4653 } elsif ( $evento eq "extensionstatus" ) { 4660 4654 $canal = $hash_temporal{"Exten"}; 4661 4655 $canal =~ s/(\d+)/SCCP\/$1/g; … … 4671 4665 push @return, "$canal|$estado_final|$texto|$unico_id|$canalid"; 4672 4666 $evento = ""; 4673 } 4674 4675 if ( $evento eq "status" ) { 4667 } elsif ( $evento eq "status" ) { 4676 4668 $evento = ""; 4677 } 4678 4679 if ( $evento eq "statuscomplete" ) { 4669 } elsif ( $evento eq "statuscomplete" ) { 4680 4670 4681 4671 # When done with the status retrieval, generate events to send to … … 4770 4760 4771 4761 $evento = ""; #NEW (estaba comentado) 4772 } 4773 4774 if ( $evento eq "fakeismeetmemember" ) { 4762 } elsif ( $evento eq "fakeismeetmemember" ) { 4775 4763 my @bot1 = (); 4776 4764 my $bot2 = 0; 4777 4765 $estado_final = "meetmeuser"; 4778 $texto = $hash_temporal{ "Usernum"} . "," . $hash_temporal{"Meetme"};4779 my ( $chan1, $nada1 ) = separate_session_from_channel( $hash_temporal{ 'Channel'} );4780 push @return, "$hash_temporal{ 'Meetme'}|setlink|$hash_temporal{'Channel'}||$hash_temporal{'Channel'}";4781 push @return, "$chan1|setlink|$hash_temporal{ 'Meetme'}||$hash_temporal{'Channel'}";4782 $evento = ""; #NEW4783 } 4784 4785 if ( $evento eq "newexten" ) { 4786 4787 # If its a new extension without state , defaults to 'Up'4788 if ( !defined( $datos{$unico_id}{'State'} ) && $ fill_datos) {4766 $texto = $hash_temporal{Usernum} . "," . $hash_temporal{Meetme}; 4767 my ( $chan1, $nada1 ) = separate_session_from_channel( $hash_temporal{Channel} ); 4768 push @return, "$hash_temporal{Meetme}|setlink|$hash_temporal{Channel}||$hash_temporal{Channel}"; 4769 push @return, "$chan1|setlink|$hash_temporal{Meetme}||$hash_temporal{Channel}"; 4770 $evento = ""; 4771 4772 } elsif ( $evento eq "newexten" ) { 4773 4774 print "newexten\n"; 4775 # If its a new extension without state and priority 1, defaults to 'Up' and set setlid 4776 if ( !defined( $datos{$unico_id}{'State'} ) && $hash_temporal{Priority} == 1 ) { 4789 4777 $datos{$unico_id}{'State'} = "Up"; 4790 4778 log_debug( "$heading POPULATES datos($unico_id){ State } = Up", 128 ) if DEBUG; 4791 } 4779 ( $canal, $sesion ) = separate_session_from_channel($hash_temporal{Channel}); 4780 $texto = $hash_temporal{Extension}; 4781 $estado_final = "setclid"; 4782 } else { 4783 print "Newexten pero otro priority?\n"; 4784 } 4792 4785 4793 4786 # If its a parked channel, set the PARK button to 'Down' … … 4801 4794 log_debug( "$heading NO EXISTE parked{$server^$canalid}", 128 ) if DEBUG; 4802 4795 } 4803 } 4804 4805 if ( $evento eq "hangup" ) { 4796 4797 } elsif ( $evento eq "hangup" ) { 4806 4798 4807 4799 # Look for attendant_pending and perform a redirect of the … … 4862 4854 log_debug( "$heading NO EXISTE parked{$server^$canalid}", 128 ) if DEBUG; 4863 4855 } 4864 } 4865 4866 if ( $evento eq "unparkedcall" ) { 4856 } elsif ( $evento eq "unparkedcall" ) { 4867 4857 my $channel1 = $hash_temporal{"Channel"}; 4868 4858 … … 4876 4866 push @return, "$canal1|ocupado5||$unidchan|$channel1"; 4877 4867 } 4878 } 4879 4880 if ( $evento eq "parkedcall" ) { 4868 } elsif ( $evento eq "parkedcall" ) { 4881 4869 $texto = "&parked," . $hash_temporal{'Exten'} . "&"; 4882 4870 $estado_final = "ocupado3"; … … 4899 4887 $parked{"$server^$hash_temporal{'Channel'}"} = $hash_temporal{'Exten'}; 4900 4888 $evento = ""; #NEW 4901 } 4902 4903 if ( $evento eq "newcallerid" ) { 4889 } elsif ( $evento eq "newcallerid" ) { 4904 4890 $estado_final = "setstatus"; 4905 4891 $state = "Newcallerid"; … … 4924 4910 # Dont check for $evento bellow this line! 4925 4911 4912 print "AFTER IF ELSE IF evento = $evento\n"; 4913 4926 4914 if ( $evento ne "" ) { 4927 4915 log_debug( "$heading Event $evento, canal '$canal'", 32 ) if DEBUG; … … 4977 4965 $exten = $datos{$unico_id}{'Extension'}; 4978 4966 } 4979 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 #}4984 4967 4985 4968 if ( exists( $datos{$unico_id}{'Callerid'} ) ) { … … 5348 5331 } 5349 5332 5350 log_debug( "$heading canal: $canal", 1) if DEBUG;5351 log_debug( "$heading quehace: $quehace", 1) if DEBUG;5352 log_debug( "$heading dos: $dos", 32 ) if DEBUG;5353 log_debug( "$heading uniqueid: $uniqueid", 32 ) if DEBUG;5354 log_debug( "$heading canalid: $canalid", 1) if DEBUG;5333 log_debug( "$heading canal: $canal", 32 ) if DEBUG; 5334 log_debug( "$heading quehace: $quehace", 32 ) if DEBUG; 5335 log_debug( "$heading dos: $dos", 32 ) if DEBUG; 5336 log_debug( "$heading uniqueid: $uniqueid", 32 ) if DEBUG; 5337 log_debug( "$heading canalid: $canalid", 32 ) if DEBUG; 5355 5338 5356 5339 # if ( !defined($canal) ) { $canal = ""; } … … 5485 5468 && $quehace !~ /^state/ 5486 5469 && $quehace !~ /^settext/ 5470 && $quehace !~ /^setclid/ 5487 5471 && $quehace !~ /^setlabel/ 5488 5472 && $quehace !~ /^setlink/ … … 5603 5587 } 5604 5588 elsif ( $quehace eq "unsetlink" ) { 5605 5606 5589 log_debug( "$heading IF quehace = UNSETLINK", 32 ) if DEBUG; 5607 5590 my @final = (); … … 5709 5692 push @respuestas, "$interno|state|busy"; 5710 5693 5711 # Problems with callerid being cleared while a call is connected5712 # from a queue using Local channels, so commnet these out5713 #push @respuestas, "$interno|settext|";5714 #push @respuestas, "$interno|setstatus|";5715 5694 $laststatus{$interno} = "busy|${buttontext}"; 5716 5695 … … 5719 5698 if DEBUG; 5720 5699 } 5700 5701 # Conserva el callerid anterior 5721 5702 if ( defined( $preestadoboton{$interno} ) ) { 5722 5703 $estadoboton{$interno} = $preestadoboton{$interno}; … … 5908 5889 5909 5890 } 5891 elsif ( $quehace eq "setclid" ) { 5892 if ( !defined( $group_count{$interno} ) ) { 5893 push @respuestas, "$interno|settext|$dos"; 5894 } 5895 } 5910 5896 elsif ( $quehace eq "settext" ) { 5911 5897 if ( !defined( $group_count{$interno} ) ) { 5912 5898 $botonpermanenttext{$interno} = $dos; 5899 print "vino settext a digest permanent $interno = -$dos-\n"; 5913 5900 push @respuestas, "$interno|settext|$dos"; 5914 5901 } … … 6049 6036 # "isagent". "agentlogoff" 6050 6037 # everything else is pushed 6051 if ( defined( $group_count{$interno} ) && $quehace2 eq "set text" ) {6038 if ( defined( $group_count{$interno} ) && $quehace2 eq "setclid" ) { 6052 6039 log_debug( "$heading skip settext because groupcount is set", 32 ) if DEBUG; 6053 6040 } … … 6096 6083 if ( $quehace2 eq "ring" ) { 6097 6084 push @mensajefinal, "$interno|state|busy"; 6098 6099 #push @mensajefinal, "$interno|settext|$dos";6100 6085 } 6101 6086 if ( $quehace2 =~ /corto/ ) { … … 6146 6131 } 6147 6132 else { 6133 if ( defined( $botonpermanenttext{$interno} ) ) { 6134 push @mensajefinal, "$interno|settext|$botonpermanenttext{$interno}"; 6135 print "corto! permanent $interno = -$dos-\n"; 6136 #$botonpermanenttext{$interno} = $dos; 6137 } 6148 6138 $botonclid{$interno} = ""; 6139 6149 6140 } 6150 6141 … … 7948 7939 if ( keys(%botonpermanenttext) ) { 7949 7940 for $interno ( keys %botonpermanenttext ) { 7941 print "permanente $interno -$botonpermanenttext{$interno}-\n"; 7950 7942 if ( $botonpermanenttext{$interno} ne "" ) { 7951 7943 send_status_to_flash( $socket, "$interno|settext|$botonpermanenttext{$interno}", 0 );
