diff -Nru a/channels/chan_sip.c b/channels/chan_sip.c --- a/channels/chan_sip.c 2005-03-20 08:01:24 -07:00 +++ b/channels/chan_sip.c 2005-03-20 08:01:24 -07:00 @@ -9787,7 +9787,7 @@ } else if (!strcasecmp(v->name, "mask")) { maskfound++; inet_aton(v->value, &peer->mask); - } else if (!strcasecmp(v->name, "port") || !strcasecmp(v->name, "bindport")) { + } else if (!strcasecmp(v->name, "port")) { if (!realtime && ast_test_flag(peer, SIP_DYNAMIC)) peer->defaddr.sin_port = htons(atoi(v->value)); else @@ -10116,11 +10116,12 @@ tos = 0; else ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno); - } else if (!strcasecmp(v->name, "port")) { + } else if (!strcasecmp(v->name, "bindport")) { if (sscanf(v->value, "%i", &ourport) == 1) { bindaddr.sin_port = htons(ourport); } else { ast_log(LOG_WARNING, "Invalid port number '%s' at line %d of %s\n", v->value, v->lineno, config); + ourport = DEFAULT_SIP_PORT; } } else if (!strcasecmp(v->name, "qualify")) { if (!strcasecmp(v->value, "no")) {