Routing calls to different (external) network interfaces

Hi

In order to save come money customer decided to run 1 asterisk server (plain old asterisk,
Trixbox, Elastix) for several smaller companies. Due to the fact that one VoIP service
provider does billing based on source IP address of the IP PBX the question came up regarding
routing (I belive this would be layer 5 routing):

Let say we have two internal subnets sn1=192.168.1.0/24 and sn2=192.168.2.0/24 and
two external IP addresses (on physical or virtual nics) ip1 on eth1 (eth1:0) and ip2
on eth2 (eth1:1).

Is it possible to route calls from certain internal subnet sn1 to specific external
(outgoing) network interface eth1 (eth1:0) with ip1 so that provider can distinguish
internal “company”?

What would be solutions:

  1. trunk setup
  2. routing (static routes) I would kindly ask You for sample
  3. virtualization

Thanks and best regards

mel

[code] —
|
|
|
|

subnet 192.168.1.0/24
                     |    |     |--------------------|              |
                     |----|  *  |                    | soft switch  |
                     |    |     |--------------------|              |

— | |-----| ip2 eth2 (eth1.1) |--------------|
| |
| |
| |
| |
| |
| |

subnet 192.168.2.0/24

—[/code]