<extension name="early_media_dtmf">
<condition>
<action application="pre_answer"/>
<action application="play_and_get_digits" data="2 5 1 7000 # /usr/share/freeswitch/sounds/en/us/callie/conference/8000/conf-pin.wav '' foobar \d+"/>
<action application="log" data="INFO captured digits ${foobar}"/>
</condition>
</extension>
2016-01-31 00:20:24.399711 [DEBUG] switch_rtp.c:6865 RTP RECV DTMF 1:1600
2016-01-31 00:20:24.399711 [INFO] switch_channel.c:502 RECV DTMF 1:1600
2016-01-31 00:20:24.819718 [DEBUG] switch_rtp.c:6865 RTP RECV DTMF 2:1600
2016-01-31 00:20:24.819718 [INFO] switch_channel.c:502 RECV DTMF 2:1600
2016-01-31 00:20:25.159703 [DEBUG] switch_rtp.c:6865 RTP RECV DTMF 3:1600
2016-01-31 00:20:25.159703 [INFO] switch_channel.c:502 RECV DTMF 3:1600
2016-01-31 00:20:25.539688 [DEBUG] switch_rtp.c:6865 RTP RECV DTMF 4:1600
2016-01-31 00:20:25.539688 [INFO] switch_channel.c:502 RECV DTMF 4:1600
2016-01-31 00:20:25.819704 [DEBUG] switch_rtp.c:6865 RTP RECV DTMF 5:1600
2016-01-31 00:20:25.819704 [INFO] switch_channel.c:502 RECV DTMF 5:1600
EXECUTE sofia/internal/1001@91.103.196.13 log(INFO captured digits 12345)
2016-01-31 00:20:25.819704 [INFO] mod_dptools.c:1692 captured digits 12345
Some (many) carriers only allow one-way audio from the switch to the caller so that you don’t get free phone calls. Early media is the part of the call that is not billed. If they allow the caller to send audio to the switch during this free period it would open them up to fraud.
Bote
From: Dmitriy Borisov
Sent: Saturday, 30 January, 2016 15:19
Subject: [Freeswitch-users] DTMF capture and early media
Hi, All!
https://tools.ietf.org/html/rfc3960 has next part:
Early media refers to media (e.g., audio and video) that is exchangedbefore a particular session is accepted by the called user. Within adialog, early media occurs from the moment the initial INVITE is sentuntil the User Agent Server (UAS) generates a final response. It maybe unidirectional or bidirectional, and can be generated by thecaller, the callee, or both. Typical examples of early media generated by
the callee are ringing tone and announcements (e.g.,queuing status). Early media generated by the caller typicallyconsists of voice commands or dual tone multi-frequency (DTMF) tonesto drive interactive voice response (IVR) systems.But I know that in FreeSWITCH in preanswer state I can`t capture DTMF. Why?
This part of RFC is conflicting with some other standard? It can be very intresting feature.
--
С уважением,
Борисов Дмитрий
Отдел облачных технологий 1С-Рарус
Тел. +7 (495) 231-20-02 доб.: 15-94
--
with best regards,
Dmitriy Borisov
1C-Rarus Cloud Services
tel.: +7 (495) 231-20-02 add.: 15-94
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org