<div><div dir="auto">Why are you trying to do all at once?</div><div dir="auto"><br></div><div dir="auto">Why not first do the lookup </div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/davidcsi/kamailio-private-public/blob/a81d7f777a8c5ee2dbb32311f7e6b5a3cf94bf32/kamailio.cfg#L771">https://github.com/davidcsi/kamailio-private-public/blob/a81d7f777a8c5ee2dbb32311f7e6b5a3cf94bf32/kamailio.cfg#L771</a></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">and then start load balancing?</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://github.com/davidcsi/kamailio-private-public/blob/a81d7f777a8c5ee2dbb32311f7e6b5a3cf94bf32/kamailio.cfg#L1109">https://github.com/davidcsi/kamailio-private-public/blob/a81d7f777a8c5ee2dbb32311f7e6b5a3cf94bf32/kamailio.cfg#L1109</a></div><br></div><div dir="auto"><br></div><div dir="auto">Do you have some special need to fulfill?</div><div dir="auto"><br></div><div dir="auto">David</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 5 Apr 2020 at 06:34, Michael Vale via Users <<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">hi,<br>
<br>
perhaps this can be solved with a failure route and or a check status<br>
but i dont know and it would be nice if i could do it without it.<br>
<br>
no matter how i write the script, either a uac to uac call goes to the<br>
load balancer or the load balancer is stuck with a 404 reply from the<br>
script or uac to uac works but when one end is not registered it goes<br>
to the load balancer instead of getting a 404.<br>
<br>
i've tried failure routes and get the same problem.  here is a snippet.<br>
<br>
       if (!lb_start(1,"pstn")) && (!lookup("location","m",)) {<br>
                lb_disable_dst();<br>
                #route(relay);<br>
                #send_reply(404,"No user or gateway");<br>
                        if (lb_start(1,"pstn")) {<br>
                                send_reply(500,"SIPSIPSIPS");<br>
                                #       t_relay();<br>
                                exit;<br>
                        }<br>
#               exit;<br>
                } else if (lookup("location","m")) &&<br>
(!lb_start(1,"pstn")) {<br>
                        lb_disable_dst();<br>
                        route(relay);<br>
                        exit;<br>
                } else if (lb_start(1,"pstn")) &&<br>
(lookup("location","m")) {<br>
                        lb_disable_dst();<br>
                        route(relay);<br>
                        exit;<br>
                } else if (!lookup("location","m")) &&<br>
(!lb_start(1,"pstn")) {<br>
                        send_reply(404,"Not Found");<br>
                        exit;<br>
                } else if (lb_start(1,"pstn")) &&<br>
(!lookup("location","m")) {<br>
#                       #lb_disable_dst();<br>
                        if (!lookup("location","m")) {<br>
                                route(relay);<br>
                                exit;<br>
                        }<br>
                        if (lookup("location","m")) {<br>
                                lb_disable_dst();<br>
                                route(relay);<br>
                                exit;<br>
                        }<br>
                }<br>
<br>
thanks in advance,<br>
<br>
michael.<br>
<br>
<br>
_______________________________________________<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></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>