Force asterisk to use diferent IP

Helo,

I have a asterisk box that has 4 IP addresses.

The main ip is xx.xx.xx.4 but asterisk must use xx.xx.xx.5

How do i force asterisk to use only this IP when dialing out?

Thank you,
Domen

I dont know if you can set it in asterisk but maybe you can set it in IP Tables ? Also set the asterisk default IP to the one that you want asterisk to use ?

i think there’s a bindaddr= in sip.conf or something like it… set to 0.0.0.0 by default.

that won’t help. bindaddr merely tells the bind() system call what IP to receive incoming data on. if you have a specific VoIP provider, you could set a static route to that IP address using the x.x.x.5 IP. something like

ip route V.O.I.P. netmask 255.255.255.255 x.x.x.5

(pseudo-syntax, you’d need to change per your actual system)