El Domingo 07 Marzo 2010, Alex Balashov escribió:
You might be able to use a branch route ...
No, branch_route is not execed when t_relay() fails. In case a TCP connection is broken t_relay() returns an error ($rc is negative) and no branch_route is entered.
On 03/07/2010 01:09 PM, Iñaki Baz Castillo wrote:
Hi, imagine this case:
bob is registered from multiple locations: a) a responding UDP/TCP location b) a non responding TCP location (it crashed)
alice calls bob
Kamailio gets both branches from location table and runs t_relay().
t_relay() replies "true" as location a) is responding.
However in this case it would be useful to realize that the second location (unreachable TCP location) doesn't work, and being TCP it's safe to remove it from location table.
AFAIK (correct me if I'm wrong) there is some script function to remove user locations, but there is no way to use it in the example above (am I wrong?).
As a suggestion, there could be a usrloc option to remove TCP contacts from location table when t_relay() fails, perhaps in conjunction with some new flag for t_relay() function.
Is there any better aproach for this purpose?