Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.803 diff -u -r1.803 chan_sip.c --- channels/chan_sip.c 4 Aug 2005 20:03:45 -0000 1.803 +++ channels/chan_sip.c 9 Aug 2005 11:58:14 -0000 @@ -11030,8 +11093,8 @@ } else if (!strcasecmp(v->name, "recordhistory")) { recordhistory = ast_true(v->value); } else if (!strcasecmp(v->name, "tos")) { - if (sscanf(v->value, "%d", &format) == 1) - tos = format & 0xff; + if (!strcmp(v->value, "0") || !strcmp(v->value, "0x0") || strtoul(v->value, NULL, 0) > 0) + tos = strtoul(v->value, NULL, 0) & 0xff; else if (!strcasecmp(v->value, "lowdelay")) tos = IPTOS_LOWDELAY; else if (!strcasecmp(v->value, "throughput"))