Hi Joachim,

apply the attached tm.patch - it's trivial change that will synchronize the execution of on_reply route. And it will be safe to use avpops functions in on_reply routes. Note that you have to change the module interface of AVPOPS and add the ONREPLY_ROUTE flag.

regards,
bogdan

PS: if you get a coredump, I'm free of any responsibilities :D

Joachim Fabini wrote:

Hi Bogdan,

the reason haven't changed: avps doesn't work in on_reply route since the avp belong to a transaction and the on_reply route execution is not synchronized and may be done in parallel for same transaction.

For the moment there is no solution to this - synchronizing the on_reply routes will be quite ugly :-/

Do you see another - even proprietary - very-short-term-workaround that can provide this functionality (storing avps within onreply_route in the database that can be later on accessed from the route block using avp-ops) without extra module coding? Ugly is not important at all if it works. After all it's just about prototyping, the final code should be clean... ;))

But what will be done (there was a discussion with Juha on this topic) is to add global avps which not being bound to a transaction can be used inside on_reply route. I guess this will solve your problem....

Definitely. That's also conceptually closer to what Service-Route
is supposed to do - it's valid for the lifetime of a registration
(although it might be changed by re-registrations) and not just
for one transaction. Any estimate when this will be available?

Thanks for your help,
regards
--Joachim



Index: modules/tm/t_reply.c
===================================================================
RCS file: /cvsroot/openser/sip-server/modules/tm/t_reply.c,v
retrieving revision 1.16
diff -u -r1.16 t_reply.c
--- modules/tm/t_reply.c        18 Oct 2005 17:42:16 -0000      1.16
+++ modules/tm/t_reply.c        19 Oct 2005 14:56:34 -0000
@@ -1228,6 +1228,9 @@
                                is_local(t)?"yes":"no");
        }
 
+       /* lock the reply*/
+       LOCK_REPLIES( t );
+
        /* processing of on_reply block */
        if (t->on_reply) {
                /* transfer transaction flag to branch context */
@@ -1249,8 +1252,8 @@
                set_avp_list( backup_list );
        }
 
-       /* lock the reply*/
-       LOCK_REPLIES( t );
+       /* lock the reply
+       LOCK_REPLIES( t );*/
        /* mark that the UAC received replies */
        uac->flags |= T_UAC_HAS_RECV_REPLY;
 
_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to