[Kamailio-Users] drop in branch/onsend-route in kam-3.0

Iñaki Baz Castillo ibc at aliax.net
Thu Apr 8 14:52:15 CEST 2010


2010/4/8 Andreas Granig <agranig at sipwise.com>:
> Hi,
>
> Looks like behavior of drop has changed in Kamailio 3.0. Before, I was able
> to drop() a specific branch in branch_route depending on various checks.
> http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.0.x#drop still
> says this is possible,
> http://kamailio.org/docs/modules/3.0.x/modules/tm.html#t_on_branch says it's
> not possible.
>
> So calling drop() in branch_route has no effect, and I have no idea how to
> mark a branch in branch_route to be dropped in onsend_route, because
> checking a bflag doesn't work there, and neither does checking $rU.

Neither checking $rU? do you mean that checking $rU in branch_route is
not valid in 3.0?


> Any ideas on how to accomplish dropping a specific branch?

If you use it to drop requests going to "unsafe" destinations (like
when a REGISTER contains a spoofed "Contact" URI pointing to a gw or
the proxy itself) then I recommend using blcklist for this purpose.
This is, you set the list of IP's for gateways and proxies (forbidden
addresses into a registration Contact) and enable such blacklist after
doing lookup. If a branch tries to go to one of these addresses it
will be dropped by t_relay (and will return certain code I don't
remember now).
I use it and works well.


-- 
Iñaki Baz Castillo
<ibc at aliax.net>




More information about the sr-users mailing list