[OpenSIPS-Users] load balancing based on source IP
Matt Hamilton
mistral9999 at hotmail.com
Fri Nov 11 16:37:29 CET 2011
Thanks Vlad!
Date: Fri, 11 Nov 2011 10:59:40 +0200
From: vladpaiu at opensips.org
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] load balancing based on source IP
Hello,
You can use the dispatcher module to accomplish this. Please check
the hash_pvar param [1] and the ds_select_dst() func [2] with the
7th algorithm.
So what you need to do is put the $si ( source IP ) in the hash_pvar
AVP, and then call ds_select_dst("1","7"). This will lead to having
calls from the same IP to be routed to the same Asterisk server.
[1]
http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id250265
[2]
http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id292791
Regards,
Vlad Paiu
OpenSIPS Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111111/7b0fc44c/attachment.htm>
More information about the Users
mailing list