[sr-dev] exit vs drop

Miklos Tirpak miklos at iptel.org
Wed Jul 1 14:46:24 CEST 2009


On 07/01/2009 02:25 PM, Juha Heinanen wrote:
> Miklos Tirpak writes:
> 
>  > Anyway, I think your particular problem can be solved with the 
>  > on_sl_reply modparam:
>  > 
>  > modparam(tm, on_sl_reply, "stateless_reply");
>  > 
>  > onreply_route["stateless_reply"]
>  > {
>  >      # This route is executes if tm module does not find
>  >      # the transaction for the reply.
>  >      # If 0 is returned then the reply is not forwarded.
>  >      return 0;
>  > }
> 
> mikos,
> 
> do i need to call t_on_reply("stateless_reply") in order to activate
> this onreply route?  

No, you do not need to. tm module checks every incoming reply. If the 
transaction is not found for a reply and the above modparam is set then 
the route block, "stateless_reply" in my example, is executed. Depending 
on the return value of this route the processing continues or stops.
t_on_reply() has an effect only if tm module finds the associated 
transaction of the reply, so it is another case.

> 
> if so, it is not very practical, because i currently call 'drop' in
> default onreply_route, which is executed automatically for each reply.

I see, so you did it before tm module saw the reply. In fact both 
solutions wrap to the same function, t_check(), so you should get the 
same result.

Miklos

> 
> -- juha



More information about the sr-dev mailing list