[asterisk-commits] jrose: branch 12 r413877 - in /branches/12: ./ channels/ include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 13 13:01:33 CDT 2014
Author: jrose
Date: Tue May 13 13:01:24 2014
New Revision: 413877
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413877
Log:
chan_sip: Add TLS and SRTP status to CLI command 'sip show channel'
ASTERISK-23564 #close
Reported by: Patrick Laimbock
Review: https://reviewboard.asterisk.org/r/3474/
........
Merged revisions 413876 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
branches/12/ (props changed)
branches/12/channels/chan_sip.c
branches/12/include/asterisk/netsock2.h
branches/12/main/netsock2.c
Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/12/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_sip.c?view=diff&rev=413877&r1=413876&r2=413877
==============================================================================
--- branches/12/channels/chan_sip.c (original)
+++ branches/12/channels/chan_sip.c Tue May 13 13:01:24 2014
@@ -21735,6 +21735,10 @@
}
}
+ /* add transport and media types */
+ ast_cli(a->fd, " Transport: %s\n", ast_transport2str(cur->socket.type));
+ ast_cli(a->fd, " Media: %s\n", cur->srtp ? "SRTP" : cur->rtp ? "RTP" : "None");
+
ast_cli(a->fd, "\n\n");
found++;
Modified: branches/12/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/branches/12/include/asterisk/netsock2.h?view=diff&rev=413877&r1=413876&r2=413877
==============================================================================
--- branches/12/include/asterisk/netsock2.h (original)
+++ branches/12/include/asterisk/netsock2.h Tue May 13 13:01:24 2014
@@ -567,6 +567,17 @@
int ast_sockaddr_hash(const struct ast_sockaddr *addr);
/*!
+ * \since 12.3
+ *
+ * \brief
+ * Returns a string representation of an ast_transport
+ *
+ * \retval Name of the tranpsort if it is defined
+ * \retval Undefined if the transport is undefined
+ */
+const char *ast_transport2str(enum ast_transport transport);
+
+/*!
* \since 1.8
*
* \brief
Modified: branches/12/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/netsock2.c?view=diff&rev=413877&r1=413876&r2=413877
==============================================================================
--- branches/12/main/netsock2.c (original)
+++ branches/12/main/netsock2.c Tue May 13 13:01:24 2014
@@ -489,6 +489,24 @@
}
}
+const char *ast_transport2str(enum ast_transport transport)
+{
+ switch (transport) {
+ case AST_TRANSPORT_TLS:
+ return "TLS";
+ case AST_TRANSPORT_UDP:
+ return "UDP";
+ case AST_TRANSPORT_TCP:
+ return "TCP";
+ case AST_TRANSPORT_WS:
+ return "WS";
+ case AST_TRANSPORT_WSS:
+ return "WSS";
+ }
+
+ return "Undefined";
+}
+
int ast_accept(int sockfd, struct ast_sockaddr *addr)
{
addr->len = sizeof(addr->ss);
More information about the asterisk-commits
mailing list