[Freeswitch-users] Loop play while wait DTMF digit

Dmitry Mordovin d.mordovin at dwide.com
Mon Aug 31 18:24:08 MSD 2015


Hello

This example play conf-pin.wav and wait DTMF.

<extension name="play_and_get_digits example">
   <condition field="destination_number" expression="^(1888)$">
     <action application="play_and_get_digits" data="2 5 3 7000 # $${base_dir}/sounds/en/us/callie/conference/8000/conf-pin.wav /invalid.wav foobar \d+"/>
     <action application="log" data="CRIT ${foobar}"/>
   </condition>
</extension>


Is it possible to play WAV file in infinity loop and wait user DTMF?

And how can I check DTMF input after user entered DTMF?

In dialpeer, like.
If ${DTMF} = 1 then bridge to XXX
If ${DTMF} = 2 then play file and finish session



Thank you.
Dmitry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150831/36f28436/attachment.html 


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