freeswitch的會議功能

轉自:http://blog.csdn.net/voip123/article/details/7893783


 FreeSwitch 默認支持會議功能,有如下特點:

          (1) 不需要創建一個會議室的操作,只需要通過 conference 撥碼計劃就可以實現;

          (2) 會議室不真正存在, 直到有人呼入爲止;

          (3) 會議功能很強大,能實現靈活控制。

 

            這樣講太學術化,來點直觀的,步驟如下:

          (1) 運行 FREESWITCH 服務器程序;

          (2) 註冊 1000、1001、1002三部IP話機;

          (3) 通過 1000 呼叫 3000,通話建立後, 1000 將聽到一段保持音樂;

          (4) 通過 1001 呼叫 3000,通話建立後, 1001將能聽到1000的聲音,1000也能聽到1001的聲音;

          (5) 通過 1002 呼叫 3000,通話建立後,  1002將能聽到 1000 和 1001的聲音,1001能聽到1000和1002的聲音,1000也能聽到 1001 和 1002 的聲音。

              

            那 3000 這個號碼是怎麼來的? 請看 \conf\dialplan\default.xml 中的內容,如下所示:

             <!--
                   start a dynamic conference with the settings of the "default" conference profile in conference.conf.xml

                   使用 conference.conf.xml 中定義的屬性進行如下會議
             -->                                                                                                                                                       
            <extension name="nb_conferences">
                <condition field="destination_number" expression="^(30\d{2})$">
                   <action application="answer"/>
                   <action application="conference" data="$1-${domain_name}@default"/>
                </condition>
             </extension>


 FreeSwitch 提供了一些控制會議成員行爲的方法,羅列如下:

          (1)Talk volume: The volume of the audio the caller sends (that is, gain control).

                   與會成員講話的音量控制;

          (2)Listen volume: The volume of the audio the caller hears.

                   與會成員收聽語音的音量控制;

          (3)Energy threshold: The minimum energy level of the audio from the caller to be considered talking. Raising the energy level will cut down on background noise when
                   a participant is in a noisy environment.

                   語音門限控制 。

 

            具體用法,可以查看:\conf\autoload_configs\console.conf.xml ,內容如下:

             <caller-controls>
                 <group name="default">
                   <control action="mute" digits="0"/>             // 靜音
                   <control action="deaf mute" digits="*"/>      // 解除靜音
                   <control action="energy up" digits="9"/>     // 增加門限
                   <control action="energy equ" digits="8"/>   // 
                   <control action="energy dn" digits="7"/>     // 降低門限
                   <control action="vol talk up" digits="3"/>     // 提高講話音量 
                   <control action="vol talk zero" digits="2"/>  // 講話音量設置爲0
                   <control action="vol talk dn" digits="1"/>     // 降低講話音量
                   <control action="vol listen up" digits="6"/>  // 提高收聽音量
                   <control action="vol listen zero" digits="5"/> // 收聽音量設置爲0
                   <control action="vol listen dn" digits="4"/>    // 降低收聽音量 
                   <control action="hangup" digits="#"/>           // 退出會議
               </group>
            </caller-controls>


 FreeSwitch中可以設置主持人以及會議密碼。設置了主持人後,可以影響會議的開展;設置了會議密碼後,與會成員必須輸入正確密碼才能入會。

        主持人對會議的影響主要體現在以下兩個方面:

      (1)直到主持人入會後,會議纔開始;

      (2)主持人退出會議後,會議才結束。

 

        那怎麼設置主持人?方法如下:

        <action application="conference" data="$1@default"/> // 未設置主持人
        <action application="conference" data="$1@default+flags{moderator}"/> // 設置了主持人

 

        如何設置會議密碼?方法如下:

        <action application="conference" data="$1@default+1234"/> // 設置入會密碼爲 1234

 

        如何既設置主持人,又設置會議密碼?方法如下:

       <action application="conference" data="$1@default+1234+flags{moderator}"/>

 


FreeSwitch 是否支持視頻會議?答案是 支持的!

               FreeSwitch 默認只支持與會成員看到當前“嗓門最大”的那個人的視頻。

               在實際應用中,當講話人改變時,視頻會切換,但切換的時候,視頻會有馬賽克現象。使用h264比h263效果要更好一點,馬賽克現象會降低一些。

 

               場景描述如下:

               三個用戶 1000、1001、1002 都註冊到同一臺服務器。

             (1)1000 呼叫 3000,進入會議,同時發送自己的視頻,1000 可以看到自己;

             (2)1001 呼叫 3000,進入會議,可以看到 1000 的視頻。若1001也發送自己的視頻,雙方看到的視頻是當前講話聲音大的一方的視頻;

             (3)1002 呼叫 3000,進入會議,可以看到當前講話一方的視頻。若 1002 也發送自己的視頻,三方看到的視頻是當前講話聲音大的一方的視頻。

 

               再擴展下思維,能否讓 FreeSwitch 實現融屏功能,實現與會各方都能彼此看到自己!那FreeSwitch就更強大了。以下是幾個相關的資源簡介:

             (1)BigBluebutton 這個視頻會議項目中用到了 FreeSwitch, 項目主頁: http://www.bigbluebutton.org/ 。但對視頻的處理只是轉發各路視頻,沒有實現融屏合成一路視頻推送到各方顯示。

             (2)openvcs 是一個開源的 SIP MCU 實現,項目主頁:http://code.google.com/p/openvcs/ 。 在 Windows 下實現了融屏的原型設計,但在效率以及併發處理方面,還有許多需要完善的地方。但提供了一個開發 SIP MCU 的思路,這個是很有價值的。



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