Jump to content

How do i send voice data to one gateway and data to a different gateway


Recommended Posts

Posted

I'd appreciate if someone could give me an answer to the following scenario:

 

If i have a desktop PC with a softphone installed, is it possible to route the voice traffic through 1 router to go out on a separate adsl line, and then route the data traffic to go out on another separate dsl line? And i dont want to have 2 nics in the desktop PC or 2 physical switches. It would be through 1 nic, to a small switch which then goes into the main switch which then goes out to the appropriate router and then the internet. Is this do-able, does it make a difference if i use a hard phone as opposed to a softphone?

 

Any help would be much appreciated.

Posted

yes you should be able to setup a static route on the machine.

 

You would need to know the IP you want to connect to and then

 

route -p add ip.of.phone.system gw ip.of.gate.way that should then add a perminate static route going out that way.

Posted

ok you seem to know a lot more than me on this, i've never really dabbled in routing. So if i have my desktop that goes through a small switch then into a larger switch and from there if its data i want it to go from the main switch to a router and content filter device which then goes out to the net and if its voice i want it to go from the main switch to the a hosted phone system on linux which is then connected to a router which then has the other dsl line modem attached to it.

 

So for data i need to set the ip of the content filtering/router device and the same address for gateway? and for voice data it would be what? the linux box which hosts the phone system and the gateway would be the router that it plugs into which the voice dsl lines go into?

 

If so, then on the desktops how do i actually do this, is that a command line you typed, is there anyway of doing it through a UI which may be a bit more user friendly?

Posted (edited)

the above is wrong i forgot to add the subnet in

 

for the data do nothing (this will be sent using the default gateway set in IP settings). Then at an elevated command prompt (i.e right click run as admin)

 

then if the IP phone system was at 10.10.10.10 and the router you need to use is at 15.15.15.15 then you would use

 

route -p add 10.10.10.10 255.255.255.255 gw 15.15.15.15

 

gw might be gateway I can't remember

 

EDIT: no other way to do it!

Edited by glennda
Posted

ok thanks so much for that, just a couple of questions, what is the -p switch, how does it know to route voice traffic, i was struggling to how it would be able to differentiate both types if its going through a softphone installed on the desktop?

 

Also once this is done is there a way of checking something to see whether or not this is in place on the desktop or not, or would you just have to do it again to be sure?

Posted

