Index: channels/chan_iax2.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v retrieving revision 1.325 diff -u -r1.325 chan_iax2.c --- channels/chan_iax2.c 4 Aug 2005 17:33:21 -0000 1.325 +++ channels/chan_iax2.c 9 Aug 2005 12:02:42 -0000 @@ -8531,8 +8531,8 @@ if (!ast_context_find(regcontext)) ast_context_create(NULL, regcontext, channeltype); } 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"))