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@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@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