Re: [SR-Users] LCR module HowTo (Spanish)

2017-02-09 Thread Daniel-Constantin Mierla
Hello,

thanks for sharing the article and the knowledge with the community!

I published a news about it at:

  - https://www.kamailio.org/w/2017/02/lcr-system-with-kamailio-on-centos-7/

Cheers,
Daniel


On 08/02/2017 14:06, Campus VoToVoice wrote:
> Hello,
>
> My small contribution to Kamailio's documentation:
>
> https://www.voztovoice.org/?q=node/1491
>
> If you find any error, please write me.
>
> Regards
>
> ___
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
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


[SR-Users] LCR module HowTo (Spanish)

2017-02-08 Thread Campus VoToVoice

Hello,

My small contribution to Kamailio's documentation:

https://www.voztovoice.org/?q=node/1491

If you find any error, please write me.

Regards

___
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


Re: [SR-Users] LCR module dont_strip_or_tag_flag -> dont_strip_or_prefix_flag

2017-01-17 Thread Victor Seva
2017-01-16 21:31 GMT+01:00 Mikko Lehto :
> Looks like that parameter is now¹ called dont_strip_or_prefix_flag
> but module documentation was just not updated.
>
> [1] Change was committed in 2010
> https://github.com/kamailio/kamailio/commit/8c0501bfaa27acab9721953e8c1551687c96edf2


Pushed the fix for lcr documentation to master, 4.4, 4.3 and 4.2
thanks for the report

___
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


Re: [SR-Users] LCR module dont_strip_or_tag_flag -> dont_strip_or_prefix_flag

2017-01-16 Thread Annus Fictus

Thnak you...

With dont_strip_or_prefix_flag working.

Regards

El 16/01/2017 a las 15:31, Mikko Lehto escribió:

Annus Fictus :


modparam("lcr", "dont_strip_or_tag_flag", 10)

and then restart kamailio, i receive this error:

ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter
 of type <2> not found in module 

Hi

Looks like that parameter is now¹ called dont_strip_or_prefix_flag
but module documentation was just not updated.

[1] Change was committed in 2010
https://github.com/kamailio/kamailio/commit/8c0501bfaa27acab9721953e8c1551687c96edf2




___
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


Re: [SR-Users] LCR module dont_strip_or_tag_flag -> dont_strip_or_prefix_flag

2017-01-16 Thread Mikko Lehto
Annus Fictus :

> modparam("lcr", "dont_strip_or_tag_flag", 10)
> 
> and then restart kamailio, i receive this error:
> 
> ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter
>  of type <2> not found in module 

Hi

Looks like that parameter is now¹ called dont_strip_or_prefix_flag
but module documentation was just not updated.

[1] Change was committed in 2010
https://github.com/kamailio/kamailio/commit/8c0501bfaa27acab9721953e8c1551687c96edf2

-- 
Mikko

___
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


[SR-Users] LCR module dont_strip_or_tag_flag

2017-01-16 Thread Annus Fictus

Hello,

I'm trying LCR module and dont_strip_or_tag_flag parameter.

If I use this line in the module configuration:

modparam("lcr", "dont_strip_or_tag_flag", 10)

and then restart kamailio, i receive this error:

ERROR:  [modparam.c:141]: set_mod_param_regex(): parameter 
 of type <2> not found in module 


I'm using 4.4.4 version

Any hint?

Thank you

Regards


___
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


Re: [SR-Users] LCR modules troubles

2016-11-29 Thread ycaner
hello;
lcr module dont touch to header. you can use UAC module  to manipulate it.



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/LCR-modules-troubles-tp153582p153614.html
Sent from the Users mailing list archive at Nabble.com.

___
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


[SR-Users] LCR modules troubles

2016-11-28 Thread Laura
Dear list,

i have a strange situation with module LCR on kamailio 4.3.6.

A customer send a call to my first kamailio and i forward it with some
tech prefix to my supplier.

Here the 2 correct invites.. customer is sending to me with prefix 9001

14:34:29.155719 CUSTOMER_IP.101:5060 -> EU_KMAILIO_IP.40:5060
INVITE sip:900133139864069@EU_KMAILIO_IP.40 SIP/2.0.
Record-Route:
.
Via: SIP/2.0/UDP
CUSTOMER_IP.101;branch=z9hG4bK2d4.4853821c2be0bf7d75377fce7683f593.0.
Via: SIP/2.0/UDP CUSTOMER_IP.108:5060;branch=z9hG4bK504DC634.
Remote-Party-ID:
;party=calling;screen=yes;privacy=off.
From: ;tag=33F431FC-2103.
To: .
Date: Mon, 28 Nov 2016 14:34:29 GMT.
Call-ID: 9A8A4545-B4AE11E6-9238E2D3-6BBD43E@CUSTOMER_IP.108.
Supported: 100rel,timer,resource-priority,replaces,sdp-anat.
Min-SE:  1800.
Cisco-Guid: 2592672861-3031306726-2677997592-0419390928.
User-Agent: Cisco-SIPGateway/IOS-12.x.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER.
CSeq: 101 INVITE.
Max-Forwards: 69.
.

and i forward to my supplier


U 2016/11/28 14:34:29.157516 EU_KMAILIO_IP.40:5060 ->
EU_SUPPLIER_IP.198:5060
INVITE sip:00233139864069@EU_SUPPLIER_IP.198 SIP/2.0.
Record-Route:
.
Record-Route:
.
Via: SIP/2.0/UDP
EU_KMAILIO_IP.40:5060;branch=z9hG4bK2d4.782830bfdde5e873d3dc6a71bcbba70f.0.
Via: SIP/2.0/UDP
CUSTOMER_IP.101;rport=5060;branch=z9hG4bK2d4.4853821c2be0bf7d75377fce7683f593.0.
Via: SIP/2.0/UDP CUSTOMER_IP.108:5060;branch=z9hG4bK504DC634.
Remote-Party-ID:
;party=calling;screen=yes;privacy=off.
From: ;tag=33F431FC-2103.
To: .
Date: Mon, 28 Nov 2016 14:34:29 GMT.
Call-ID: 9A8A4545-B4AE11E6-9238E2D3-6BBD43E@CUSTOMER_IP.108.
Supported: 100rel,timer,resource-priority,replaces,sdp-anat.
Min-SE:  1800.
Cisco-Guid: 2592672861-3031306726-2677997592-0419390928.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER.
CSeq: 101 INVITE.
Max-Forwards: 68.
Timestamp: 1480343669.
Contact: .
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Disposition: session;handling=required.
Content-Length: 310.


On both invites the To field respect the correct information from INVITE
so that the kamailio CDR is working correct.

After that the supplier reply me 503 and call is come back to my kamailio.

LCR modules send the call to second supplier that on this case is my
second box kamailio on another countrie..

Here there is this problem that i signed on RED

U 2016/11/28 14:34:43.191618 EU_KMAILIO_IP.40:5060 ->
EU_SUPPLIER2_IP.242:5060
*INVITE sip:905233139864069@EU_SUPPLIER2_IP.242 SIP/2.0.*
Record-Route: .
Record-Route:
.
Via: SIP/2.0/UDP
EU_KMAILIO_IP.40:5060;branch=z9hG4bK2d4.782830bfdde5e873d3dc6a71bcbba70f.1.
Via: SIP/2.0/UDP
CUSTOMER_IP.101;rport=5060;branch=z9hG4bK2d4.4853821c2be0bf7d75377fce7683f593.0.
Via: SIP/2.0/UDP CUSTOMER_IP.108:5060;branch=z9hG4bK504DC634.
Remote-Party-ID:
;party=calling;screen=yes;privacy=off.
From: ;tag=33F431FC-2103.
*To: .*
Date: Mon, 28 Nov 2016 14:34:29 GMT.
Call-ID: 9A8A4545-B4AE11E6-9238E2D3-6BBD43E@CUSTOMER_IP.108.
Supported: 100rel,timer,resource-priority,replaces,sdp-anat.
Min-SE:  1800.
Cisco-Guid: 2592672861-3031306726-2677997592-0419390928.
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER,
SUBSCRIBE, NOTIFY, INFO, REGISTER.
CSeq: 101 INVITE.
Max-Forwards: 68.
Timestamp: 1480343669.
Contact: .
Expires: 180.
Allow-Events: telephone-event.
Content-Type: application/sdp.
Content-Disposition: session;handling=required.



The LCR modules make the new INVITE using the original To field and
don't rewrite it like on the first request..

How is that possibile ?


Any idea ?

Best regards

Laura

___
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


Re: [SR-Users] LCR routing, and finaly route to media gateway if not found

2016-09-26 Thread Daniel Tryba
On Fri, Sep 23, 2016 at 03:59:20PM +0200, Loic Chabert wrote:
> - I have some sbc for one destination. If one destination fail, kamailio
> try to second one etc..
> - If no SBC is available for this destination (for exemple, all are down),
> i want to send my call to an error server (asterisk), play an error sound.
> 
> To accomplish this, i re-write the RURI: "sip:error1@errorserver.local",
> and launch RELAY route. But kamailio dont make a DNS query to find IP of
> "errorserver.local", only change RURI and try to send to the last LCR
> gateway.
> 
> I have also try to add a new branch, but same result... Why kamailio do not
> make a new DNS query ?

I never used the LCR module myself, but the documentation mentions that
the module "sets the R-URI and possibly the destination URI". If $du is
set any modification of R-URI is just send to the same destination. The
solution might be:
$ru="sip:error1@errorserver.local";
$du=$null;

___
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


Re: [SR-Users] LCR routing, and finaly route to media gateway if not found

2016-09-23 Thread Juha Heinanen
Loic Chabert writes:

> In fact, kamailio is out from lcr at this point, no more gateway to try
> (all gateways are down).
> I just want to send call to a static server for playing sound.
> 
> To be more specific, if no gateways are not set on database, a sound must
> be played.
> 
> Should i change $du and $ru to make it work ?

depends on the check that i asked you to do in my previous reply.

-- 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


Re: [SR-Users] LCR routing, and finaly route to media gateway if not found

2016-09-23 Thread Loic Chabert
In fact, kamailio is out from lcr at this point, no more gateway to try
(all gateways are down).
I just want to send call to a static server for playing sound.

To be more specific, if no gateways are not set on database, a sound must
be played.

Should i change $du and $ru to make it work ?

Le 23 sept. 2016 4:36 PM, "Juha Heinanen"  a écrit :

Loic Chabert writes:

> To accomplish this, i re-write the RURI: "sip:error1@errorserver.local",
> and launch RELAY route. But kamailio dont make a DNS query to find IP of
> "errorserver.local", only change RURI and try to send to the last LCR
> gateway.
>
> I have also try to add a new branch, but same result... Why kamailio do
not
> make a new DNS query ?

check if both hostname and ip address are given for the gateway.  if so,
next_gw() also sets destination uri.

-- 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
___
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


[SR-Users] LCR routing, and finaly route to media gateway if not found

2016-09-23 Thread Juha Heinanen
Loic Chabert writes:

> To accomplish this, i re-write the RURI: "sip:error1@errorserver.local",
> and launch RELAY route. But kamailio dont make a DNS query to find IP of
> "errorserver.local", only change RURI and try to send to the last LCR
> gateway.
> 
> I have also try to add a new branch, but same result... Why kamailio do not
> make a new DNS query ?

check if both hostname and ip address are given for the gateway.  if so,
next_gw() also sets destination uri.

-- 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


[SR-Users] LCR routing, and finaly route to media gateway if not found

2016-09-23 Thread Loic Chabert
Hello List,

I'm finishing my implementation of LCR with kamailio for outgoing calls but
one use case does not work.
Let me explain:
- I have some sbc for one destination. If one destination fail, kamailio
try to second one etc..
- If no SBC is available for this destination (for exemple, all are down),
i want to send my call to an error server (asterisk), play an error sound.

To accomplish this, i re-write the RURI: "sip:error1@errorserver.local",
and launch RELAY route. But kamailio dont make a DNS query to find IP of
"errorserver.local", only change RURI and try to send to the last LCR
gateway.

I have also try to add a new branch, but same result... Why kamailio do not
make a new DNS query ?













































































*route[RELAY] {#if (is_method("INVITE")) {#
if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
#}if (!t_relay()) {sl_reply_error();
}exit;}route[NOTFOUND]{$ru =
"sip:error1@errorserver.local";xlog("L_WARN", "[$ci]|$si|Routing
this call to $ru (error server)\n");append_branch($ru);
route(RELAY);}route[LCR] {xlog("L_INFO", "[$ci]|$si|Loading
gateways...\n");if (!load_gws(1)) {xlog("L_ERR",
"[$ci]|$si|Can't load LCR gateways\n");sl_send_reply("503",
"Unable to load gateways");exit;} else
{$var(i) = 0;
while(is_avp_set("$(avp(i:709)[$var(i)])")) {
xlog("L_INFO", "[$ci]|$si|This gateway was found:
gw_uri_avp[$var(i)]=$(avp(i:709)[$var(i)]) \n");
$var(i) = $var(i) + 1;};
if(is_avp_set("$avp(i:709)")) {xlog("L_INFO",
"[$ci]|$si|Trying gateway ‘$avp(i:709)’\n");} else
{xlog("L_INFO", "[$ci]|$si|No more gateways. Goto
route NOTFOUND...\n");
route(NOTFOUND);};# try the first matched
gatewayif (next_gw()) {
xlog("L_INFO", "[$ci]|$si|New request URI built: $ru . Relaying it (and
arming backup destination if needed).");# Route to
failure for failover
t_on_failure("lcrfailure");
route(RELAY);} else {xlog("L_INFO",
"[$ci]|$si|No more gateways (after next_gw()). Goto route
NOTFOUND...");route(NOTFOUND);
};};exit;}failure_route[lcrfailure] {# the previous
gateway is no goodif (t_check_status("408|50[34]"))
{xlog("L_WARN", "[$ci]|$si|Entering in entering
failure_route[lcrfailure]. Error code: $T_reply_code \n");
if(is_avp_set("$avp(i:709)")) {xlog("L_INFO",
"[$ci]|$si|Trying gateway ‘$avp(i:709)’\n");} else
{xlog("L_ERR", "[$ci]|$si|AVP is not
set\n");};if (next_gw())
{xlog("L_INFO", "[$ci]|$si|New request URI built:
$ru . Relaying it (and arming backup destination if
needed).");# Route to failure for
failover
t_on_failure("lcrfailure");
route(RELAY);} else {xlog("L_INFO",
"[$ci]|$si|No more gateways (after next_gw()). Goto route
NOTFOUND...");route(NOTFOUND);
};exit;};}*

Many thanks,
Regards.
___
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


Re: [SR-Users] LCR Module Question

2016-05-09 Thread Alberto Sagredo
Thanks Both Fred/Juha

System is in production when i have a "free slot" i will check repeating
each rule with lower priority. I think that would work as i expect

Thanks for your tips guys!

Have a nice week

Alberto

2016-05-06 13:44 GMT+02:00 Juha Heinanen :

> Alberto Sagredo writes:
> >
> > I do not know if its enough to add under same lcr_id or its better to add
> > with different one and add several lcr_rule and lcr_rule_target
> >
> > Acordding to next_gw() function, what is better to be used? In my case. a
> > primary providers is used and only a backup one for the momment.
>
> If your rules would be the same for both, then you can add a backup gw
> to each rule with lower priority.  You can also use defunct_gw()
> function to make failing gws inactive for a period.
>
> If the rules are not the same, then in failure route you would need to
> call load_gws() with another lcr id.
>
> -- 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
>
___
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


[SR-Users] LCR Module Question

2016-05-06 Thread Juha Heinanen
Alberto Sagredo writes:
> 
> I do not know if its enough to add under same lcr_id or its better to add
> with different one and add several lcr_rule and lcr_rule_target
> 
> Acordding to next_gw() function, what is better to be used? In my case. a
> primary providers is used and only a backup one for the momment.

If your rules would be the same for both, then you can add a backup gw
to each rule with lower priority.  You can also use defunct_gw()
function to make failing gws inactive for a period.

If the rules are not the same, then in failure route you would need to
call load_gws() with another lcr id.

-- 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


Re: [SR-Users] LCR Module Question

2016-05-06 Thread Fred Posner
Have you considered either dispatcher or just using a failure route?

-- Fred

> On May 6, 2016, at 7:15 AM, Alberto Sagredo  
> wrote:
> 
> Hi
> 
> I have it working but i have re-read documentation and do not see how to do 
> what i need. 
> 
> I explain it :)
> 
> Now i have only one LCR provider and i need to add a backup one.
> 
> I do not know if its enough to add under same lcr_id or its better to add 
> with different one and add several lcr_rule and lcr_rule_target 
> 
> Acordding to next_gw() function, what is better to be used? In my case. a 
> primary providers is used and only a backup one for the momment.
> 
> Thanks for your help
> 
> Alberto
> 
> 
> ___
> 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


___
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


[SR-Users] LCR Module Question

2016-05-06 Thread Alberto Sagredo
Hi

I have it working but i have re-read documentation and do not see how to do
what i need.

I explain it :)

Now i have only one LCR provider and i need to add a backup one.

I do not know if its enough to add under same lcr_id or its better to add
with different one and add several lcr_rule and lcr_rule_target

Acordding to next_gw() function, what is better to be used? In my case. a
primary providers is used and only a backup one for the momment.

Thanks for your help

Alberto
___
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


Re: [SR-Users] LCR prefix based

2016-03-21 Thread Daniel-Constantin Mierla
Hello,

did you use t_relay() after all the lcr logic?

Cheers,
Daniel

On 10/03/16 23:19, Roberto Innaimi wrote:
> Hi to all, 
>
> i want to use prefix based LCR routing, but for some reason, something
> is not working as expected. 
>
> Can anyone help me? 
>
> This is the LCR configuration:
>
>
> #LCR MODULE
> loadmodule "lcr.so"
>
> modparam("lcr", "db_url",
> "mysql://kamailioro:kamailioro@localhost/kamailio")
> modparam("lcr", "lcr_gw_table","lcr_gw")
> modparam("lcr", "id_column", "id")
> modparam("lcr", "gw_name_column", "gw_name")
> modparam("lcr", "ip_addr_column", "ip_addr")
> modparam("lcr", "hostname_column", "hostname")
> modparam("lcr", "port_column", "port")
> modparam("lcr", "params_column", "params")
> modparam("lcr", "uri_scheme_column", "uri_scheme")
> modparam("lcr", "transport_column", "transport")
> modparam("lcr", "strip_column", "strip")
> modparam("lcr", "tag_column", "tag")
> modparam("lcr", "flags_column", "flags")
> modparam("lcr", "defunct_column", "defunct")
> modparam("lcr", "lcr_rule_table", "lcr_rule")
> modparam("lcr", "prefix_column", "prefix")
> modparam("lcr", "from_uri_column", "from_uri")
> modparam("lcr", "request_uri_column", "request_uri")
> modparam("lcr", "stopper_column", "stopper")
> modparam("lcr", "enabled_column", "enabled")
> modparam("lcr", "lcr_rule_target_table", "lcr_rule_target")
> modparam("lcr", "rule_id_column", "id")
> modparam("lcr", "gw_id_column", "gw_id")
> modparam("lcr", "priority_column", "priority")
> modparam("lcr","weight_column", "weight")
>
> modparam("lcr", "gw_uri_avp", "$avp(i:709)")
> modparam("lcr", "ruri_user_avp", "$avp(i:500)")
>
>
> modparam("lcr", "tag_avp", "$avp(lcr_tag)")
> modparam("lcr", "flags_avp", "$avp(i:712)")
> modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)")
> modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)")
>
>
> route[LCR] {
> if (status=="200")
> {
>   xlog("LCR: Inside the LCR route\n");
> }
>
> if(method=="INVITE")
> {
>   xlog("We got an invite");
>   if(!load_gws(1, $rU, $var(caller_uri))) {
> xlog("Couldn't load gateways");
> sl_send_reply("500", "Server Internal Error - Cannot load gateways");
> exit;
>   } else {
> xlog("GW Selected '$avp(i:709)'\n");
> xlog("Domain of destination: $dd\n");
> xlog("To URI: $tu\n");
>   }
>
>   if(!next_gw()) {
> xlog("Couldn't proceed to next gateway");
> sl_send_reply("503", "Service not available, no gateways found");
> exit;
>   } else {
> xlog("Calling the first matched gateway\n");
> xlog("ruri_user_avp: '$avp(i:500)'\n");
> xlog("To URI after next_gw: $tu\n");
> xlog("Request URI: $rU\n");
>
>   }
> }
> }
>
>
>
>
> AND this is the error which i have got:
>
>
>
> 17(7483) ERROR: 

[SR-Users] LCR prefix based

2016-03-10 Thread Roberto Innaimi
Hi to all, 

i want to use prefix based LCR routing, but for some reason, something is not 
working as expected. 

Can anyone help me? 

This is the LCR configuration:


#LCR MODULE
loadmodule "lcr.so"

modparam("lcr", "db_url", "mysql://kamailioro:kamailioro@localhost/kamailio")
modparam("lcr", "lcr_gw_table","lcr_gw")
modparam("lcr", "id_column", "id")
modparam("lcr", "gw_name_column", "gw_name")
modparam("lcr", "ip_addr_column", "ip_addr")
modparam("lcr", "hostname_column", "hostname")
modparam("lcr", "port_column", "port")
modparam("lcr", "params_column", "params")
modparam("lcr", "uri_scheme_column", "uri_scheme")
modparam("lcr", "transport_column", "transport")
modparam("lcr", "strip_column", "strip")
modparam("lcr", "tag_column", "tag")
modparam("lcr", "flags_column", "flags")
modparam("lcr", "defunct_column", "defunct")
modparam("lcr", "lcr_rule_table", "lcr_rule")
modparam("lcr", "prefix_column", "prefix")
modparam("lcr", "from_uri_column", "from_uri")
modparam("lcr", "request_uri_column", "request_uri")
modparam("lcr", "stopper_column", "stopper")
modparam("lcr", "enabled_column", "enabled")
modparam("lcr", "lcr_rule_target_table", "lcr_rule_target")
modparam("lcr", "rule_id_column", "id")
modparam("lcr", "gw_id_column", "gw_id")
modparam("lcr", "priority_column", "priority")
modparam("lcr","weight_column", "weight")

modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")


modparam("lcr", "tag_avp", "$avp(lcr_tag)")
modparam("lcr", "flags_avp", "$avp(i:712)")
modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)")
modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)")


route[LCR] {
if (status=="200")
{
  xlog("LCR: Inside the LCR route\n");
}

if(method=="INVITE")
{
  xlog("We got an invite");
  if(!load_gws(1, $rU, $var(caller_uri))) {
    xlog("Couldn't load gateways");
    sl_send_reply("500", "Server Internal Error - Cannot load gateways");
    exit;
  } else {
        xlog("GW Selected '$avp(i:709)'\n");
        xlog("Domain of destination: $dd\n");
        xlog("To URI: $tu\n");
  }

  if(!next_gw()) {
    xlog("Couldn't proceed to next gateway");
    sl_send_reply("503", "Service not available, no gateways found");
    exit;
  } else {
        xlog("Calling the first matched gateway\n");
        xlog("ruri_user_avp: '$avp(i:500)'\n");
        xlog("To URI after next_gw: $tu\n");
        xlog("Request URI: $rU\n");

  }
}
}




AND this is the error which i have got:



17(7483) ERROR: 

Re: [SR-Users] LCR Commands Kamctl

2016-03-02 Thread Daniel-Constantin Mierla


On 02/03/16 08:54, Juha Heinanen wrote:
> Alberto Sagredo writes:
>
>> I have just edited kamctl in order to make lcr commands work. Hope that
>> helps someone.
>>
>> Using Kamailio 4.3.0
>>
>> Please find kamctl attached also
> Alberto,
>
> Thanks for your kamctl contribution.  If you like it to be committed to
> next release, please provide a new version that does not replace $
> variables with fixed values.  Also, remove old code comments.
>
>
The best it will be to make a pull request via Github portal, it is
easier to review and see if there are conflicts on merging.

Here are few links for github docs on this matter:
  - https://help.github.com/articles/using-pull-requests/
  - https://help.github.com/articles/creating-a-pull-request/

Also, important to properly format the commit message:

  -
https://www.kamailio.org/wiki/devel/github-contributions#commit_message_format

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, March 7-9, 2016 - http://www.asipto.com


___
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


[SR-Users] LCR Commands Kamctl

2016-03-01 Thread Juha Heinanen
Alberto Sagredo writes:

> I have just edited kamctl in order to make lcr commands work. Hope that
> helps someone.
> 
> Using Kamailio 4.3.0
> 
> Please find kamctl attached also

Alberto,

Thanks for your kamctl contribution.  If you like it to be committed to
next release, please provide a new version that does not replace $
variables with fixed values.  Also, remove old code comments.

-- 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


[SR-Users] LCR Commands Kamctl

2016-02-28 Thread Alberto Sagredo
I have just edited kamctl in order to make lcr commands work. Hope that
helps someone.

Using Kamailio 4.3.0

Please find kamctl attached also

### LCR management

#

lcr() *{*

*case* $1 *in*

show_gws)

#   merr "command disabled"

#   exit 1

require_dbengine

mecho "lcr gateways"

QUERY="select * FROM lcr_gw ORDER BY id; "

$DBROCMD "$QUERY"

;;

show_routes)

#   merr "command disabled"

#   exit 1

require_dbengine

mecho "lcr routes"

QUERY="select * FROM lcr_rule ORDER BY id;"

$DBROCMD "$QUERY"

;;

reload)

#   merr "command disabled"

#   exit 1

kamcmd lcr.reload

;;

dump_gws)

#   merr "command disabled"

#   exit 1

kamcmd lcr.dump_gws

;;

dump_routes)

#   merr "command disabled"

#   exit 1

kamcmd lcr.dump_rules

*exit* 1

;;

eval_weights)

*shift*

   $AWK 'BEGIN {

if (ARGC < 2) {

printf("Usage: lcr eval_weights
\n");

exit;

}

iters = 10;

for (i = 1; i < ARGC; i++) { counts[i] = 0;
}

for (i = 1; i <= iters; i++) {

for (j = 1; j < ARGC; j++) {

elem[j] = ARGV[j] *
rshift(int(2147483647 * rand()), 8);

}

at = 1;

max = elem[at];

for (j = 2; j < ARGC; j++) {

if (elem[j] > max) {

max = elem[j];

at = j;

}

}

counts[at] = counts[at] + 1;

}

for (i = 1; i < ARGC; i++) {

printf("weight %d probability
%.4f\n", ARGV[i], counts[i]/iters);

}

}' $@

;;

*)

usage_lcr

*exit* 1

*esac*

*}*


kamctl
Description: Binary data
___
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


Re: [SR-Users] LCR Module issue

2016-02-18 Thread Alberto Sagredo
Thank you!

That resolved my issue :)



2016-02-18 17:23 GMT+01:00 ycaner :

> There is parameter for lcr_id. you need to set max lcr_count in .cfg.
>
> lcr_count
> lcr_gw_count
>
>
>
> --
> View this message in context:
> http://sip-router.1086192.n5.nabble.com/LCR-Module-issue-tp145861p145863.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ___
> 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
>
___
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


Re: [SR-Users] LCR Module issue

2016-02-18 Thread ycaner
There is parameter for lcr_id. you need to set max lcr_count in .cfg.

lcr_count
lcr_gw_count



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/LCR-Module-issue-tp145861p145863.html
Sent from the Users mailing list archive at Nabble.com.

___
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


[SR-Users] LCR Module issue

2016-02-18 Thread Alberto Sagredo
Hi

I have LCR working but not able to add more gateways?

It seems only first one is accepted

What could be wrong?

I show you database data and kamcmd commands output.


mysql> select * from lcr_rule_target;

+++-+---+--++

| id | lcr_id | rule_id | gw_id | priority | weight |

+++-+---+--++

|  1 |  1 |   1 | 1 |1 |  1 |

|  2 |  1 |   2 | 1 |1 |  1 |

|  3 |  2 |   2 | 2 |1 |  1 |

+++-+---+--++

3 rows in set (0.00 sec)


mysql> select * from lcr_rule;

+++---+--+-+-+-+

| id | lcr_id | prefix| from_uri | request_uri | stopper | enabled |

+++---+--+-+-+-+

|  1 |  1 | 6 | NULL | NULL|   1 |   1 |

|  2 |  1 | DIDNUMBER | NULL | NULL|   1 |   1 |

|  3 |  2 | DIDNUMBER | NULL | NULL|   1 |   1 |

+++---+--+-+-+-+

3 rows in set (0.00 sec)


mysql> select * from lcr_gw;

++++--+--+--+++---+---++--+---+-+

| id | lcr_id | gw_name| ip_addr  | hostname | port | params |
uri_scheme | transport | strip | prefix | tag  | flags | defunct |

++++--+--+--+++---+---++--+---+-+

|  1 |  1 | Carrier_Prueba | 172.x.x.x | NULL | 5060 | NULL   |
  1 | 1 | 0 | NULL   | NULL | 1 |NULL |

|  5 |  2 | Proveedor_1| 172.x.x.x | NULL | 5060 | NULL   |
  1 | 1 | 0 | NULL   | NULL | 0 |NULL |

++++--+--+--+++---+---++--+---+-+

2 rows in set (0.00 sec)


mysql>

root@kamailio:~# kamcmd lcr.reload

root@kamailio:~# kamcmd lcr.dump_rules

{

lcr_id: 1

rule_id: 2

prefix: DIDNUMBER

from_uri:

request_uri:

stopper: 1

}

{

gw_index: 1

priority: 1

weight: 1

}

{

lcr_id: 1

rule_id: 1

prefix: 6

from_uri:

request_uri:

stopper: 1

}

{

gw_index: 1

priority: 1

weight: 1

}

9

1

root@kamailio:~# kamcmd lcr.dump_gws

{

lcr_id: 1

gw_id: 1

gw_index: 1

gw_name: Carrier_Prueba

scheme: sip:

ip_addr: 172.x.x.x

hostname:

port: 5060

params:

transport: ;transport=udp

strip: 0

prefix:

tag:

flags: 1

state: 0

defunct_until: 0
___
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


Re: [SR-Users] LCR

2016-02-15 Thread Alexey V. Panfilov
15.02.2016 11:11, Juha Heinanen wrote:
> Alexey V. Panfilov writes:
> 
>> It's a pity. May I ask (as feature request) to add it to the future
>> version of Kam?
> 
> I currently don't need such a feature.  It might be possible to
> implement it by adding target_id field to struct target and to struct
> matched_gw_info. Then add_gws_into_avps() function could include the id
> in gw_uri_avps.  Feel free to do it.
> 
> -- Juha

I'll try to do it by myself.

Thanks.

-- 
Best regards,
Alexey V. Panfilov


___
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


Re: [SR-Users] LCR

2016-02-15 Thread Juha Heinanen
Alexey V. Panfilov writes:

> It's a pity. May I ask (as feature request) to add it to the future
> version of Kam?

I currently don't need such a feature.  It might be possible to
implement it by adding target_id field to struct target and to struct
matched_gw_info. Then add_gws_into_avps() function could include the id
in gw_uri_avps.  Feel free to do it.

-- 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


Re: [SR-Users] LCR

2016-02-14 Thread Alexey V. Panfilov
15.02.2016 10:13, Juha Heinanen wrote:
> Alexey V. Panfilov writes:
> 
>> I'm using LCR module in my kamailio setup. I can access to the
>> gw_uri_avp's value of matched gateway, but I'd like to get value of
>> selected id of lcr_rule_target. Is there any way to get it?
> 
> id of lcr_rule_target is not currently stored in gw_uri_avp.  only flags
> and tag of selected gw is available.

It's a pity. May I ask (as feature request) to add it to the future
version of Kam?

-- 
Best regards,
Alexey V. Panfilov


___
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


[SR-Users] LCR

2016-02-14 Thread Juha Heinanen
Alexey V. Panfilov writes:

> I'm using LCR module in my kamailio setup. I can access to the
> gw_uri_avp's value of matched gateway, but I'd like to get value of
> selected id of lcr_rule_target. Is there any way to get it?

id of lcr_rule_target is not currently stored in gw_uri_avp.  only flags
and tag of selected gw is available.

-- 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


[SR-Users] LCR

2016-02-14 Thread Alexey V. Panfilov
Hello,

I'm using LCR module in my kamailio setup. I can access to the
gw_uri_avp's value of matched gateway, but I'd like to get value of
selected id of lcr_rule_target. Is there any way to get it?

Thanks.

P.S. Access to value of custom table's field (for example, named as
'flags') of cr_rule_target will be better. I'd like to store at this
field the price of selected direction.

-- 
Best regards,
Alexey V. Panfilov


___
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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-04 Thread Juha Heinanen
ycaner writes:

> Thanks for reply. before load_gws , setting ruri_user_avp to null solves
> request uri problems.

load_gws() tries to delete possibly existing avp values by this
statement:

delete_avp(gw_uri_avp_type|AVP_VAL_STR, gw_uri_avp);

obviously there is something wrong with if the avp needs to be deleted
by the script.

i'll try at some point try to figure out how to delete an avp based on
its name.

-- 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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-04 Thread Juha Heinanen
ycaner writes:

>   in load_gws function
>   there is a delete_avp for gw_uri_avp as you mentioned . but in my
>   view it needs a delete_avp for ruri_user_avp. 
>   Because it is reloading gws for different route.

I added deletion of possible old ruri_user_avp value when next_gw() is
called first time after load_gws().

It is currently in master branch only, but I can commit also to 4.3
branch if this fixes the issue.

-- 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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-04 Thread ycaner

  

  
  
in load_gws function
  there is a delete_avp for gw_uri_avp as you mentioned . but in my
  view it needs a delete_avp for ruri_user_avp. 
  Because it is reloading gws for different route. 
  Thanks. 

04.12.2015 11:44 tarihinde Juha
  Heinanen [via SIP Router] yazdı: 

 ycaner writes:
  
  
   Thanks for reply. before load_gws , setting ruri_user_avp to
  null solves
  
   request uri problems.
  
  
  load_gws() tries to delete possibly existing avp values by this
  
  statement:
  
  
      delete_avp(gw_uri_avp_type|AVP_VAL_STR, gw_uri_avp);
  
  
  obviously there is something wrong with if the avp needs to be
  deleted
  
  by the script.
  
  
  i'll try at some point try to figure out how to delete an avp
  based on
  
  its name.
  
  
  -- juha
  
  
  
  ___
  
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list
  
  [hidden email] 
  
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 
  
  
  
  
If you reply to this email, your
  message will be added to the discussion below: 

http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp143602p143652.html
 
  
  
To unsubscribe from LCR module : re load_gws uri errors, click
  here . 
NAML  


-- 
  
  
  

  

  

  

  



yasin-imza-2014.jpg (51K) 





