Some issues
CraftedCat opened this issue · 2 comments
Hi, thank you for your project!
error, when try catch digits
digit = self.session.play_and_get_digits('3', '20', '3', '10000', "#*", 'ivr/ivr-welcome.wav', 'ivr/ivr-pin_or_extension_is-invalid.wav', 'some_digits', '\d+', '1000', "''", block=True, response_timeout=5)
Traceback (most recent call last):
File "outbound_socket_example.py", line 31, in run
self.safe_run()
File "outbound_socket_example.py", line 55, in safe_run
block=True, response_timeout=5)
File "/usr/local/lib/python3.6/dist-packages/greenswitch/esl.py", line 398, in play_and_get_digits
event = async_response.get(block=True, timeout=response_timeout)
File "src/gevent/event.py", line 268, in gevent._event.AsyncResult.get
File "src/gevent/event.py", line 293, in gevent._event.AsyncResult.get
File "src/gevent/_abstract_linkable.py", line 165, in gevent.__abstract_linkable.AbstractLinkable._wait_core
File "src/gevent/_abstract_linkable.py", line 169, in gevent.__abstract_linkable.AbstractLinkable._wait_core
File "src/gevent/_greenlet_primitives.py", line 60, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 60, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 64, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/__greenlet_primitives.pxd", line 35, in gevent.__greenlet_primitives._greenlet_switch
gevent.timeout.Timeout: 5 seconds
FreeSWITCH Version 1.10.1-release~64bit (-release 64bit)
You have set 10 seconds to play_and_get_digit
timeout, and your response_timeout is set to 5 seconds. You need at least to wait for the play_and_get_digit
timeout
check https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+play_and_get_digits
I need play wav file, and catch digits. That's all. I know wav duration, which parameters i need set?
digits = self.session.play_and_get_digits('3', '20', '1', '13000', "#",
file_path,
'ivr/ivr-pin_or_extension_is-invalid.wav',
'some_digits', '\d+', '1000', "''", block=True, response_timeout=60)
file duration 12 sec