From f8247040e6231c4b3b5099ea3a526348b7941566 Mon Sep 17 00:00:00 2001 From: russell Date: Sat, 19 Jan 2008 00:19:29 +0000 Subject: Creating tag for the release of asterisk-1.6.0-beta1 git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.6.0-beta1@99163 f38db490-d61c-443f-a65b-d21fe96a405b --- trunk/include/asterisk/srv.h | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 trunk/include/asterisk/srv.h (limited to 'trunk/include/asterisk/srv.h') diff --git a/trunk/include/asterisk/srv.h b/trunk/include/asterisk/srv.h new file mode 100644 index 000000000..567b40844 --- /dev/null +++ b/trunk/include/asterisk/srv.h @@ -0,0 +1,45 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 1999 - 2005, Digium, Inc. + * + * Mark Spencer + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + */ + +/* + * DNS SRV record support + */ + +#ifndef _ASTERISK_SRV_H +#define _ASTERISK_SRV_H + +/*! + \file srv.h + \brief Support for DNS SRV records, used in to locate SIP services. + \note Note: This SRV record support will respect the priority and + weight elements of the records that are returned, but there are + no provisions for retrying or failover between records. +*/ + +/*! Lookup entry in SRV records Returns 1 if found, 0 if not found, -1 on hangup + Only do SRV record lookup if you get a domain without a port. If you get a port #, it's a DNS host name. +*/ +/*! \param chan Ast channel + \param host host name (return value) + \param hostlen Length of string "host" + \param port Port number (return value) + \param service Service tag for SRV lookup (like "_sip._udp" or "_stun._udp" +*/ +extern int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, const char *service); + +#endif /* _ASTERISK_SRV_H */ -- cgit v1.2.3