]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add sip show peer info about crypto and remove dated comment
authorTerry Wilson <twilson@digium.com>
Tue, 19 Oct 2010 19:27:32 +0000 (19:27 +0000)
committerTerry Wilson <twilson@digium.com>
Tue, 19 Oct 2010 19:27:32 +0000 (19:27 +0000)
This patch adds information about the encryption setting to 'sip show
peers' and removes an out-of-date comment from res_srtp.c and instead
directs users to the proper documentation.

(closes issue #18140)
Reported by: chodorenko

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@292309 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
res/res_srtp.c

index ed9f46b86d7d68199617c0739c89b94b7080b70d..c8173d3980a7652df412556970e59bc0b641cf22 100644 (file)
@@ -16394,6 +16394,7 @@ static char *_sip_show_peer(int type, int fd, struct mansession *s, const struct
                ast_cli(fd, "  RTP Engine   : %s\n", peer->engine);
                ast_cli(fd, "  Parkinglot   : %s\n", peer->parkinglot);
                ast_cli(fd, "  Use Reason   : %s\n", AST_CLI_YESNO(ast_test_flag(&peer->flags[1], SIP_PAGE2_Q850_REASON)));
+               ast_cli(fd, "  Encryption   : %s\n", AST_CLI_YESNO(ast_test_flag(&peer->flags[1], SIP_PAGE2_USE_SRTP)));
                ast_cli(fd, "\n");
                peer = unref_peer(peer, "sip_show_peer: unref_peer: done with peer ptr");
        } else  if (peer && type == 1) { /* manager listing */
@@ -16449,6 +16450,7 @@ static char *_sip_show_peer(int type, int fd, struct mansession *s, const struct
                astman_append(s, "SIP-Sess-Expires: %d\r\n", peer->stimer.st_max_se);
                astman_append(s, "SIP-Sess-Min: %d\r\n", peer->stimer.st_min_se);
                astman_append(s, "SIP-RTP-Engine: %s\r\n", peer->engine);
+               astman_append(s, "SIP-Encryption: %s\r\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_USE_SRTP) ? "Y" : "N");
 
                /* - is enumerated */
                astman_append(s, "SIP-DTMFmode: %s\r\n", dtmfmode2str(ast_test_flag(&peer->flags[0], SIP_DTMF)));
index 808444ca0754a84718ee640b5aca793613c18893..3a330dba1ffb30b8e2f0b0cd60d859437287ec42 100644 (file)
          <depend>srtp</depend>
 ***/
 
-/* The SIP channel will automatically use sdescriptions if received in a SDP offer,
-   and res_srtp is loaded. SRTP with sdescriptions key exchange can be activated
-  in outgoing offers by setting _SIPSRTP_CRYPTO=enable in extension.conf before executing Dial
-
-  The dial fails if the callee doesn't support SRTP and sdescriptions.
-
-  exten => 2345,1,Set(_SIPSRTP_CRYPTO=enable)
-  exten => 2345,2,Dial(SIP/1001)
-*/
+/* See doc/tex/secure-calls.tex for SRTP usage information */
 
 #include "asterisk.h"