On Feb 19, 2010 at 17:33, Min Wang <[email protected]> wrote: > Hi > > I have following scenario: > > u1---> p1 --> u2 > > u1 calling u2, u2 reply with 200 OK, > > The p1 need to check something, and decide to send ACK/Bye to u2, > and 488 to u1: > > onreply_route[1] > { > if (my_function_check("")) { > release_call_onreply(""); > } > > } > > The question is : How to do implement release_call_onreply correctly? > > The pseudo codes is like: > > t=tmb.t_gett(); > send_request(method_ACK); > send_request(method_BYE); > reason_code = 488 > tmb.t_reply(t->uas.request,reason_code,reason_text); > (Not sure if t_reply can be called here or not.)
> > The ACK/Bye is sent to U2, 488 is sent to U1, > > But the issue is it seems the original 200 OK is forwarded to U1 as > well. > > How to avoid it? You need either to DROP the reply (add drop in the script after your function), or use the generic onreply_route ( [0] or unnamed). Anyway you would need to modify t_reply, or it won't work from the onreply_route (at least not in sr 3.*). > > Or should the Data lumps function be used here to modify the 200 reply > msg instead of using t_reply here? No, you won't be able to change the reply code that way. Andrei _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
