[OpenSIPS-Users] Absorbing retransmissions

Alex Massover alex at jajah.com
Fri Oct 10 12:40:33 CEST 2008


Hi!

I want to explicitly absorb retransmissions of INVITE, before it reach t_relay(). I need this because I have I run a very heavy custom authentication on INVITE before it goes to t_relay().

if(method=="INVITE")
            {
                        if(!perl_exec("very_heavy_auth"))
                                    { sl_reply("403"); }
                        ...
                        ...
                        ...
                        t_relay();
            }

I want to absorb retransmission before my perl_exec, 1) in order not to run it multiple times, it's very heavy, 2) if "very_heavy_auth" misbehaves it can break the call logic, I can answer to the callee with 403 for one retransmission, but to successfully forward another retransmission further.

Here's my idea:
if(method=="INVITE")
            {
                        if (!t_check_trans())
                                    { t_new_trans(); }
                                    else
                                    { drop(); }
                        if(!perl_exec("very_heavy_auth"))
                                    { sl_reply("403"); }
                        ...
                        ...
                        ...
                        t_relay();
            }

Is it a good idea to absorb retransmissions with t_check_trans() and t_new_trans()?



--
Best Regards,
Alex Massover





******************************************************************************

 This footnote confirms that this email message has been scanned by Jajah Inc. Mail system for the presence of malicious code, vandals & computer viruses.

******************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081010/e1f7cdd2/attachment.htm 


More information about the Users mailing list