[OpenSIPS-Users] using load balancer and lookup together
David Villasmil
david.villasmil.work at gmail.com
Sun Apr 5 10:47:57 EST 2020
Why are you trying to do all at once?
Why not first do the lookup
https://github.com/davidcsi/kamailio-private-public/blob/a81d7f777a8c5ee2dbb32311f7e6b5a3cf94bf32/kamailio.cfg#L771
and then start load balancing?
https://github.com/davidcsi/kamailio-private-public/blob/a81d7f777a8c5ee2dbb32311f7e6b5a3cf94bf32/kamailio.cfg#L1109
Do you have some special need to fulfill?
David
On Sun, 5 Apr 2020 at 06:34, Michael Vale via Users <
users at lists.opensips.org> wrote:
> hi,
>
> perhaps this can be solved with a failure route and or a check status
> but i dont know and it would be nice if i could do it without it.
>
> no matter how i write the script, either a uac to uac call goes to the
> load balancer or the load balancer is stuck with a 404 reply from the
> script or uac to uac works but when one end is not registered it goes
> to the load balancer instead of getting a 404.
>
> i've tried failure routes and get the same problem. here is a snippet.
>
> if (!lb_start(1,"pstn")) && (!lookup("location","m",)) {
> lb_disable_dst();
> #route(relay);
> #send_reply(404,"No user or gateway");
> if (lb_start(1,"pstn")) {
> send_reply(500,"SIPSIPSIPS");
> # t_relay();
> exit;
> }
> # exit;
> } else if (lookup("location","m")) &&
> (!lb_start(1,"pstn")) {
> lb_disable_dst();
> route(relay);
> exit;
> } else if (lb_start(1,"pstn")) &&
> (lookup("location","m")) {
> lb_disable_dst();
> route(relay);
> exit;
> } else if (!lookup("location","m")) &&
> (!lb_start(1,"pstn")) {
> send_reply(404,"Not Found");
> exit;
> } else if (lb_start(1,"pstn")) &&
> (!lookup("location","m")) {
> # #lb_disable_dst();
> if (!lookup("location","m")) {
> route(relay);
> exit;
> }
> if (lookup("location","m")) {
> lb_disable_dst();
> route(relay);
> exit;
> }
> }
>
> thanks in advance,
>
> michael.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Regards,
David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200405/47e06a7d/attachment-0001.html>
More information about the Users
mailing list