My source IP in "From" and "Via" headers

Hello, everyone

I have an asterisk machine with two public IPs in the same range. Is there a way to control from asterisk which IP is used when calling out. For example, If I’m calling through “Trunk1” - use first IP, if I’m calling through “Trunk2” - use second IP.

I think my chances to control source IP in outgoing UDP packets are quite poor. However it is sufficient to control my source IP inside the SIP packet. Is there a way? Can I control what IP does my asterisk send in “From” and “Via” headers of the outgoing SIP packets?


Negative. To accomplish this, you’ll have to run more than one Asterisk instance on a server, with each bound to the IP address you prefer.

Thanks a lot for your reply. That’s actually some great new :smile:

Could anyone point out some drawbacks/sideffects of such dual-asterisk setup? Does anyone have it working at all?