Hello, I am currently deploying the LCR module. I have some questions about fields and what they do... I searched the docs, but couldn't find anything. Can someone please fill in the blanks?
[LCR Gateways] Gateway Name: description of the gateway Group ID: Numeric identifier used to link LCR Rules IP Address: The IP of the SIP gateway Hostname: The hostname of the SIP gateway (not required if IP provided?) Port: The port the SIP gateway listens on URI Scheme: (well documented) NULL = sip, 1 = sip and 2 = sips Transport: (well documented) NULL = none, 1 = udp, 2 = tcp, 3 = tls, and 4 = sctp Strip: ? Tag: ? Weight: ? Ping: ? Flags: ?
[LCR Rules] Prefix: The matching prefix. In the US most would do this by area code, so I would assume I would put something like 1678 or 1770 to route Atlanta calls. Would putting a NULL or Empty String force a default route for everything?
From URI: If I don't care about the from URI can I leave this NULL or BLANK?
Group ID: The numeric identifier matching to LCR Gateways Priority: I am assuming if there are 2 records which match the prefix and from URI the high priority will be chosen first?
Also, say for example, one of my gateway providers has a primary and a secondary gateway. If the primary is down I need to route calls to the secondary. How would this fit into an LCR scheme? Would I need duplicate routes for the secondary with a lower priority?
Thanks, Geoff
p.s. for anyone holding out, I just installed Siremis today and it rocks! I am really quite pleased with the solution.
Hello,
On 03/05/2009 09:03 PM, Geoffrey Mina wrote:
Hello, I am currently deploying the LCR module. I have some questions about fields and what they do... I searched the docs, but couldn't find anything. Can someone please fill in the blanks?
have you seen (I forced a regeneration to be sure is up to date): http://kamailio.org/docs/db-tables/kamailio-db-devel.html#GEN-DB-GW
Cheers, Daniel
[LCR Gateways] Gateway Name: description of the gateway Group ID: Numeric identifier used to link LCR Rules IP Address: The IP of the SIP gateway Hostname: The hostname of the SIP gateway (not required if IP provided?) Port: The port the SIP gateway listens on URI Scheme: (well documented) NULL = sip, 1 = sip and 2 = sips Transport: (well documented) NULL = none, 1 = udp, 2 = tcp, 3 = tls, and 4 = sctp Strip: ? Tag: ? Weight: ? Ping: ? Flags: ?
[LCR Rules] Prefix: The matching prefix. In the US most would do this by area code, so I would assume I would put something like 1678 or 1770 to route Atlanta calls. Would putting a NULL or Empty String force a default route for everything?
From URI: If I don't care about the from URI can I leave this NULL or BLANK?
Group ID: The numeric identifier matching to LCR Gateways Priority: I am assuming if there are 2 records which match the prefix and from URI the high priority will be chosen first?
Also, say for example, one of my gateway providers has a primary and a secondary gateway. If the primary is down I need to route calls to the secondary. How would this fit into an LCR scheme? Would I need duplicate routes for the secondary with a lower priority?
Thanks, Geoff
p.s. for anyone holding out, I just installed Siremis today and it rocks! I am really quite pleased with the solution.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Thanks! I hadn't seen that before. I have another semi-related question about LCR. I have multiple gateways, each require me to prefix the dial string with a specific account ID or rule.
i.e. to dial the phone number 5555551212 I would need to do the following:
gateway 1: #556233#5555551212@mygateway1.com
gateway 2: +15555551212@mygateway2.com
gateway3 : 5555551212@mygateway3.com
Is there any way the LCR system can account for this, or will I need to build some custom functionality to make this work?
Thanks, Geoff
On Thu, Mar 5, 2009 at 2:24 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
On 03/05/2009 09:03 PM, Geoffrey Mina wrote:
Hello, I am currently deploying the LCR module. I have some questions about fields and what they do... I searched the docs, but couldn't find anything. Can someone please fill in the blanks?
have you seen (I forced a regeneration to be sure is up to date): http://kamailio.org/docs/db-tables/kamailio-db-devel.html#GEN-DB-GW
Cheers, Daniel
[LCR Gateways] Gateway Name: description of the gateway Group ID: Numeric identifier used to link LCR Rules IP Address: The IP of the SIP gateway Hostname: The hostname of the SIP gateway (not required if IP provided?) Port: The port the SIP gateway listens on URI Scheme: (well documented) NULL = sip, 1 = sip and 2 = sips Transport: (well documented) NULL = none, 1 = udp, 2 = tcp, 3 = tls, and 4 = sctp Strip: ? Tag: ? Weight: ? Ping: ? Flags: ?
[LCR Rules] Prefix: The matching prefix. In the US most would do this by area code, so I would assume I would put something like 1678 or 1770 to route Atlanta calls. Would putting a NULL or Empty String force a default route for everything?
From URI: If I don't care about the from URI can I leave this NULL or
BLANK? Group ID: The numeric identifier matching to LCR Gateways Priority: I am assuming if there are 2 records which match the prefix and from URI the high priority will be chosen first?
Also, say for example, one of my gateway providers has a primary and a secondary gateway. If the primary is down I need to route calls to the secondary. How would this fit into an LCR scheme? Would I need duplicate routes for the secondary with a lower priority?
Thanks, Geoff
p.s. for anyone holding out, I just installed Siremis today and it rocks! I am really quite pleased with the solution.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
-- Daniel-Constantin Mierla http://www.asipto.com
Geoffrey Mina writes:
Thanks! I hadn't seen that before. I have another semi-related question about LCR. I have multiple gateways, each require me to prefix the dial string with a specific account ID or rule.
i.e. to dial the phone number 5555551212 I would need to do the following:
gateway 1: #556233#5555551212@mygateway1.com
gateway 2: +15555551212@mygateway2.com
gateway3 : 5555551212@mygateway3.com
Is there any way the LCR system can account for this, or will I need to build some custom functionality to make this work?
from lcr/README:
Function next_gw() can then be used to select one gateway at a time for forwarding. Upon each call, user part of original Request URI is first stripped by the number of characters as specified by the gateway's strip count and then prefixed by gateway's tag.
-- juha
I think that this arrangement should work, 3 gws with different "tags", it should do a load balancing among the 3 gws and append an specific "tag" to each gw 556233 for gw1 1 for gw2 nothing for gw3
I do not know about using "#" as part of the URI,
regards
jp
lcr routes +----+-----------------+----------+--------+----------+ | id | prefix | from_uri | grp_id | priority | +----+-----------------+----------+--------+----------+ | 1 | 5555551212 | | 1 | 1 | | 2 | 5555551212 | | 2 | 1 | | 3 | 5555551212 | | 3 | 1 | +----+-----------------+----------+--------+----------+ lcr gateways +-----------+--------------+------+------------+-----------+--------+-------+-------+-------+ | gw_name | ip_addr | port | uri_scheme | transport | grp_id | strip | tag | flags | +-----------+--------------+------+------------+-----------+--------+-------+-------+-------+ | gw1 | ip_gw_1 | 5060 | 1 | 1 | 1 | 0 |556233 | 0 | | gw2 | ip_gw_2 | 5060 | 1 | 1 | 2 | 0 | 1 | 0 | | gw3 | ip_gw_3 | 5060 | 1 | 1 | 3 | 0 | | 0 | +-----------+--------------+------+------------+-----------+--------+-------+-------+-------+ [root@proxy1 ~]# [root@proxy1 ~]#
On Thu, Mar 5, 2009 at 3:03 PM, Geoffrey Mina geoffreymina@gmail.com wrote:
Thanks! I hadn't seen that before. I have another semi-related question about LCR. I have multiple gateways, each require me to prefix the dial string with a specific account ID or rule.
i.e. to dial the phone number 5555551212 I would need to do the following:
gateway 1: #556233#5555551212@mygateway1.com
gateway 2: +15555551212@mygateway2.com
gateway3 : 5555551212@mygateway3.com
Is there any way the LCR system can account for this, or will I need to build some custom functionality to make this work?
Thanks, Geoff
On Thu, Mar 5, 2009 at 2:24 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
On 03/05/2009 09:03 PM, Geoffrey Mina wrote:
Hello, I am currently deploying the LCR module. I have some questions about fields and what they do... I searched the docs, but couldn't find anything. Can someone please fill in the blanks?
have you seen (I forced a regeneration to be sure is up to date): http://kamailio.org/docs/db-tables/kamailio-db-devel.html#GEN-DB-GW
Cheers, Daniel
[LCR Gateways] Gateway Name: description of the gateway Group ID: Numeric identifier used to link LCR Rules IP Address: The IP of the SIP gateway Hostname: The hostname of the SIP gateway (not required if IP
provided?)
Port: The port the SIP gateway listens on URI Scheme: (well documented) NULL = sip, 1 = sip and 2 = sips Transport: (well documented) NULL = none, 1 = udp, 2 = tcp, 3 = tls, and 4 = sctp Strip: ? Tag: ? Weight: ? Ping: ? Flags: ?
[LCR Rules] Prefix: The matching prefix. In the US most would do this by area code, so I would assume I would put something like 1678 or 1770 to route Atlanta calls. Would putting a NULL or Empty String force a default route for everything?
From URI: If I don't care about the from URI can I leave this NULL or
BLANK? Group ID: The numeric identifier matching to LCR Gateways Priority: I am assuming if there are 2 records which match the prefix and from URI the high priority will be chosen first?
Also, say for example, one of my gateway providers has a primary and a secondary gateway. If the primary is down I need to route calls to the secondary. How would this fit into an LCR scheme? Would I need duplicate routes for the secondary with a lower priority?
Thanks, Geoff
p.s. for anyone holding out, I just installed Siremis today and it rocks! I am really quite pleased with the solution.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
-- Daniel-Constantin Mierla http://www.asipto.com
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Thanks everyone. I was unclear from the docs the definition of "tag" and "strip", which was the original reason for my request. I thought those might have something to do with this, but I wasn't 100% sure. As everyone knows, the "tag" keyword is thrown around a lot in SIP, so I didn't want to assume anything.
Much appreciated! Geoff
On Thu, Mar 5, 2009 at 4:54 PM, Fabian Borot fborot@gmail.com wrote:
I think that this arrangement should work, 3 gws with different "tags", it should do a load balancing among the 3 gws and append an specific "tag" to each gw 556233 for gw1 1 for gw2 nothing for gw3
I do not know about using "#" as part of the URI,
regards
jp
lcr routes +----+-----------------+----------+--------+----------+ | id | prefix | from_uri | grp_id | priority | +----+-----------------+----------+--------+----------+ | 1 | 5555551212 | | 1 | 1 | | 2 | 5555551212 | | 2 | 1 | | 3 | 5555551212 | | 3 | 1 | +----+-----------------+----------+--------+----------+ lcr gateways +-----------+--------------+------+------------+-----------+--------+-------+-------+-------+ | gw_name | ip_addr | port | uri_scheme | transport | grp_id | strip | tag | flags | +-----------+--------------+------+------------+-----------+--------+-------+-------+-------+ | gw1 | ip_gw_1 | 5060 | 1 | 1 | 1 | 0 |556233 | 0 | | gw2 | ip_gw_2 | 5060 | 1 | 1 | 2 | 0 | 1 | 0 | | gw3 | ip_gw_3 | 5060 | 1 | 1 | 3 | 0 | | 0 | +-----------+--------------+------+------------+-----------+--------+-------+-------+-------+ [root@proxy1 ~]# [root@proxy1 ~]#
On Thu, Mar 5, 2009 at 3:03 PM, Geoffrey Mina geoffreymina@gmail.com wrote:
Thanks! I hadn't seen that before. I have another semi-related question about LCR. I have multiple gateways, each require me to prefix the dial string with a specific account ID or rule.
i.e. to dial the phone number 5555551212 I would need to do the following:
gateway 1: #556233#5555551212@mygateway1.com
gateway 2: +15555551212@mygateway2.com
gateway3 : 5555551212@mygateway3.com
Is there any way the LCR system can account for this, or will I need to build some custom functionality to make this work?
Thanks, Geoff
On Thu, Mar 5, 2009 at 2:24 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
On 03/05/2009 09:03 PM, Geoffrey Mina wrote:
Hello, I am currently deploying the LCR module. I have some questions about fields and what they do... I searched the docs, but couldn't find anything. Can someone please fill in the blanks?
have you seen (I forced a regeneration to be sure is up to date): http://kamailio.org/docs/db-tables/kamailio-db-devel.html#GEN-DB-GW
Cheers, Daniel
[LCR Gateways] Gateway Name: description of the gateway Group ID: Numeric identifier used to link LCR Rules IP Address: The IP of the SIP gateway Hostname: The hostname of the SIP gateway (not required if IP provided?) Port: The port the SIP gateway listens on URI Scheme: (well documented) NULL = sip, 1 = sip and 2 = sips Transport: (well documented) NULL = none, 1 = udp, 2 = tcp, 3 = tls, and 4 = sctp Strip: ? Tag: ? Weight: ? Ping: ? Flags: ?
[LCR Rules] Prefix: The matching prefix. In the US most would do this by area code, so I would assume I would put something like 1678 or 1770 to route Atlanta calls. Would putting a NULL or Empty String force a default route for everything?
From URI: If I don't care about the from URI can I leave this NULL or
BLANK? Group ID: The numeric identifier matching to LCR Gateways Priority: I am assuming if there are 2 records which match the prefix and from URI the high priority will be chosen first?
Also, say for example, one of my gateway providers has a primary and a secondary gateway. If the primary is down I need to route calls to the secondary. How would this fit into an LCR scheme? Would I need duplicate routes for the secondary with a lower priority?
Thanks, Geoff
p.s. for anyone holding out, I just installed Siremis today and it rocks! I am really quite pleased with the solution.
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
-- Daniel-Constantin Mierla http://www.asipto.com
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Geoffrey Mina writes:
Thanks everyone. I was unclear from the docs the definition of "tag" and "strip", which was the original reason for my request. I thought those might have something to do with this, but I wasn't 100% sure. As everyone knows, the "tag" keyword is thrown around a lot in SIP, so I didn't want to assume anything.
...
lcr routes +----+-----------------+----------+--------+----------+ | id | prefix | from_uri | grp_id | priority | +----+-----------------+----------+--------+----------+ | 1 | 5555551212 | | 1 | 1 | | 2 | 5555551212 | | 2 | 1 | | 3 | 5555551212 | | 3 | 1 | +----+-----------------+----------+--------+----------+
in the above case, you could also have only one entry in lcr table and put your three gws in the same group. if gws are not of same size, you can also assign them a weight accordingly.
-- juha
OK... I have pretty much everything now. Just a couple more quick questions.
1 - The "flags" column in the LCR table, what exactly does it do? All I could find the docs is: "Gateway specific flags". Not sure what they would be for, or how I would use them.
2 - Say I had a gateway which was having problems. Maybe not down hard, but just failing to route properly. Is there an easy way to disable it without deleting the record?
Thanks to everyone. Geoff
On Thu, Mar 5, 2009 at 7:31 PM, Juha Heinanen jh@tutpro.com wrote:
Geoffrey Mina writes:
> Thanks everyone. I was unclear from the docs the definition of "tag" > and "strip", which was the original reason for my request. I thought > those might have something to do with this, but I wasn't 100% sure. > As everyone knows, the "tag" keyword is thrown around a lot in SIP, so > I didn't want to assume anything.
... > > lcr routes > > +----+-----------------+----------+--------+----------+ > > | id | prefix | from_uri | grp_id | priority | > > +----+-----------------+----------+--------+----------+ > > | 1 | 5555551212 | | 1 | 1 | > > | 2 | 5555551212 | | 2 | 1 | > > | 3 | 5555551212 | | 3 | 1 | > > +----+-----------------+----------+--------+----------+
in the above case, you could also have only one entry in lcr table and put your three gws in the same group. if gws are not of same size, you can also assign them a weight accordingly.
-- juha
Geoffrey Mina writes:
1 - The "flags" column in the LCR table, what exactly does it do? All I could find the docs is: "Gateway specific flags". Not sure what they would be for, or how I would use them.
you have not read the README file:
As a side effect of gateway selection, gateway's flags (that may contain information about capabilities of the gateway) are stored into an AVP.
2 - Say I had a gateway which was having problems. Maybe not down hard, but just failing to route properly. Is there an easy way to disable it without deleting the record?
there is no way to mark in the db that a gw is active or passive. see ping_interval module parameter if sending messages to the gw would help you.
-- juha
I have read the readme. Unfortunately it is not descriptive enough for someone not involved in the development or testing of kamailio.
Even your 'clarification' statement means very little to me. What would one use these flags for?
Could I perhaps check the value of a flag in my script to ensure my gateway is active, and if not immediately call next_gw() until I found a gateway which I flagged as 'active'?
Also- what is the recommended max routes for the lcr module. Would 10,000 be an acceptable number, or would the performance hit be too great?
Thanks, Geoff
On 3/6/09, Juha Heinanen jh@tutpro.com wrote:
Geoffrey Mina writes:
1 - The "flags" column in the LCR table, what exactly does it do? All I could find the docs is: "Gateway specific flags". Not sure what they would be for, or how I would use them.
you have not read the README file:
As a side effect of gateway selection, gateway's flags (that may contain information about capabilities of the gateway) are stored into an AVP.
2 - Say I had a gateway which was having problems. Maybe not down hard, but just failing to route properly. Is there an easy way to disable it without deleting the record?
there is no way to mark in the db that a gw is active or passive. see ping_interval module parameter if sending messages to the gw would help you.
-- juha
Geoffrey Mina writes:
Even your 'clarification' statement means very little to me. What would one use these flags for?
for anything that 32 bits is good for. for example, you could use one of the flags to tell if the gw is active and if not, call next_gw() again. you can also tell, for example, if gw accepts a particular header, for example, rpid.
Could I perhaps check the value of a flag in my script to ensure my gateway is active, and if not immediately call next_gw() until I found a gateway which I flagged as 'active'?
yes you could.
Also- what is the recommended max routes for the lcr module. Would 10,000 be an acceptable number, or would the performance hit be too great?
it is tradeoff between hash table size and performance. module is using hash on prefix. if you have 10,000 different prefixes, you could define lcr_has_size to be 10000 in which case collisions should be rare.
this too is documented in readme:
1.3.25. lcr_hash_size (integer)
Defines the size of hash table used to store <prefix, from_pattern, priority> tuples. Hashing is done based on prefix. Larger value means less collisions with other prefixes. Hash size value should be a power of 2.
-- juha