[Kamailio-Users] Sending from 1 of N ip address

Stagg Shelton stagg at sheltonjohns.com
Fri Jun 19 17:08:43 CEST 2009


I have a requirement from an upstream provider that is providing  
multiple termination only gateways to me.  The requirement is that I  
have to have a unique source ip address for each gateway that I will  
be terminating calls to.  I would like to use only one kamailio system  
bound to multiple ip addresses to meet this requirement.  I have my  
LCR built with the various routes to the gateways.  I have identified  
the function force_send_socket([proto:]address[:port]) which seems  
like it can be used to meet this functional requirement.  I am a  
little confused how to implement this function with LCR.

My basic requirement is that if upstream gateway ip address == 1.2.3.4  
then originate and maintain the dialog from my source ip 4.3.2.1  else  
if gateway ip == 6.7.8.9  then originate and maintain dialog using  
soure ip 9.8.7.6, else if ... N upstream gateways


Is force_send_socket([proto:]address[:port]) the function that I need  
to be trying to use to meet this requirement?  Is there a simpler  
method that can be used instead?


Any help will be appreciated.

Stagg




More information about the sr-users mailing list