Koozali.org: home of the SME Server

HOW-TO reserve Bandwith for Asterisk ?

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
HOW-TO reserve Bandwith for Asterisk ?
« on: September 21, 2008, 07:41:35 PM »
Hello World,

I bought licenses G.729A but when I send a mail or I make a upload my interlocutor not hear me more. Communication is jerked.

I've try this without success : http://wiki.contribs.org/Wondershaper

My Upload bandwith is 340kbps, My Download bandwith is neer 12000kbps

Somebody can help me ?

In advance

Thanks.

Olivier

----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #1 on: September 23, 2008, 09:52:14 AM »
You also need to set the TOS field in asterisk configuration. I don't know how sail works, but in a standard asterisk installation, you need to add something like
Code: [Select]
tos=0x18
in sip.conf and/or iax.conf (depending the technologie of your trunk)
C'est la fin du monde !!! :lol:

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #2 on: September 23, 2008, 03:54:27 PM »
tos is deprecated for SIP in asterisk 1.4 (it doesn't do anything anymore).  Instead, the recommended setting is

Code: [Select]
tos_sip=cs3
tos= may still be valid for IAX, I can find no references




Kind Regards

S


« Last Edit: September 23, 2008, 03:56:45 PM by selintra »

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #3 on: September 24, 2008, 05:08:13 PM »
I've try http://wiki.contribs.org/Wondershaper script
with tos=0x18 and tos=cs3 in sip.conf without succes, my upload bandwith really decrease but a single call is jerked.

It seems that asterisk follow the same path as the rest of the applications instead of using the reserved bandwidth.

I must install a client with 8 channels with only 340kbps of upload bandwith. In G729A it's sufficient but if the communication are jerky whenever the customer sending an email. This is not great

thanks a lot

Olivier
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #4 on: September 24, 2008, 05:45:15 PM »
I've try http://wiki.contribs.org/Wondershaper script
with tos=0x18 and tos=cs3 in sip.conf without succes, my upload bandwith really decrease but a single call is jerked.

It seems that asterisk follow the same path as the rest of the applications instead of using the reserved bandwidth.

I must install a client with 8 channels with only 340kbps of upload bandwith. In G729A it's sufficient but if the communication are jerky whenever the customer sending an email. This is not great

thanks a lot

Olivier

in this case IMHO you shoult think about a different solution: is your SME server and gateway? is there a FW solution behind router and SME?

the best solution is to setup SME as server only and use a FW (like m0n0wall http://m0n0.ch/wall) with bandwidth management.

My 2c

Ciao
Stefano

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #5 on: September 24, 2008, 08:32:34 PM »
You won't get 8 channels of G729 through 384K no matter what you do.  G729 with overhead uses about 30Kbits.  8 channels is 240Kbits and you can double that as a rule of thumb to cover latency on the circuit.  You might get 5 or 6 if you are lucky.

Best

S

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #6 on: September 25, 2008, 04:29:15 PM »
That's not a good news. I must find another Internet Provider for my client to use 8 channels...

But the discusion is not close. Because my communication is jerked with a single channel when I send a mail.
When I have another provider and that I will send a mail, problem still exists. Mail process uses the entire bandwidth as well.

HOW-TO reserve Bandwith for Asterisk ? Without using Monowall above SME Server ?

Older versions of SAIL had some QOS. Why have removed this feature?

Thanks a Lot

Olivier

----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: HOW-TO reserve Bandwith for Asterisk ?
« Reply #7 on: September 25, 2008, 10:39:45 PM »
Quote
Older versions of SAIL had some QOS. Why have removed this feature?

Because it didn't work.  HBWondershaper (which is what we used, or a variation of it), works with fixed speed links.  Modern ADSL "max" links don't work this way, they are adaptive, which means that they will always run "as fast as they can".  Measured over a period, the link speed can vary considerably which means that tools like wondershaper (which expect you to manually supply the upload and download speeds) can end up doing more harm than good.  In any event, you can only contol QOS within your own subnet; as soon as the packets leave your perimeter you have no control over them at all. 

Having said that, if you cannot get even a single voice conversation at 384K then I would suspect that something is probably wrong with your link (or you are a long way from yopur telephone exchange).  Yoiu might want to fit a packet sniffer such as wireshark to see what (if any) packet loss you are experiencing.  You might want to log into your router/modem to see what speed it thinks the link is running at.

Finally, if you are worried about data traffic clogging up the DSL circuit, then why not get another circuit, just for telphony? 

Kind Regards

S