Asterisk with 2 ip's on different nic card

Hi all,

My sip provider as supplied me with 2 trunk
my Linux server as 2 nic card 2 different ips
trunk 1 external ip is router with static route going to internal ip should be for long distance calls.
trunk 2 external ip is going to internal ip should be for local calls
my problem is that when I do long distance call is going on ip 2.29 and when I do local calls it goes to the same ip.
My question i how can I get long distance calls to route from Asterisk to the right ip (


This is probably only possible if you have different remote IP addresses, or port number ranges for the two cases.

Also if you have 2 NIC in the Asterisk server, both need to be in different subnets. And I think this is not the case for you. Would you care to provide some more info about your setup?


you dont need 2 nics from what I can see, you need 2 different itsps to send the calls to and then setup 2 static routes fro those.