It looks like rtpengine has to be a bridge between docker-compose network and external ( for docker compose ) net.

First of all there is an option of rrpengine to listen 2 interfaces, which can be the same interface but one of them can be advertised to external ip.
So you can give aliases to those virtual interfaces and use flag "direction" when call rtpengine module in kamailio.

Also you can use "media-addr" flag when call rtpengine module instead using direction flag, this is more flexible but more tricky.

On Tue, 4 Aug 2020, 10:30 Daniel-Constantin Mierla, <miconda@gmail.com> wrote:

Hello,

the mangler module does not have any idea of inbound/outbound directions, so you can use it for any of them.


Also, the nathelper module should have a function allowing to change the ip in the sdp, iirc.


On the other hand, if you use rtppengine for the calls, then the ips should be replaced by it.


Do not forget to use msg_apply_changes() in case you want those changes to be visible immediately in the configuration file.


Cheers,
Daniel


On 29.07.20 13:18, Edward Romanenco wrote:
Hey guys,

I am working on a project involving Kamailio dockerezation, which is meant to run alongside Freeswitch and RTPEngine containers, on the basis of a Docker-Compose file which is launched on top of a CentOS 7.7 host system.

Anyway, I would love to know if there is any way to manipulate / mask the IP addresses that are being appended to a status 183 response for an incoming invite.

For some reason which I am trying to figure out in parallel, Freeswitch uses the local network bridge subnet instead of the defined external RTP IPs, and I was wondering - Can I manipulate them using Kamailio? I know that Mangler module can do it for outbound calls, but can I do the same for inbound?

v=0.
o=FreeSWITCH 1595974788 1595974789 IN IP4 172.18.0.40.
s=FreeSWITCH.
c=IN IP4 172.18.0.40.
t=0 0.
m=audio 45878 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16

Edward

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users