Thanks everyone for your valuable feedback. 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.
Anyways, we changed the business logic a bit(send to phones only if registered) and were able to handle them using branch params. Ryan. On Fri, 24 Jul 2020 at 18:51, Liviu Chircu <[email protected]> wrote: > On 24.07.2020 16:25, Ben Newlin wrote: > > 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. > > > > Even asynchronous sleep is performed by suspending all message processing > for that message, not individual branches. > > 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. > > 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. > > Curious to hear other opinions as well :) > > Best regards, > > -- > Liviu Chircuwww.twitter.com/liviuchircu | www.opensips-solutions.com > OpenSIPS Summit 2020 Distributed > www.opensips.org/events/Summit-2020Distributed > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
