<div dir="ltr">I have a patch that could do async curl using the curl multi api, but not finished yet.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 19, 2021 at 7:07 PM VERMA Vineet (BCS/SPS) via FreeSWITCH-users <<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br><br>---------- Forwarded message ----------<br>From: "VERMA Vineet (BCS/SPS)" <<a href="mailto:vineet.verma@bics.com" target="_blank">vineet.verma@bics.com</a>><br>To: "<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>" <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>Cc: <br>Bcc: <br>Date: Mon, 19 Apr 2021 11:00:44 +0000<br>Subject: Lua API call delays the packet sending out<br>





<div lang="EN-GB">
<div class="gmail-m_-4848402816765766587WordSection1">
<p class="MsoNormal">Dears,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am facing the issue that when REST API triggers the freeswitch I am sending the reply with
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Following code:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><i>    stream:write("HTTP/1.1 200 OK\r\n")<u></u><u></u></i></p>
<p class="MsoNormal"><i>    if (accept == "application/json" or accept == "*/*") then<u></u><u></u></i></p>
<p class="MsoNormal"><i>        stream:write("Content-Type: application/json\r\n")<u></u><u></u></i></p>
<p class="MsoNormal"><i>    else<u></u><u></u></i></p>
<p class="MsoNormal"><i>        stream:write("Content-Type: text/plain\r\n")<u></u><u></u></i></p>
<p class="MsoNormal"><i>    end<u></u><u></u></i></p>
<p class="MsoNormal"><i>    stream:write("\r\n")<u></u><u></u></i></p>
<p class="MsoNormal"><i><u></u> <u></u></i></p>
<p class="MsoNormal">but it seems before packet it out , there is as deplay of 2-3 sec .<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">can you please suggest how to solve this?<u></u><u></u></p>
<p class="MsoNormal">I already tried <u></u><u></u></p>
<p class="MsoNormal">stream:shutdown();<u></u><u></u></p>
<p class="MsoNormal">and <u></u><u></u></p>
<p class="MsoNormal">stream:close()<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">but did not helped.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(85,85,85)">Thanks & Regards<u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-family:Arial,sans-serif;color:rgb(85,85,85)">Vineet Verma<u></u><u></u></span></b></p>
</div>
<div align="center"><span style="font-size:9pt;font-family:Calibri;color:rgb(115,115,115)">This e-mail cannot be used for other purposes than BICS business use.<br>
</span></div>

</div>

<br><br><br>---------- Forwarded message ----------<br>From: "VERMA Vineet (BCS/SPS) via FreeSWITCH-users" <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>To: "<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>" <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>Cc: <br>Bcc: <br>Date: Mon, 19 Apr 2021 04:07:36 -0700 (PDT)<br>Subject: [Freeswitch-users] Lua API call delays the packet sending out<br>_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">About: <a href="http://about.me/dujinfang" target="_blank">http://about.me/dujinfang</a><br>Blog: <a href="http://www.dujinfang.com" target="_blank">http://www.dujinfang.com</a><br>Proj:  <a href="http://www.freeswitch.org.cn" target="_blank">http://www.freeswitch.org.cn</a></div>