If I set the default timeout for an INVITE in tm using:
modparam("tm", "fr_inv_timer", 35)
modparam("tm", "fr_inv_timer_avp", "$avp(s:invite_timeout)")
and then I overwrite it in the script using a per subscriber specified value that was previously read from the subscriber database:
$avp(s:invite_timeout) := $avp(s:user_timeout);
Then all works well if user_timeout < 35. In this case I get the call to timeout at the value specified by the user.
However if user_timeout > 35, then it is not respected and the call does timeout at 35 seconds, ignoring the user timeout.