How to get media information?

I need to get the media details through extentions.conf or through CLI on live call
The details I need are:

  1. The RTP port that the asterisk allocate for a specific call (both legs)
  2. the client public RTP port (assuming it’s behind NAT’)

in other words While in a call in need to know the excact ip and port of thr RTP session of both caller and called legs


AFAIK the only way to get that is in an RTP debug. You can try offering a bounty to have those options put into a pre defined variable for Asterisk.