Johannes,
On 11/24/2010 05:19 AM, Johannes Wagner-Meingassner wrote:
I have to remove the Transparent Codec in the INVITE-Message to a dedicated SIP-Client, because the Client can not work with it. What do you think is the best methode to do this?
While the motive is understandable, this is a bad idea. Proxies are supposed to relay messages, not modify them. There are certain fields of a message (for example, the Request URI in an initial request) that they can modify, and they can add additional headers, but in general, that is not their purpose an.d their modification capabilities are formally very restricted. It is fundamentally contrary to the purpose of a proxy in every way to do something like modify the SDP body.
On a practical level, the problem with modifying the SDP offer is that without stateful reversion applied to every answer sent (rather in the way that uac_replace_from() and 'topoh' work for other data), the sender of the offer is fully entitled to refuse an answer whose content does not reflect the original offer sent (since modifying SDP on the proxy would be opaque to the sender).
You really need to use a B2BUA for something like this.