I don't understand this message: [2009-10-29 16:31:51] WARNING[28510]: rtp.c:1997 ast_rtp_settos: Unable to set TOS to 184
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> If you already mangle packets with IPTABLES, then you should comment the line[s] tos_* on sip.conf. <br> <br> Regards,<br> Juan<br> <br> Bart Fisher wrote: <blockquote cite="mid:8572E3CD9D4348688C1E336E444456C4@BART8300" type="cite"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <meta name="GENERATOR" content="MSHTML 8.00.6001.18812"> <style></style> <div><font face="Arial" size="2">I don't understand this message:</font></div> <div> </div> <div><font face="Arial" size="2">[2009-10-29 16:31:51] WARNING[28510]: rtp.c:1997 ast_rtp_settos: Unable to set TOS to 184</font></div> <div> </div> <div><font face="Arial" size="2">From what I have read the reason is asterisk can't set TOS if not running in root. Mine is running as asterisk.</font></div> <div> </div> <div><font face="Arial" size="2">I found one post that says to run at boot:</font></div> <div> </div> <div><font face="Arial" size="2">#!/bin/bash <br> /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 4569 -j DSCP --set-dscp-class ef<br> /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp-class ef<br> /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 5060 -j DSCP --set-dscp-class ef</font></div> <div> </div> <div><font face="Arial" size="2">Does this make sense? Is this the only method to end ths warning?</font></div> <div> </div> <div><font face="Arial" size="2">Thanks, Bart</font></div> <pre wrap=""> <hr size="4" width="90%"> _______________________________________________ -- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre> </blockquote> </body> </html>
On Thu, 2009-10-29 at 16:36 -0700, Bart Fisher wrote:> I don't understand this message: > > [2009-10-29 16:31:51] WARNING[28510]: rtp.c:1997 ast_rtp_settos: > Unable to set TOS to 184 > > From what I have read the reason is asterisk can't set TOS if not > running in root. Mine is running as asterisk. > > I found one post that says to run at boot: > > #!/bin/bash > /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 4569 -j DSCP > --set-dscp-class ef > /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 > -j DSCP --set-dscp-class ef > /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 5060 -j DSCP > --set-dscp-class ef > > Does this make sense? Is this the only method to end ths warning?<snip>>I'm pretty new to Asterisk so take this with a grain of salt. Is it possible you used decimal (184) instead of hex notation (b8) in your sip.conf? We're running 1.6.1.6 and it appears to be working just fine. Here are the pertinent lines from our sip.conf: tos_audio=0xb0 ; b8 (expedited forwarding) confuses the Linux pfifo_fast so b0 works better for us tos_sip=0xb0 The comment is also important in light of the iptables rules you have. As someone else pointed out, you shouldn't need both. I prefer to set them in the application. For example, if I ever change ports for whatever reason, I won't have the problem of forgetting to also change my iptables rules. Now, I may be wrong about this so I wouldn't mind feedback from someone who know better than I do, but I think expedited forwarding (ef = 184 = b8) can shoot you in the foot in Linux. If you don't change the default packet queueing from pfifo-fast, I believe it will not look at the DSCP bits but rather the ToS bits and will place ef packets into band1 (normal priority) rather than band0 (high priority). That's why we use b0 instead and then tell our DSCP enabled switches to place the resultant DSCP values into the highest priority queue. Hope that makes sense. If I'm wrong, please, someone call me out on it. Thanks - John -- John A. Sullivan III Open Source Development Corporation +1 207-985-7880 jsullivan at opensourcedevel.com http://www.spiritualoutreach.com Making Christianity intelligible to secular society
Hi Bart, Am Donnerstag, den 29.10.2009, 16:36 -0700 schrieb Bart Fisher:> I don't understand this message: > > [2009-10-29 16:31:51] WARNING[28510]: rtp.c:1997 ast_rtp_settos: > Unable to set TOS to 184You did not tell us, which version of asterisk You are running. The kernel restricts setting of high ToS-bits for non-root users. To allow a process to run as non-root and be able to set these bits, there is the possibility to use 'capabilities'. This feature was implemtented and fixed in the past (issues 7074 and 14004 at issues.asterisk.org).> I found one post that says to run at boot: > > #!/bin/bash > /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 4569 -j DSCP > --set-dscp-class ef > /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 > -j DSCP --set-dscp-class ef > /sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 5060 -j DSCP > --set-dscp-class efIn case Your iptables is working, I think You can ignore the warning. HTH, Karsten