Hi Marc,
yes you get it right :)...indeed there was a c`n`p error in my example..
has_body() function can be easyly done in textops modules...maybe in the
future we can extended to has_body(type)....I will take care of this.
the flags from request are inherited by replies of the same transaction....
regards,
bogdan
Marc Haisenko wrote:
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
_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel