[asterisk-commits] mmichelson: trunk r419970 - /trunk/channels/sip/dialplan_functions.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 4 15:25:19 CDT 2014
Author: mmichelson
Date: Mon Aug 4 15:25:16 2014
New Revision: 419970
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419970
Log:
Add the ability to retrieve the source port of a SIP call.
This adds the ability to call CHANNEL(recvport) on chan_sip
channels to see the port on which an INVITE was received.
ASTERISK-24040 #close
Reported by dtryba
Patches:
dialplan_functions.patch uploaded by dtryba (License #6628)
Review: https://reviewboard.asterisk.org/r/3781
Modified:
trunk/channels/sip/dialplan_functions.c
Modified: trunk/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sip/dialplan_functions.c?view=diff&rev=419970&r1=419969&r2=419970
==============================================================================
--- trunk/channels/sip/dialplan_functions.c (original)
+++ trunk/channels/sip/dialplan_functions.c Mon Aug 4 15:25:16 2014
@@ -76,6 +76,8 @@
ast_copy_string(buf, ast_sockaddr_isnull(&p->sa) ? "" : ast_sockaddr_stringify_addr(&p->sa), buflen);
} else if (!strcasecmp(args.param, "recvip")) {
ast_copy_string(buf, ast_sockaddr_isnull(&p->recv) ? "" : ast_sockaddr_stringify_addr(&p->recv), buflen);
+ } else if (!strcasecmp(args.param, "recvport")) {
+ ast_copy_string(buf, ast_sockaddr_isnull(&p->recv) ? "" : ast_sockaddr_stringify_port(&p->recv), buflen);
} else if (!strcasecmp(args.param, "from")) {
ast_copy_string(buf, p->from, buflen);
} else if (!strcasecmp(args.param, "uri")) {
More information about the asterisk-commits
mailing list