Hello,
On 03/11/15 05:31, Daniel W. Graham wrote:
Looking for some clarification / direction on setting up forking.
I have configured clients to use q-value and is stored in location
table. I see several examples as described in TM module documentation
but does not mention use of lookup() function.
Per registrar documentation-
lookup()
The functions extracts username from Request-URI and tries to find all
contacts for the username in usrloc. If there are no such contacts, -1
will be returned. If there are such contacts, Request-URI will be
overwritten with the contact that has the highest q value and
optionally the rest will be appended to the message (depending on
append_branches parameter value).
Append_branch parameter
The parameter controls how lookup function processes multiple
contacts. If there are multiple contacts for the given username in
usrloc and this parameter is set to 1, Request-URI will be overwritten
with the highest-q rated contact and the rest will be appended to
sip_msg structure and can be later used by tm for forking.
Does lookup() build the destination set and then I can proceed by
doing t_load_contacts(), t_next_contacts() and setup failure route?
Any direction is appreciated!
Yes, lookup location builds the destination set with all available
contacts in location table. A t_relay() at that moment will do parallel
forking, ingnoring the q values. To do serial forking, use
t_load_contacts(), t_next_contacts() and failure_route.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio -
http://www.asipto.com
Kamailio Advanced Training, Nov 30-Dec 2, Berlin -
http://asipto.com/kat