Show
Ignore:
Timestamp:
02/11/11 18:40:47 (2 years ago)
Author:
p_lindheimer
Message:

adds a toggle feature code and hints to go in conjunction with Asterisk patch submission 18788 on review board as 1105 re #778

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/core/agi-bin/user_login_out.agi

    r9667 r11342  
    5252  $que_devstate = get_var( "QUEDEVSTATE" ) == "TRUE" ? true : false; 
    5353  $intercom_code = get_var( "INTERCOMCODE" ); 
     54  $campon_toggle = get_var( "CAMPONTOGGLE" ); 
    5455 
    5556  $ast_version14 = version_compare($ast_version, "1.4", "ge"); 
     
    278279    global $dnd_devstate; 
    279280    global $intercom_code; 
     281    global $campon_toggle; 
    280282    global $ast_version14; 
    281283 
     
    285287    if ($devices) { 
    286288      $dial_string = get_dial_string($devices); 
     289 
     290      if ($campon_toggle != 'nocampon' && $campon_toggle != '') { 
     291        $dev_arr = explode('&',$dial_string); 
     292        $hint_val = 'ccss:'.implode('&ccss:',$dev_arr); 
     293        $response = $astman->send_request('Command',array('Command'=>$dp_pre."add extension {$campon_toggle}{$user},hint,{$hint_val} into ext-local replace")); 
     294      } 
    287295      if ($dnd_devstate) { 
    288296        $dial_string .= "&Custom:DND$user"; 
     
    298306      if ($intercom_code != 'nointercom' && $intercom_code != '') { 
    299307        $response = $astman->send_request('Command',array('Command'=>$dp_pre."remove extension {$intercom_code}{$user}@ext-local hint")); 
     308      } 
     309      if ($campon_toggle != 'nocampon' && $campon_toggle != '') { 
     310        $response = $astman->send_request('Command',array('Command'=>$dp_pre."remove extension {$campon_toggle}{$user}@ext-local hint")); 
    300311      } 
    301312    }