FreeSWITCH開啓錄音功能

FreeSwitch錄音功能默認是關閉的,需要修改配置開啓錄音功能。

 

首先備份freeswitch/conf/dialplan/default.xml 。

然後編輯default.xml ,在

<extension name="Local_Extension">
     <condition field="destination_number" expression="^(10[01][0-8])$">

下面加入以下配置即可錄音。

<action application="set" data="RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/>
<action application="set" data="RECORD_COPYRIGHT=(c) 2011"/>
<action application="set" data="RECORD_SOFTWARE=FreeSWITCH"/>
<action application="set" data="RECORD_ARTIST=FreeSWITCH"/>
<action application="set" data="RECORD_COMMENT=FreeSWITCH"/>
<action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/>
<action application="set" data="RECORD_STEREO=true"/>
<action application="record_session" data="/opt/FreeSwitch/recordings/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>

如果是Windows測試使用,最後一行可使用如下配置:

<action application="record_session" data="D:/FreeSwitch/recordings/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>

該配置即是錄音文件的存放位置。

加入配置後按F6重新加載配置即可生效。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章