function setAsteriskDirectWave($id, $phrase) { $wav = getWaveFilePhrase($phrase); if (DIRECTORY_SEPARATOR != "\\") { $path = "/var/lib/asterisk/sounds/pt_BR/" . $id . ".wav"; //echo "Dest path: $path \n"; copy($wav, $path); } }
public function applyConfigToFreePBX() { $ivrMenu = array(); foreach ($this->msgs as $msg) { $ivrMenu[] = getWaveFilePhrase($msg); } $joined = getConcatenatedWaves($ivrMenu); setFreePbxRecordingWave($joined, $this->name); $this->config->insert("recordings", array('id' => "{$this->extension}", 'displayname' => $this->name, 'filename' => "custom/{$this->name}", 'description' => "{$this->name}", 'fcode' => (int) 0, 'fcode_pass' => "")); }