the -p switch is to save to the registry (so it doesn't remove on reboot). It doesn't know its voice traffic as such it just routes anything to the phone system out that way (so if you tried to connect via the internet to the phone system it would go that way).

 

Yes to test you would then run traceroute 10.10.10.10 and make sure it goes to the IP of the gateway first (which it should do)

Posted

ok so let me get this straight, if it already knows that traffic is being routed to the phone system, then why would you need to set this up if its already going that way, because i'm assuming then on the phone system you can set the gateway to the desired router there?

 

I just am struggling to see how if you are working away, browsing the internet and talking on the phone, at what point something knows to send the voice data one way and the internet data the other. sorry i'm probably being stupid.

Posted

ah ok - sorry I have just re-read the original post - if the phone system and the phones are on the same subnet you won't need to set the routes on the desktop (i thought the phone system was hosted online). You would probably need 2 nics on the phone system one connected to the second router and for you to setup on the phone system for that router to be its default gateway.

 

Toby

Posted
ok yeah that makes more sense, so on the phone server, 2 nics, 1 to the main switch and 1 to the 2nd router and to set the gateway on the phone system as the 2nd router. That way all voice traffic will end up on the phone server and that will send it the right way? ok thanks for that.
Posted
ah ok - sorry I have just re-read the original post - if the phone system and the phones are on the same subnet you won't need to set the routes on the desktop (i thought the phone system was hosted online). You would probably need 2 nics on the phone system one connected to the second router and for you to setup on the phone system for that router to be its default gateway.

 

Could you do that with vlans on the NIC itself using software? we have some virtual fabric NIC's that can have upto 8 virtual NICs in the hardware (for FoE, Iscsi, NFS etc) I just wonder if you could do this on software?

Posted
Could you do that with vlans on the NIC itself using software? we have some virtual fabric NIC's that can have upto 8 virtual NICs in the hardware (for FoE, Iscsi, NFS etc) I just wonder if you could do this on software?

 

you could but you would open up the second router to the possibility of non phone traffic using it and therefore avoiding any filtering - you would just need setup the nic as being vlan aware that can easily be done.

 

With regards to the phone system just make sure you set a default gateway on the external nic not the internal one otherwise it will get confused with its routing.

  • Thanks 1
Posted
thanks for your help!

 

not a problem - its what we are here for! I have just done all of that myself!

 

Out of interest are you just using an asterisk installation?

 

I've done FreePBX and its brilliant!

Posted
im using something called trixbox which is some way connected to asterisk i think, i'm not really clear on it to be honest, only just getting to grips with it so im on the lookout for help guidance and how to upgrade as i have a feeling its dated and the hardware its on is struggling and running at capacity
Posted
im using something called trixbox which is some way connected to asterisk i think, i'm not really clear on it to be honest, only just getting to grips with it so im on the lookout for help guidance and how to upgrade as i have a feeling its dated and the hardware its on is struggling and running at capacity

 

I doubt the hardware will struggle its not that resource intensive - I've used trixbox in my experimenting but went with FreePBX due to ease of use at the backend - they are both front ends to asterisk.

Posted

i think i heard someone tell me though that trixbox was no longer in development and not supported anywhere and that i should be looking at moving (might have been FreePBX) asap. And on the system page it tells me physical memory usage is at 97%. Fair enough i only have 2gb RAM in it which can be fixed but i wouldnt mind knowing what the cpu load is like but cant seem to find those stats.

 

If i did move to FreePBX, would you know if its an easy transfer from trixbox??

Posted
i think i heard someone tell me though that trixbox was no longer in development and not supported anywhere and that i should be looking at moving (might have been FreePBX) asap. And on the system page it tells me physical memory usage is at 97%. Fair enough i only have 2gb RAM in it which can be fixed but i wouldnt mind knowing what the cpu load is like but cant seem to find those stats.

 

If i did move to FreePBX, would you know if its an easy transfer from trixbox??

 

it depends what settings you have setup - how many phones do you have to use 97% of 2gb?

 

You could ssh to the linux box and run top which will tell you server load.

 

Mines sitting on a single dual core xeon and 2 gb ram with 80 clients and doesn't moan.

Posted

have about 35 phones, about 10 are hard phones the rest softphones. ssh and run top? sheesh not done that for a while. That would be through something like putty yeah? i think i'd need more in depth instructions to do that because i cant remember off the top of my head, its been too long!

 

i dont know the CPU, would have to open it up and check but it cant be that much worse than what you are using. so im not happy to hear im struggling along and yours is running like a charm :(

Posted

mine has only been live for a week but we have been heavily testing for 2 months.

 

Yh just download putty put in the IP of the phone system connect and enter username/password and then type top and post results.

 

You might find its not actually asterisk using the ram it could be mysql (although not sure if trixbox is mysql based)

Posted

ok so i ran top, this is what i get:

 

login as: root

[email protected]'s password:

Last login: Wed Mar 7 09:23:31 2012 from 192.168.1.156

 

Welcome to trixbox CE

-------------------------------------------------

 

For access to the trixbox web GUI use this URL

eth0: http://216.113.207.2

eth1: http://192.168.1.200

 

For help on trixbox commands you can use from this

command shell type help-trixbox.

 

[trixbox1.localdomain ~]# top

top - 14:49:58 up 56 days, 5:23, 1 user, load average: 0.14, 0.19, 0.12

Mem: 2067184k total, 2012272k used, 54912k free, 60072k buffers

Swap: 1052152k total, 184k used, 1051968k free, 1751276k cached

 

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

32289 asterisk 15 0 55100 24m 8208 S 9 1.2 1677:59 asterisk

27972 asterisk 15 0 13356 9560 1920 S 0 0.5 1:01.43 op_server.pl

1 root 15 0 2060 624 532 S 0 0.0 0:00.78 init

2 root RT 0 0 0 0 S 0 0.0 0:00.61 migration/0

3 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0

4 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0

5 root RT 0 0 0 0 S 0 0.0 0:00.77 migration/1

6 root 34 19 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1

7 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1

8 root 10 -5 0 0 0 S 0 0.0 0:00.05 events/0

9 root 10 -5 0 0 0 S 0 0.0 0:00.01 events/1

10 root 10 -5 0 0 0 S 0 0.0 0:00.00 khelper

11 root 10 -5 0 0 0 S 0 0.0 0:00.00 kthread

15 root 10 -5 0 0 0 S 0 0.0 0:05.81 kblockd/0

16 root 10 -5 0 0 0 S 0 0.0 0:00.01 kblockd/1

17 root 14 -5 0 0 0 S 0 0.0 0:00.00 cqueue/0

18 root 15 -5 0 0 0 S 0 0.0 0:00.00 cqueue/1

21 root 14 -5 0 0 0 S 0 0.0 0:00.00 khubd

23 root 16 -5 0 0 0 S 0 0.0 0:00.00 kseriod

106 root 15 0 0 0 0 S 0 0.0 0:11.28 pdflush

107 root 15 0 0 0 0 S 0 0.0 0:38.46 pdflush

108 root 10 -5 0 0 0 S 0 0.0 0:33.17 kswapd0

109 root 14 -5 0 0 0 S 0 0.0 0:00.00 aio/0

110 root 14 -5 0 0 0 S 0 0.0 0:00.00 aio/1

264 root 11 -5 0 0 0 S 0 0.0 0:00.00 kpsmoused

297 root 10 -5 0 0 0 S 0 0.0 0:00.00 ata/0

298 root 20 -5 0 0 0 S 0 0.0 0:00.00 ata/1

299 root 20 -5 0 0 0 S 0 0.0 0:00.00 ata_aux

303 root 10 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_0

304 root 10 -5 0 0 0 S 0 0.0 0:00.00 scsi_eh_1

307 root 11 -5 0 0 0 S 0 0.0 7:09.87 md2_raid1

310 root 15 -5 0 0 0 S 0 0.0 0:00.00 md1_raid1

313 root 15 -5 0 0 0 S 0 0.0 0:00.00 md0_raid1

314 root 10 -5 0 0 0 S 0 0.0 3:41.60 kjournald

341 root 19 -5 0 0 0 S 0 0.0 0:00.00 kauditd

375 root 18 -4 2144 612 388 S 0 0.0 0:00.11 udevd

1076 root 12 -5 0 0 0 S 0 0.0 0:00.00 kmpathd/0

1077 root 13 -5 0 0 0 S 0 0.0 0:00.00 kmpathd/1

1105 root 11 -5 0 0 0 S 0 0.0 0:00.00 kjournald

1779 root 18 0 1716 576 476 S 0 0.0 0:02.60 syslogd

1782 root 15 0 1668 404 336 S 0 0.0 0:00.00 klogd

Posted
Hmm it's got 54mb free but it appears as though asterisk isn't using it but I'm looking on my phone so may have the columns mixed as its not displayed great
Posted
memory though?

 

its ok - linux will only free memory when it needs it, and it has been up for a few days. there is no major swapping going on so all is good.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...