[Devel] Improving force_rtp_proxy

Marc Haisenko haisenko at comdasys.com
Fri Mar 3 17:49:57 CET 2006


On Friday 03 March 2006 17:29, you wrote:
> Hi Marc,
>
> just to bring the topic on the focus...
>
> I was thinking of a compromise solution between autodetection (which has
> performance penalties - multiple rtpproxy command per message) and
> configurable (to be performat and flexible, but still easy to use).
>
> Here is my idea:
>
> force_rtp_proxy() will accept a new flag "s" - swap creation with
> confirmation (default : requests create and replies confirm).

>
> As scripting:
>
> route {
>     .....
>     if (ACK and has_body() )
>        force_rtp_proxy("s");
>     if (INVITE) {
>        if (has_body())
>            force_rtp_proxy();
>        else
>             force_rtp_proxy();
>     .....
> }

Did you mean this instead:
    if (INVITE) {
       if (has_body())
           force_rtp_proxy();
       else
           setflag(x)
    }

> on_reply{
>     if (isflagset(x))
>         force_rtp_proxy("s");
>     else
>         force_rtp_proxy();
> }
>
>
> and that's all... If we agree on a solution, I would like to have this
> fixed on CVS ASAP.

Hmmm... so let me rephrase to check whether I've understood what you want to 
do:

INVITE/SDP + OK/SDP + ACK:
We see an INVITE with SDP and call force_rtp_proxy just normal and do NOT set 
a flag. In on_reply we test for that flag, don't have it set and again call 
force_rtp_proxy the normal way.

INVITE + OK/SDP + ACK/SDP:
We see an INVITE without SDP and set a flag and DON'T call force_rtp_proxy 
(there's no reason to, is there ?). In on_reply we see that the flag is set 
and call force_rtp_proxy with "s". If an ACK has SDP we always call 
force_rtp_proxy with "s".

I didn't know I can set a flag which can be passed to the reply (how is the 
REQUEST/REPLY touple called ?). This would indeed be a nice way to fix this 
problem as it would be quite fast and reliable.

So I would have to:

- implement a new function "has_sdp_body" (is there already one ? after all I 
know INVITE/OK/ACK can all have different bodies than SDP, right ?)
- introduce a new flag (can you give me an example where flags are used so I 
can see how to add a new one and how to use them ?)
- introduce a new option "s" to force_rtp_proxy with simply reverts the 
"create" variable in force_rtp_proxy2_f

Did I miss something ?


Problem is that I can't currently test/debug that stuff. Some time next week 
we will get equipment with which we have that issue and I can then test and 
fix the problem.

C'ya,
	Marc

-- 
Marc Haisenko
Comdasys AG

Rüdesheimer Straße 7
D-80686 München
Tel:   +49 (0)89 - 548 43 33 0
Fax:   +49 (0)89 - 548 43 33 29
e-mail: haisenko at comdasys.com
http://www.comdasys.com



More information about the Devel mailing list