I think you are mixing 2 different approaches of achieving the same: 1- Use: fix_nated_contact() --> Will *modify* the contact header and *replace* current ip:port with correct ip:port.
2- Use: set_contact_alias() in conjunction with handle_ruri_alias() --> set_contact_alias will *add an alias* with correct ip:port but will not *modify* the current ip:port sent by the UAC. handle_ruri_alias will search for an alias in the RURI and if found, it will remove it and *set $du accordingly*.You will not see the contact with correct ip:port in RURI but routing will be sent to correct ip:port ($du). This is a high level explanation, but I hope it helps you understand what is going on. If you print $du in the logs after calling handle_ruri_alias() you should see what you expect (if you previously called set_contact_alias)... Or you can call set_contact_alias on not call handle_ruri_alias. Two ways of doing the same. On Sat, Sep 1, 2018 at 04:47 Wilkins, Steve <[email protected]> wrote: > Good Morning All, > > > > The following Incoming request came in => > > SIP Incoming Request: [[BYE sip:[email protected]:5060; > *alias=10.10.10.5~55157*~2 SIP/2.0 > > > > I called *handle_ruri_alias(),* and expected the destination and port to > be set to *10.10.10.5:55157 <http://10.10.10.5:55157>*, but it was not. > > It was left 20.20.20.20:5060. > > > > Is my thinking correct or is there another way to set the destination and > port to the alias? > > > > Thanks All!, > > -Steve > _______________________________________________ > Kamailio (SER) - Users Mailing List > [email protected] > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
_______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
