<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello All,<div class=""><br class=""></div><div class="">We use registrar servers (call them A,B) for TLS connections from clients and a central routing proxy (P) that authenticates and manages all call routing.</div><div class=""><br class=""></div><div class="">On INVITE, P uses lookup(“location”) and handle_uri_alias() to route the INVITE to A or B depending on the AOR from REGISTER.</div><div class=""><br class=""></div><div class="">In failure_route I’m trying to send INVITE to a voicemail URI at host (V), using alias_db_lookup to retrieve it and sending with t_relay().  However, despite showing V as the host in the URI, the message is sent to A (or B) as if the handle_uri_alias is still in effect.</div><div class=""><br class=""></div><div class="">I’ve tried calling revert_uri() before the alias_db_lookup(), but this doesn’t seem to help.  Is there a way to reset the uri_alias?</div><div class=""><br class=""></div><div class="">The failure_route (simplified) looks like this:</div><div class=""><div class=""><font face="Courier" class="">failure_route[1] {</font></div><div class=""><font face="Courier" class="">        if (method == "INVITE") {</font></div><div class=""><span style="font-family: Courier;" class="">                revert_uri(); </span></div><div class=""><span style="font-family: Courier;" class="">                if (alias_db_lookup("dbaliases")) {</span></div><div class=""><span style="font-family: Courier;" class="">                        t_relay();</span></div><div class=""><font face="Courier" class="">                }</font></div><div class=""><span style="font-family: Courier;" class="">        }</span></div><div class=""><font face="Courier" class="">}</font></div></div><div class=""><br class=""></div><div class="">I have also tried using t_relay(“$rd”, “$rp”) after confirming (by logging) that the uri contains the desired values, but kamailio failed to start, with this error logged:</div><div class=""><font face="Courier" class=""><span class="Apple-tab-span" style="white-space:pre">      </span>ERROR: tm [tm.c:672]: fixup_hostport2proxy(): TM module:fixup_hostport2proxy: bad port number <$rp></font></div><div class=""><br class=""></div><div class="">Any suggestions?</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Dave.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>