Hi,
First of all say that I'm new to Kamailio. I've been working with asterisk for a while now and it's time to get started with the sip router project. My idea for a start is to reduce the load of our asterisk servers and once we have good knowledge on how kamailio works, migrate some of our services.
I've setup a server in our lab with kamailio 3.3.0 and siremis 3.3.0, created a user (subscriber) and registered with a softphone. So far OK.
Now I'm trying to make a call and route it through one of our asterisk servers for testing. To do this I need LCR module (thanks Sébastien, I wasn't subscribed to this list yet) and configure it.
After reading http://kamailio.org/docs/modules/stable/modules/lcr.html#id2553110 I've added in kamailio.cfg:
#!define WITH_LCR
#!ifdef WITH_LCR loadmodule "lcr.so" #!endif
#!ifdef WITH_LCR # ----- lcr params ----- modparam("lcr", "db_url", DBURL) modparam("lcr", "gw_uri_avp", "$avp(i:709)") modparam("lcr", "ruri_user_avp", "$avp(i:500)") modparam("lcr", "tag_avp", "$avp(lcr_tag)") #!endif
And now I see LCR module being loaded at startup. But, I don't understand what gw_uri_avp, ruri_user_avp or tag_avp mean. Where can I find some doc/manual to understand what AVP means and does? (For example the $avp(i:709), etc.)
I've added a LCR GW, LCR TARGET and LCR RULE with the following data (I have no idea if it's completely wrong):
mysql> select * from lcr_gw; +----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+ | id | lcr_id | gw_name | ip_addr | hostname | port | params | uri_scheme | transport | strip | prefix | tag | flags | defunct | +----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+ | 1 | 0 | TEST | XX.XXX.XXX.X | test12345678.testing.com | 5060 | NULL | 1 | 1 | NULL | NULL | NULL | 0 | NULL | +----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+ 1 row in set (0.00 sec)
mysql> select * from lcr_rule; +----+--------+--------+----------+-------------+---------+---------+ | id | lcr_id | prefix | from_uri | request_uri | stopper | enabled | +----+--------+--------+----------+-------------+---------+---------+ | 1 | 1 | .* | | | 0 | 1 | +----+--------+--------+----------+-------------+---------+---------+ 1 row in set (0.00 sec)
mysql> select * from lcr_rule_target; +----+--------+---------+-------+----------+--------+ | id | lcr_id | rule_id | gw_id | priority | weight | +----+--------+---------+-------+----------+--------+ | 1 | 1 | 1 | 1 | 1 | 1 | +----+--------+---------+-------+----------+--------+ 1 row in set (0.00 sec)
mysql>
Am I still missing basic stuff to be able to place a call ? (To get started I'd like to route all calls to our Asterisk server)
I'm glad to read documentation so If all of this is already somewhere please guide me cause I haven't found too much...
Thanks in advanced.
Regards, Joel.
Hi,
You can look at dispatcher module in order to reduce load on one server and share your load to many asterisk instances, it's easy to setup, look at this page for sample configuration http://www.bayramkaragoz.org/genel/kamailio-3-1-x-openser-ile-sip-load-balan... sample configuration file is here: http://www.bayramkaragoz.org/wp-content/uploads/kamailio.rar
Kamailio dispatcher module manual: http://kamailio.org/docs/modules/stable/modules_k/dispatcher.html
2012/9/15 Joel Smith | VOZELIA joel@vozelia.com
Hi,
First of all say that I'm new to Kamailio. I've been working with asterisk for a while now and it's time to get started with the sip router project. My idea for a start is to reduce the load of our asterisk servers and once we have good knowledge on how kamailio works, migrate some of our services.
I've setup a server in our lab with kamailio 3.3.0 and siremis 3.3.0, created a user (subscriber) and registered with a softphone. So far OK.
Now I'm trying to make a call and route it through one of our asterisk servers for testing. To do this I need LCR module (thanks Sébastien, I wasn't subscribed to this list yet) and configure it.
After reading http://kamailio.org/docs/modules/stable/modules/lcr.html#id2553110 I've added in kamailio.cfg:
#!define WITH_LCR
#!ifdef WITH_LCR loadmodule "lcr.so" #!endif
#!ifdef WITH_LCR # ----- lcr params ----- modparam("lcr", "db_url", DBURL) modparam("lcr", "gw_uri_avp", "$avp(i:709)") modparam("lcr", "ruri_user_avp", "$avp(i:500)") modparam("lcr", "tag_avp", "$avp(lcr_tag)") #!endif
And now I see LCR module being loaded at startup. But, I don't understand what gw_uri_avp, ruri_user_avp or tag_avp mean. Where can I find some doc/manual to understand what AVP means and does? (For example the $avp(i:709), etc.)
I've added a LCR GW, LCR TARGET and LCR RULE with the following data (I have no idea if it's completely wrong):
mysql> select * from lcr_gw;
+----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+ | id | lcr_id | gw_name | ip_addr | hostname | port | params | uri_scheme | transport | strip | prefix | tag | flags | defunct |
+----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+ | 1 | 0 | TEST | XX.XXX.XXX.X | test12345678.testing.com | 5060 | NULL | 1 | 1 | NULL | NULL | NULL | 0 | NULL |
+----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+ 1 row in set (0.00 sec)
mysql> select * from lcr_rule; +----+--------+--------+----------+-------------+---------+---------+ | id | lcr_id | prefix | from_uri | request_uri | stopper | enabled | +----+--------+--------+----------+-------------+---------+---------+ | 1 | 1 | .* | | | 0 | 1 | +----+--------+--------+----------+-------------+---------+---------+ 1 row in set (0.00 sec)
mysql> select * from lcr_rule_target; +----+--------+---------+-------+----------+--------+ | id | lcr_id | rule_id | gw_id | priority | weight | +----+--------+---------+-------+----------+--------+ | 1 | 1 | 1 | 1 | 1 | 1 | +----+--------+---------+-------+----------+--------+ 1 row in set (0.00 sec)
mysql>
Am I still missing basic stuff to be able to place a call ? (To get started I'd like to route all calls to our Asterisk server)
I'm glad to read documentation so If all of this is already somewhere please guide me cause I haven't found too much...
Thanks in advanced.
Regards, Joel.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Anybody using LCR and Siremis 3.3 with Kamailio 3.3?
Do I still need to load lcr.so via Kamailio.cfg, and add routing logic in Kamailio.cfg??
I have a softphone registered to Kamailio. Try calling a number which should route via LCR to an asterisk box. I get: [lookup.c:158]: 'XXXX' Not found in usrloc ; along with a SIP 404 not found msg in the logs.
In siremis, I’ve setup dispatcher, lcr_gw, lcr_rule, lcr_target, but nothing hits my asterisk box..
Any help?
Matt Scott
Joel Smith | VOZELIA writes:
And now I see LCR module being loaded at startup. But, I don't understand what gw_uri_avp, ruri_user_avp or tag_avp mean. Where can I find some doc/manual to understand what AVP means and does? (For example the $avp(i:709), etc.)
see http://www.kamailio.org/wiki/cookbooks/3.3.x/pseudovariables and http://kamailio.org/docs/modules/3.3.x/modules/avpops.html.
mysql> select * from lcr_rule; +----+--------+--------+----------+-------------+---------+---------+ | id | lcr_id | prefix | from_uri | request_uri | stopper | enabled | +----+--------+--------+----------+-------------+---------+---------+ | 1 | 1 | .* | | | 0 | 1 | +----+--------+--------+----------+-------------+---------+---------+
'prefix' value cannot be regular expression. see lcr README.
-- juha
Hi,
I've read both docs and done the necessary changes to the prefix in the lcr rule.
(I've created a second subscriber and tried calling from user1 to user2 and that works fine)
Back to the topic, $avp(i:500) refers to the AVP variable with integer ID 500, but would be the value? And for 709?
I've tried listing the AVPs with kamctl:
root@proxysip:~# kamctl avp list Dumping AVPs
root@proxysip:~#
Do I have to enable and set up avp module in kamailio.cfg first like I had to with lcr module?
Thanks again.
Regards, Joel.
On Sun, Sep 16, 2012 at 7:55 AM, Juha Heinanen jh@tutpro.com wrote:
Joel Smith | VOZELIA writes:
And now I see LCR module being loaded at startup. But, I don't understand what gw_uri_avp, ruri_user_avp or tag_avp mean. Where can I find some doc/manual to understand what AVP means and does? (For example the $avp(i:709), etc.)
see http://www.kamailio.org/wiki/cookbooks/3.3.x/pseudovariables and http://kamailio.org/docs/modules/3.3.x/modules/avpops.html.
mysql> select * from lcr_rule; +----+--------+--------+----------+-------------+---------+---------+ | id | lcr_id | prefix | from_uri | request_uri | stopper | enabled | +----+--------+--------+----------+-------------+---------+---------+ | 1 | 1 | .* | | | 0 | 1 | +----+--------+--------+----------+-------------+---------+---------+
'prefix' value cannot be regular expression. see lcr README.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users