Sat Aug 6 00:39:28 2011

Asterisk developer's documentation


enum.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2005, Digium, Inc.
00005  *
00006  * Mark Spencer <markster@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*!   \file enum.h
00020    \brief DNS and ENUM functions
00021 */
00022 
00023 #ifndef _ASTERISK_ENUM_H
00024 #define _ASTERISK_ENUM_H
00025 
00026 #include "asterisk/channel.h"
00027 
00028 /*! \brief Lookup entry in ENUM Returns 1 if found, 0 if not found, -1 on hangup
00029    \param chan Channel
00030    \param number   E164 number with or without the leading +
00031    \param location Number returned  (or SIP uri)
00032    \param maxloc  Max length
00033    \param technology     Technology (from url scheme in response)
00034                        You can set it to get particular answer RR, if there are many techs in DNS response, example: "sip"
00035                        If you need any record, then set it to empty string
00036    \param maxtech  Max length
00037    \param suffix   Zone suffix (if is NULL then use enum.conf 'search' variable)
00038    \param options  Options ('c' to count number of NAPTR RR)
00039    \param record   The position of required RR in the answer list
00040 */
00041 int ast_get_enum(struct ast_channel *chan, const char *number, char *location, int maxloc, char *technology, 
00042       int maxtech, char* suffix, char* options, unsigned int record);
00043 
00044 /*!   \brief Lookup DNS TXT record (used by app TXTCIDnum
00045    \param chan Channel
00046    \param number   E164 number with or without the leading +
00047    \param location   Number returned   (or SIP uri)
00048    \param maxloc  Max length of number
00049    \param technology    Technology (not used in TXT records)
00050    \param maxtech Max length
00051    \param txt  Text string (return value)
00052    \param maxtxt  Max length of "txt"
00053 */
00054 int ast_get_txt(struct ast_channel *chan, const char *number, char *location, int maxloc, char *technology, int maxtech, char *txt, int maxtxt);
00055 
00056 int ast_enum_init(void);
00057 int ast_enum_reload(void);
00058 
00059 #endif /* _ASTERISK_ENUM_H */

Generated on Sat Aug 6 00:39:28 2011 for Asterisk - the Open Source PBX by  doxygen 1.4.7