Hi,

I have an application that uses an RTPproxy and needs to modify both the incoming and the outgoing SDPs. Up to 1.4.x, I could do it by overloading AmSession::negotiate(). In 1.5, we have a much cleaner way to modify the outgoing SDP, the getSdpOffer(), getSdpAnswer() hooks, and a last chance before setting up the media stream in onSdpCompleted().
Observation 1,
The argument naming in this function is misleading: the
onSdpCompleted(const AmSdp& offer, const AmSdp& answer) implies that the first parameter is the offer and the latter is the answer, but that's only true in case of an incoming invite that has SDP. It is called from AmSipDialog: onSdpCompleted(oa.getLocalSdp(), oa.getRemoteSdp()), so we can see that "offer" should be "local" and "answer" should be "remote".

Observation 2,
Since the remote SDP is generated in a way that exposes no point to intervene to the plugins, this has to be done after the fact, in onSdpCompleted(), but there the arguments are const, so I must make a copy and modify that. After inspecting the code, I see no risk making the arguments of the onSdpCompleted() not const (of course that means AmOfferAnswer::getRemoteSdp() and AmOfferAnswer::getLocalSdp() should also return not const).

Any toughts?

Thank you

br

Szo
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to