[asterisk-commits] oej: branch group/pine-multiple-externip-1.4 r312555 - /team/group/pine-multi...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 4 07:22:17 CDT 2011
Author: oej
Date: Mon Apr 4 07:21:58 2011
New Revision: 312555
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=312555
Log:
Publish extern IP in "sip show peer"
Modified:
team/group/pine-multiple-externip-1.4/channels/chan_sip.c
Modified: team/group/pine-multiple-externip-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pine-multiple-externip-1.4/channels/chan_sip.c?view=diff&rev=312555&r1=312554&r2=312555
==============================================================================
--- team/group/pine-multiple-externip-1.4/channels/chan_sip.c (original)
+++ team/group/pine-multiple-externip-1.4/channels/chan_sip.c Mon Apr 4 07:21:58 2011
@@ -11800,6 +11800,7 @@
ast_cli(fd, " DTMFmode : %s\n", dtmfmode2str(ast_test_flag(&peer->flags[0], SIP_DTMF)));
ast_cli(fd, " LastMsg : %d\n", peer->lastmsg);
ast_cli(fd, " ToHost : %s\n", peer->tohost);
+ ast_cli(fd, " ExternIP : %s\n", peer->externip.sin_addr.s_addr ? ast_inet_ntoa(peer->externip.sin_addr) : "(Unspecified)");
ast_cli(fd, " Addr->IP : %s Port %d\n", peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "(Unspecified)", ntohs(peer->addr.sin_port));
ast_cli(fd, " Defaddr->IP : %s Port %d\n", ast_inet_ntoa(peer->defaddr.sin_addr), ntohs(peer->defaddr.sin_port));
if (!ast_strlen_zero(global_regcontext))
@@ -11880,6 +11881,7 @@
astman_append(s, "SIP-DTMFmode: %s\r\n", dtmfmode2str(ast_test_flag(&peer->flags[0], SIP_DTMF)));
astman_append(s, "SIPLastMsg: %d\r\n", peer->lastmsg);
astman_append(s, "ToHost: %s\r\n", peer->tohost);
+ astman_append(s, "Extern-IP: %s\r\n", peer->externip.sin_addr.s_addr ? ast_inet_ntoa(peer->externip.sin_addr) : "");
astman_append(s, "Address-IP: %s\r\nAddress-Port: %d\r\n", peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "", ntohs(peer->addr.sin_port));
astman_append(s, "Default-addr-IP: %s\r\nDefault-addr-port: %d\r\n", ast_inet_ntoa(peer->defaddr.sin_addr), ntohs(peer->defaddr.sin_port));
astman_append(s, "Default-Username: %s\r\n", peer->username);
More information about the asterisk-commits
mailing list