Wed May 16 06:33:42 2012

Asterisk developer's documentation


channels/sip/utils.c

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 1999 - 2012, Digium, Inc.
00005  *
00006  * See http://www.asterisk.org for more information about
00007  * the Asterisk project. Please do not directly contact
00008  * any of the maintainers of this project for assistance;
00009  * the project provides a web site, mailing lists and IRC
00010  * channels for your use.
00011  *
00012  * This program is free software, distributed under the terms of
00013  * the GNU General Public License Version 2. See the LICENSE file
00014  * at the top of the source tree.
00015  */
00016 
00017 /*!
00018  * \file
00019  * \brief Utility functions for chan_sip
00020  *
00021  * \author Terry Wilson <twilson@digium.com>
00022  */
00023 
00024 #include "asterisk.h"
00025 
00026 #include "asterisk/utils.h"
00027 #include "asterisk/cli.h"
00028 #include "include/sip.h"
00029 #include "include/sip_utils.h"
00030 
00031 const char *force_rport_string(struct ast_flags *flags)
00032 {
00033    if (ast_test_flag(&flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
00034       return ast_test_flag(&flags[0], SIP_NAT_FORCE_RPORT) ? "Auto (Yes)" : "Auto (No)";
00035    }
00036    return AST_CLI_YESNO(ast_test_flag(&flags[0], SIP_NAT_FORCE_RPORT));
00037 }
00038 
00039 const char *comedia_string(struct ast_flags *flags)
00040 {
00041    if (ast_test_flag(&flags[2], SIP_PAGE3_NAT_AUTO_COMEDIA)) {
00042       return ast_test_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP) ? "Auto (Yes)" : "Auto (No)";
00043    }
00044    return AST_CLI_YESNO(ast_test_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP));
00045 }

Generated on Wed May 16 06:33:42 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6