NAT issue when changing endpoints

I’m configuring my asterisk for nating , here is my configuration :
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5070
local_net=x.x.x.x
external_media_address=public ip
external_signaling_address=public ip

then i use another end point whith this configuration in transport :
[transport-udp-ipsec]
type = transport
protocol = udp
bind = ipsecip:50600

the call is working like magic .
the only problem is in BYE .
all sip messages are going smoothly with my private ip and my ipsec ip and all working great .
except for the BYE , it’s sent directly from my ipsec ip to the source ip so the call is not handing up .

I think you’re going to need to show an actual SIP trace from “pjsip set logger on” and describe more, I’m not exactly sure what you’re expecting.

1 Like

I was hard coding the ip in pjsip.conf , i changed it to 0.0.0.0 and asterisk was smart enough to chose the best network interface .
Thanks tho

That’s not Asterisk doing so, it the OS. It’s how IP sockets work.