[asterisk-commits] oej: trunk r54348 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 14 08:27:50 MST 2007


Author: oej
Date: Wed Feb 14 09:27:49 2007
New Revision: 54348

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54348
Log:
Add port number to SIPPEER dialplan function

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=54348&r1=54347&r2=54348
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Feb 14 09:27:49 2007
@@ -11696,6 +11696,8 @@
 
 	if (!strcasecmp(colname, "ip")) {
 		ast_copy_string(buf, peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "", len);
+	} else  if (!strcasecmp(colname, "port")) {
+		snprintf(buf, len, "%d", ntohs(peer->addr.sin_port));
 	} else  if (!strcasecmp(colname, "status")) {
 		peer_status(peer, buf, len);
 	} else  if (!strcasecmp(colname, "language")) {
@@ -11749,6 +11751,7 @@
 	.read = function_sippeer,
 	.desc = "Valid items are:\n"
 	"- ip (default)          The IP address.\n"
+	"- port                  The port number\n"
 	"- mailbox               The configured mailbox.\n"
 	"- context               The configured context.\n"
 	"- expire                The epoch time of the next expire.\n"



More information about the asterisk-commits mailing list