I'm developing a program which must modify the sdp load of a SIP message. Right now, I create the sipstack, receive the packet, proccess the request, access the data, obtain the formats and decide which ones I want.
The problem begins when I want to modify the media information. I set the formats I want using media.setMediaFormats(valid);
When I print this, i have something like "m=audio "myport" RTP/AVP "myformats", so it seems to do it right.
After this, I try to set the media to the packet to send it to the server, but I don't get it. At the mediaDescription, I can modify the "m=" line, but the "a=" lines keep without changes, and I don't know how to do it. I've tried setMedia(media), and I've also tried to remove the "a=" attributes and after that add the new ones, but it doesn't work properly neither.
Any ideas?
I'm quite desperate right now.