[Kamailio-Devel] drop in onreply_route

Daniel-Constantin Mierla miconda at gmail.com
Fri Oct 31 14:21:36 CET 2008



On 10/31/08 14:42, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>  > I just committed to trunk an update that drop() will stop the execution 
>  > of any reply processing if called in default onreply_route.
>
> default onreply route is executed for all replies.  what kind of
> performance penalty results when i add it and execute t_check_trans() test
> in it?
>   
practically close to none, that's because some internals of tm that make 
such code run anyhow.

When tm is loaded it registers a function that is executed for each 
reply (even no onreply_route is there, it needs to update transaction 
state). The code to detect if there is a corresponding transaction is 
the same there as in t_check_trans() now. I added some extra attributes 
so subsequent calls of this code returns quickly if transaction was found.
>  > Do you think should be extended for the onreply_routes executed by tm 
>  > upon t_on_reply()?
>
> other onreply routes are executed when they are explicitly set by
> t_onreply function call.  currently i don't have a need to drop such
> replies.
>
> by the way, is default onreply route executed before or after other
> onreply route set by t_onreply call?
>   
default onreply_route is executed before tm onreply routes, so if you 
drop it in default onreply_route then no TM execution happens.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list