pfSense Support Subscription

Author Topic: Possible? When it detects a voip call, throttle everything else to 1%?  (Read 468 times)

0 Members and 1 Guest are viewing this topic.

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
I have very freaky cable internet :(



I'm paying for 1gig/50mbps but I've never seen more than 30mbps up.

In the evening the upload speed drops to about 20mbps and the download speed drops to about 150mbps, so setting up traffic shaping rules is tricky.

My main issue is with voip. We have 6 voip channels and 6 extensions connected to Anveo on port 5010 (sip.ca.anveo.com) using g711 (about 87kbps per channel so says the traffic queue). When doing big downloads using sftp (48 threads) it murders the voip (timeouts, dropped packets, big latency, etc.).

What I would like to do is set up some type of rule that once it detects a voip call it throttles everything else to 1% or something. When I'm on a call I don't need to be using the internet. We don't have IPTV or anything else that needs priority.

-Jamie M.

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2273
  • Karma: +208/-12
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #1 on: December 26, 2017, 06:04:17 pm »
Like you've said, fluctuating bandwidth complicates the matter. In general, you need to target your slowest rate.

That being said, you don't need to limit to 1%, assuming that is possible in a non-kludgy way. If you look into the fq_Codel discussion, you should get pretty much everything you want and all you need to do is configure the bandwidth appropriately. It may be possible to setup some timed jobs that change ipfw's configured bandwidth for on-peak and off-peak times.

Offline KOM

  • Hero Member
  • *****
  • Posts: 5496
  • Karma: +680/-23
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #2 on: December 26, 2017, 09:06:53 pm »
At work I just use PRIQ and classify voip traffic over everything else.  I don't have to worry about bandwidth allocation.

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #3 on: December 26, 2017, 09:32:56 pm »
In general, you need to target your slowest rate.
You were right. If I set it to 125mbps voip works flawless, no matter how many downloads I have going on:



(WAN gateway is pinging my sip provider, WAN6 is pinging google dns)

Going to hurt bad during the daytime though.

Thanks for the help!

-Jamie M.

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2273
  • Karma: +208/-12
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #4 on: December 26, 2017, 09:54:35 pm »
You may be able to get away with no throttling your download so much as your upload. Your upload bandwidth is probably getting swamped with ACKs hurting VoIP.

Online johnpoz

  • Hero Member
  • *****
  • Posts: 14732
  • Karma: +1370/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #5 on: December 30, 2017, 09:12:45 am »
"I'm paying for 1gig/50mbps but I've never seen more than 30mbps up."

Why would you not call your isp if your not getting close to 50?  If you pay for gig and it drops to 150... Dude I would be complaining!!! Until they fix it - or move...
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #6 on: December 30, 2017, 12:54:35 pm »
"I'm paying for 1gig/50mbps but I've never seen more than 30mbps up."

Why would you not call your isp if your not getting close to 50?  If you pay for gig and it drops to 150... Dude I would be complaining!!! Until they fix it - or move...
It's cable internet, they call it "up to" 1gig/50mbps so when I call and complain they say "you can pay $1300/mo for our dedicated fiber service, then you will get 1gig/1gig" lol :(

Voip seems to be working great if I throttle at 125mbps/20mbps and nobody is complaining so far so I'll keep it at that for now.

-Jamie M.

Offline Harvy66

  • Hero Member
  • *****
  • Posts: 2273
  • Karma: +208/-12
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #7 on: December 30, 2017, 08:04:24 pm »
You can still complain. I have unlimited minutes and speakerphone on my cell phone. I'm willing to help keep their call center busy.

Offline KOM

  • Hero Member
  • *****
  • Posts: 5496
  • Karma: +680/-23
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #8 on: January 02, 2018, 09:57:28 am »
Tell your ISP you're going to send them "up to" the amount of money they request each month.

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #9 on: January 03, 2018, 01:17:19 am »
Still not working very well. I have to keep moving the speed down and down and down. I'm at 100mbps now :(

Is there absolutely NO way for the traffic shaping to detect the voip call and have it throttle everything else?



-Jamie M.

Offline KOM

  • Hero Member
  • *****
  • Posts: 5496
  • Karma: +680/-23
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #10 on: January 03, 2018, 08:42:43 am »
Quote
Still not working very well.

What does that actually mean?  I don't see any drops in your voip queue.

Quote
Is there absolutely NO way for the traffic shaping to detect the voip call and have it throttle everything else?

Not automagically.  All pfSense has to work with are IP addresses and ports.  There is no built-in DPI stuff to figure out the app from the packet.

In my first reply to you, I mentioned that I use a dozen voip phones here in my office and I have no problems at all using the PRIQ shaper which doesn't care about bandwidth -- only packet priority.  I'm surprised you didn't follow up on that.

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #11 on: January 03, 2018, 09:28:21 pm »
What does that actually mean?  I don't see any drops in your voip queue.
It never shows any drops in the voip queue. The problems are latency so big my sip provider drops the connection (or my voip phones time out connecting to the sip server) so all of a sudden I get an voicemail e-mail from my sip provider but my phones never ring. The other problem is garbled audio of course. As soon as I pause my download the audio returns to flawless, unpause my download and audio goes to crap.

Not automagically.  All pfSense has to work with are IP addresses and ports.  There is no built-in DPI stuff to figure out the app from the packet.
It doesn't need DPI. As you can see from the screenshot above it already "knows" there's a voip call in progress. When it detects that, throttle all the other stuff way down.

In my first reply to you, I mentioned that I use a dozen voip phones here in my office and I have no problems at all using the PRIQ shaper which doesn't care about bandwidth -- only packet priority.  I'm surprised you didn't follow up on that.
I didn't believe packet priority would work in my case because it's being buffered at my ISP, not my modem (I assume). I'll investigate that option more and give it a try, thanks.

Someone sent me a script on here for OpenWRT x86 that will automatically throttle everything else when it detects a voip call, might give that a try.

-Jamie M.

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #12 on: January 03, 2018, 10:55:41 pm »
In my first reply to you, I mentioned that I use a dozen voip phones here in my office and I have no problems at all using the PRIQ shaper which doesn't care about bandwidth -- only packet priority.  I'm surprised you didn't follow up on that.
PRIQ seems to be working much better, thanks! I have WAN and LAN set to PRIQ, qVoIP priority 15, qP2P priority to 0. Is it true that putting in bandwidth numbers or percentages does nothing with PRIQ? Freaky.



The only thing I'm finding with PRIQ is that http and https doesn't work well when downloading, DNS timeouts (DNS PROBE FINISHED NO INTERNET) or page loading timeouts mostly. In the traffic shaping wizard I set HTTP and DNS to "Higher priority".

-Jamie M.

Offline KOM

  • Hero Member
  • *****
  • Posts: 5496
  • Karma: +680/-23
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #13 on: January 04, 2018, 08:08:53 am »
Quote
Is it true that putting in bandwidth numbers or percentages does nothing with PRIQ?

Yes.  The wizard is meant to support several different shapers in a one-size-fits-all manner, so some options don't apply depending on which shaper you're using.

Quote
The only thing I'm finding with PRIQ is that http and https doesn't work well when downloading, DNS timeouts (DNS PROBE FINISHED NO INTERNET)

Are you remembering to use UDP as well as TCP with your DNS floating rules?

Offline toysareforboys

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Possible? When it detects a voip call, throttle everything else to 1%?
« Reply #14 on: January 04, 2018, 11:38:10 am »
Are you remembering to use UDP as well as TCP with your DNS floating rules?
It looks like the traffic wizard created both TCP and UDP floating DNS rules:



Maybe I need to increase the priority of qOthersHigh?

-Jamie M.