Show
Ignore:
Timestamp:
02/19/12 10:55:05 (1 year ago)
Author:
p_lindheimer
Message:

closes #4911 removes record_in and record_out from sip, iax, dahdi, zap tables and code no longer used with new recording changes

Files:

Legend:

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

    r13469 r13476  
    371371                $output .= $result2['keyword']."=".$result2['data']."\n"; 
    372372              break; 
    373             case 'record_in': 
    374             case 'record_out': 
    375               break; 
    376373            case 'context': 
    377374              $context = $result2['data']; 
     
    552549                $output .= $result2['keyword']."=".$result2['data']."\n"; 
    553550              break; 
    554             case 'record_in': 
    555             case 'record_out': 
    556               break; 
    557551            case 'context': 
    558552              $context = $option; 
     
    646640 
    647641          // These are not zapata.conf variables so keep out of file 
    648           case 'record_out': 
    649           case 'record_in': 
    650642          case 'dial': 
    651643            break; 
     
    46354627  $sipfields[] = array($account,'callerid',$db->escapeSimple((isset($_REQUEST['description']) && $_REQUEST['description'])?$_REQUEST['description']." <".$account.'>':'device'." <".$account.'>'),$flag++); 
    46364628   
    4637   // Where is this in the interface ?????? 
    4638   $sipfields[] = array($account,'record_in',$db->escapeSimple(($_REQUEST['record_in'])?$_REQUEST['record_in']:'On-Demand'),$flag++); 
    4639   $sipfields[] = array($account,'record_out',$db->escapeSimple(($_REQUEST['record_out'])?$_REQUEST['record_out']:'On-Demand'),$flag++); 
    4640  
    46414629  $compiled = $db->prepare('INSERT INTO sip (id, keyword, data, flags) values (?,?,?,?)'); 
    46424630  $result = $db->executeMultiple($compiled,$sipfields); 
     
    47164704  $iaxfields[] = array($account,'setvar',$db->escapeSimple("REALCALLERIDNUM=$account"),$flag++); 
    47174705   
    4718   // Where is this in the interface ?????? 
    4719   $iaxfields[] = array($account,'record_in',$db->escapeSimple(($_REQUEST['record_in'])?$_REQUEST['record_in']:'On-Demand'),$flag++); 
    4720   $iaxfields[] = array($account,'record_out',$db->escapeSimple(($_REQUEST['record_out'])?$_REQUEST['record_out']:'On-Demand'),$flag++); 
    4721    
    47224706  $compiled = $db->prepare('INSERT INTO iax (id, keyword, data, flags) values (?,?,?,?)'); 
    47234707  $result = $db->executeMultiple($compiled,$iaxfields); 
     
    47914775  $zapfields[] = array($account,'callerid',$db->escapeSimple(($_REQUEST['description'])?$_REQUEST['description']." <".$account.'>':'device'." <".$account.'>')); 
    47924776   
    4793   // Where is this in the interface ?????? 
    4794   $zapfields[] = array($account,'record_in',$db->escapeSimple(($_REQUEST['record_in'])?$_REQUEST['record_in']:'On-Demand')); 
    4795   $zapfields[] = array($account,'record_out',$db->escapeSimple(($_REQUEST['record_out'])?$_REQUEST['record_out']:'On-Demand')); 
    4796  
    47974777  $compiled = $db->prepare('INSERT INTO zap (id, keyword, data) values (?,?,?)'); 
    47984778  $result = $db->executeMultiple($compiled,$zapfields); 
     
    48444824  $dahdifields[] = array($account,'callerid',$db->escapeSimple(($_REQUEST['description'])?$_REQUEST['description']." <".$account.'>':'device'." <".$account.'>')); 
    48454825   
    4846   // Where is this in the interface ?????? 
    4847   $dahdifields[] = array($account,'record_in',$db->escapeSimple(($_REQUEST['record_in'])?$_REQUEST['record_in']:'On-Demand')); 
    4848   $dahdifields[] = array($account,'record_out',$db->escapeSimple(($_REQUEST['record_out'])?$_REQUEST['record_out']:'On-Demand')); 
    4849  
    48504826  $compiled = $db->prepare('INSERT INTO dahdi (id, keyword, data) values (?,?,?)'); 
    48514827  $result = $db->executeMultiple($compiled,$dahdifields); 
     
    53235299  } 
    53245300   
    5325   // TODO: go through and really remove the old recording stuff! 
    5326   $results['record_in']='Adhoc'; 
    5327   $results['record_out']='Adhoc'; 
    53285301  if ($astman) { 
    53295302 
     
    66236596 
    66246597  // Ensure variables possibly extracted later exist 
    6625   $name = $outboundcid = $record_in = $record_out =  $sipname = $cid_masquerade = $newdid_name = $newdid = $newdidcid = $call_screen = $pinless = null; 
     6598  $name = $outboundcid = $sipname = $cid_masquerade = $newdid_name = $newdid = $newdidcid = $call_screen = $pinless = null; 
    66266599 
    66276600  // Init vars from $_REQUEST[] 
  • modules/branches/2.10/core/install.php

    r13091 r13476  
    812812$affected_rows .= $db->affectedRows(); 
    813813$affected_rows ? out(sprintf(_("updated %s records"),$affected_rows)) : out(_("not needed")); 
     814 
     815 
     816$tables = array('sip', 'iax', 'zap', 'dahdi'); 
     817outn(_("deleting obsoleted record_in and record_out entries..")); 
     818foreach ($tables as $table) { 
     819  $sql = "DELETE FROM `$table` WHERE `keyword` in ('record_in', 'record_out')"; 
     820  $db->query($sql); 
     821} 
     822out(_("ok"));