[Devel] [PATCH] has_sdp_body

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 16 17:19:06 CET 2006


Hi Marc,

thanks for the patch - I guess the proper place for the function will be 
textops module than mangler...

I will shortly integrate it on the development branch.

regards,
bogdan


Marc Haisenko wrote:

>Hi folks,
>as follow-up to the discussion with force_rtp_proxy and SDP-less INVITES I now 
>provide a patch to add a function "has_sdp_body()" which does what the name 
>suggests: it returns true if the SIP message contains a body of type 
>"application/sdp".
>
>I've seen that in the development version force_rtp_proxy already has a "s" 
>flag to switch lookup/register... I've also written a patch to do so and only 
>just noticed you guys already fixed that :-) (unfortunately I can't use 
>Sourceforge's CVS viewer for some reason so I only know there's a "s" flag 
>from the docs)
>
>The patch is against OpenSER 1.0.1
>
>So together with the "s" flag and this method we now can correctly handle the 
>INVITE/SDP + OK/SDP + ACK as well as the INVITE + OK/SDP + ACK/SDP cases:
>
>route block:
>------------
>
>if (method == INVITE) {
>	if (has_sdp_body ()) {
>		force_rtp_proxy ();
>	} else {
>		setflag (1);
>	}
>} else if ((method == ACK) && (has_sdp_body ())) {
>	force_rtp_proxy ("s");
>}
>
>onreply block:
>--------------
>
>if ((method == OK) && (has_sdp_body ()) {
>	if (isflagset (1)) {
>		force_rtp_proxy ("s");
>	} else {
>		force_rtp_proxy ();
>	}
>}
>
>We tested this (with our own force_rtp_proxy "s" patch) and it seems work.
>C'ya,
>	Marc
>  
>




More information about the Devel mailing list