[sr-dev] alias_contact()/handle_alias() ready for testing

Juha Heinanen jh at tutpro.com
Mon Nov 9 08:33:17 CET 2009


Iñaki Baz Castillo writes:

 > Really great, it looks very simple, correct and doesn't break
 > original Contact  URI.

inaki,

i went to walk and it occurred to me that alias_contact() should not be
called if request comes from another proxy, because it is that proxy's
job to do whatever it needs to to.  so the condition on calling
alias_contact() on initial requests is:

route [OTHER_REQUESTS] { # handle other initial requests than REGISTER
    
    if (!is_present_hf("Record-Route") && !alias_contact()) {
        xlog("L_ERR", "Error in aliasing contact <$ct>\n");
        send_reply("400", "Bad request");
        exit;
    };

same thing if reply to initial request comes from another proxy.  the
test could then be if the topmost rr header has been added by this
proxy, but i haven't had time yet to think how to implement the test.

and the same for in-dialog requests.

perhaps you have ideas here.

-- juha



More information about the sr-dev mailing list