Hi ALL,
I have a problem to configure LCR module to work properly (kamailio rel. 1.5) The task in my case is to handle: 1) All calls coming with CLD number prefix 482223344 from my MGW (77.77.77.77) towards kamilio and direct them to sip world (88.88.88.88) 2) Calls with CLD starting with 48 coming from SIP world towards kamailio and direct them to my MGWs. Additionaly i need to route it on the basis of CLI number. So MGWs <---> Kamailio <---> SIPProxies (88.88.88.88)
In db: +----+-----------+----------------+--------+----------+ | id | prefix | from_uri | grp_id | priority | +----+-----------+----------------+--------+----------+ | 1 | 48 | 48 | 1 | 1 | | 2 | 48 | 49 | 2 | 1 | | 3 | 482223344 | 77.77.77.77 | 3 | 1 | +----+-----------+----------------+--------+----------+
gw, +----+--------------+--------+----------------+----------+------+------------+-----------+-------+------+--------+------+-------+ | id | gw_name | grp_id | ip_addr | hostname | port | uri_scheme | transport | strip | tag | weight | ping | flags | +----+--------------+--------+----------------+----------+------+------------+-----------+-------+------+--------+------+-------+ | 1 | CLI48 | 1 | 77.77.77.70 | NULL | 5060 | NULL | NULL | NULL | NULL | 150 | 0 | 0 | | 2 | CLI48backup | 1 | 77.77.77.71 | NULL | 5060 | NULL | NULL | NULL | NULL | 150 | 0 | 0 | | 3 | CLI49 | 2 | 77.77.77.75 | NULL | 5060 | NULL | NULL | NULL | NULL | 15 | 0 | 0 | | 4 | CLI49backup | 2 | 77.77.77.76 | NULL | 5060 | NULL | NULL | NULL | NULL | 15 | 0 | 0 | | 5 | SIPWORLD | 3 | 88.88.88.88 | NULL | 5060 | NULL | NULL | NULL | NULL | 250 | 0 | 0 | +----+--------------+--------+----------------+----------+------+------------+-----------+-------+------+--------+------+-------+
Unfortunately: - call is originated on 77.77.77.77 with CLD 48222334455 number and kamailio forward this call to grp_id=3 SIPWORLD which is okay. The problem is that if the call fail, kamailio will try to use 77.77.77.70 and 77.77.77.71 from grp_id=1 which is wrong. I have no idea how to provide a kind of huntstop in grp_id=3.
I've been trying with +----+-----------+----------------+--------+----------+ | id | prefix | from_uri | grp_id | priority | +----+-----------+----------------+--------+----------+ | 1 | 48 | 88.88.88.88 | 1 | 1 | | 2 | 48 | 88.88.88.88 | 2 | 1 | | 3 | 482223344 | 77.77.77.77 | 3 | 1 | +----+-----------+----------------+--------+----------+ but in this case i am unable to provide kamailio with CLI number routing.
Here is a part of my config file...
if (!load_gws()) { sl_send_reply("503", "Unable to load gateways"); exit; } if (!next_gw()) { sl_send_reply("503", "Unable to find a gateway"); exit; } route(1); exit;
and failover for route(1)...
failure_route[11] { # In case of failure, send it to an alternative route: if (t_check_status("408|404|5[0-9][0-9]")) { if (!next_gw()) { t_reply("503", "Service not available, no more gateways"); exit; } else { t_on_failure("11"); t_relay(); } exit; } }
Anybody could help my to get out of that?
Thx, Maciej.