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

play_and_get_digits method is not returning typed digits #81

Open
marcelojcaraujo opened this issue Sep 23, 2022 · 0 comments
Open

play_and_get_digits method is not returning typed digits #81

marcelojcaraujo opened this issue Sep 23, 2022 · 0 comments
Assignees
Labels

Comments

@marcelojcaraujo
Copy link

Calling sample outbound esl code on freeswitch 1.10.7 play_and_get_digits method is not returning to timeout.

Code:
...
digit = self.session.play_and_get_digits('1', '1', '3', '5000', '#',
'conference/conf-pin.wav',
'invalid.wav',
'digit_response', '[0-1]', '1000', "''",
block=True, response_timeout=5)
...

freeswitch console output:

2022-09-23 13:51:56.951182 97.93% [DEBUG] switch_ivr.c:632 sofia/internal/1010@fusionpbx-dev Command Execute [depth=0] play_and_get_digits(1 1 3 5000 # conference/conf-pin.wav invalid.wav digit_response [0-1] 1000 '')
EXECUTE [depth=0] sofia/internal/1010@fusionpbx-dev play_and_get_digits(1 1 3 5000 # conference/conf-pin.wav invalid.wav digit_response [0-1] 1000 '')
2022-09-23 13:51:56.951182 97.93% [DEBUG] mod_dptools.c:2904 Transfer on failure = [].
2022-09-23 13:51:56.951182 97.93% [DEBUG] switch_ivr_play_say.c:1556 Codec Activated L16@8000hz 1 channels 20ms
2022-09-23 13:51:58.651267 97.87% [DEBUG] switch_ivr_play_say.c:2001 done playing file /usr/share/freeswitch/sounds/en/us/callie/conference/conf-pin.wav
2022-09-23 13:52:00.291265 97.87% [DEBUG] switch_rtp.c:8179 RTP RECV DTMF 1:800
2022-09-23 13:52:00.291265 97.87% [INFO] switch_channel.c:527 RECV DTMF 1:800
2022-09-23 13:52:05.311170 97.83% [NOTICE] switch_core_state_machine.c:382 sofia/internal/1010@fusionpbx-dev has executed the last dialplan instruction, hanging up.
2022-09-23 13:52:05.311170 97.83% [NOTICE] switch_core_state_machine.c:384 Hangup sofia/internal/1010@fusionpbx-dev [CS_EXECUTE] [NORMAL_CLEARING]

python output:

DEBUG:root:Event Processor Running
DEBUG:root:Connection count 1
ERRORRR
ERROR:root:Exception raised when handling call
Traceback (most recent call last):
File "/home/marcelo/dev/ivr-tts/ivr_tts/fs_esl_out.py", line 36, in run
self.safe_run()
File "/home/marcelo/dev/ivr-tts/ivr_tts/fs_esl_out.py", line 90, in safe_run
digit = self.session.play_and_get_digits('1', '1', '3', '5000', '#',
File "/home/marcelo/.cache/pypoetry/virtualenvs/ivr-tts-6y5d3Kla-py3.10/lib/python3.10/site-packages/greenswitch/esl.py", line 420, in play_and_get_digits
event = async_response.get(block=True, timeout=response_timeout)
File "src/gevent/event.py", line 329, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 356, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/_abstract_linkable.py", line 487, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
File "src/gevent/_abstract_linkable.py", line 490, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
File "src/gevent/_abstract_linkable.py", line 442, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
File "src/gevent/_abstract_linkable.py", line 451, in gevent._gevent_c_abstract_linkable.AbstractLinkable._switch_to_hub
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
gevent.timeout.Timeout: 5 seconds
INFO:root:Waiting for event processing greenlet exit
DEBUG:root:Socket closed: {'Content-Type': 'text/disconnect-notice', 'Controlled-Session-UUID': '9eda2394-9986-4b6c-b45d-30c5e3358808', 'Content-Disposition': 'disconnect', 'Content-Length': '67'}
DEBUG:root:Raising OutboundSessionHasGoneAway for all pendingresults
INFO:root:Call from 1010 ended
DEBUG:root:Connection count 0
(ivr-tts-6y5d3Kla-py3.10) marcelo@endeavo
ur8:~/dev/ivr-tts$ cd /home/marcelo/dev/ivr-tts ; /
usr/bin/env /home/marcelo/.cache/pypoetry/virtualenvs/ivr-tts-6y5d3Kla-py3.10/bin/python /home/marcelo/.vscode/extensions/ms-python.python-2022.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 40427 -- /home/marcelo/dev/ivr-tts/ivr_tts/fs_esl_out.py
INFO:root:Starting OutboundESLServer at 0.0.0.0:[5000]
INFO:root:Successfully bound to port 5000
DEBUG:root:Event Processor Running
DEBUG:root:Connection count 1
ERRORRR
ERROR:root:Exception raised when handling call
Traceback (most recent call last):
File "/home/marcelo/dev/ivr-tts/ivr_tts/fs_esl_out.py", line 36, in run
self.safe_run()
File "/home/marcelo/dev/ivr-tts/ivr_tts/fs_esl_out.py", line 90, in safe_run
digit = self.session.play_and_get_digits('1', '1', '3', '5000', '#',
File "/home/marcelo/.cache/pypoetry/virtualenvs/ivr-tts-6y5d3Kla-py3.10/lib/python3.10/site-packages/greenswitch/esl.py", line 420, in play_and_get_digits
event = async_response.get(block=True, timeout=response_timeout)
File "src/gevent/event.py", line 329, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 356, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/_abstract_linkable.py", line 487, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
File "src/gevent/_abstract_linkable.py", line 490, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
File "src/gevent/_abstract_linkable.py", line 442, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
File "src/gevent/_abstract_linkable.py", line 451, in gevent._gevent_c_abstract_linkable.AbstractLinkable._switch_to_hub
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
gevent.timeout.Timeout: 5 seconds
INFO:root:Waiting for receive greenlet exit
DEBUG:root:Socket closed: {'Content-Type': 'text/disconnect-notice', 'Controlled-Session-UUID': 'd36d07b6-b5a2-4e16-9f26-728bb7a6b8ea', 'Content-Disposition': 'disconnect', 'Content-Length': '67'}
DEBUG:root:Raising OutboundSessionHasGoneAway for all pendingresults
INFO:root:Call from 1010 ended

@italorossi italorossi added the bug label Sep 23, 2022
@italorossi italorossi self-assigned this Sep 23, 2022
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