<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">We have a situation where we get a redirect from a carrier with a list of carriers to send the transaction to in the contact header. None of the carriers in the contact header have q values assigned. <div class=""><br class=""></div><div class="">We have implemented our redirect handling logic using the UAC_REDIRECT module (get_redirects()) with help from TM module (t-load_contacts(), t_next_contact()). (failure_route code is at bottom of this note)</div><div class=""><br class=""></div><div class="">We find that when we receive a contact header with q values, we can launch requests serially using t_next_contact() and individually work through the contact list until we get a positive response. When we get a redirect with no q values in the contact header we find that all contacts get loaded and launched in parallel.</div><div class=""><br class=""></div><div class="">Although not stated in the documentation, it appears that in order to implement serial contact redirect handling, q values must be present in the contact header. Based on this assumption, and knowing that the redirecting carrier cannot include q values, we have attempted to modify the contact header and find that we are unable to add q values to the contact header.</div><div class=""><br class=""></div><div class="">We have attempted without success to use remove_hf("Contact”) followed by append_hf("Contact: $(avp(contact)) \r\n”); where $(avp(contact)) is the avp where we have rewritten the contact header to include q values.</div><div class=""><br class=""></div><div class="">Any guidance on how to handle this issue is appreciated.</div><div class=""><br class=""></div><div class="">_________________________________________________________-</div><div class=""><br class=""></div><div class="">Our failure route code:</div><div class=""><div class="">        if (t_check_status("3[0-9][0-9]")) {</div><div class="">                xlog("L_INFO", "----> REDIRECT Contact Header --> $T_rpl($ct) --- Method $rm --- From $T_req($fu) --- To $T_req($tu) --- Destination $T_req($du) \n");</div><div class="">                get_redirects("*:*");</div><div class=""><br class=""></div><div class="">                if (!t_load_contacts()) {</div><div class="">                        xlog("L_INFO", "-t_load_contacts() FAILED /n");</div><div class="">                };</div><div class=""><br class=""></div><div class="">                        xlog("L_INFO", "####->LOAD CONTACT LIST $xavp(tm_contacts[0]=>uri) \n");</div><div class=""><br class=""></div><div class="">                if (t_next_contacts()) {</div><div class="">                        xlog("L_INFO", "-t_next_contact() loaded successfully /n");</div><div class="">                        xlog("L_INFO", "####-> NEXT CONTACT LIST $xavp(tm_contacts[0]=>uri) \n");</div><div class="">                };</div><div class="">                t_on_failure("serial");</div><div class=""><br class=""></div><div class="">                if(t_relay()){</div><div class="">                    xlog("L_INFO","----->Relayed in MANAGE_FAILURE --- Method $rm --- Contact Header $ct \n");</div><div class="">                 };</div><div class="">                exit;</div><div class="">        } else {</div><div class="">                xlog("L_INFO","-----> NO REDIRECT --- Method $rm --- Contact Header $ct \n");</div><div class="">                exit;</div><div class="">        }</div><div class=""><br class=""></div><div class=""><div class="">failure_route["serial"] {</div><div class="">        xlog ("L_INFO", "Entered failure_route(serial) /n");</div><div class="">        if (t_check_status("3[0-9][0-9]")) {</div><div class="">                xlog("L_INFO", "----> DOUBLE REDIRECT Contact Header --> $T_rpl($ct) --- Method $rm --- From $T_req($fu) --- To $T_req($tu) --- Destination $T_req($du) \n");</div><div class="">                $xavp(tm_contacts[*]) = $null;</div><div class="">                xlog("L_INFO", "XXX-> tm_contacts reset to Null $xavp(tm_contacts[0]=>uri)\n");</div><div class=""><br class=""></div><div class="">                get_redirects("*:*");</div><div class=""><br class=""></div><div class="">                if (!t_load_contacts()) {</div><div class="">                        xlog("L_INFO", "-t_load_contacts() FAILED /n");</div><div class="">                };</div><div class=""><br class=""></div><div class="">                        xlog("L_INFO", "####-> LOAD 2 CONTACT LIST $xavp(tm_contacts[0]=>uri) \n");</div><div class=""><br class=""></div><div class="">        }</div><div class="">        if (!t_next_contacts()) {</div><div class="">                exit;</div><div class="">        }</div><div class=""><br class=""></div><div class="">        xlog("L_INFO", "-t_next_contact() loaded successfully /n");</div><div class="">        xlog("L_INFO", "####-> NEXT CONTACT LIST $xavp(tm_contacts[0]=>uri) \n");</div><div class=""><br class=""></div><div class="">        t_on_failure("serial");</div><div class="">        if(t_relay()){</div><div class="">            xlog("L_INFO","----->Relayed in failure_route(serial) --- Method $rm --- Contact Header $ct \n");</div><div class="">        };</div><div class="">}</div></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class="">Best Regards,<br class=""><br class=""> Mike Montgomery<br class=""> Principal, Trusted Technical Services, Inc.</div></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> o - 919 924 4703  x3000</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> m - 919 539 6133</div><br class="Apple-interchange-newline"><span><img apple-inline="yes" id="909CBA8C-89C8-460F-AC1D-C6333590E169" width="264" height="230" src="cid:BC8B0648-5B64-41EF-9233-30D8AFE38711@nc.rr.com" class=""></span>
</div>
<br class=""></div></body></html>