<div dir="ltr">Thanks everyone for your valuable feedback. <div><br></div><div>I think we can send the branches to be delayed back to opensips and in this way, it would be a new call in opensips so we can easily handle it with extra configs. </div><div><br></div><div>Anyways, we changed the business logic a bit(send to phones only if registered) and were able to handle them using branch params. </div><div><br></div><div>Ryan. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 24 Jul 2020 at 18:51, Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.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">
<div>
<div>On 24.07.2020 16:25, Ben Newlin wrote:<br>
</div>
<blockquote type="cite">
<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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></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 cols="72">--
Liviu Chircu
<a href="http://www.twitter.com/liviuchircu" target="_blank">www.twitter.com/liviuchircu</a> | <a href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a>
OpenSIPS Summit 2020 Distributed
<a href="http://www.opensips.org/events/Summit-2020Distributed" target="_blank">www.opensips.org/events/Summit-2020Distributed</a></pre>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>