freeswitch dtmf rfc2833 rtp 只识别一种

一、extension

 <action application="execute_extension" data="dtmfinband XML dtmfinband"/>


[root@host044016 dialplan]# cat dtmfinband.xml 

<?xml version="1.0" encoding="utf-8"?>
<include>
  <context name="dtmfinband">
  <extension name="dtmfinband">
        <condition field="${switch_r_sdp}" expression="a=rtpmap:(\d+)\stelephone-event/8000" break="always">
        <anti-action application="start_dtmf"/>
      </condition>
    </extension>
  </context>
</include>

二、lua

local switch_r_sdp = session:getVariable( "switch_r_sdp" )
-- freeswitch.consoleLog("INFO", string.format(" ===r_sdp===: %s \n",switch_r_sdp))
local dtmftype=string.find(switch_r_sdp,"a=rtpmap%d+)%s+telephone%-event/8000") 

你可能感兴趣的:(xml,session,application,extension,encoding)