Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should...
[asterisk-bristuff.git] / include / asterisk / srv.h
blob567b408449ca104a20a09ff320e38aba7a84b1a6
1 /*
2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Mark Spencer <markster@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
20 * DNS SRV record support
23 #ifndef _ASTERISK_SRV_H
24 #define _ASTERISK_SRV_H
26 /*!
27 \file srv.h
28 \brief Support for DNS SRV records, used in to locate SIP services.
29 \note Note: This SRV record support will respect the priority and
30 weight elements of the records that are returned, but there are
31 no provisions for retrying or failover between records.
34 /*! Lookup entry in SRV records Returns 1 if found, 0 if not found, -1 on hangup
35 Only do SRV record lookup if you get a domain without a port. If you get a port #, it's a DNS host name.
37 /*! \param chan Ast channel
38 \param host host name (return value)
39 \param hostlen Length of string "host"
40 \param port Port number (return value)
41 \param service Service tag for SRV lookup (like "_sip._udp" or "_stun._udp"
43 extern int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, const char *service);
45 #endif /* _ASTERISK_SRV_H */