When an audio channel has established, I need to know which RTP port Asterisk has decided to use for listening RTP packet from that channel.
I know that it is possible to open a "rtp debug" in the rasterisk window, but I need to detect that information by, for example, a variable in the Asterisk Manager or so on. I need to develop an AGI that uses this information (the port) so I need to read a variable or a log file but I can't parse the rtp debug.
Therefore my problem is: where can I find the RTP port Asterisk assigned to a particular channel (in the range rtpstart, rtpend configured in the rtp.conf file)?
Thanks very much in advance,