[Kamailio-Users] Sending from 1 of N ip address
Stagg Shelton
stagg at 3pconnect.com
Sun Jun 21 14:43:21 CEST 2009
Thanks Juha,
I sat down yesterday and got the configuration working on a
development system. For the benefit of anyone else doing something
similar here is the config that I ended up with.
Where A.B.C.D is the IP part of the ruri returned by next_gw, and
E.F.G.H, I.J.K.L are IPs of local sockets that my system is listening
on. I also have the if(uri=~"sip... statement in a branch set to
handle the call to next_gw from the failure route if called.
if(!load_gws())
{
xlog("L_INFO", "[ROUTE-X] Unable To Find Gateway ");
route(4);
exit;
}
if (next_gw()) {
# prepare for lcr failover
t_on_failure("2");
if(uri=~"sip:.*[@]A.B.C.D+.*")
{
force_send_socket(udp:E.F.G.H:5060);
}
else
{
force_send_socket(udp:I.J.K.L:5060);
};
Thank you for your responses.
Stagg
On Jun 20, 2009, at 2:01 PM, Juha Heinanen wrote:
> Stagg Shelton writes:
>
>> Would I use the force_send_socket to set the source address inside
>> the
>> switch, or is there some other method that should be used.
>
> use force_send_socket,
>
> -- juha
More information about the Users
mailing list