spandsp.conf.xml增加下面这一段:
<descriptor name="china">
<tone name="BUSY_TONE">
<!-- 450hz, 单频 -->
<element freq1="450" freq2="0" min="300" max="400"/> <!--350ms on-->
<element freq1="0" freq2="0" min="300" max="400"/> <!--350ms off-->
<element freq1="450" freq2="0" min="300" max="400"/> <!--第2个tone-->
</tone>
</descriptor>
Dialplan参考下面这一段:
<action application="spandsp_start_tone_detect" data="china"/>
<action application="set" data="api_on_spandsp_tone_detect_BUSY_TONE='uuid_kill ${uuid}'"/>
<action application="set" data="execute_on_spandsp_tone_detect_BUSY_TONE=hangup"/> <!--跟上面的一行起同样的作用,api和app不需同时配置-->
<action application="answer" data=""/>
...
呼出可以抄上面的路由,设置好通道变量就行。
我没严格测试过,如果谁有fxo网关,可以试试。如果不起作用的话,录下语音给我。