--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp143602p143654.html
Sent from the Users mailing list archive at Nabble.com.___
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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-04 Thread ycaner

  

  
  
Hello; 
  i commented your last commit. Sorry , i think i couldn't explain 
situation.
  Here is log for more understand. 
  
  
  - Here is first load_gws and next_gws() functions are 
  called- 
  6(10299) DEBUG: lcr [lcr_mod.c:1943]: load_gws(): load_gws(1,
  10218503027337, ) 
   6(10299) DEBUG: lcr [lcr_mod.c:2014]: load_gws(): added
  matched_gws[0]=[21, 4, 1, 6054284] 
   6(10299) DEBUG: lcr [lcr_mod.c:1887]: add_gws_into_avps(): added
  gw_uri_avp 21|sip:|0||0|3020380345||5080||;transport=udp|0
  with weight 6054284 
   6(10299) DEBUG: lcr [../../resolve.h:258]: str2ip(): str2ip:
  ERROR: too few dots in [3020380345] 
   6(10299) DEBUG: lcr [../../resolve.h:355]: str2ip6(): str2ip6:
  ERROR: too few colons in [3020380345] 
   6(10299) DEBUG: lcr [lcr_mod.c:2175]: generate_uris(): r_uri
  sip:10218503027337@ip:5080;transport=udp, dst_uri  
   6(10299) DEBUG: lcr [lcr_mod.c:2456]: next_gw(): added
  ruri_user_avp 10218503027337 
   6(10299) DEBUG: lcr [lcr_mod.c:2492]: next_gw(): added flags_avp
  0 
   6(10299) DEBUG: lcr [lcr_mod.c:2499]: next_gw(): added tag_avp
  0 
   this route/number gives busy response, i am gonna
  change route and number- 
  - Second loads_gws and next_gws functions are
  called.-- 
   8(10303) DEBUG: lcr [lcr_mod.c:1943]: load_gws(): load_gws(1,
  200015066109057, ) 
   8(10303) DEBUG: lcr [lcr_mod.c:2014]: load_gws(): added
  matched_gws[0]=[1, 5, 1, 2247144] 
   8(10303) DEBUG: lcr [lcr_mod.c:1887]: add_gws_into_avps(): added
  gw_uri_avp
  1|sip:|5|200010|2|3020380345||5080||;transport=udp|0 with
  weight 2247144 
   8(10303) DEBUG: lcr [../../resolve.h:258]: str2ip(): str2ip:
  ERROR: too few dots in [3020380345] 
   8(10303) DEBUG: lcr [../../resolve.h:355]: str2ip6(): str2ip6:
  ERROR: too few colons in [3020380345] 
   8(10303) DEBUG: lcr [lcr_mod.c:2175]: generate_uris(): r_uri
  sip:200010503027337@ip:5080;transport=udp, dst_uri
   
   8(10303) DEBUG: lcr [lcr_mod.c:2492]: next_gw(): added flags_avp
  0 
   8(10303) DEBUG: lcr [lcr_mod.c:2499]: next_gw(): added tag_avp
  2 
  r_uri must be 200015066109057 but
  it gets first called r_uri because r_uri saved--- 
  
  
  Number 200015066109057 is
  stripped with five as underline. but lcr strips olds uri (10218503027337) 
as saved r_uri. 
  
  
  this route scripts a kind of that if pstn is busy , forward to
  call a cellphone. 
  
  

04.12.2015 13:27 tarihinde Juha
  Heinanen [via SIP Router] yazdı: 

 ycaner writes:
  
  
         in load_gws function
  
         there is a delete_avp for gw_uri_avp as you mentioned .
  but in my
  
         view it needs a delete_avp for ruri_user_avp. 
         Because it is reloading gws for different route.
  
  
  I added deletion of possible old ruri_user_avp value when
  next_gw() is
  
  called first time after load_gws().
  
  
  It is currently in master branch only, but I can commit also to
  4.3
  
  branch if this fixes the issue.
  
  
  -- Juha
  
  
  ___
  
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list
  
  [hidden email] 
  
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 
  
  
  
  
If you reply to this email, your
  message will be added to the discussion below: 

http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp143602p143656.html
 
  
  
To unsubscribe from LCR module : re load_gws uri errors, click
  here . 
NAML  


-- 
  
  
  

  

  

  

  



yasin-imza-2014.jpg (51K) 





--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp143602p143659.html
Sent from the Users mailing list archive at Nabble.com.___
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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-03 Thread ycaner
Hey;
Thanks for reply. before load_gws , setting ruri_user_avp to null solves
request uri problems.






--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp143602p143648.html
Sent from the Users mailing list archive at Nabble.com.

___
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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-03 Thread ycaner
Hello;
i found the problem i hope i can explain the problem to get solution.

when first usage of load_gws() and next_gw() functions , next_gw() fills all 
uri avps to ru_AVPs from gws tables. if it goes to failure route or route
again , it can re use ru_AVPs in next_gw(). so if recall the load_gws()
again for choose new route , it uses old uri avps in next_gw() function , it
is totally incorrect. if there is flag or parameter to define gws are
reloaded , it can null to ru_AVPs to correct gws informations.

i couldn't find why fromuri appending itself. searching about it.

Thanks.



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/LCR-module-re-load-gws-uri-errors-tp143602p143642.html
Sent from the Users mailing list archive at Nabble.com.

___
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


Re: [SR-Users] LCR module : re load_gws uri errors

2015-12-03 Thread Juha Heinanen
ycaner writes:

> when first usage of load_gws() and next_gw() functions , next_gw() fills all 
> uri avps to ru_AVPs from gws tables. if it goes to failure route or route
> again , it can re use ru_AVPs in next_gw(). so if recall the load_gws()
> again for choose new route , it uses old uri avps in next_gw() function , it
> is totally incorrect. if there is flag or parameter to define gws are
> reloaded , it can null to ru_AVPs to correct gws informations.

does it work if you destroy (e.g. using avp_delete("$avp(x)/g"))
gw_uri_avp and ruri_user_avp before the second load_gws() call?

> i couldn't find why fromuri appending itself. searching about it.

if i remember correctly, lcr functions do not modify from uri.

-- 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


[SR-Users] LCR module : re load_gws uri errors

2015-12-02 Thread Yasin CANER

  
  
Hello;
    After change $rU in  failure route , calling load_gws function.
so lcr module changes request uri and fromuser  and it is wrong.
here is example for more explain;
    
calls flows
1- 850xxx to 1021850yyy
2- 486 busy
3- going to t_on_failure route and then changing to request uri to
506aaa
4- re-format request uri to  20001506aaa
5- calling lcr load_gws(1,$rU);
6- lcr formatting to request uri to 20001506yyy
7- from user to (850xxx850xxx) appending last fromuser.



 8(10303) DEBUG: 

Re: [SR-Users] LCR Routing - Cost based routing

2015-08-11 Thread DanB

Hi Alexandru,

Well the concept is simple: on INVITE, you will issue a special format 
evapi request. You will receive the list of suppliers in the reply 
(which is received in a separate route) and you continue processing from 
there. These suppliers are simple tags so your creativity will be the 
limit of what you can do with them - eg: direct ip addresses received or 
tags of suppliers which you can further translate with drouting module 
or any alias related one.


For more information on LCR please find this year's presentation on 
Kamailio World (which I strongly recommend to be attended):


https://www.youtube.com/watch?v=Hsvcwleb-fY

You can also find the kamailio configuration which I have used in the 
worshop here:


https://github.com/cgrates/cgrates/tree/master/data/tutorials/kamevapi/kamailio/etc/kamailio

Let me know if further questions (or join our irc or mailing list so we 
do not create too much noise here).


DanB

___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-10 Thread DanB

Guys,

Since I saw the thread growing, I am around if you got questions on 
CGRateS related LCR, fully compatible with Kamailio via evapi module.


DanB

___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-10 Thread Alexandru Covalschi
DanB, well, I never used it - can you please describe how does it work? :)
I mean, the logic in short

2015-08-10 13:15 GMT+03:00 DanB danb.li...@gmail.com:

 Guys,

 Since I saw the thread growing, I am around if you got questions on
 CGRateS related LCR, fully compatible with Kamailio via evapi module.

 DanB


 ___
 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




-- 
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/
___
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


[SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Arun Kumar
Hi

 is there any way to achive following usecase using carrier route / LCR
/ droude module

i have 10 different termination gateways, each gateways will have more than
1 destinations and each gateways will have different rate, for example

91 Destination ( there will be 1 entries like 91 )
gw1gw2   gw3   gw4gw5
0.001 0.007 0.003 0.002 0.003

now need to logic to load the these destination with cost and sort gateways
in order of longest match of dialled number,cost, priority for the dialled
destination, which will not use too much CPU and memory

Regards
Arun
___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Alexandru Covalschi
try using CGRateS

2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier route /
 LCR / droude module

 i have 10 different termination gateways, each gateways will have more
 than 1 destinations and each gateways will have different rate, for
 example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




-- 
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/
___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Alexandru Covalschi
Or, well, see that guide
http://dopensource.com/least-cost-routing-with-kamailio-v4-1/ - we have
priority and weight on LCR module

2015-08-09 12:37 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 try using CGRateS

 2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier route /
 LCR / droude module

 i have 10 different termination gateways, each gateways will have more
 than 1 destinations and each gateways will have different rate, for
 example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




-- 
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/
___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Arun Kumar
but above guide is only prefix priority and weight based   , but we should
involve rate as well.
 ,

On Sun, Aug 9, 2015 at 3:09 PM, Alexandru Covalschi 568...@gmail.com
wrote:

 Or, well, see that guide
 http://dopensource.com/least-cost-routing-with-kamailio-v4-1/ - we have
 priority and weight on LCR module

 2015-08-09 12:37 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 try using CGRateS

 2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier route /
 LCR / droude module

 i have 10 different termination gateways, each gateways will have more
 than 1 destinations and each gateways will have different rate, for
 example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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


___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Arun Kumar
hi Alexandru

   so we have manually  set prefix , weight and priority depanding
upon rates  ?  is there any avaliable way to automate or we have to
rewrite/modify  the lcr/drouting module for rate selection  ,



On Sun, Aug 9, 2015 at 9:22 PM, Alexandru Covalschi 568...@gmail.com
wrote:

 however you can try building LCR based on prefix and weight, why not?

 2015-08-09 18:52 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 I know CGRateS allow cost-based LCR for Kamailio. Maybe there are some
 internal Kamailio modules, but I don't know about them

 2015-08-09 17:10 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 but above guide is only prefix priority and weight based   , but we
 should involve rate as well.
  ,

 On Sun, Aug 9, 2015 at 3:09 PM, Alexandru Covalschi 568...@gmail.com
 wrote:

 Or, well, see that guide
 http://dopensource.com/least-cost-routing-with-kamailio-v4-1/ - we
 have priority and weight on LCR module

 2015-08-09 12:37 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 try using CGRateS

 2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier route
 / LCR / droude module

 i have 10 different termination gateways, each gateways will have
 more than 1 destinations and each gateways will have different rate,
 for example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for 
 the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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



 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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


___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Juha Heinanen
Arun Kumar writes:

 but above guide is only prefix priority and weight based   , but we should
 involve rate as well.

may be you can use priority as your rate.

-- 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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Alexandru Covalschi
however you can try building LCR based on prefix and weight, why not?

2015-08-09 18:52 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 I know CGRateS allow cost-based LCR for Kamailio. Maybe there are some
 internal Kamailio modules, but I don't know about them

 2015-08-09 17:10 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 but above guide is only prefix priority and weight based   , but we
 should involve rate as well.
  ,

 On Sun, Aug 9, 2015 at 3:09 PM, Alexandru Covalschi 568...@gmail.com
 wrote:

 Or, well, see that guide
 http://dopensource.com/least-cost-routing-with-kamailio-v4-1/ - we have
 priority and weight on LCR module

 2015-08-09 12:37 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 try using CGRateS

 2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier route
 / LCR / droude module

 i have 10 different termination gateways, each gateways will have more
 than 1 destinations and each gateways will have different rate, for
 example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for 
 the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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



 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




-- 
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/
___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Alexandru Covalschi
I know CGRateS allow cost-based LCR for Kamailio. Maybe there are some
internal Kamailio modules, but I don't know about them

2015-08-09 17:10 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 but above guide is only prefix priority and weight based   , but we should
 involve rate as well.
  ,

 On Sun, Aug 9, 2015 at 3:09 PM, Alexandru Covalschi 568...@gmail.com
 wrote:

 Or, well, see that guide
 http://dopensource.com/least-cost-routing-with-kamailio-v4-1/ - we have
 priority and weight on LCR module

 2015-08-09 12:37 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 try using CGRateS

 2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier route /
 LCR / droude module

 i have 10 different termination gateways, each gateways will have more
 than 1 destinations and each gateways will have different rate, for
 example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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



 ___
 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




-- 
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/
___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Alex Balashov
‎Long story short: Kamailio supports primitive weight-based routing with its 
various internal modules, but not complex, jurisdiction and market-specific 
business logic which we commonly think of as LCR. 

For that, you need to somehow shoehorn your right selection algorithm into 
these modules' limited schema, write your own logic, or licence a commercial 
product which provides this, such as Sipwise's sip-provider (www.sipwise.com), 
or ours (www.csrpswitch.com), or various others.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.
  Original Message  
From: Alexandru Covalschi
Sent: Sunday, August 9, 2015 11:52
To: Kamailio (SER) - Users Mailing List
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] LCR Routing - Cost based routing


