Hi Grant,

 

Check inside your JS script for a value.  It is waiting for the hangup event to run so DTMFvalues should exist.

 

You <action application=”log” … may be running before the DTMF is received.

 

Sean

 

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Grant Bagdasarian
Sent: Wednesday, May 14, 2014 7:59 AM
To: FreeSWITCH Users Help (freeswitch-users@lists.freeswitch.org)
Subject: [Freeswitch-users] Received DTMF not available

 

Hello,

 

I’m originating calls from Freeswitch to remote destinations.

When the destination answers the call (wait_for_answer) I ask the destination for some digits.

 

        <action application="play_and_get_digits" data="6 8 2 5000 # ${prompts_directory}/ask_and_collect.wav ${prompts_directory}/invalid.wav dtmfInput \d 2500"/>

 

        <action application="set" data="api_hangup_hook=jsrun $${scripts_directory}/collect_data.js ${internal_reference} DTMFInput=${dtmfInput}"/>

 

        <action application="log" data="INFO The caller entered the following code for verification: ${dtmfInput}" />

 

It happens quite often where the variable $[dtmfInput} doesn’t have a value, even though I see the console output in Freeswitch receiving the DTMF events.

2014-05-14 13:29:26.316614 [DEBUG] switch_rtp.c:3901 RTP RECV DTMF 3:2880

2014-05-14 13:29:26.316614 [DEBUG] switch_channel.c:471 RECV DTMF 3:2880

2014-05-14 13:29:26.956611 [DEBUG] switch_rtp.c:3901 RTP RECV DTMF 1:2880

2014-05-14 13:29:26.956611 [DEBUG] switch_channel.c:471 RECV DTMF 1:2880

 

I’m using RFC2833 mode.

 

Any ideas why this happens?

 

Regards,

 

Grant