[SR-Users] set_advertised_address() / set_advertised_port() + PVs?

Daniel-Constantin Mierla miconda at gmail.com
Wed Mar 23 19:32:22 CET 2016


Hello,

On 23/03/16 18:51, Alex Balashov wrote:
> Hello,
>
> I have a need to deploy Kamailio in AWS in a scenario of this sort:
>
>
>    [Public Internet] <---> Kamailio <---> (Internal AWS servers)
>
> In such a scenario, Kamailio would be multihomed.
>
> Furthermore, in addition to sending out of two distinct network
> interfaces, the networking idiosyncrasies of AWS needs to be taken
> into account. AWS hosts only have an RFC1918 address homed natively,
> front-ended by 1:1 NAT externally. Normally, this is taken care of by
> advertised_address, which allows Kamailio to make outward
> representations about the network address by which it can be reached
> that are different to the IP to which it is bound.
>
> The problem here is that I need to do this conditionally, only on
> traffic going out the public interface. It should not be done on
> messages going to the "internal AWS servers".
>
> So, the questions that arise are:
>
> 1. Is this sane? Any unforeseen effects, e.g. vis-a-vis RR, provided
> enable_double_rr is enabled and that two genuinely different network
> interfaces are used?
>
> 2. Do set_advertised_address()/set_advertised_port() accept PV
> arguments, or are they pre-PV "core function folk traditions" in the
> same way as rewritehostport() and force_send_socket()?
I expect those functions not to support pvs, but I think this is
something to address in 5.0 and get all core functions working with pvs.

As you have two cases here, using some IFs to decide what advertised
address to be used should not make the config much more complex.

On the other hand, what I prefer in this case is to use different ports
for communication with external and internal worlds. Then you can
specify the listen on external port with advertise address and the one
for internal without. Nothing else should be done in config regarding
the advertise address, just select the proper socket for sending the
traffic.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com




More information about the sr-users mailing list