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

Max Grobecker max.grobecker at ml.grobecker.info
Wed Nov 9 17:35:54 CST 2016


Hi Ethy,


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

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



Max

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161110/743b1548/attachment.pgp>


More information about the asterisk-users mailing list