Utility functions for chan_sip. More...
#include "asterisk.h"#include "asterisk/utils.h"#include "asterisk/cli.h"#include "include/sip.h"#include "include/sip_utils.h"
Go to the source code of this file.
Functions | |
| const char * | comedia_string (struct ast_flags *flags) |
| const char * | force_rport_string (struct ast_flags *flags) |
Utility functions for chan_sip.
Definition in file channels/sip/utils.c.
| const char* comedia_string | ( | struct ast_flags * | flags | ) |
Definition at line 43 of file channels/sip/utils.c.
References AST_CLI_YESNO, and ast_test_flag.
Referenced by _sip_show_peer(), _sip_show_peers_one(), and sip_show_settings().
{
if (ast_test_flag(&flags[2], SIP_PAGE3_NAT_AUTO_COMEDIA)) {
return ast_test_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP) ? "Auto (Yes)" : "Auto (No)";
}
return AST_CLI_YESNO(ast_test_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP));
}
| const char* force_rport_string | ( | struct ast_flags * | flags | ) |
Definition at line 35 of file channels/sip/utils.c.
References AST_CLI_YESNO, and ast_test_flag.
Referenced by _sip_show_peer(), _sip_show_peers_one(), sip_show_channel(), and sip_show_settings().
{
if (ast_test_flag(&flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
return ast_test_flag(&flags[0], SIP_NAT_FORCE_RPORT) ? "Auto (Yes)" : "Auto (No)";
}
return AST_CLI_YESNO(ast_test_flag(&flags[0], SIP_NAT_FORCE_RPORT));
}