ast_playtones_stop(chan);
if (res < 1)
break;
+ if (res == '#')
+ break;
collect[x++] = res;
- if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num)) {
- if (collect[x-1] == '#') {
- /* Not a valid extension, ending in #, assume the # was to finish dialing */
- collect[x-1] = '\0';
- }
+ if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num))
break;
- }
}
if (res >= 0) {
if (ast_exists_extension(chan, context, collect, 1, chan->cid.cid_num))
user->callingpres = ast_parse_caller_presentation(v->value);
if (user->callingpres == -1)
user->callingpres = atoi(v->value);
- }
- /*else if (strcasecmp(v->name,"type"))
- * ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
- */
+ } else if (strcasecmp(v->name, "type"))
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
v = v->next;
}
ast_copy_flags(user, &userflags, mask.flags);
ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno);
peer->maxms = 0;
}
- }
- /* else if (strcasecmp(v->name,"type"))
- * ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
- */
- v=v->next;
+ } else if (strcasecmp(v->name, "type"))
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
+ v = v->next;
}
if (!ast_test_flag((&global_flags_page2), SIP_PAGE2_IGNOREREGEXPIRE) && ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC) && realtime) {
time_t nowtime;
}
} else if (!strcasecmp(v->name, "callevents")) {
callevents = ast_true(v->value);
- }
- /* else if (strcasecmp(v->name,"type"))
- * ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
- */
+ } else
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
v = v->next;
}
/* Format for authentication is auth = username:password@realm */
if (!strcasecmp(v->name, "auth")) {
authl = add_realm_authentication(authl, v->value, v->lineno);
- }
+ } else
+ ast_log(LOG_WARNING, "Ignoring unknown option '%s' at line %d of sip.conf!\n", v->name, v->lineno);
v = v->next;
}