如何讓freeswitch支持inband按鍵,包括檢測識別以及發送

 

傳統模擬線路轉數只能inband,所以要fs這裏開啓inband的檢測以及發送。

先說識別:

方法一:官方文檔和書本都推薦的,對應路由增加這句話

            <action application="set" data="dtmf_type=inband"/>
            <action application="start_dtmf"/>

結果:識別率非常糟糕,誤檢或者漏檢。大坑,千萬別用。

 

方法二:官方文檔上面找到的,引用 mod_spandsp 這個模塊來進行識別,對應路由增加這句

             <action application="spandsp_start_dtmf"/>

結果:識別率非常高。關於這個模塊,官方文檔有這個說明:

Inband DTMF detectors in mod_spandsp can detect duration in addition to frequency. The Teletone detector in the FreeSWITCH core is based on an old version of spandsp and should be replaced with this detector.

最後一句話是重點,意思是自帶的檢測器(方法1)基於spandsp的舊版本,應替換爲該檢測器。真是天雷滾滾。

 

再來發送的,只找到這個方法

            <action application="start_dtmf_generate"/>

結果:效果還可以,不過按鍵多了,會報錯,報錯了就不再發碼了,沒有找到更好的解決方法,有更好的方法可以評論區留言。 

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