[Freeswitch-users] start_dtmf when no RFC 2833

Phillip Jones pjintheusa at gmail.com
Fri Mar 20 01:08:11 MSK 2015


Just for others looking later, here is the final code I came up with, with
rtp_payload extracted.

if session:getVariable("switch_r_sdp") ~= nil then
 local s = '[[' .. session:getVariable("switch_r_sdp") ..']]'
 if string.find(s, "a=rtpmap:(%d+)%stelephone%-event%/8000") ~= nil then

freeswitch.consoleLog("debug", "NO NEED TO START starting
spandsp_start_dtmf\n")
 local payload = string.match(s,"a=rtpmap:(%d+)%stelephone%-event%/8000")
 if payload  ~= nil then
freeswitch.consoleLog("debug", "rtp_payload_number = " .. payload  .."\n")
end

else

freeswitch.consoleLog("info", "starting spandsp_start_dtmf\n")
session:execute("spandsp_start_dtmf")
session:sleep(2000)
 end

end


Cheers

Phil




>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150319/89dc8f44/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list