In my situation, Asterisk (v.13) is behind a NAT, registering and calling to a remote SIP trunk. My question is how to configure Asterisk to let the connection IP address in SDP (the c= line) be the public IP address instead of the local IP address, but that this be done automatically using STUN (not using DynDNS), so without manually configuring the public IP address. Is this possible?
Tried so far:
- Without special configuration, the connection address in SDP is the local IP address
- If Asterisk is manually configured with the public IP address (external_media_address in pjsip, or externaddr in chan_sip), the public IP address is filled in correctly in SDP.
- With STUN configured, the public IP address is detected, but not used in SDP, the connection address in SDP is still local.
- With STUN and ICE configured, the public IP address is detected and used in SDP for ICE candidates, but the connection address (c=) in SDP is still local.
Any ideas or explanation?