diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-05 21:37:57 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-05 21:37:57 +0000 |
commit | a1b41ad50ae6ca9fd3a50d1e40638ec41aee8c6a (patch) | |
tree | 88a71891f009f781fb95bfbe32fb017f82c26b69 /channels | |
parent | 2d1a5be267865c76dd9c7928b1e1ea596f32a46c (diff) |
Adding TCP and TLS to "sip show settings".
TLS needs to have one configuration per configured domain at some point.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128287 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 79844a12d..ae45b1205 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13709,22 +13709,35 @@ static char *sip_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_ return CLI_SHOWUSAGE; ast_cli(a->fd, "\n\nGlobal Settings:\n"); ast_cli(a->fd, "----------------\n"); - ast_cli(a->fd, " SIP Port: %d\n", ntohs(bindaddr.sin_port)); - ast_cli(a->fd, " Bindaddress: %s\n", ast_inet_ntoa(bindaddr.sin_addr)); + ast_cli(a->fd, " UDP SIP Port: %d\n", ntohs(bindaddr.sin_port)); + ast_cli(a->fd, " UDP Bindaddress: %s\n", ast_inet_ntoa(bindaddr.sin_addr)); + ast_cli(a->fd, " TCP SIP Port: "); + if (sip_tcp_desc.sin.sin_family != AF_INET) { + ast_cli(a->fd, "%d\n", ntohs(sip_tcp_desc.sin.sin_port)); + ast_cli(a->fd, " TCP Bindaddress: %s\n", ast_inet_ntoa(sip_tcp_desc.sin.sin_addr)); + } else { + ast_cli(a->fd, "Disabled"); + } + if (default_tls_cfg.enabled != FALSE) { + ast_cli(a->fd, "%d\n", ntohs(sip_tls_desc.sin.sin_port)); + ast_cli(a->fd, " TLS Bindaddress: %s\n", ast_inet_ntoa(sip_tls_desc.sin.sin_addr)); + } else { + ast_cli(a->fd, "Disabled"); + } ast_cli(a->fd, " Videosupport: %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_VIDEOSUPPORT))); ast_cli(a->fd, " Textsupport: %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_TEXTSUPPORT))); ast_cli(a->fd, " AutoCreate Peer: %s\n", cli_yesno(autocreatepeer)); ast_cli(a->fd, " Match Auth Username: %s\n", cli_yesno(global_match_auth_username)); ast_cli(a->fd, " Allow unknown access: %s\n", cli_yesno(global_allowguest)); ast_cli(a->fd, " Allow subscriptions: %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_ALLOWSUBSCRIBE))); - ast_cli(a->fd, " Enable call counters: %s\n", cli_yesno(global_callcounter)); ast_cli(a->fd, " Allow overlap dialing: %s\n", cli_yesno(ast_test_flag(&global_flags[1], SIP_PAGE2_ALLOWOVERLAP))); - ast_cli(a->fd, " Promsic. redir: %s\n", cli_yesno(ast_test_flag(&global_flags[0], SIP_PROMISCREDIR))); + ast_cli(a->fd, " Allow promsic. redir: %s\n", cli_yesno(ast_test_flag(&global_flags[0], SIP_PROMISCREDIR))); + ast_cli(a->fd, " Enable call counters: %s\n", cli_yesno(global_callcounter)); ast_cli(a->fd, " SIP domain support: %s\n", cli_yesno(!AST_LIST_EMPTY(&domain_list))); + ast_cli(a->fd, " Realm. auth: %s\n", cli_yesno(authl != NULL)); + ast_cli(a->fd, " Our auth realm %s\n", global_realm); ast_cli(a->fd, " Call to non-local dom.: %s\n", cli_yesno(allow_external_domains)); ast_cli(a->fd, " URI user is phone no: %s\n", cli_yesno(ast_test_flag(&global_flags[0], SIP_USEREQPHONE))); - ast_cli(a->fd, " Our auth realm %s\n", global_realm); - ast_cli(a->fd, " Realm. auth: %s\n", cli_yesno(authl != NULL)); ast_cli(a->fd, " Always auth rejects: %s\n", cli_yesno(global_alwaysauthreject)); ast_cli(a->fd, " Direct RTP setup: %s\n", cli_yesno(global_directrtpsetup)); ast_cli(a->fd, " User Agent: %s\n", global_useragent); |