Asterisk with 2 ip's on different nic card


#1

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 xxx.xxx.xxx.189 router with static route going to internal ip 192.168.2.22 should be for long distance calls.
trunk 2 external ip is xxx.xxx.xxx.190 going to internal ip 192.168.2.29 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 (xxx.xxx.xxx.189)?

Cleard


#2

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


#3

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?


#4

Hi

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.

Ian