___
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


Re: [SR-Users] LCR Routing - Cost based routing

2015-08-09 Thread Alexandru Covalschi
you already have cost, just write a script to transform it into weight, I
don't see a hard task here. It can be easily automated

2015-08-09 21:15 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 hi Alexandru

so we have manually  set prefix , weight and priority
 depanding upon rates  ?  is there any avaliable way to automate or we have
 to rewrite/modify  the lcr/drouting module for rate selection  ,



 On Sun, Aug 9, 2015 at 9:22 PM, Alexandru Covalschi 568...@gmail.com
 wrote:

 however you can try building LCR based on prefix and weight, why not?

 2015-08-09 18:52 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 I know CGRateS allow cost-based LCR for Kamailio. Maybe there are some
 internal Kamailio modules, but I don't know about them

 2015-08-09 17:10 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 but above guide is only prefix priority and weight based   , but we
 should involve rate as well.
  ,

 On Sun, Aug 9, 2015 at 3:09 PM, Alexandru Covalschi 568...@gmail.com
 wrote:

 Or, well, see that guide
 http://dopensource.com/least-cost-routing-with-kamailio-v4-1/ - we
 have priority and weight on LCR module

 2015-08-09 12:37 GMT+03:00 Alexandru Covalschi 568...@gmail.com:

 try using CGRateS

 2015-08-09 12:06 GMT+03:00 Arun Kumar mi2a...@gmail.com:

 Hi

  is there any way to achive following usecase using carrier
 route / LCR / droude module

 i have 10 different termination gateways, each gateways will have
 more than 1 destinations and each gateways will have different rate,
 for example

 91 Destination ( there will be 1 entries like 91 )
 gw1gw2   gw3   gw4gw5
 0.001 0.007 0.003 0.002 0.003

 now need to logic to load the these destination with cost and sort
 gateways in order of longest match of dialled number,cost, priority for 
 the
 dialled destination, which will not use too much CPU and memory

 Regards
 Arun

 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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



 ___
 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




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/




 --
 Alexandru Covalschi
 ABRISS-Solutions
 VoIP engineer and system administrator
 phone: +37367398493
 web: http://abs-telecom.com/

 ___
 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



 ___
 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




-- 
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
phone: +37367398493
web: http://abs-telecom.com/
___
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


Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov



On 29/04/15 12:34, Grant Bagdasarian wrote:


That sounds possible! Thanks.

That does this description mean: “Execution time of load_gws() 
function is O(N) * O(M), where N is number of different prefix lengths 
and M is number of collisions for matching prefix(es) in lcr rules 
hash table of the LCR instance.”?


Does this mean it loads the data from its internal memory or does it 
load the data from the database again?


load_gws() prepares an ordered list of gateways for current destination. 
It loads data only from internal in-memory gateways db (hash table).


How fast does it select a gateway after load_gws using next_gw()? Is 
it O(N) again?


O(1) since load_gws already prepared ordered (by price) list and 
next_gw() only takes next gw in a list.


What about multiple combinations of capabilities? For example caller 
id spoofing and g729 codec, or caller id spoofing and g711ulaw codec? Etc.


Wouldn’t this cause the data to grow exponentially?


It would.

Another idea:
You can also have only one lcr instance and keep gateways capabilities 
in the tag field (serialized somehow). Then you can just iterate through 
a list generated by load_gws() skipping gateways which don't match your 
criteria and in the end a call will be routed to the cheapest gateway 
with proper capabilities.


*From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
Behalf Of *Vitaliy Aleksandrov

*Sent:* Wednesday, April 29, 2015 10:36 AM
*To:* sr-users@lists.sip-router.org
*Subject:* Re: [SR-Users] LCR with gateway capabilities

What about configuring two LCR instances with different lcr_id.
The first one can use only gateways with requested capabilities and 
the second one all gateways.
Then you can make a decision about which instance to use during call 
routing process providing this lcr_id to load_gws() function.



Hello,

From what I understand about the LCR module is that the rules have
to be prioritized by the admin, be it manually or automatically by
an application.

Let’s say the LCR database has 10 gateways, each with their own
rules etc.

4 of these gateways support caller id spoofing and the others don’t.

But the other 6 are cheaper and Kamailio has to route a call using
a gateway which support caller id spoofing and is the cheapest of
the 4.

Would it be possible to tell the LCR module to select a gateway
based on certain capabilities and is the cheapest of the ones
which support a certain capability?




___

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users@lists.sip-router.org  mailto:sr-users@lists.sip-router.org

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
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


___
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


Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Grant Bagdasarian
The Tag column size is 64. If I make this larger in the database, will it be 
truncated once it is loaded into memory?
Through which list do I need to iterate? You mentioned the data is stored in a 
hash table, what is the name of this hash table?

Basically for each call I need to call the load_gws() function, which is O(N) * 
O(M).
What if I take a different approach and call a stored procedure (for each call) 
which does the selection of a gateway based on the supplied criteria.
Of course the tables would be optimized with indices for the best possible 
performance.

When comparing load_gws() (O(N) * O(M)) with the stored procedure approach, 
would there be a huge performance loss when taking the stored procedure 
approach?
I know this approach brings a whole new set of problem with availability and 
the loss of features, but for now I'm only interested in the performance aspect 
of both methods.

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Vitaliy Aleksandrov
Sent: Wednesday, April 29, 2015 12:27 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] LCR with gateway capabilities


On 29/04/15 12:34, Grant Bagdasarian wrote:
That sounds possible! Thanks.

That does this description mean: Execution time of load_gws() function is O(N) 
* O(M), where N is number of different prefix lengths and M is number of 
collisions for matching prefix(es) in lcr rules hash table of the LCR 
instance.?

Does this mean it loads the data from its internal memory or does it load the 
data from the database again?
load_gws() prepares an ordered list of gateways for current destination. It 
loads data only from internal in-memory gateways db (hash table).

How fast does it select a gateway after load_gws using next_gw()? Is it O(N) 
again?
O(1) since load_gws already prepared ordered (by price) list and next_gw() only 
takes next gw in a list.


What about multiple combinations of capabilities? For example caller id 
spoofing and g729 codec, or caller id spoofing and g711ulaw codec? Etc.
Wouldn't this cause the data to grow exponentially?
It would.

Another idea:
You can also have only one lcr instance and keep gateways capabilities in the 
tag field (serialized somehow). Then you can just iterate through a list 
generated by load_gws() skipping gateways which don't match your criteria and 
in the end a call will be routed to the cheapest gateway with proper 
capabilities.


From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Vitaliy Aleksandrov
Sent: Wednesday, April 29, 2015 10:36 AM
To: sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org
Subject: Re: [SR-Users] LCR with gateway capabilities

What about configuring two LCR instances with different lcr_id.
The first one can use only gateways with requested capabilities and the second 
one all gateways.
Then you can make a decision about which instance to use during call routing 
process providing this lcr_id to load_gws() function.



Hello,

From what I understand about the LCR module is that the rules have to be 
prioritized by the admin, be it manually or automatically by an application.

Let's say the LCR database has 10 gateways, each with their own rules etc.
4 of these gateways support caller id spoofing and the others don't.
But the other 6 are cheaper and Kamailio has to route a call using a gateway 
which support caller id spoofing and is the cheapest of the 4.

Would it be possible to tell the LCR module to select a gateway based on 
certain capabilities and is the cheapest of the ones which support a certain 
capability?







___

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





___

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
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


Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Grant Bagdasarian
That sounds possible! Thanks.

That does this description mean: Execution time of load_gws() function is O(N) 
* O(M), where N is number of different prefix lengths and M is number of 
collisions for matching prefix(es) in lcr rules hash table of the LCR 
instance.?

Does this mean it loads the data from its internal memory or does it load the 
data from the database again?
How fast does it select a gateway after load_gws using next_gw()? Is it O(N) 
again?

What about multiple combinations of capabilities? For example caller id 
spoofing and g729 codec, or caller id spoofing and g711ulaw codec? Etc.
Wouldn't this cause the data to grow exponentially?

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Vitaliy Aleksandrov
Sent: Wednesday, April 29, 2015 10:36 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] LCR with gateway capabilities

What about configuring two LCR instances with different lcr_id.
The first one can use only gateways with requested capabilities and the second 
one all gateways.
Then you can make a decision about which instance to use during call routing 
process providing this lcr_id to load_gws() function.


Hello,

From what I understand about the LCR module is that the rules have to be 
prioritized by the admin, be it manually or automatically by an application.

Let's say the LCR database has 10 gateways, each with their own rules etc.
4 of these gateways support caller id spoofing and the others don't.
But the other 6 are cheaper and Kamailio has to route a call using a gateway 
which support caller id spoofing and is the cheapest of the 4.

Would it be possible to tell the LCR module to select a gateway based on 
certain capabilities and is the cheapest of the ones which support a certain 
capability?






___

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
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


Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov

What about configuring two LCR instances with different lcr_id.
The first one can use only gateways with requested capabilities and the 
second one all gateways.
Then you can make a decision about which instance to use during call 
routing process providing this lcr_id to load_gws() function.



Hello,

From what I understand about the LCR module is that the rules have to 
be prioritized by the admin, be it manually or automatically by an 
application.


Let’s say the LCR database has 10 gateways, each with their own rules 
etc.


4 of these gateways support caller id spoofing and the others don’t.

But the other 6 are cheaper and Kamailio has to route a call using a 
gateway which support caller id spoofing and is the cheapest of the 4.


Would it be possible to tell the LCR module to select a gateway based 
on certain capabilities and is the cheapest of the ones which support 
a certain capability?




___
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


___
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


Re: [SR-Users] LCR with gateway capabilities

2015-04-29 Thread Vitaliy Aleksandrov


The Tag column size is 64. If I make this larger in the database, will 
it be truncated once it is loaded into memory?


According to modules source code Tag's max size is hardcoded and will be 
truncated. But this is not a bit problem. You can keep capabilities list 
in htable and only put a key for this htable info to the tag.


Through which list do I need to iterate? You mentioned the data is 
stored in a hash table, what is the name of this hash table?



load_gws() creates a list of gateways and next_gw() fetches them one by one.
After calling load_gws() you can just call next_gw() which puts gateways 
tag to the tag_avp. If current gateway doesn't have requested 
capabilities just call next_gw() again.


Basically for each call I need to call the load_gws() function, which 
is O(N) * O(M).


What if I take a different approach and call a stored procedure (for 
each call) which does the selection of a gateway based on the supplied 
criteria.


Of course the tables would be optimized with indices for the best 
possible performance.


When comparing load_gws() (O(N) * O(M)) with the stored procedure 
approach, would there be a huge performance loss when taking the 
stored procedure approach?



Who knows.. You can test it and share results with community :)


I know this approach brings a whole new set of problem with 
availability and the loss of features, but for now I’m only interested 
in the performance aspect of both methods.


Actually going this way you don't need LCR module at all. You can call 
stored procedure, lua/python/perl/... script, or request an external 
system using radius/xmlrpc. But be careful making blocking operations 
from a script or have enough number of kamailio processes.


___
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


[SR-Users] lcr module ping

2014-10-27 Thread Debojit Kakoti
Hi,
My current setup is
I have one kamailio server and one asterisk server.In the asterisk server I
have two trunk where there are two different PRI provider is used for
outbound call.
I am using uac_replace_from function to route call to different trunk of
the same server.

However I want to use lcr module and I can check if particular gateway is
up and down using lcr module and route the call.

But problem is In my current scenario the gateway is up but one PRI is down
for one provider and other one is up.So how to check if one sip trunk is
working and other one is not working? Can you suggest me a solution?


-- 
Debojit Kakoti
Mobile   : +91 9650654870
Email : debojkakot...@gmail.com
Skype: deboj1988
___
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


[SR-Users] lcr module ping

2014-10-27 Thread Juha Heinanen
Debojit Kakoti writes:

 However I want to use lcr module and I can check if particular gateway is
 up and down using lcr module and route the call.

if i undertood correctly, i don't think you can use it since from the
point of view of lcr module, there is only one gw, i.e., your asterisk.

-- 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


Re: [SR-Users] LCR base on call rate

2014-09-11 Thread Juha Heinanen
Satish Patel writes:

 Thanks for replay, anyone did that before? Any example or sample
 script will help.

you just call load_gw() first and then make next_gw() calls until call
succeeds.  this is explained in the 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


[SR-Users] LCR base on call rate

2014-09-10 Thread Satish Patel
I heard somewhere LCR can do routing based on call rate and call price, does it 
true? I haven't seen any config or doc which does call rate using LCR. It only 
does routing base on prefix scan. 

Am I missing something here?

Sent from my iPhone
___
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


[SR-Users] LCR base on call rate

2014-09-10 Thread Juha Heinanen
Satish Patel writes:

 I heard somewhere LCR can do routing based on call rate and call
 price, does it true? I haven't seen any config or doc which does call
 rate using LCR. It only does routing base on prefix scan.

for each prefix you can define gateways and give each a priority and
weight.  if you can map your rates to gw priorities then lcr module may
work for you.

-- 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


Re: [SR-Users] LCR base on call rate

2014-09-10 Thread Satish Patel
Thanks for replay, anyone did that before? Any example or sample script will 
help 

Sent from my iPhone

On Sep 10, 2014, at 12:17 PM, Juha Heinanen j...@tutpro.com wrote:

 Satish Patel writes:
 
 I heard somewhere LCR can do routing based on call rate and call
 price, does it true? I haven't seen any config or doc which does call
 rate using LCR. It only does routing base on prefix scan.
 
 for each prefix you can define gateways and give each a priority and
 weight.  if you can map your rates to gw priorities then lcr module may
 work for you.
 
 -- 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

___
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


Re: [SR-Users] LCR

2014-07-30 Thread Juha Heinanen
Keith writes:

 I want to do LCR based on from uri. I get I need to do regular expression
 matching but have no idea where to look to start.

see lcr module readme if lcr module from uri matching meets your needs.

-- 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


Re: [SR-Users] LCR

2014-07-30 Thread Moritz Graf
Hi Keith,

you can take the from userpart from the pseudovar $fU. Find further
infos on the pseudovar documentation site:
http://www.kamailio.org/wiki/cookbooks/4.1.x/pseudovariables

After that you can try to match that with the module regex, see
documentation here:
http://kamailio.org/docs/modules/4.1.x/modules/regex.html

But I recomend using app_perl. By that you get the whole SIP-message.
Apply PERL regexpower onto it and return some values via avps, or insert
branch directly in perl.

Depending on how sophisticated your LCR rules are using the LCR-Module
or any other module might also be worth a thought.

greetz

Am 29.07.2014 21:55, schrieb Keith:
 Hi,
 
 I want to do LCR based on from uri. I get I need to do regular
 expression matching but have no idea where to look to start.
 
 Any pointers would be good.
 Thanks
 Keith


-- 

Moritz Graf, M.Sc.
Betrieb NGN-Plattform
G-FIT GmbH  Co. KG
Greflingerstr. 26, 93055 Regensburg



signature.asc
Description: OpenPGP digital signature
___
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


Re: [SR-Users] LCR

2014-07-29 Thread Keith
Hi,

I want to do LCR based on from uri. I get I need to do regular expression
matching but have no idea where to look to start.

Any pointers would be good.
Thanks
Keith
___
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


Re: [SR-Users] LCR from URI (CLI)

2014-06-17 Thread Keith
Hi all,

I have an issue where I have two carriers, one only accepts +44 then the
CLI and the other only accepts the number with the leading zero dropped.

I am using LCR to route to carriers, however I can only switch carriers by
manually altering the CLI.

Is there a way I can manipulate the CLI based on the destination the call
is being sent to?

Thanks
Keith
___
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


Re: [SR-Users] LCR from URI (CLI)

2014-06-17 Thread Juha Heinanen
Keith writes:

 Is there a way I can manipulate the CLI based on the destination the call
 is being sent to?

you can, for example, set a lcr_gw flag that tells what the
representation of cli need to be and then add p-a-i header accordingly.

-- 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


[SR-Users] LCR from_uri help

2014-04-28 Thread Juha Heinanen
just to complete this thread, it turned out that from uri matching
didn't happen because load_gws() was called without caller uri
argument.

-- 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


Re: [SR-Users] LCR from_uri help

2014-04-25 Thread Geoffrey Mina
Juha,
Thank you for all of your help so far, but we are still totally stuck
trying to make this work.  We have double and triple checked our
configuration, database, and INVITE and everything is in-line with what
previously worked (in 1.5).  We are running 4.1.3, is that what you were
testing on?

What can I do to debug this?  I checked and we aren't seeing any of the
failed to compile regex errors in the logs.  We have 4 servers that are
all displaying the same behavior (read: ignoring the from_uri match on a
lower priority).

Any further help would be really appreciated.

Thanks,
Geoff
___
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


Re: [SR-Users] LCR from_uri help

2014-04-25 Thread Juha Heinanen
Geoffrey Mina writes:

 What can I do to debug this?  I checked and we aren't seeing any of the
 failed to compile regex errors in the logs.  We have 4 servers that are
 all displaying the same behavior (read: ignoring the from_uri match on a
 lower priority).

you didn't answer if this issue is related to from uri pattern or
priorities in general.  if you remove from uri patterns, do priorities
then work?

if you can give me a simple example configuration where this problem
appears, i'll try it myself.

-- 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


Re: [SR-Users] LCR from_uri help

2014-04-23 Thread Juha Heinanen
Geoffrey Mina writes:

 Right now, I would think that with our Priority of 0 on the route with the
 from_URI match, the algorithm should always look at that one first and
 route the calls accordingly.
 
 Since we have the priority correctly set to evaluate in the order we want,
 what next can we look to?

i made same kind of test that you have and routing worked as expected,
i.e., when request uri matched a common prefix, the one with lower
priority was tried first.

if you remove from uri constraint from the rule that had it, is lower
priority gw then selected first or doesn't priorities work at all for
you?

-- 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


[SR-Users] LCR from_uri help

2014-04-22 Thread Juha Heinanen
Geoffrey Mina writes:

 The LCR module is behaving in a way that is inconsistent with our old 1.5
 versions.  We have a customer that passes a certain caller-id.  That
 from_uri should be routing over a specific trunk.  Here are the relevant
 bits of the LCR data from kamcmd.
 
 I would expect gw_index: 7 to match before gw_index: 6 here, but that is
 not the case.  Any help would be greatly appreciated.  Please note, i Have
 stripped out a bunch of other routes that are not in play here... hence the
 reason gw_index starts at 6.

you didn't show how from uri of the call looks like.  if it matches
from_uri: 2089328663, it will also match from_uri: and either rule can
get selected.

-- juha

 kamcmd lcr.dump_rules
 {
 lcr_id: 1
 rule_id: 31
 prefix: +1
 from_uri: 2089328663
 request_uri:
 stopper: 0
 }
 {
 gw_index: 6
 priority: 1
 weight: 1
 }
 {
 lcr_id: 1
 rule_id: 5
 prefix: +1
 from_uri:
 request_uri:
 stopper: 0
 }
 {
 gw_index: 7
 priority: 1
 weight: 1
 }
 ___
 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

___
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


Re: [SR-Users] LCR from_uri help

2014-04-22 Thread Geoffrey Mina
OK.  WE have made a change so that the priority is 0 for the route that has
the from_uri.  We are still not seeing this route get matched properly.

Here is what the INVITE looks like:

INVITE sip:+19137274555@1.2.3.4:5060 SIP/2.0
Via: SIP/2.0/UDP 1.2.3.4:5060;branch=z9hG4bK5b52e524;rport
From: 2089328663 sip:2089328...@blah.com;tag=as37fe796f
To: sip:+19137274555@1.2.3.4:5060
Contact: sip:2089328663@1.2.3.4
Call-ID: 09ed895a452fac516a0d11e237bd1...@blah.com
CSeq: 102 INVITE
User-Agent: Kamailio
Max-Forwards: 70
Date: Tue, 22 Apr 2014 14:42:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
P-Account-ID: 12680001
P-Charge-Info: 4019921313 sip:4019921...@blah.com
Content-Type: application/sdp
Content-Length: 236

Here is what lcr.dump_rules looks like:
 kamcmd lcr.dump_rules

 {
 lcr_id: 1
 rule_id: 31
 prefix: +1
 from_uri: 2089328663
 request_uri:
 stopper: 0
 }
 {
 gw_index: 6

 priority: 0
 weight: 1
}
{
 lcr_id: 1
 rule_id: 5
 prefix: +1
 from_uri:
 request_uri:
 stopper: 0
 }
 {
 gw_index: 7

 priority: 1
 weight: 1
 }




On Tue, Apr 22, 2014 at 12:56 AM, Juha Heinanen j...@tutpro.com wrote:

 Geoffrey Mina writes:

  The LCR module is behaving in a way that is inconsistent with our old 1.5
  versions.  We have a customer that passes a certain caller-id.  That
  from_uri should be routing over a specific trunk.  Here are the relevant
  bits of the LCR data from kamcmd.
 
  I would expect gw_index: 7 to match before gw_index: 6 here, but that is
  not the case.  Any help would be greatly appreciated.  Please note, i
 Have
  stripped out a bunch of other routes that are not in play here... hence
 the
  reason gw_index starts at 6.

 you didn't show how from uri of the call looks like.  if it matches
 from_uri: 2089328663, it will also match from_uri: and either rule can
 get selected.

 -- juha

  kamcmd lcr.dump_rules
  {
  lcr_id: 1
  rule_id: 31
  prefix: +1
  from_uri: 2089328663
  request_uri:
  stopper: 0
  }
  {
  gw_index: 6
  priority: 1
  weight: 1
  }
  {
  lcr_id: 1
  rule_id: 5
  prefix: +1
  from_uri:
  request_uri:
  stopper: 0
  }
  {
  gw_index: 7
  priority: 1
  weight: 1
  }
  ___
  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

 ___
 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

___
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


Re: [SR-Users] LCR from_uri help

2014-04-22 Thread Juha Heinanen
Geoffrey Mina writes:

 OK.  WE have made a change so that the priority is 0 for the route that has
 the from_uri.  We are still not seeing this route get matched
 properly.

i tried to say that from uri plays no role in your lcr setup, because +1
matches both rules 31 and 5.  if you want it match only rule 31, you
have to replace empty from pattern in rule 5 with one that does NOT
match to 2089328663 or define another lcr instance for this caller.

-- 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


Re: [SR-Users] LCR from_uri help

2014-04-22 Thread Geoffrey Mina
OK, has this behavior changed since Kamailio 1.5 because this previously
worked.

Right now, I would think that with our Priority of 0 on the route with the
from_URI match, the algorithm should always look at that one first and
route the calls accordingly.

Since we have the priority correctly set to evaluate in the order we want,
what next can we look to?



On Tue, Apr 22, 2014 at 9:27 AM, Juha Heinanen j...@tutpro.com wrote:

 Geoffrey Mina writes:

  OK.  WE have made a change so that the priority is 0 for the route that
 has
  the from_uri.  We are still not seeing this route get matched
  properly.

 i tried to say that from uri plays no role in your lcr setup, because +1
 matches both rules 31 and 5.  if you want it match only rule 31, you
 have to replace empty from pattern in rule 5 with one that does NOT
 match to 2089328663 or define another lcr instance for this caller.

 -- 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

___
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


[SR-Users] LCR from_uri help

2014-04-21 Thread Geoffrey Mina
Greetings,
I need a little help with the LCR module.  I am running Kamailio 4.1.2.

The LCR module is behaving in a way that is inconsistent with our old 1.5
versions.  We have a customer that passes a certain caller-id.  That
from_uri should be routing over a specific trunk.  Here are the relevant
bits of the LCR data from kamcmd.

I would expect gw_index: 7 to match before gw_index: 6 here, but that is
not the case.  Any help would be greatly appreciated.  Please note, i Have
stripped out a bunch of other routes that are not in play here... hence the
reason gw_index starts at 6.

kamcmd lcr.dump_gws
{
lcr_id: 1
gw_id: 11
gw_index: 6
gw_name: Route A
scheme: sip
ip_addr: 1.2.3.4
hostname:
port: 5060
params:
transport: UDP
strip: 0
prefix:
tag:
flags: 2
defunct_until: 0
}
{
lcr_id: 1
gw_id: 1
gw_index: 7
gw_name: Route P
scheme: sip
ip_addr: 4.3.2.1
hostname:
port: 5060
params:
transport: UDP
strip: 0
prefix: DLR#
tag:
flags: 0
defunct_until: 0
}


kamcmd lcr.dump_rules
{
lcr_id: 1
rule_id: 31
prefix: +1
from_uri: 2089328663
request_uri:
stopper: 0
}
{
gw_index: 6
priority: 1
weight: 1
}
{
lcr_id: 1
rule_id: 5
prefix: +1
from_uri:
request_uri:
stopper: 0
}
{
gw_index: 7
priority: 1
weight: 1
}
___
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


Re: [SR-Users] LCR

2014-04-10 Thread Keith
Hi,

I am having issues with trying to use multiple lcr_ids so I can route to
different groups. When I reload lcr it always only shows one group. I have
copied the first group exactly and just changed the number but can't work
out why it's not working.

Any ideas?
Thanks
Keith
___
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


Re: [SR-Users] LCR help

2014-01-25 Thread Juha Heinanen
Pete Ashdown writes:

 Thank you Juha.  I'm muddling through this.  One thing that is puzzling
 to me is that LCR entries are ranked by weight and priority, both
 integers.  When I have a rate deck of costs like .003211 per minute per
 prefix, translating thousands of those to integers between 0  255 seems
 obtuse and inflexible.  I would presume that least cost routing would
 have a column for cost.  Am I seeing this wrong or using the wrong module?

it is wrong module if you are not able to scale your costs to integer
priorities.

-- 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


Re: [SR-Users] LCR help

2014-01-23 Thread Daniel Tryba
On Wednesday 22 January 2014 23:19:09 Juha Heinanen wrote:
 prefix column cannot hold a regular expression.  lcr routing is based on
 longest match, which cannot be efficiently implemented using regular
 expressions.

If lcr is based on longest prefix, Pete could just use a little logic to 
implement longest match with alias_db_lookup (his original question). I store 
either a full number, a 10 number block or 100 block (by leaving off the last 
1 or 2 digits) and do the following:

$avp(callednumber)=$rU;
if(!alias_db_lookup(dbaliases))
{
strip_tail(1);
if(!alias_db_lookup(dbaliases))
{
strip_tail(1);
if(!alias_db_lookup(dbaliases))
{
$rU=$avp(callednumber);
}
}
}

If you give bigger numberblocks to endusers just add a level (of make a decent 
loop that checks the remaining length of $rU).

-- 

POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/   - http://www.sipo.nl/
K.v.K. Eindhoven 17097024

___
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


Re: [SR-Users] LCR help

2014-01-23 Thread Pete Ashdown
On 01/22/2014 03:19 PM, Juha Heinanen wrote:
 Pete Ashdown writes:

 2) How do I populate the rest of the LCR database?  It appears that
 using kamctl lcr has been depreciated.  Am I supposed to use Siremis? 
 Is there any way to do this via shell?  Does anyone have any scripts
 that digest csv rate decks from trunkers into the db for creation and
 update?
 you need to populate lcr tables manually unless you find a tool to
 do it for you.

Thank you Juha.  I'm muddling through this.  One thing that is puzzling
to me is that LCR entries are ranked by weight and priority, both
integers.  When I have a rate deck of costs like .003211 per minute per
prefix, translating thousands of those to integers between 0  255 seems
obtuse and inflexible.  I would presume that least cost routing would
have a column for cost.  Am I seeing this wrong or using the wrong module?


___
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


[SR-Users] LCR help

2014-01-22 Thread Pete Ashdown
On 01/21/2014 10:09 PM, Alex Balashov wrote:
 There is not, but there are numerous other modules that provide for that sort 
 of thing, such as pdt, drouting, and lcr. 

 Of course, it's only useful if your DID block falls on decimal boundaries. 
 :-) 
Thank you Alex.

Could someone point me to some LCR help resources?  A couple of
questions come up after reading the module page, and I'm having trouble
finding specifics.

1) Do I have to put the full authenticated URI in for each gw, or is
there a better place to store this information?
2) How do I populate the rest of the LCR database?  It appears that
using kamctl lcr has been depreciated.  Am I supposed to use Siremis? 
Is there any way to do this via shell?  Does anyone have any scripts
that digest csv rate decks from trunkers into the db for creation and
update?
3) Is the number_prefix column PCRE friendly?  I note mod_lcr's use of
libpcre.



___
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


[SR-Users] LCR help

2014-01-22 Thread Juha Heinanen
Pete Ashdown writes:

 2) How do I populate the rest of the LCR database?  It appears that
 using kamctl lcr has been depreciated.  Am I supposed to use Siremis? 
 Is there any way to do this via shell?  Does anyone have any scripts
 that digest csv rate decks from trunkers into the db for creation and
 update?

you need to populate lcr tables manually unless you find a tool to
do it for you.

 3) Is the number_prefix column PCRE friendly?  I note mod_lcr's use of
 libpcre.

prefix column cannot hold a regular expression.  lcr routing is based on
longest match, which cannot be efficiently implemented using regular
expressions.

-- 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


[SR-Users] LCR Question

2013-07-05 Thread Geoffrey Mina
I am still a little baffled by the new LCR table structures and i am having
a hard time figuring out how to use them.  I want to different LCR gateways
for two different prefixes.  When I load up this configuration,
lcr.dump_gws is only returning the Gateway with Lcr ID: 1.  What am I doing
wrong here?

Here is my current table structure:


LCR Gateway List

Id 1
Lcr Id 1
Gw Name: Host 1
Ip Addr: X.X.X.X
Uri: 1
Transport 1

Id 2
Lcr ID 2
Gw Name: Host 2
Ip Addr: Y.Y.Y.Y
Uri: 1
Transport 1


LCR Rule List:

Id: 1
Lcr Id: 1
Prefix: 1555
Stopper 0
Enabled 1

Id: 2
Lcr Id: 2
Prefix: 1444
Stopper: 0
Enabled: 1


LCR Target List:

Id: 1
Lcr Id: 1
Rule Id: 1
Gw Id: 1

Id: 2
Lcr Id: 2
Rule Id: 2
Gw Id: 2
___
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


[SR-Users] LCR Question

2013-07-05 Thread Juha Heinanen
Geoffrey Mina writes:

 I am still a little baffled by the new LCR table structures and i am having
 a hard time figuring out how to use them.  I want to different LCR gateways
 for two different prefixes.  When I load up this configuration,
 lcr.dump_gws is only returning the Gateway with Lcr ID: 1.  What am I doing
 wrong here?

perhaps you have not set lcr_count module param.  it defaults to 1.

-- 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


Re: [SR-Users] LCR Question

2013-07-05 Thread Geoffrey Mina
OK.  I updated that to 10 and now it loads both.  Is there any harm in
making it 100 even though I will never use that many?  Just so I don't need
to restart Kamailio to add new routes?


On Fri, Jul 5, 2013 at 10:17 AM, Juha Heinanen j...@tutpro.com wrote:

 Geoffrey Mina writes:

  I am still a little baffled by the new LCR table structures and i am
 having
  a hard time figuring out how to use them.  I want to different LCR
 gateways
  for two different prefixes.  When I load up this configuration,
  lcr.dump_gws is only returning the Gateway with Lcr ID: 1.  What am I
 doing
  wrong here?

 perhaps you have not set lcr_count module param.  it defaults to 1.

 -- 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

___
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


Re: [SR-Users] LCR Question

2013-07-05 Thread Juha Heinanen
Geoffrey Mina writes:

 OK.  I updated that to 10 and now it loads both.  Is there any harm in
 making it 100 even though I will never use that many?  Just so I don't need
 to restart Kamailio to add new routes?

the param is there in order to save shared memory and speed up those
functions that operate on lcr instances.  if you don't run out of shm
memory, you can set lcr_count to whatever value you wish.

-- 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


Re: [SR-Users] LCR Question

2013-07-05 Thread Juha Heinanen
Juha Heinanen writes:

 the param is there in order to save shared memory and speed up those
 functions that operate on lcr instances.
   ^ all

-- 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


Re: [SR-Users] LCR in Kamailio 4.0

2013-06-29 Thread Juha Heinanen
Gary Chen writes:

 In this case if you have several sets of lcr_id, you will end up with
 several duplicate gateway and rulls.

it is possible to define gateways that are common to all lcr instances.
lcr_id of such gws is 0.

-- 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


[SR-Users] LCR in Kamailio 4.0

2013-06-28 Thread Geoffrey Mina
Greetings,
I am migrating some 1.5 servers to 4.0 and I have some questions about how
the LCR module works now.

I am familiar with the concept of the gw table and the lcr table.  This was
pretty straight forward.  In the new version it looks like we have:

LCR Gateway List
LCR Rule List
LCR Target List

I read through the module documentation and it doesn't really speak to what
the new architecture is intended to accomplish.  Anyone have a quick
overview they would like to share which would help me understand the intent
of the data structure?

Thanks,
Geoff
___
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


Re: [SR-Users] LCR in Kamailio 4.0

2013-06-28 Thread Gary Chen
First thing to remember that lcr_id field is the one to link all three
tables together. Let's say that you want to create a lcr to route
international call starting with 011:
1) Create a row in lcr_gw table with id = 4, lcr_id = 3 and gateway IP etc.
2) Then create a row in lcr_rule table with id =2, lcr_id = 3 and prefix =
011
3) Then create a row in lcr_rule_target table to glue the gateway and
prefix together like this: lcr_id =3, gw_id=4 (Match the id value in lcr_gw
table), rule_id = 2 (Match the id in lcr_rule table)  also rest of the
fields like priority etc.

Hope this help.

Gary



On Fri, Jun 28, 2013 at 5:02 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 Greetings,
 I am migrating some 1.5 servers to 4.0 and I have some questions about how
 the LCR module works now.

 I am familiar with the concept of the gw table and the lcr table.  This
 was pretty straight forward.  In the new version it looks like we have:

 LCR Gateway List
 LCR Rule List
 LCR Target List

 I read through the module documentation and it doesn't really speak to
 what the new architecture is intended to accomplish.  Anyone have a quick
 overview they would like to share which would help me understand the intent
 of the data structure?

 Thanks,
 Geoff

 ___
 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


___
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


Re: [SR-Users] LCR in Kamailio 4.0

2013-06-28 Thread Geoffrey Mina
What is the value of the target table?  Previously the lcr rule table was
directly tied to the gateway.  Is this simply to enable N:1 relationships
between lcr rules and gateways.

Also - any idea how to reload the LCR configuration without restarting
kamailio?  I previously issued kamctl fifo lcr_reload, but that doesn't
appear to work any longer.

Thanks!


On Fri, Jun 28, 2013 at 4:44 PM, Gary Chen gchen3...@gmail.com wrote:

 First thing to remember that lcr_id field is the one to link all three
 tables together. Let's say that you want to create a lcr to route
 international call starting with 011:
 1) Create a row in lcr_gw table with id = 4, lcr_id = 3 and gateway IP
 etc.
 2) Then create a row in lcr_rule table with id =2, lcr_id = 3 and prefix =
 011
 3) Then create a row in lcr_rule_target table to glue the gateway and
 prefix together like this: lcr_id =3, gw_id=4 (Match the id value in lcr_gw
 table), rule_id = 2 (Match the id in lcr_rule table)  also rest of the
 fields like priority etc.

 Hope this help.

 Gary



 On Fri, Jun 28, 2013 at 5:02 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 Greetings,
 I am migrating some 1.5 servers to 4.0 and I have some questions about
 how the LCR module works now.

 I am familiar with the concept of the gw table and the lcr table.  This
 was pretty straight forward.  In the new version it looks like we have:

 LCR Gateway List
 LCR Rule List
 LCR Target List

 I read through the module documentation and it doesn't really speak to
 what the new architecture is intended to accomplish.  Anyone have a quick
 overview they would like to share which would help me understand the intent
 of the data structure?

 Thanks,
 Geoff

 ___
 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



 ___
 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


___
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


Re: [SR-Users] LCR in Kamailio 4.0

2013-06-28 Thread Gary Chen
lcr_rule_target is like a glue to link lcr_gw and lcr_rule tables together
through rule_id and gw_id as well as lcr_id.
In this case if you have several sets of lcr_id, you will end up with
several duplicate gateway and rulls. It is not the best design and is hard
to use.

To reload lcr you do this: sercmd lcr.reload

Gary Chen


On Fri, Jun 28, 2013 at 6:50 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 What is the value of the target table?  Previously the lcr rule table
 was directly tied to the gateway.  Is this simply to enable N:1
 relationships between lcr rules and gateways.

 Also - any idea how to reload the LCR configuration without restarting
 kamailio?  I previously issued kamctl fifo lcr_reload, but that doesn't
 appear to work any longer.

 Thanks!


 On Fri, Jun 28, 2013 at 4:44 PM, Gary Chen gchen3...@gmail.com wrote:

 First thing to remember that lcr_id field is the one to link all three
 tables together. Let's say that you want to create a lcr to route
 international call starting with 011:
 1) Create a row in lcr_gw table with id = 4, lcr_id = 3 and gateway IP
 etc.
 2) Then create a row in lcr_rule table with id =2, lcr_id = 3 and prefix
 = 011
 3) Then create a row in lcr_rule_target table to glue the gateway and
 prefix together like this: lcr_id =3, gw_id=4 (Match the id value in lcr_gw
 table), rule_id = 2 (Match the id in lcr_rule table)  also rest of the
 fields like priority etc.

 Hope this help.

 Gary



 On Fri, Jun 28, 2013 at 5:02 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 Greetings,
 I am migrating some 1.5 servers to 4.0 and I have some questions about
 how the LCR module works now.

 I am familiar with the concept of the gw table and the lcr table.  This
 was pretty straight forward.  In the new version it looks like we have:

 LCR Gateway List
 LCR Rule List
 LCR Target List

 I read through the module documentation and it doesn't really speak to
 what the new architecture is intended to accomplish.  Anyone have a quick
 overview they would like to share which would help me understand the intent
 of the data structure?

 Thanks,
 Geoff

 ___
 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



 ___
 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



 ___
 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


___
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


Re: [SR-Users] LCR in Kamailio 4.0

2013-06-28 Thread Geoffrey Mina
Thanks.  I included ctl.so module and now I can properly use kamcmd to
reload LCR.





On Fri, Jun 28, 2013 at 4:57 PM, Gary Chen gchen3...@gmail.com wrote:

 lcr_rule_target is like a glue to link lcr_gw and lcr_rule tables together
 through rule_id and gw_id as well as lcr_id.
 In this case if you have several sets of lcr_id, you will end up with
 several duplicate gateway and rulls. It is not the best design and is hard
 to use.

 To reload lcr you do this: sercmd lcr.reload

 Gary Chen


 On Fri, Jun 28, 2013 at 6:50 PM, Geoffrey Mina geoffreym...@gmail.comwrote:

 What is the value of the target table?  Previously the lcr rule table
 was directly tied to the gateway.  Is this simply to enable N:1
 relationships between lcr rules and gateways.

 Also - any idea how to reload the LCR configuration without restarting
 kamailio?  I previously issued kamctl fifo lcr_reload, but that doesn't
 appear to work any longer.

 Thanks!


 On Fri, Jun 28, 2013 at 4:44 PM, Gary Chen gchen3...@gmail.com wrote:

 First thing to remember that lcr_id field is the one to link all three
 tables together. Let's say that you want to create a lcr to route
 international call starting with 011:
 1) Create a row in lcr_gw table with id = 4, lcr_id = 3 and gateway IP
 etc.
 2) Then create a row in lcr_rule table with id =2, lcr_id = 3 and prefix
 = 011
 3) Then create a row in lcr_rule_target table to glue the gateway and
 prefix together like this: lcr_id =3, gw_id=4 (Match the id value in lcr_gw
 table), rule_id = 2 (Match the id in lcr_rule table)  also rest of the
 fields like priority etc.

 Hope this help.

 Gary



 On Fri, Jun 28, 2013 at 5:02 PM, Geoffrey Mina 
 geoffreym...@gmail.comwrote:

 Greetings,
 I am migrating some 1.5 servers to 4.0 and I have some questions about
 how the LCR module works now.

 I am familiar with the concept of the gw table and the lcr table.  This
 was pretty straight forward.  In the new version it looks like we have:

 LCR Gateway List
 LCR Rule List
 LCR Target List

 I read through the module documentation and it doesn't really speak to
 what the new architecture is intended to accomplish.  Anyone have a quick
 overview they would like to share which would help me understand the intent
 of the data structure?

 Thanks,
 Geoff

 ___
 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



 ___
 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



 ___
 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



 ___
 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


___
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


Re: [SR-Users] LCR Module - Rule_id

2013-05-24 Thread Eloy Coto Pereiro
Hi Juha,


Many thanks, finally with lcr_id is ok. I make a few changes in my config
and work ok.

Cheers


On Fri, May 17, 2013 at 3:02 PM, Juha Heinanen j...@tutpro.com wrote:

 Eloy Coto Pereiro writes:

  Any solution to check the rule extra info. I want route billing info to
 put
  in the acc. Any standar solution?

 i quickly looked the code and seems like rule_id would need to be added
 to matched_gw_info struct when load_gws() is called and copied from
 there as a new field to gw_uri_avp. then when next_gw() is called,
 rule_id stored with matched gw would need to be copied from the gw's
 matched_gw_info struct to a new rule_id_avp.

 -- 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

___
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


[SR-Users] LCR Module - Rule_id

2013-05-17 Thread Eloy Coto Pereiro
Hi,

It Is possible get the rule_id after execute next_gw() function?

Cheers
___
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


[SR-Users] LCR Module - Rule_id

2013-05-17 Thread Juha Heinanen
Eloy Coto Pereiro writes:

 It Is possible get the rule_id after execute next_gw() function?

no, that is not currently available in any avp.

-- 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


Re: [SR-Users] LCR Module - Rule_id

2013-05-17 Thread Eloy Coto Pereiro
Hi

Thanks Juha for your response.

Any solution to check the rule extra info. I want route billing info to put
in the acc. Any standar solution?

Cheers


On Fri, May 17, 2013 at 11:27 AM, Juha Heinanen j...@tutpro.com wrote:

 Eloy Coto Pereiro writes:

  It Is possible get the rule_id after execute next_gw() function?

 no, that is not currently available in any avp.

 -- 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

___
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


Re: [SR-Users] LCR Module - Rule_id

2013-05-17 Thread Juha Heinanen
Eloy Coto Pereiro writes:

 Any solution to check the rule extra info. I want route billing info to put
 in the acc. Any standar solution?

i quickly looked the code and seems like rule_id would need to be added
to matched_gw_info struct when load_gws() is called and copied from
there as a new field to gw_uri_avp. then when next_gw() is called,
rule_id stored with matched gw would need to be copied from the gw's
matched_gw_info struct to a new rule_id_avp.

-- 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


Re: [SR-Users] LCR

2013-01-11 Thread Andrew Pogrebennyk
Hello,
try printing the $ru with xlog statement when the request comes into the
server and in the beginning of route[LCR].

On 11/01/2013 01:50, Douglas Ugalde wrote:
 Hi,
 
 Im trying to configure LCR in Kamailio 3.3.3 but I dont Know how can I
 do to fix this error:
 
  ERROR: lcr [lcr_mod.c:1840]: error while parsing R-URI
 
 This is my LCR configuration block:
 
 route[LCR] {
 
 if(!load_gws(1)){
  sl_send_reply(500, Internal server error, unable to load gateways);
  xlog(L_NOTICE,Internal server error, unable to load gateways);
  break;
  }
  if(!next_gw()){
  sl_send_reply(503, Service not available, no gateways found);
  break;
  }
 }
 
 
 I not sure if this configuration thats ok, please somebody help me.
 
 Note:
 
 Params and modules are already loaded,  sorry for my english.
 
 
 Best regards.

___
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


[SR-Users] LCR

2013-01-10 Thread Douglas Ugalde
Hi,

Im trying to configure LCR in Kamailio 3.3.3 but I dont Know how can I do
to fix this error:

 ERROR: lcr [lcr_mod.c:1840]: error while parsing R-URI

This is my LCR configuration block:

route[LCR] {

if(!load_gws(1)){
 sl_send_reply(500, Internal server error, unable to load gateways);
 xlog(L_NOTICE,Internal server error, unable to load gateways);
 break;
 }
 if(!next_gw()){
 sl_send_reply(503, Service not available, no gateways found);
 break;
 }
}


I not sure if this configuration thats ok, please somebody help me.

Note:

Params and modules are already loaded,  sorry for my english.


Best regards.
___
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


  1   2   3   >