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 /* 00020 * DNS SRV record support 00021 */ 00022 00023 #ifndef _ASTERISK_SRV_H 00024 #define _ASTERISK_SRV_H 00025 00026 /*! 00027 \file srv.h 00028 \brief Support for DNS SRV records, used in to locate SIP services. 00029 \note Note: The Asterisk DNS SRV record support is broken, it only 00030 supports the first DNS SRV record and will give no load 00031 balancing or failover support. 00032 */ 00033 00034 /*! Lookup entry in SRV records Returns 1 if found, 0 if not found, -1 on hangup 00035 Only do SRV record lookup if you get a domain without a port. If you get a port #, it's a DNS host name. 00036 */ 00037 /*! \param chan Ast channel 00038 \param host host name (return value) 00039 \param hostlen Length of string "host" 00040 \param port Port number (return value) 00041 \param service Service tag for SRV lookup (like "_sip._udp" or "_stun._udp" 00042 */ 00043 extern int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, const char *service); 00044 00045 #endif /* _ASTERISK_SRV_H */