Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetDigits not receiving DTMF #38

Closed
cwells opened this issue Aug 23, 2011 · 8 comments
Closed

GetDigits not receiving DTMF #38

cwells opened this issue Aug 23, 2011 · 8 comments
Assignees
Labels

Comments

@cwells
Copy link

cwells commented Aug 23, 2011

My action URL is called inconsistently, but even when it is called, it never receives digits, even thought Freeswitch appears to be queuing them:

plivo-outbound:

2011-08-23 22:28:21,657 plivo-outbound[8003]: INFO: (1) Processing Call
2011-08-23 22:28:21,657 plivo-outbound[8003]: INFO: (1) Fetching RESTXML from http://127.0.0.1:5000/inbound/answered with {}
2011-08-23 22:28:21,713 plivo-outbound[8003]: INFO: (1) Sent to POST http://127.0.0.1:5000/inbound/answered with {'To': '9711231234', 'Direction': 'inbound', 'From': '5031231234', 'CallUUID': 'ae2e093c-cdb5-11e0-9c64-d9ad09e6366b', 'CallStatus': 'ringing'} -- Result: <Response><GetDigits action="http://127.0.0.1:5000/inbound/getdigits"><Play>/usr/local/freeswitch/scripts/jovan-welcome.wav</Play></GetDigits></Response>
2011-08-23 22:28:21,714 plivo-outbound[8003]: INFO: (1) Requested RESTXML to http://127.0.0.1:5000/inbound/answered with {'To': '9711231234', 'Direction': 'inbound', 'From': '5031231234', 'CallUUID': 'ae2e093c-cdb5-11e0-9c64-d9ad09e6366b', 'CallStatus': 'ringing'}
2011-08-23 22:28:21,863 plivo-outbound[8003]: DEBUG: (1) Answering because Element GetDigits need it
2011-08-23 22:28:21,863 plivo-outbound[8003]: DEBUG: (1) Execute: answer args=, uuid='', lock=True, loops=1
2011-08-23 22:28:21,868 plivo-outbound[8003]: DEBUG: (1) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=>
2011-08-23 22:28:21,868 plivo-outbound[8003]: INFO: (1) [GetDigits]  {'finishOnKey': '#', 'retries': 1, 'timeout': 5, 'validDigits': '0123456789*#', 'invalidDigitsSound': '', 'playBeep': 'false', 'action': 'http://127.0.0.1:5000/inbound/getdigits', 'method': 'POST', 'numDigits': 99}
2011-08-23 22:28:21,868 plivo-outbound[8003]: INFO: (1) GetDigits Started ['/usr/local/freeswitch/scripts/jovan-welcome.wav']
2011-08-23 22:28:21,868 plivo-outbound[8003]: DEBUG: (1) Execute: set args=playback_delimiter=!, uuid='', lock=True, loops=1
2011-08-23 22:28:21,871 plivo-outbound[8003]: DEBUG: (1) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=>
2011-08-23 22:28:21,872 plivo-outbound[8003]: DEBUG: (1) Execute: play_and_get_digits args=1 99 1 5000 '#' file_string://silence_stream://1!/usr/local/freeswitch/scripts/jovan-welcome.wav silence_stream://150 pagd_input (0|1|2|3|4|5|6|7|8|9|\*|#)+ 5000, uuid='', lock=True, loops=1
2011-08-23 22:28:21,875 plivo-outbound[8003]: DEBUG: (1) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=>
2011-08-23 22:28:35,298 plivo-outbound[8003]: DEBUG: (1) Execute: api args='uuid_getvar ae2e093c-cdb5-11e0-9c64-d9ad09e6366b pagd_input'
2011-08-23 22:28:35,302 plivo-outbound[8003]: DEBUG: (1) Response: <ApiResponse headers={'Content-Length': '7', 'Content-Type': 'api/response'}, body=_undef_>
2011-08-23 22:28:35,303 plivo-outbound[8003]: INFO: (1) GetDigits, No Digits Received
2011-08-23 22:28:35,303 plivo-outbound[8003]: INFO: (1) [GetDigits] Done
2011-08-23 22:28:35,303 plivo-outbound[8003]: DEBUG: (1) Execute: api args='uuid_getvar ae2e093c-cdb5-11e0-9c64-d9ad09e6366b plivo_transfer_progress'
2011-08-23 22:28:35,305 plivo-outbound[8003]: DEBUG: (1) Response: <ApiResponse headers={'Content-Length': '7', 'Content-Type': 'api/response'}, body=_undef_>
2011-08-23 22:28:35,305 plivo-outbound[8003]: INFO: (1) No more Elements, Hangup Now !
2011-08-23 22:28:35,306 plivo-outbound[8003]: DEBUG: (1) Execute: hangup args=, uuid='', lock=True, loops=1

