<div dir="ltr"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">We have been using </span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">waitforresult to try and wait for AMD to come back with something but we are having issues with it hanging (never returning from that) and locking up a license).  We have also tried using the amd_execute_on_person command as it doesn't seem to be working.  </span><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">We originally had the script setup to run amd_execute_on_person but that was never hit and we would end up just waiting the full timeout each time before checking the result: </span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(amd.lua)</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">dst_number = session:getVariable("sip_to_user")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">initial_wait = session:getVariable("ppamd_initial_wait")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">max_wait = session:getVariable("ppamd_max_wait")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">if not max_wait then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    max_wait = 3000<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">while (session:ready() and not session:answered()) do<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    -- Waiting for answer.<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    session:sleep(500)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">--    freeswitch.msleep(500)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">function on_finished(reason)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    if reason == nil then reason = "unspecified" end<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    session:setVariable("ppamd_reason", reason)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    session:execute("transfer", "process_amd XML default")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">if session:ready() and session:answered() then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    freeswitch.consoleLog("INFO", string.format("AMD Enable on %s.\n", dst_number))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    if initial_wait then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:sleep(initial_wait)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    end<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    local use_amd = api:executeString("amd_available")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    if use_amd == "true" then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        -- Be sure to set these variables.  They will stop the wait and immediatly transfer the call if it gets a hit<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:setVariable("amd_execute_on_machine", "transfer amd_machine_detected XML default")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:setVariable("amd_execute_on_person", "transfer amd_person_detected XML default")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:setVariable("amd_execute_on_unsure", "transfer amd_unsure_detected XML default")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:execute("voice_start")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        -- Giving some time to AMD to work on the call.<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        -- If a voicemail is detected, it will auto-transfer from the variables that are set.<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:sleep(max_wait)</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        local amd_finished_called = session:getVariable("amd_finished_called")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        if amd_finished_called == 'true' then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            freeswitch.consoleLog("INFO", string.format("AMD Finish script already called!\n"))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        else<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            -- NOTE: Hopefully this never gets called as the module should auto transfer this<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            freeswitch.consoleLog("INFO", string.format("AMD Timeout reached for vmd: %s\n", max_wait))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            session:execute("voice_stop")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            local amd_detect = session:getVariable("amd_status")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            freeswitch.consoleLog("INFO", string.format("AMD amd_status: %s\n", amd_detect))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            on_finished(amd_detect)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        end<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    else<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        freeswitch.consoleLog("WARNING", string.format("AMD not available for %s\n", dst_number))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        on_finished("unavailable")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    end<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">else<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    freeswitch.consoleLog("WARNING", string.format("AMD Failed to run %s\n", dst_number))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    on_finished("failure")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    return<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font></blockquote><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">the amd_execute_on_XXX does not seem to do anything...  The sleep would always max out and we would always hit the Timeout reached part of the script instead of getting transferred.  </div></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">After that didn't work because we would always wait the sleep time (3 seconds) we scrapped transfers and tried handling the whole thing through a single lua script using <span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">waitforresult:</span></div><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div><span style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">DEFAULT_MAX_WAIT = 3000 -- in (ms)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">DEFAULT_INITIAL_WAIT = 100 -- in (ms)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">HUMAN_EXTENSION = "amd_queue"<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">UNSURE_EXTENSION = "amd_queue"</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">api = freeswitch.API()</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">dst_number = session:getVariable("sip_to_user")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">initial_wait = session:getVariable("ppamd_initial_wait") or DEFAULT_INITIAL_WAIT<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">max_wait = session:getVariable("ppamd_max_wait") or DEFAULT_MAX_WAIT</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">while (session:ready() and not session:answered()) do<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    session:sleep(500)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">freeswitch.consoleLog("INFO", string.format("AMD Attempting on %s. \n", dst_number))</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">if initial_wait then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    session:sleep(initial_wait)<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">if session:ready() and session:answered() then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    local use_amd = api:executeString("amd_available")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    if use_amd == "true" then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        freeswitch.consoleLog("INFO", string.format("AMD Available Max Wait: %s, Initial Wait %s. \n", max_wait, initial_wait))</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        -- Allow AMD to run and analyze.</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        freeswitch.consoleLog("INFO", "AMD Voice start. \n")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:execute("voice_start")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        freeswitch.consoleLog("INFO", "AMD Wait for result. \n")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:execute("waitforresult", string.format("%s", max_wait))</span><br></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        freeswitch.consoleLog("INFO", "AMD Voice stop. \n")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        session:execute("voice_stop")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        amd_detect = session:getVariable("amd_status")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        freeswitch.consoleLog("INFO", string.format("AMD Result: %s. \n", amd_detect))</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        if amd_detect == "machine" then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            freeswitch.consoleLog("INFO", "AMD Detected machine. \n")</span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px"><br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            session:hangup()<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            return<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        elseif amd_detect == "person" then<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            freeswitch.consoleLog("INFO", "AMD Detected human, transfering call. \n")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            session:execute("transfer", string.format("%s XML default", HUMAN_EXTENSION))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            return<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        else<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            freeswitch.consoleLog("INFO", string.format("AMD Unknown: %s. \n", amd_detect))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            session:execute("transfer", string.format("%s XML default", UNSURE_EXTENSION))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">            return<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">        end<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    end<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">else<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    freeswitch.consoleLog("INFO", "AMD not enabled. \n")<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    session:execute("transfer", string.format("%s XML default", UNSURE_EXTENSION))<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">    return<br></span></font><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">end</span></font></blockquote><div style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><br></div></span></div></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I prefer not having to do all that transferring around but to just run with waitforresult but it never comes back... </span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">The dialplan extensions just connect the call to an agent.  Once we do the transfer it all works.  The only problem is we have to replace the:</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">session:execute("waitforresult", string.format("%s", max_wait))</span></span></blockquote><div><br></div><div>with a sleep so no matter if the mod_com_amd detects its a person or not we ALWAYS have to wait the full sleep time.  This is not really legal as we would be essentially abandoning every single call... </div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px">Any thoughts on what we may be missing or how we could improve this?</span></font></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div></div>