I am upgrading from 1.5 to 3.1, but ran into some issues. The one right now is that I can’t seem to use the lcr and gws, although I’ve spent quite some time looking at the documentation. When it hits the next_gw() inside my route[PSTN] it finds nothing, and I have already added to the tables. But I added it manually to the tables, so maybe I needed to load them to memory – but “kamctl lcr reload” has been discontinued, so no loading. Is Siremis necessary as the input tool for lcr and gws?
Just to make sure that it's not because of my cfg - here is the part of the cfg where it returns false in next_gw():
route[PSTN] {
if (is_method("INVITE")) {
t_on_reply("REPLY_ONE"); t_on_failure("FAIL_ONE");
if (!load_gws(1)) { sl_send_reply("500", "Our mistake - cannot load gateways"); exit; }
if (!next_gw()) { sl_send_reply("503", "Service not available (no more gateways)"); exit; } }
if (!t_relay()) { sl_reply_error(); }
exit; }
Any ideas what is wrong?
//Anders
Anders writes:
But I added it manually to the tables, so maybe I needed to load them to memory – but “kamctl lcr reload” has been discontinued, so no loading. Is Siremis necessary as the input tool for lcr and gws?
anders,
read what is new in 3.1 wiki page and lcr manual. also, ctl help knows about lcr ctl commands.
-- juha
For anyone else who might not be able to find the old `kamctl lcr`-commands, the alternatives to some can be found here: http://www.kamailio.org/docs/modules/3.1.x/modules/lcr.html#id2960364
Being able to reload the lcr didn't solve my problem though - still not finding any gw when I run next_gw(), so I'm still open for input...
On Sat, Dec 4, 2010 at 6:08 PM, Juha Heinanen jh@tutpro.com wrote:
Anders writes:
But I added it manually to the tables, so maybe I needed to load them to memory – but “kamctl lcr reload” has been discontinued, so no loading. Is Siremis necessary as the input tool for lcr and gws?
anders,
read what is new in 3.1 wiki page and lcr manual. also, ctl help knows about lcr ctl commands.
-- juha
the dump ctl commands shows show commands like 'lcr dump_gws' and 'lcr show_gws' - commands that only give a "command disabled" return when run. According to the documentation of lcr (3.1.x), only three commands are left (lcr.reload, lcr.dump_gws, lcr.dump_rules - that with sercmd). I have probably overlooked something, but this leaves me with the question: how can i add gws/lcr and ensure validity of entry? Only Siremis?
Thanks, Anders
On Sun, Dec 5, 2010 at 7:29 PM, Juha Heinanen jh@tutpro.com wrote:
Anders writes:
Being able to reload the lcr didn't solve my problem though - still not finding any gw when I run next_gw(), so I'm still open for input...
use the dump ctl commands to check how the gw and routing stuff looks like.
-- juha
Anders writes:
the dump ctl commands shows show commands like 'lcr dump_gws' and 'lcr show_gws' - commands that only give a "command disabled" return when run. According to the documentation of lcr (3.1.x), only three commands are left (lcr.reload, lcr.dump_gws, lcr.dump_rules - that with sercmd).
you can check with lcr.dump_gws, lcr.dump_rules on what info lcr operates on.
I have probably overlooked something, but this leaves me with the question: how can i add gws/lcr and ensure validity of entry? Only Siremis?
i don't know if siremis supports lcr.
-- juha
On Tue, Dec 7, 2010 at 9:54 AM, Juha Heinanen jh@tutpro.com wrote:
Anders writes:
the dump ctl commands shows show commands like 'lcr dump_gws' and 'lcr show_gws' - commands that only give a "command disabled" return when run. According to the documentation of lcr (3.1.x), only three commands are left (lcr.reload, lcr.dump_gws, lcr.dump_rules - that with sercmd).
you can check with lcr.dump_gws, lcr.dump_rules on what info lcr operates on.
True - and it showed nothing. It turns out that it did not like that I had given the only only registration lcr_id = 10. When I changed the lcr_id to 1, it loaded correctly (reloaded with sercmd lcr.reload), and lcr.dump_gws showed it.
Thanks for the inputs - problem solved!
--Anders
Anders writes:
True - and it showed nothing. It turns out that it did not like that I had given the only only registration lcr_id = 10. When I changed the lcr_id to 1, it loaded correctly (reloaded with sercmd lcr.reload), and lcr.dump_gws showed it.
anders,
didn't you get any error message to syslog, if you used lcr_10 when default value of lcr_gw_count 1?
-- juha
Anders writes:
No, no warning or error on this one.
yes, during reload, only those rows are loaded from database rows where lcr_id is from 1 to lcr_count. in order to figure out if there are rows where lcr id is something else, another query just to check it would need to be done.
-- juja