summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/enum.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/include/asterisk/enum.h b/include/asterisk/enum.h
index d6bbea294..499e34673 100644
--- a/include/asterisk/enum.h
+++ b/include/asterisk/enum.h
@@ -45,7 +45,8 @@ struct enum_context {
char *txt; /*!< TXT record in TXT lookup */
int txtlen; /*!< Length */
char *naptrinput; /*!< The number to lookup */
- int position; /*!< used as counter for RRs or specifies position of required RR */
+ int position; /*!< specifies position of required RR */
+ int count; /*!< used as counter for RRs */
int options; /*!< options , see ENUMLOOKUP_OPTIONS_* defined above */
struct enum_naptr_rr *naptr_rrs; /*!< array of parsed NAPTR RRs */
int naptr_rrs_count; /*!< Size of array naptr_rrs */
@@ -57,12 +58,18 @@ struct enum_context {
\param number E164 number with or without the leading +
\param location Number returned (or SIP uri)
\param maxloc Max length
- \param technology Technology (from url scheme in response)
+ \param technology Technology (from url scheme in response)
You can set it to get particular answer RR, if there are many techs in DNS response, example: "sip"
- If you need any record, then set it to empty string
+ If you need any record, then set it to "ALL" string
\param maxtech Max length
- \param suffix Zone suffix (if is NULL then use enum.conf 'search' variable)
- \param options Options ('c' to count number of NAPTR RR)
+ \param suffix Zone suffix (WARNING: No defaults here any more)
+ \param options Options
+ 'c' - Count number of NAPTR RR
+ number - Position of the requested RR in the answer list
+ 'u' - Full URI return (does not strip URI scheme)
+ 'i' - Infrastructure ENUM lookup
+ 's' - ISN based lookup
+ 'd' - Direct DNS query
\param record The position of required RR in the answer list
\param argcontext Argument for caching results into an enum_context pointer (NULL is used for not caching)
\retval 1 if found
@@ -75,14 +82,11 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *location, i
/*! \brief Lookup DNS TXT record (used by app TXTCIDnum
\param chan Channel
\param number E164 number with or without the leading +
- \param location Number returned (or SIP uri)
- \param maxloc Max length of number
- \param technology Technology (not used in TXT records)
- \param maxtech Max length
\param txt Text string (return value)
\param maxtxt Max length of "txt"
+ \param suffix Zone suffix
*/
-int ast_get_txt(struct ast_channel *chan, const char *number, char *location, int maxloc, char *technology, int maxtech, char *txt, int maxtxt);
+int ast_get_txt(struct ast_channel *chan, const char *number, char *txt, int maxtxt, char *suffix);
int ast_enum_init(void);
int ast_enum_reload(void);