[Freeswitch-users] spandsp detects tone only while sleeping?
Mitchell Langs
napole at gmail.com
Wed Jan 29 19:26:01 UTC 2020
I want to originate a call and do something as soon as the busy tone
is detected. I use this lua script but nothing is detected:
session = freeswitch.Session("{codec_string=PCMA}sofia/external/ringbusyde at 192.168.2.4:5080");
consumer = freeswitch.EventConsumer("DETECTED_TONE");
session:execute("spandsp_start_tone_detect", "49");
event = consumer:pop(1,6000);
However when I sleep after spandsp_start_tone_detect the tone is
detected properly:
session = freeswitch.Session("{codec_string=PCMA}sofia/external/ringbusyde at 192.168.2.4:5080");
consumer = freeswitch.EventConsumer("DETECTED_TONE");
session:execute("spandsp_start_tone_detect", "49");
session:execute("sleep", "2000");
event = consumer:pop(1,6000);
I'd like to understand why it is not working in the first case.
log output if needed:
https://pastebin.com/CnFsKNsJ
More information about the FreeSWITCH-users
mailing list