Changeset 14224

Show
Ignore:
Timestamp:
07/02/12 19:55:50 (11 months ago)
Author:
GameGamer43
Message:

adds getters and setters for callwaiting, not currently used anywhere but should be used in the future for things like ARI, etc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/callwaiting/functions.inc.php

    r13091 r14224  
    7676  $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid) 
    7777} 
     78 
     79function callwaiting_set($extension, $state = '') { 
     80  global $astman; 
     81 
     82  if ($state != "") { 
     83          $ret = $astman->database_put('CW',$extension,$state); 
     84        } else { 
     85                $ret = $astman->database_del('CW',$extension); 
     86          $ret = $ret['result']; 
     87  } 
     88   
     89  return $ret; 
     90} 
     91 
     92function callwaiting_get($extension = '') { 
     93  global $astman; 
     94 
     95  if ($extension) { 
     96    return $astman->database_get('CW', $extension); 
     97  } else { 
     98    return $astman->database_show('CW'); 
     99  } 
     100} 
    78101?>