[Freeswitch-users] start_dtmf when no RFC 2833
Phillip Jones
pjintheusa at gmail.com
Tue Mar 17 22:29:43 MSK 2015
Thanks Chris.
So something like.
s = session:getVariable("switch_r_sdp")
if string.find(s, "telephone-event/8000") == nil then
session.execute("start_dtfm")
end
Is telephone-event/8000 the correct thing to look for? I guess it is from
the dial plan example.
On Tue, Mar 17, 2015 at 3:10 PM, Christopher Rienzo <cmrienzo at gmail.com>
wrote:
> You could set the "execute_on_answer" variable on the b-leg dialstring to
> execute the lua script. In the lua script, you'd use
> session:getVariable("switch_r_sdp") and then some pattern matching to
> figure out if "telephone-event" is in the SDP. If not, then do
> session:execute("start_dtmf", "")
>
> Chris
>
>
> On Tue, Mar 17, 2015 at 3:05 PM, Phillip Jones <pjintheusa at gmail.com>
> wrote:
>
>> Hi All,
>>
>> The following dial plan detects RFC 2833 and if it is not present, runs
>> the "start_dtmf" application.
>>
>> <condition field="${switch_r_sdp}"
>> expression="a=rtpmap:(\d+)\stelephone-event/8000" break="never">
>> <action application="set" data="rtp_payload_number=$1"/>
>> <anti-action application="start_dtmf"/>
>> </condition>
>>
>> I need to do this on the outbound leg - using Lua. Can anyone point me to
>> some code example that would achieve this or get me started?
>>
>> Any help appreciated.
>>
>> Thanks
>>
>>
>>
>> Phil
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150317/d89e134a/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list