|
|
|
@ -64,8 +64,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|
|
|
|
#define T_TXT 16
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* The IETF Enum standard root, managed by the ITU */
|
|
|
|
|
#define TOPLEV "e164.arpa."
|
|
|
|
|
#define TOPLEV "e164.arpa." /*!< The IETF Enum standard root, managed by the ITU */
|
|
|
|
|
|
|
|
|
|
/* Linked list from config file */
|
|
|
|
|
static struct enum_search {
|
|
|
|
@ -416,8 +415,8 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
|
|
|
|
|
context.naptr_rrs = NULL;
|
|
|
|
|
context.naptr_rrs_count = 0;
|
|
|
|
|
|
|
|
|
|
if (options != NULL){
|
|
|
|
|
if (*options == 'c'){
|
|
|
|
|
if (options != NULL) {
|
|
|
|
|
if (*options == 'c') {
|
|
|
|
|
context.options = ENUMLOOKUP_OPTIONS_COUNT;
|
|
|
|
|
context.position = 0;
|
|
|
|
|
} else {
|
|
|
|
@ -531,7 +530,6 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
|
|
|
|
|
} else if (!(context.options & ENUMLOOKUP_OPTIONS_COUNT)) {
|
|
|
|
|
context.dst[0] = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (chan)
|
|
|
|
|
ret |= ast_autoservice_stop(chan);
|
|
|
|
|
|
|
|
|
@ -600,7 +598,8 @@ int ast_get_txt(struct ast_channel *chan, const char *number, char *dst, int dst
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (ret < 0) {
|
|
|
|
|
ast_log(LOG_DEBUG, "No such number found: %s (%s)\n", tmp, strerror(errno));
|
|
|
|
|
if (option_debug > 1)
|
|
|
|
|
ast_log(LOG_DEBUG, "No such number found in ENUM: %s (%s)\n", tmp, strerror(errno));
|
|
|
|
|
ret = 0;
|
|
|
|
|
}
|
|
|
|
|
if (chan)
|
|
|
|
@ -608,7 +607,7 @@ int ast_get_txt(struct ast_channel *chan, const char *number, char *dst, int dst
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*! \brief Add enum tree to linked list ---*/
|
|
|
|
|
/*! \brief Add enum tree to linked list */
|
|
|
|
|
static struct enum_search *enum_newtoplev(char *s)
|
|
|
|
|
{
|
|
|
|
|
struct enum_search *tmp;
|
|
|
|
|