[asterisk-users] SIP and RTP port and IP addresses

Ethy H. Brito ethy.brito at inexo.com.br
Thu Nov 10 07:15:31 CST 2016

On Thu, 10 Nov 2016 00:35:54 +0100
Max Grobecker <max.grobecker at ml.grobecker.info> wrote:

> Hi Ethy,

Hi Max and All. 

> Am 09.11.2016 um 17:13 schrieb Ethy H. Brito:
> > How are these parameters available from dialplan?
> > 
> > For instance, ${SIPURI} holds the internal "IP:port" if the client is
> > behind NAT. I need the external IP:port  
> You can get the peer's signalling IP address from ${CHANNEL(recvip)} and the
> RTP address with ${CHANNEL(rtpsource)} resp. ${CHANNEL(rtpdest)}. If you need
> more information (like the codecs used) you can find other channel variables
> on https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL


${CHANNEL(rtpsource)} is always returning something like "" where

and ${CHANNEL(rtpdest)} returns the internal (not accessible) IP addr if the
caller is behind NAT, therefore, not what I need.

Wouldn't these two variables have correct values only after the callee answers
the call??

> Please note that, if you have not disabled re-invites, the RTP address may
> change while the call is running.

Interesting observation.



More information about the asterisk-users mailing list