Daniel-Constantin Mierla writes:
Also, maybe @juha-h can comment on this issue, being the initial developer of these functions, to see what is the expected behaviour and if there is an unwanted change in the last version.
Version of tm README before mode param was added tells what the expected behavior of t_load_contacts() is:
Function t_load_contacts() removes all branches from the current destination set and stores them into the XAVP whose name is configured with the parameter contacts_avp. ... If the current destination set contains more than one branch, the function sorts them according to increasing value of the q parameter and then stores the branches in reverse order into the XAVP.
The q parameter of a branch contains a value from range 0-1.0 and it expresses relative preference of the branch among all branches in the destination set. The higher the q value the more preference the user agent gave to the branch. Branches with higher q values will be tried before branches with lower ones when serial forking takes place.
If the behavior is not that anymore, there is a bug that needs to be fixed.