[SR-Users] handle_ruri_alias() question or issue?

Joel Serrano joel at textplus.com
Sat Sep 1 16:42:57 CEST 2018


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 <swwilkins at mitre.org> wrote:

> Good Morning All,
>
>
>
> The following Incoming request came in =>
>
> SIP Incoming Request: [[BYE sip:2406506175 at 20.20.20.20: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
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180901/a40dee1b/attachment.html>


More information about the sr-users mailing list