> On April 24, 2014, 2:31 a.m., Olle E Johansson wrote: > > /branches/11/channels/chan_sip.c, line 21286 > > <https://reviewboard.asterisk.org/r/3474/diff/1/?file=57790#file57790line21286> > > > > If the header is just "signalling" we should also list other transports > > than TLS - UDP, TCP, WS, WSS. "non-TLS" is not a good solution :-) > > Patrick Laimbock wrote: > Oej: thank you for your comment. I totally agree. The reason for TLS or > non-TLS is my very limited C foo. I did some digging and came up with the > patch below which seems to work (tested UDP/TLS,RTP/SRTP). Is that more like > it? > > diff -uNr asterisk-11.9.0.org/channels/chan_sip.c > asterisk-11.9.0/channels/chan_sip.c > --- asterisk-11.9.0.org/channels/chan_sip.c 2014-04-21 > 22:56:05.000000000 +0200 > +++ asterisk-11.9.0/channels/chan_sip.c 2014-04-24 16:14:05.116999990 > +0200 > @@ -21294,6 +21294,24 @@ > } > } > > + /* add transport and media types */ > + char *transport_type; > + if (cur->socket.type == SIP_TRANSPORT_TLS) { > + transport_type = "TLS"; > + } else if (cur->socket.type == SIP_TRANSPORT_UDP) { > + transport_type = "UDP"; > + } else if (cur->socket.type == SIP_TRANSPORT_TCP) { > + transport_type = "TCP"; > + } else if (cur->socket.type == SIP_TRANSPORT_WS) { > + transport_type = "WS"; > + } else if (cur->socket.type == SIP_TRANSPORT_WSS) { > + transport_type = "WSS"; > + } else > + transport_type = "Unknown"; > + > + ast_cli(a->fd, " Transport: %s\n", > transport_type); > + ast_cli(a->fd, " Media: %s\n", > cur->srtp ? "SRTP" : "RTP"); > + > ast_cli(a->fd, "\n\n"); > > found++;
As an addition to an existing CLI command, I have no issue with this going into all branches. There's no reasonable risk of this negatively impacting users, and given recent SSL issues, it has an obvious benefit. - Matt ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3474/#review11726 ----------------------------------------------------------- On April 24, 2014, 12:33 p.m., Patrick Laimbock wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3474/ > ----------------------------------------------------------- > > (Updated April 24, 2014, 12:33 p.m.) > > > Review request for Asterisk Developers. > > > Bugs: ASTERISK-23564 > https://issues.asterisk.org/jira/browse/ASTERISK-23564 > > > Repository: Asterisk > > > Description > ------- > > AFAICT there is no way to see from the CLI if TLS and SRTP are enabled for a > channel. I asked on the ML and in #asterisk but received no answer other than > that nobody knew how to get that info from the CLI. This patch shows TLS or > non-TLS and SRTP or RTP. > > > Diffs > ----- > > /branches/11/channels/chan_sip.c 412921 > > Diff: https://reviewboard.asterisk.org/r/3474/diff/ > > > Testing > ------- > > Testing was done on Asterisk-11.8.1 with TLS & RPT, TLS & SRTP, non-TLS & RPT > configured and a Nexus GSM using Linphone with similar configs. AFAICT the > status of the channel and media was correctly reported for each scenario. > > > Thanks, > > Patrick Laimbock > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
