[Freeswitch-users] play_and_get_digits disconnect after input

Grant Bagdasarian GB at cm.nl
Wed Feb 12 15:30:57 MSK 2014


Hello,

I have the following in my dialplan.

  <context name="1000">

    <extension name="start">
      <condition field="destination_number" expression="^(.*)$" require-nested="false" break="never">

        <!--Answer the channel-->
        <action application="answer"/>

        <action application="play_and_get_digits" data="1 1 2 5000 # ${prompts_directory}/reprompt.wav ${prompts_directory}/invalid.wav dtmfInput \d+ 2500"/>

        <condition field="${dtmfInput}" expression="1" break="never">
          <!--Playback Security Code-->
          <action application="javascript" data="$${scripts_directory}/say_characters.js ${security_code} ${characters_directory} 500"/>
        </condition>

        <!--Hangup the channel-->
        <action application="hangup"/>

      </condition>
    </extension>

  </context>

As soon as I enter 1, the condition block isn't executed and the channel is hungup immediately.

|--- Dialplan: Processing recursive conditions level:1 [start_recur_1] require-nested=FALSE
|--- Dialplan: sofia/inbound/1002 at 192.168.1.1  Regex (FAIL) [start_recur_1] ${dtmfInput}() =~ /1/ break=never
Dialplan: sofia/inbound/1002 at 192.168.1.1 Regex (PASS) [start] destination_number(start) =~ /^(.*)$/ break=never
.................
EXECUTE sofia/inbound/1002 at 192.168.1.1 play_and_get_digits(1 1 2 5000 # /usr/src/freeswitch/sounds//1/prompts//reprompt.wav /usr/src/freeswitch/sounds//1/prompts//invalid.wav dtmfInput \d+ 2500)
2014-02-12 13:25:53.440479 [DEBUG] switch_ivr_play_say.c:1315 Codec Activated L16 at 8000hz 1 channels 20ms
2014-02-12 13:25:59.720479 [DEBUG] switch_rtp.c:3901 RTP RECV DTMF 1:1280
2014-02-12 13:25:59.720479 [DEBUG] switch_channel.c:471 RECV DTMF 1:1280
2014-02-12 13:25:59.720479 [DEBUG] switch_ivr_play_say.c:1703 done playing file /usr/src/freeswitch/sounds//1/prompts//reprompt.wav
EXECUTE sofia/inbound/1002 at 192.168.1.1 hangup()

Could anyone tell me what I'm doing wrong? Don't mind the variables, I removed some pieces of the dialplan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140212/bfcf6c78/attachment-0001.html 


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