Freeswitch console:

2011-08-23 11:28:21.905651 [DEBUG] switch_ivr.c:551 FreeTDM/1:14/9711231234 Command Execute play_and_get_digits(1 99 1 5000 '#' file_string://silence_stream://1!/usr/local/freeswitch/scripts/jovan-welcome.wav silence_stream://150 pagd_input (0|1|2|3|4|5|6|7|8|9|\*|#)+ 5000)
EXECUTE FreeTDM/1:14/9711231234 play_and_get_digits(1 99 1 5000 '#' file_string://silence_stream://1!/usr/local/freeswitch/scripts/jovan-welcome.wav silence_stream://150 pagd_input (0|1|2|3|4|5|6|7|8|9|\*|#)+ 5000)
2011-08-23 11:28:21.905651 [DEBUG] switch_ivr_play_say.c:1162 Codec Activated L16@8000hz 1 channels 20ms
2011-08-23 11:28:22.076658 [DEBUG] switch_ivr_play_say.c:1476 done playing file
2011-08-23 11:28:30.746081 [DEBUG] ftdm_io.c:2868 [s1c14][1:14] Queuing DTMF 1
2011-08-23 11:28:30.746081 [DEBUG] mod_freetdm.c:698 Queuing DTMF [1] in channel FreeTDM/1:14/9711231234
2011-08-23 11:28:30.746081 [DEBUG] switch_ivr_play_say.c:1476 done playing file
@mike-plivo
Copy link
Member

Hi,
can you give your restxml and your FS dialplan ?

Seems FS is queueing dtmfs but never flushes the buffer .

I see you're using FreeTDM, is there any parameter for setting dtmfs like dtmf length, ... ?

Maybe we need to explicitly flush dtmfs in buffer ... or another bug fro FreeTDM ... :p

@cwells
Copy link
Author

cwells commented Aug 23, 2011

public.xml (copied from Plivo install files):

<include>
  <context name="public">

    <extension name="unloop">
      <condition field="${unroll_loops}" expression="^true$"/>
      <condition field="${sip_looped_call}" expression="^true$">
    <action application="deflect" data="${destination_number}"/>
      </condition>
    </extension>
    <!--
    Tag anything pass thru here as an outside_call so you can make sure not
    to create any routing loops based on the conditions that it came from
    the outside of the switch.
    -->
    <extension name="outside_call" continue="true">
      <condition>
    <action application="set" data="outside_call=true"/>
    <action application="set" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
      </condition>
    </extension>

    <extension name="call_debug" continue="true">
      <condition field="${call_debug}" expression="^true$" break="never">
        <action application="info"/>
      </condition>
    </extension>

    <!--
     This extension allows calling any digits of number
     freeswitch will call plivo outbound server on every incoming call
    -->
    <extension name="plivo_public_did">
        <condition field="destination_number" expression="^(\d+)$">
            <action application="enable_heartbeat" data="60"/>
            <action application="socket" data="69.168.53.39:8084 async full"/>
        </condition>
    </extension>

  </context>
</include>

restxml:

/inbound/answered

<Response>
  <GetDigits action="http://127.0.0.1:5002/inbound/getdigits">
    <Play>/usr/local/freeswitch/scripts/jovan-welcome.wav</Play>
  </GetDigits>
</Response>

/inbound/getdigits

<Response>
  <Play>/usr/local/freeswitch/scripts/jovan-thankyou.wav</Play>
</Response>

@mike-plivo
Copy link
Member

ok
can you retry with GetDigits and timeout='20' and paste the FS and plivo logs ?

@mike-plivo
Copy link
Member

also try using a sip line instead of a freetdm to see if it works
and try freetdm in FS XML dialplan using play_and_get_digits to see if it works too .

@ghost ghost assigned mike-plivo Aug 24, 2011
@mike-plivo
Copy link
Member

Any news ?

I have another idea .
try using http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_flush_dtmf before play_and_get_digits in FS dialplan .

@cwells
Copy link
Author

cwells commented Aug 29, 2011

Sorry for the delay. We've been rearranging our stack due to issues between Sangoma (our T1 card vendor), freetdm and Freeswitch. I just finished migrating our T1 box to Asterisk, which is now handling the TDM layer and sending the voice via SIP to Freeswitch. With that out of the way, I need to retest to see if the issue still exists. I should be able to give an answer by tomorrow.

@mike-plivo
Copy link
Member

ok perfect :)

@cwells cwells closed this as completed Oct 11, 2011
@cwells
Copy link
Author

cwells commented Oct 11, 2011

I'm closing this as I've given up on running FS on a separate server for now. Running FS on the same system as Plivo works great, running FS on a separate system doesn't work and simply isn't important enough to keep fighting with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants