Hello, I want to use Kamailio to load balance traffic across multiple asterisks.The problem is that my SIP traffic is related to conference, so if a SIP callfor a particular URI is sent to an Asterisk instance, any subsequent calls for thatSIP URI should be sent to the same Asterisk instance.Is there anyway to achieve this in Kamailio? Thanks,Nitesh
I have done something similar as follows
if($rU=~"^[0-3][0-9][0-9]$") { $var(valor)=1; }
And later..
if(!ds_select_domain("$var(valor)", "4")) { sl_send_reply("500", "Service Unavailable"); xlog("L_INFO","[$fU@$si:$sp]{$rm} Sin destinos disponibles para $rd \n");
exit; }
That could be one idea to do that...
On your load balance table you have to use 0 -> All
1 -> Destination 1
2 -> Destination 2
an so.
2016-04-01 12:26 GMT+02:00 NITESH BANSAL nitesh.bansal@outlook.com:
Hello,
I want to use Kamailio to load balance traffic across multiple asterisks. The problem is that my SIP traffic is related to conference, so if a SIP call for a particular URI is sent to an Asterisk instance, any subsequent calls for that SIP URI should be sent to the same Asterisk instance. Is there anyway to achieve this in Kamailio?
Thanks, Nitesh
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
Hi, if I understand correctly your problem is that the first INVITE for a specific URI will go to a server and the conference will be instantiated there. Then you must route all the INVITEs from the other participants to the same server, is it right? If this is the case why not use algorithm 3 in ds_select_ds (or ds_select_domain) which does hashing over Request-URI? ( http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatche... )
Regards,
Federico
On Fri, Apr 1, 2016 at 12:26 PM, NITESH BANSAL nitesh.bansal@outlook.com wrote:
Hello,
I want to use Kamailio to load balance traffic across multiple asterisks. The problem is that my SIP traffic is related to conference, so if a SIP call for a particular URI is sent to an Asterisk instance, any subsequent calls for that SIP URI should be sent to the same Asterisk instance. Is there anyway to achieve this in Kamailio?
Thanks, Nitesh
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
Hi Federico. In mi case i have to force some RURIs to a determinate Asterisk . There was some logic to do that instead letting kamailio to handle that situations
I haven't tested option 3 , but it must do what you expect i think. Maybe you would need to adjust ds_hash_expire Regards
2016-04-01 14:46 GMT+02:00 Federico Cabiddu federico.cabiddu@gmail.com:
Hi, if I understand correctly your problem is that the first INVITE for a specific URI will go to a server and the conference will be instantiated there. Then you must route all the INVITEs from the other participants to the same server, is it right? If this is the case why not use algorithm 3 in ds_select_ds (or ds_select_domain) which does hashing over Request-URI? ( http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatche... )
Regards,
Federico
On Fri, Apr 1, 2016 at 12:26 PM, NITESH BANSAL nitesh.bansal@outlook.com wrote:
Hello,
I want to use Kamailio to load balance traffic across multiple asterisks. The problem is that my SIP traffic is related to conference, so if a SIP call for a particular URI is sent to an Asterisk instance, any subsequent calls for that SIP URI should be sent to the same Asterisk instance. Is there anyway to achieve this in Kamailio?
Thanks, Nitesh
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
Thanks guys for your ideas, I finally think that I have an idea on how to do it. Nitesh
Date: Fri, 1 Apr 2016 16:28:02 +0200 From: alberto.sagredo@avanzada7.com To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Load balancing traffic based on SIP URI
Hi Federico. In mi case i have to force some RURIs to a determinate Asterisk . There was some logic to do that instead letting kamailio to handle that situations I haven't tested option 3 , but it must do what you expect i think. Maybe you would need to adjust ds_hash_expireRegards 2016-04-01 14:46 GMT+02:00 Federico Cabiddu federico.cabiddu@gmail.com: Hi,if I understand correctly your problem is that the first INVITE for a specific URI will go to a server and the conference will be instantiated there. Then you must route all the INVITEs from the other participants to the same server, is it right?If this is the case why not use algorithm 3 in ds_select_ds (or ds_select_domain) which does hashing over Request-URI?(http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatche...) Regards, Federico On Fri, Apr 1, 2016 at 12:26 PM, NITESH BANSAL nitesh.bansal@outlook.com wrote:
Hello, I want to use Kamailio to load balance traffic across multiple asterisks.The problem is that my SIP traffic is related to conference, so if a SIP callfor a particular URI is sent to an Asterisk instance, any subsequent calls for thatSIP URI should be sent to the same Asterisk instance.Is there anyway to achieve this in Kamailio? Thanks,Nitesh
_______________________________________________
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
Great. You can share with us how did you did it :)
Others would thank you also
BR
2016-04-04 15:22 GMT+02:00 NITESH BANSAL nitesh.bansal@outlook.com:
Thanks guys for your ideas, I finally think that I have an idea on how to do it.
Nitesh
Date: Fri, 1 Apr 2016 16:28:02 +0200 From: alberto.sagredo@avanzada7.com To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Load balancing traffic based on SIP URI
Hi Federico. In mi case i have to force some RURIs to a determinate Asterisk . There was some logic to do that instead letting kamailio to handle that situations
I haven't tested option 3 , but it must do what you expect i think. Maybe you would need to adjust ds_hash_expire Regards
2016-04-01 14:46 GMT+02:00 Federico Cabiddu federico.cabiddu@gmail.com:
Hi, if I understand correctly your problem is that the first INVITE for a specific URI will go to a server and the conference will be instantiated there. Then you must route all the INVITEs from the other participants to the same server, is it right? If this is the case why not use algorithm 3 in ds_select_ds (or ds_select_domain) which does hashing over Request-URI? ( http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatche... )
Regards,
Federico
On Fri, Apr 1, 2016 at 12:26 PM, NITESH BANSAL nitesh.bansal@outlook.com wrote:
Hello,
I want to use Kamailio to load balance traffic across multiple asterisks. The problem is that my SIP traffic is related to conference, so if a SIP call for a particular URI is sent to an Asterisk instance, any subsequent calls for that SIP URI should be sent to the same Asterisk instance. Is there anyway to achieve this in Kamailio?
Thanks, Nitesh
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