> On July 21, 2014, 6:31 p.m., Mark Michelson wrote:
> > /trunk/channels/sip/dialplan_functions.c, line 80
> > <https://reviewboard.asterisk.org/r/3781/diff/1/?file=63311#file63311line80>
> >
> >     There's an inline function in include/asterisk/netsock2.h called 
> > ast_sockaddr_stringify_port() that you can use in place of the 
> > ast_sockaddr_stringify_fmt() call.

Didn't spot that one. Updated patch, same results as expected.


- dtryba


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3781/#review12791
-----------------------------------------------------------


On July 22, 2014, 11:44 a.m., dtryba wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3781/
> -----------------------------------------------------------
> 
> (Updated July 22, 2014, 11:44 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24040
>     https://issues.asterisk.org/jira/browse/ASTERISK-24040
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Retrieve the source port of an incoming (chan_sip) SIP invite in the dialplan 
> with ${CHANNEL(recvport)}
> To complement ${CHANNEL(recvip)} and enable me to make dialplan decisions 
> based on source port (in a peerless setup, handle everything as guests using 
> AGI to lookup source ip/port for routing/handling).
> 
> pjsip appears to have this capability through the CHANNEL function 
> (pjsip,local_addr/remote_addr).
> 
> Simple 2 line patch using ast_sockaddr_stringify_fmt(const struct 
> ast_sockaddr *sa, int format)
> to return the port as a string.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/sip/dialplan_functions.c 418610 
> 
> Diff: https://reviewboard.asterisk.org/r/3781/diff/
> 
> 
> Testing
> -------
> 
> Tested on 11.10.2 (Debian Jessie) and trunk (418610) using IPv4. Having a few 
> SIP endpoints connect from different address/ports combinations 
> Logged ${CHANNEL(recvip)}:${CHANNEL(recvport)} corresponds with source 
> ip:port in packetdumps on the asterisk machine.
> 
> 
> Thanks,
> 
> dtryba
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to