diegolocal@turing:~/Proj/pkg-voip/freepbx/trunk$ cat ../modules-2.2/ _cache/ modules/ modules-2.2.xml .svn/ diegolocal@turing:~/Proj/pkg-voip/freepbx/trunk$ cat ../modules-2.2/modules/freepbx-module-recordings/debian/patches/ 00list fix-sysrecordings-debian.dpatch sqlite3-support.dpatch .svn/ diegolocal@turing:~/Proj/pkg-voip/freepbx/trunk$ cat ../modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch #! /bin/sh /usr/share/dpatch/dpatch-run ## fix-sysrecordings-debian.dpatch by Diego Iastrubni ## ## DP: The system recordings path is /usr/share on debian based systems @DPATCH@ diff -urNad freepbx-module-recordings~/functions.inc.php freepbx-module-recordings/functions.inc.php --- freepbx-module-recordings~/functions.inc.php 2007-04-02 11:21:37.000000000 +0300 +++ freepbx-module-recordings/functions.inc.php 2007-06-27 17:07:04.000000000 +0300 @@ -2,9 +2,9 @@ // Source and Destination Dirctories for recording global $recordings_astsnd_path; // PHP5 needs extra convincing of a global -$recordings_save_path = "/tmp/"; $recordings_astsnd_path = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; $recordings_astsnd_path .= "/sounds/"; +$recordings_save_path = $recordings_astsnd_path . "/custom/"; function recordings_get_config($engine) { global $ext; // is this the best way to pass this? diff -urNad freepbx-module-recordings~/page.recordings.php freepbx-module-recordings/page.recordings.php --- freepbx-module-recordings~/page.recordings.php 2007-04-02 11:21:37.000000000 +0300 +++ freepbx-module-recordings/page.recordings.php 2007-06-27 17:06:09.000000000 +0300 @@ -47,8 +47,11 @@ recording_sysfiles(); break; case "newsysrec": - $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; - $astsnd .= "/sounds/"; + // debian uses another directory for this + //$astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; + //$astsnd .= "/sounds/"; + $astsnd = "/usr/share/asterisk/sounds/"; + $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1); if (recordings_add($sysrecs[$sysrec], $sysrecs[$sysrec])) { $id = recordings_get_id($sysrecs[$sysrec]); @@ -67,9 +70,9 @@ echo '
'._("Failed to create").' '.$recordings_astsnd_path.'custom'.'
'; } } else { - // can't rename a file from one partition to another, must use mv or cp - // rename($recordings_save_path."{$dest}ivrrecording.wav",$recordings_astsnd_path."custom/{$filename}.wav"); - exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $recordings_astsnd_path."custom/{$filename}.$suffix"); + // recordings are done on the same directory - with different name + // ivr-*.wav are generated by dialing *77 + rename($recordings_save_path."{$dest}ivrrecording.wav",$recordings_astsnd_path."custom/{$filename}.wav"); $isok = recordings_add($rname, "custom/{$filename}.$suffix");