No subject


Sun May 13 13:41:23 UTC 2007


When the system recordings module wants to enable a sound file it only needs to rename it (before it was doing a full copy).



Modified: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog	2007-07-10 06:02:29 UTC (rev 3733)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog	2007-07-10 14:24:33 UTC (rev 3734)
@@ -1,3 +1,10 @@
+freepbx-module-recordings (2.2-3.3.2-2) unstable; urgency=low
+
+  * Now system recordings are done directly in sounds/custom (not /tmp)
+  * Do not list ivr recordings in the drop down menu of the module
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com>  Wed, 27 Jun 2007 16:57:37 +0300
+
 freepbx-module-recordings (2.2-3.3.2-1) unstable; urgency=low
 
   * New upstream release

Modified: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch	2007-07-10 06:02:29 UTC (rev 3733)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch	2007-07-10 14:24:33 UTC (rev 3734)
@@ -4,9 +4,44 @@
 ## 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-07-10 15:51:20.000000000 +0300
++++ freepbx-module-recordings/functions.inc.php	2007-07-10 17:17:40.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?
+@@ -211,11 +211,20 @@
+ 
+ function recordings_readdir($snddir) {
+ 	$files = recordings_getdir($snddir);
++	$remove_arr = array();
+ 	$ptr = 0;
+ 	foreach ($files as $fnam) {
+ 		$files[$ptr] = substr($fnam, strlen($snddir)+1);
++		// ignore ivr recordings
++		if (preg_match('!custom/\d+-ivrrecording!',$files[$ptr])) {
++			$remove_arr[] = $files[$ptr];
++		}
+ 		$ptr++;
+ 	}
++
++	// remove from the list custom/*-ivrrecording*
++	$files = array_diff($files , $remove_arr );
++
+ 	// Strip off every possible file extension
+ 	$flist = preg_replace("/\.(au|g723|g723sf|g726-\d\d|g729|gsm|h263|ilbc|mp3|ogg|pcm|[au]law|[au]l|mu|sln|raw|vox|WAV|wav|wav49)$/", "", $files);
+ 	sort($flist);
 diff -urNad freepbx-module-recordings~/page.recordings.php freepbx-module-recordings/page.recordings.php
---- freepbx-module-recordings~/page.recordings.php	2007-01-22 06:28:04.000000000 +0200
-+++ freepbx-module-recordings/page.recordings.php	2007-02-18 15:25:11.000000000 +0200
+--- freepbx-module-recordings~/page.recordings.php	2007-04-02 11:21:37.000000000 +0300
++++ freepbx-module-recordings/page.recordings.php	2007-07-10 17:12:59.000000000 +0300
 @@ -47,8 +47,11 @@
  		recording_sysfiles();
  		break;
@@ -21,6 +56,19 @@
  		$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 '<div class="content"><h5>'._("Failed to create").' '.$recordings_astsnd_path.'custom'.'</h5>';			
+ 			}		
+ 		} 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");
+ 
+ 			recording_sidebar(null, $usersnum);
 @@ -310,8 +313,9 @@
  }
  

Modified: freepbx/trunk/debian/patches/00list
===================================================================
--- freepbx/trunk/debian/patches/00list	2007-07-10 06:02:29 UTC (rev 3733)
+++ freepbx/trunk/debian/patches/00list	2007-07-10 14:24:33 UTC (rev 3734)
@@ -10,6 +10,7 @@
 fix-ari-link
 fix-permissions
 fix-process-fax-path
+fix-recording-save
 
 # integration with debian's op-panel
 fix-fop-config.dpatch

Added: freepbx/trunk/debian/patches/fix-recording-save.dpatch
===================================================================
--- freepbx/trunk/debian/patches/fix-recording-save.dpatch	                        (rev 0)
+++ freepbx/trunk/debian/patches/fix-recording-save.dpatch	2007-07-10 14:24:33 UTC (rev 3734)
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-recording-save.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: System recordings should be done in the custom sounds dir
+## DP: and not in the /tmp/. This simplifies the code and works better
+## DP: To be commited upstream "soon" and removed in version 2.2.3 or 2.3.0
+
+ at DPATCH@
+diff -urNad upstream~/amp_conf/astetc/extensions.conf upstream/amp_conf/astetc/extensions.conf
+--- upstream~/amp_conf/astetc/extensions.conf	2007-06-08 05:50:53.000000000 +0300
++++ upstream/amp_conf/astetc/extensions.conf	2007-06-27 14:41:34.000000000 +0300
+@@ -673,11 +673,11 @@
+ [macro-systemrecording]
+ exten => s,1,Goto(${ARG1},1)
+ 
+-exten => dorecord,1,Record(/tmp/${CALLERID(number)}-ivrrecording:wav)
++exten => dorecord,1,Record(custom/${CALLERID(number)}-ivrrecording:wav)
+ exten => dorecord,n,Wait(1)
+ exten => dorecord,n,Goto(confmenu,1)
+ 
+-exten => docheck,1,Playback(/tmp/${CALLERID(number)}-ivrrecording)
++exten => docheck,1,Playback(custom/${CALLERID(number)}-ivrrecording)
+ exten => docheck,n,Wait(1)
+ exten => docheck,n,Goto(confmenu,1)
+ 


Property changes on: freepbx/trunk/debian/patches/fix-recording-save.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-voip-commits mailing list