[Freeswitch-users] start_dtmf when no RFC 2833

Phillip Jones pjintheusa at gmail.com
Tue Mar 17 23:59:37 MSK 2015


Appreciated. Thanks

On Tue, Mar 17, 2015 at 4:38 PM, Steven Ayre <steveayre at gmail.com> wrote:

> It is. The regex checking a=rtpmap too would be more 'correct', but in
> practice you'll only see that string on that line.
>
> Since telephone-event has no static payload type assigned you'll always
> see the a=rtpmap line for it, so you don't need to worry about non-verbose
> SDP.
>
>
> On 17 March 2015 at 19:29, Phillip Jones <pjintheusa at gmail.com> wrote:
>
>> 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
>>>
>>
>>
>> _________________________________________________________________________
>> 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/297692bf/attachment-0001.html 


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