Changeset 4576

Show
Ignore:
Timestamp:
07/28/07 01:34:24 (6 years ago)
Author:
p_lindheimer
Message:

Merged revisions 4574 via svnmerge from
https://amportal.svn.sourceforge.net/svnroot/amportal/modules/branches/2.3

........

r4574 | p_lindheimer | 2007-07-27 22:30:14 -0700 (Fri, 27 Jul 2007) | 1 line


#2092 problems creating recordings, if running asterisk as root, was trying to mv tmp file saved as root, also provided better error message when things go wrong to diagnose

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.2

    • Property svnmerge-integrated changed from /modules/branches/2.1:1-2166,2289,2414,2419,2424,2430,2449,2458,2462,2476 /modules/branches/2.3:1-3256,4102,4227,4232,4251,4312,4390,4570 to /modules/branches/2.1:1-2166,2289,2414,2419,2424,2430,2449,2458,2462,2476 /modules/branches/2.3:1-3256,4102,4227,4232,4251,4312,4390,4570,4574
  • modules/branches/2.2/recordings/module.xml

    r4295 r4576  
    22  <rawname>recordings</rawname> 
    33  <name>Recordings</name> 
    4   <version>3.3.4</version> 
     4  <version>3.3.4.1</version> 
    55  <type>setup</type> 
    66  <category>Internal Options &amp; Configuration</category> 
    77  <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description> 
    88  <changelog> 
     9  *3.3.4.1* #2092 can't cannot save/read file fix some errors, better messages 
    910  *3.3.4* fixed bug not able to save recorded message from *77 featurecode, backported for FreePBX 2.3 
    1011  *3.3.3* #2032 remove recordings as a destination, no purpose (use annoucement module) 
  • modules/branches/2.2/recordings/page.recordings.php

    r4294 r4576  
    7272      // can't rename a file from one partition to another, must use mv or cp 
    7373      // rename($recordings_save_path."{$dest}ivrrecording.wav",$recordings_astsnd_path."custom/{$filename}.wav"); 
    74       exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $astsnd."custom/{$filename}.$suffix"); 
    75       $isok = recordings_add($rname, "custom/{$filename}.$suffix"); 
     74      if (!file_exists($recordings_save_path."{$dest}ivrrecording.$suffix")) { 
     75        echo "<hr><h5>"._("[ERROR] The Recorded File Does Not exists:")."</h5>"; 
     76        echo $recordings_save_path."{$dest}ivrrecording.$suffix<br><br>"; 
     77        echo "make sure you uploaded or recorded a file with the entered extension<hr>"; 
     78      } else { 
     79        exec("cp " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $astsnd."custom/{$filename}.$suffix", $outarray, $ret); 
     80        if (!$ret) { 
     81          $isok = recordings_add($rname, "custom/{$filename}.$suffix"); 
     82        } else { 
     83          echo "<hr><h5>"._("[ERROR] SAVING RECORDING:")."</h5>"; 
     84          foreach ($outarray as $line) { 
     85            echo "$line<br>"; 
     86          } 
     87          echo _("Make sure you have entered a proper name"); 
     88          echo "<hr>"; 
     89        } 
     90        exec("rm " . $recordings_save_path . "{$dest}ivrrecording.$suffix ", $outarray, $ret); 
     91        if ($ret) { 
     92          echo "<hr><h5>"._("[ERROR] REMOVING TEMPORARY RECORDING:")."</h5>"; 
     93          foreach ($outarray as $line) { 
     94            echo "$line<br>"; 
     95          } 
     96          echo _("Make sure Asterisk is not running as root "); 
     97          echo "<hr>"; 
     98        } 
     99      } 
    76100 
    77101      recording_sidebar(null, $usersnum);