[asterisk-commits] rmudgett: trunk r351977 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 20 17:05:10 CST 2012


Author: rmudgett
Date: Fri Jan 20 17:05:06 2012
New Revision: 351977

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=351977
Log:
Make CLI sip show channel list the complete route set.

(closes issue ASTERISK-16877)
Reported by: klaus3000
Patches:
      show-complete-routeset-patch.txt (license #5054) patch uploaded by klaus3000 (modified)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=351977&r1=351976&r2=351977
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jan 20 17:05:06 2012
@@ -18970,7 +18970,19 @@
 			ast_cli(a->fd, "  Need Destroy:           %s\n", AST_CLI_YESNO(cur->needdestroy));
 			ast_cli(a->fd, "  Last Message:           %s\n", cur->lastmsg);
 			ast_cli(a->fd, "  Promiscuous Redir:      %s\n", AST_CLI_YESNO(ast_test_flag(&cur->flags[0], SIP_PROMISCREDIR)));
-			ast_cli(a->fd, "  Route:                  %s\n", cur->route ? cur->route->hop : "N/A");
+			ast_cli(a->fd, "  Route:                  ");
+			if (cur->route) {
+				struct sip_route *route;
+				int first = 1;
+
+				for (route = cur->route; route; route = route->next) {
+					ast_cli(a->fd, "%s<%s>", first ? "" : ", ", route->hop);
+					first = 0;
+				}
+				ast_cli(a->fd, "\n");
+			} else {
+				ast_cli(a->fd, "N/A\n");
+			}
 			ast_cli(a->fd, "  DTMF Mode:              %s\n", dtmfmode2str(ast_test_flag(&cur->flags[0], SIP_DTMF)));
 			ast_cli(a->fd, "  SIP Options:            ");
 			if (cur->sipoptions) {




More information about the asterisk-commits mailing list