<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi,<br>
<br>
The only way to do a non-blocking waiting is via the
async(sleep()) combination, but the async() statement works only
in main request route (in route{}) and not for reply route :( .<br>
<br>
Doing a blocking sleep() it is very very dangerous in terms of
performance, as you will block the opensips processes with these
sleep()'s.<br>
<br>
Anyhow, from SIP perspective it is not wise to delay a reply, as
this will trigger retransmissions from the UAC side....so, not
sure if what you try to do is actually something right.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 16.04.2024 17:25, Parthesh Bhavsar
via Users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACkXxUxY60iES_80uLa+N_bRDcoF0FqAibYiN2Krmf6wQSRiyg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">I'm facing a challenge in my OpenSIPS
implementation where I need to perform certain operations after
receiving a 200 OK response, but only after waiting for 10
seconds. Currently, I'm considering using the sleep() function,
but I'm concerned about its impact on performance.<br>
<br>
Is there a recommended approach to achieve this functionality
without compromising OpenSIPS performance? I'd appreciate any
advice or alternative solutions you can offer.
<div><br>
</div>
<div><br clear="all">
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">Regards,
<div><br>
</div>
<div><b>Parthesh Bhavsar | Software Engineer | VOIP</b></div>
<div><br>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Apr 16, 2024 at
7:39 PM Parthesh Bhavsar <<a
href="mailto:parthesh.bhavsar@ecosmob.com"
moz-do-not-send="true" class="moz-txt-link-freetext">parthesh.bhavsar@ecosmob.com</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">
<div dir="ltr">Hello,
<div>I want to use Launch and async function for function
sleep() as I need to wait for some time to do some
operations but from the route which I use in above
function I am not able to use any variable for my
operation and from documentation it seems only able to use
those variable which sleep() function use so is there any
alternative solution to get variable??? or any other
function on which I can wait for a specific time without
blocking opensips??</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Regards,
<div><br>
</div>
<div><b>Parthesh Bhavsar | Software Engineer | VOIP</b></div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<div><b><a href="https://www.ecosmob.com/opensips-summit/"
target="_blank" moz-do-not-send="true"><img
src="https://ecosmobnew.ecosmob.net/wp-content/uploads/2024/04/opensip-email-signature.jpg"
alt="https://www.ecosmob.com/opensips-summit/"
moz-do-not-send="true"></a><br>
</b></div>
<div><b>Disclaimer</b><br>
</div>
<div>
<div><span>In addition to generic Disclaimer which you have
agreed on our website, any views or opinions presented in
this email are solely those of the originator and do not
necessarily represent those of the Company or its sister
concerns. Any liability (in negligence, contract or
otherwise) arising from any third party taking any action,
or refraining from taking any action on the basis of any of
the information contained in this email is hereby excluded.</span></div>
</div>
<div><span><br>
</span></div>
<div><span><b>Confidentiality</b></span></div>
<div><span>This communication (including any attachment/s) is
intended only for the use of the addressee(s) and contains
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized
reading, dissemination, distribution, or copying of this
communication is prohibited. Please inform originator if you
have received it in error.</span></div>
<div><span><br>
</span></div>
<div><span><b>Caution for viruses, malware etc.</b></span></div>
<div><span>This communication, including any attachments, may not
be free of viruses, trojans, similar or new
contaminants/malware, interceptions or interference, and may
not be compatible with your systems. You shall carry out
virus/malware scanning on your own before opening any
attachment to this e-mail. The sender of this e-mail and
Company including its sister concerns shall not be liable for
any damage that may incur to you as a result of viruses,
incompleteness of this message, a delay in receipt of this
message or any other computer problems. </span></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>