### Description
**Use case**
Kamailio installed in AWS cloud. Exist phones located in internet and exist phones connected via VPN. As option, also may exist phones connected via docker VxLAN or any other Kubernetes providers.
I want use same `listen` for all this connections types. Need to `advertise` different IP for each connection type.
Could you add ability advertise different IP using ACL info. As example ``` listen=udp:eth0:5060 advertise 192.168.34.34:5060 for_acl 0 listen=udp:eth0:5060 advertise 172.16.20.41:5060 for_acl 1 listen=udp:eth0:5060 advertise 10.14.11.4:5060 for_acl 2 listen=udp:eth0:5060 advertise 52.24.22.57:5060 ```
### Expected behavior Kamailio will apply different `advertise` option dependent of source IP of incoming packet.
#### Actual observed behavior Listener support only one `advertise` param.
Nice idea, as a workaround what I'm doing for the same problem is using different ports for different "types of sources" (vpn/internet/private/etc.)
Not the best solution, but at least you can have different advertise settings.
I'm subscribing to this feature request!
Just giving my 2 cents in this matter, but by having the function set_advertised_address accepting variables instead of only pure strings would probably help solving this problem in the script logic. I asked about this possibility not too long ago and Daniel pointed me out some workaround which I couldn't implement (http://sip-router.1086192.n5.nabble.com/set-advertised-address-with-variable...). Anyway I just think that the set_advertised_address function would give a lot more flexibility for scenarios like this where there isn't only one IP to advertise on the same listening IP.
Closed #2131.
Thanks @pwakano for links. Daniel also pointed me to this function, but I not looked that this function already exists. I closing this.
Although you can workaround the issue with the set_advertised_address, I created this ticket https://github.com/kamailio/kamailio/issues/2137 to allow variables instead of strings as parameter for the function.