Yes, you need to append a new branch to initiate a new transaction. Your best bet, however, is to use lcr module and the q-value to serialize the contacts. LCR is in CVS head and in the experimental module for 0.9.x. g-) ----- Original Message ----- From: "Tim Klein" tkpublic@timklein.fastmail.fm To: serusers@lists.iptel.org Sent: Tuesday, November 22, 2005 2:39 AM Subject: [Serusers] How to do a large number of relay attempts?
Imagine I have 50 salespeople, and I know the URIs of all of their phones. When an INVITE comes in to SER, I want to keep trying to forward it to the salespeople, one at a time (in series, not in parallel), forever or until one of them accepts the call. (I randomize the order.)
QUESTION 1: At first, I tried rewriting the Request URI in a failure route each time t_relay() returned failure, and then calling t_relay() again. But t_relay() doesn't work that way -- when used in a failure route, it requires you to append a branch, and apparently ignores any changes in the Request URI after the failure happens.
OK, so in my failure route, I'll append a branch instead of rewriting the Request URI. But the default value of MAX_BRANCHES in config.h is only 12. I think this means I can never try to relay to more than 13 salespeople -- the first t_relay() call, plus 12 t_relay() calls in failure routes. Is this correct?
QUESTION 2: OK, so I'll make the value of MAX_BRANCHES greater than 12. But I see in modules/tm/tm.c that MAX_BRANCHES cannot be given a value greater than 31, since each branch occupies one bit in a 32-bit bitmap. So how can I do 50 stateful relays? Or, for that matter, an indefinite number?
Thank you for any help!
Tim
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers