Changeset 18
- Timestamp:
- 03/20/07 17:02:22 (2 years ago)
- Files:
-
- trunk/op_server.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/op_server.pl
r17 r18 2334 2334 my $heading = "** FIND_PANEL_BUT"; 2335 2335 my $calleridnum = "noexiste"; 2336 my $didnum = "noexiste"; 2336 2337 my %trunk_matched = (); 2337 2338 … … 2346 2347 my $uniqueid = find_uniqueid( $canalsesion, $server ); 2347 2348 if ( $uniqueid ne "" ) { 2348 if ( defined( $datos{$uniqueid}{"CallerID"} ) ) { 2349 $calleridnum = $datos{$uniqueid}{"CallerID"}; 2349 if ( defined( $datos{$uniqueid}{CallerID} ) ) { 2350 $calleridnum = $datos{$uniqueid}{CallerID}; 2351 } 2352 if ( defined( $datos{$uniqueid}{Extension} ) && 2353 defined( $datos{$uniqueid}{AppData} ) && 2354 $datos{$uniqueid}{AppData} =~ m/^FROM_DID/ 2355 ) { 2356 $didnum = $datos{$uniqueid}{"Extension"}; 2357 print "set did $didnum\n"; 2350 2358 } 2351 2359 } … … 2465 2473 # Attemp to match a button from cache 2466 2474 $indice_cache = $canalsesion . "-" . $canal . "-" . $server; 2467 if ( !defined( $cache_hit{$indice_cache} ) ) {2475 if ( !defined( $cache_hit{$indice_cache} ) || $didnum ne "noexiste" ) { 2468 2476 log_debug( "$heading CACHE MISS $indice_cache", 32 ) if DEBUG; 2469 2477 for ( keys %buttons ) { … … 2505 2513 if ( $canalfinal ne "" ) { 2506 2514 log_debug( "$heading clid match trunk ( $_ ) $canal $contexto", 32 ) if DEBUG; 2507 $trunk_matched{"$server^ $canal"} = 1;2515 $trunk_matched{"$server^CLID/$calleridnum"} = 1; 2508 2516 $canalfinal =~ s/(.*)\^(.*)/$2/g; 2509 2517 } … … 2514 2522 $canalfinal = "CLID/$calleridnum"; 2515 2523 } 2524 elsif ( $_ =~ /^$server\^DID\/\Q$didnum\E=/ ) { 2525 print "did num match $didnum\n"; 2526 my ($ccanal, $ssesion) = separate_session_from_channel($canalsesion); 2527 my $tcanal = "DID/".$didnum."-".$ssesion; 2528 if ( !exists( $trunk_matched{"$server^DID/$didnum"} ) ) { 2529 $canalfinal = get_next_trunk_button( $tcanal, $contexto, $server, $tcanal ); 2530 if ( $canalfinal ne "" ) { 2531 print "canalfinal $canalfinal\n"; 2532 log_debug( "$heading did match trunk ( $_ ) $canal $contexto", 32 ) if DEBUG; 2533 $trunk_matched{"$server^DID/$didnum"} = 1; 2534 $canalfinal =~ s/(.*)\^(.*)/$2/g; 2535 } 2536 } 2537 } 2538 elsif ( $_ =~ /^$server\^DID\/\Q$didnum\E\&?/ ) { 2539 log_debug( "$heading did match ( $_ ) $canal $contexto", 32 ) if DEBUG; 2540 $canalfinal = "DID/$didnum"; 2541 } 2542 2516 2543 2517 2544 if ( $canalfinal ne "" ) { … … 5319 5346 if ( $quehace eq "" ) { 5320 5347 log_debug( "$heading skipping $canal (empty quehace)", 32 ) if DEBUG; 5321 print "skip empty\n";5322 5348 next; 5323 5349 } … … 5874 5900 push @respuestas, "$interno|settext|$dos"; 5875 5901 } 5902 if ( $estadoboton{$interno} eq "" ) { 5903 push @respuestas, "$interno|state|busy"; 5904 $estadoboton{$interno}="busy"; 5905 } 5876 5906 } elsif ( $quehace eq "settext" ) { 5877 5907 if ( !defined( $group_count{$interno} ) ) {
