I'm trying to obtain the port of the audio media of SDP headers. I am currently using JnetPcap to catch traffic.
I am obtaining the Media value from the SDP headers like so:
sdp.getAVP(Sdp.Fields.Media.name());
(I know this is not the prettiest way, I have already asked for better alternatives here.)
This does the job. Except for voice calls. When a call has video enabled the SDP header contains 2 Media values, audio and video. The problem is that the getAVP() method always only returns the video value.
How do I obtain the audio port?