[OpenSIPS-Users] Launch and async
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Apr 18 07:15:28 UTC 2024
Hi,
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 :( .
Doing a blocking sleep() it is very very dangerous in terms of
performance, as you will block the opensips processes with these sleep()'s.
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.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 16.04.2024 17:25, Parthesh Bhavsar via Users wrote:
> 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.
>
> Is there a recommended approach to achieve this functionality without
> compromising OpenSIPS performance? I'd appreciate any advice or
> alternative solutions you can offer.
>
>
> Regards,
>
> *Parthesh Bhavsar | Software Engineer | VOIP*
>
>
>
> On Tue, Apr 16, 2024 at 7:39 PM Parthesh Bhavsar
> <parthesh.bhavsar at ecosmob.com> wrote:
>
> Hello,
> 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??
>
>
> Regards,
>
> *Parthesh Bhavsar | Software Engineer | VOIP*
>
>
> *https://www.ecosmob.com/opensips-summit/
> <https://www.ecosmob.com/opensips-summit/>
> *
> *Disclaimer*
> 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.
>
> *Confidentiality*
> 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.
>
> *Caution for viruses, malware etc.*
> 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.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240418/04c36357/attachment.html>
More information about the Users
mailing list