Wed Oct 28 15:47:56 2009

Asterisk developer's documentation


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

Generated on Wed Oct 28 15:47:56 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6