<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 24.07.2020 16:25, Ben Newlin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2C667559-800D-42AD-9E3D-4E94D33AE70D@genesys.com">
<p class="MsoNormal">I think the issue here is that the sleep
function pauses the OpenSIPS process in which it is running; it
doesn’t matter what type of route you call it in, the whole
process will sleep. Since all message processing, and all branch
routes, are running in the same process then sleeping that
process will delay everything.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Even asynchronous sleep is performed by
suspending all message processing for that message, not
individual branches.</p>
</blockquote>
<p><tt>Spot on, Ben! All branches are forked out by the same
process: if you pause it, you pause the forking of the remaining
branches in the set... which somehow leads me to believe that
doing an async(sleep) after t_relay()'ing the last mobile phone
branch _should work_, at least in theory... such that after the
sleep is completed, the remaining branches in the set will be
forked out.<br>
</tt></p>
<p><tt>Now, the tricky part is making sure that the mobile phone
branches are always ahead of the desk phone ones, so they
parallel fork first. I do not see an easy solution to this, nor
are there any handy script functions to help you do this... you
will have to "swap" the branch data around using the $branch
properties and other variables (e.g. $ru, $du, $socket_out)
until you obtain the desired effect.</tt></p>
<p><tt>Curious to hear other opinions as well :)<br>
</tt></p>
<p><tt>Best regards,<br>
</tt></p>
<pre class="moz-signature" cols="72">--
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a>
OpenSIPS Summit 2020 Distributed
<a class="moz-txt-link-abbreviated" href="http://www.opensips.org/events/Summit-2020Distributed">www.opensips.org/events/Summit-2020Distributed</a></pre>
</body>
</html>