2012年8月20日 星期一

Elastix 2.30 錄音格式改成MP3

原文連結: http://www.osslab.com.tw/VoIP/IP_PBX/%E8%BB%9F%E9%AB%94%E5%BC%8F_IP_PBX/Asterisk/%E7%99%BC%E8%A1%8C%E5%A5%97%E4%BB%B6%E5%8F%8A%E7%B3%BB%E7%B5%B1%E5%AE%89%E8%A3%9D/Elastix/%E8%AE%8A%E6%9B%B4%E9%80%9A%E8%A9%B1%E9%8C%84%E9%9F%B3%E6%AA%94%E6%A0%BC%E5%BC%8F%E7%82%BA_MP3


Elastix 2.0 會出現 404 file not found
請編輯 /var/www/html/modules/monitoring/index.php

找到這幾行


更新 2.30版
    if (!file_exists($path) || !is_file($path)) {
        Header('HTTP/1.1 404 Not Found');
        die("404 4 "._tr("no_file")." ");
    }
替換成
    if (!file_exists($path) || !is_file($path)) {
           // modified by alang
           // check the format mp3
           $mp3file = str_replace(".wav",".mp3",$file);
           $mp3path = $path_record.$mp3file;
           if (!is_file($mp3path)) {
              die("404 40 ".$arrLang["no_file"]." ");
           }else{
              $file = $mp3file;
              $path = $mp3path;
           }
        }
 
PS.如果在Elastix / monitoring 顯示 404 40
則要手動修改/var/www/html/modules/monitoring/configs/default.conf.php
 #$arrConfModule['records_dir']       = '/var/spool/asterisk/monitor/';
改為你所指定的錄音檔存放路徑.