[asterisk-commits] rizzo: branch rizzo/astobj2 r76033 - /team/rizzo/astobj2/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 20 09:12:38 CDT 2007


Author: rizzo
Date: Fri Jul 20 09:12:38 2007
New Revision: 76033

URL: http://svn.digium.com/view/asterisk?view=rev&rev=76033
Log:
Print localnet setting

Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=76033&r1=76032&r2=76033
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Fri Jul 20 09:12:38 2007
@@ -11575,6 +11575,18 @@
 	ast_cli(fd, "  Externip:               %s:%d\n", ast_inet_ntoa(externip.sin_addr), ntohs(externip.sin_port));
 	ast_cli(fd, "  Externrefresh:          %d\n", externrefresh);
 	ast_cli(fd, "  Internal IP:            %s:%d\n", ast_inet_ntoa(internip.sin_addr), ntohs(internip.sin_port));
+	{ struct ast_ha *a;
+	  const char *prefix = "Localnet:";
+	  char buf[INET_ADDRSTRLEN]; /* need to print two addresses */
+
+	  for (a = localaddr; a ; a = a->next) {
+		ast_cli(fd, "  %-24s%s/%s\n",
+			prefix,
+			ast_inet_ntoa(a->netaddr),
+			inet_ntop(AF_INET, &a->netmask, buf, sizeof(buf)) );
+		prefix = "";
+	  }
+	}
 	ast_cli(fd, "  Stun server:            %s:%d\n", ast_inet_ntoa(stunaddr.sin_addr), ntohs(stunaddr.sin_port));
 
 	ast_cli(fd, "\nGlobal Signalling Settings:\n");




More information about the asterisk-commits mailing list