[SR-Users] Dispatcher Usage and change of $rU

Daniel-Constantin Mierla miconda at gmail.com
Fri Apr 29 12:52:25 CEST 2022


dispatcher module does not touch To/From headers, so if the $tU/$fU are
changed, there are other actions in kamailio.cfg doing it.

dispatcher updates r-uri ($ru) if ds_select_domain() is used, by
changing the domain part ($actually rd, port and parameters).

When ds_select_dst() is used, r-uri ($ru, $rd, ...) is not touched at
all, only dst-uri is set ($du).

Use ds_select_dst() when you do not want to lose the r-uri content
(e.g., preserve incoming r-uri domain), but you want to set a particular
next hop address.

Cheers,
Daniel

On 29.04.22 11:58, Benoît Panizzon wrote:
>> There’s a typo here:
> Ignore, I only made that type in the email example.
>
> After some more google research I found another user describing a
> similar issue so I did some testing:
>
> ds_select_dst does RESET $rU and $tU but not $fU
>
> ds_select_domain does not RESET $rU or $tU.
>
> Doing:
>
> ds_select_dst("2000","6");
> $rU = "0012345";
> route(RELAY)
>
> setting $rU after calling ds_select_dst solved the issue I have.
>
> But I wonder, why this is resetting certain header. This is not clear
> from the documentation.
>
> I also wonder: When should one use ds_select_dst and when
> ds_select_domain ?
>
> Could ds_select_domain be safely used for any situation?
>
> -- 
> Mit freundlichen Grüssen
>
> -Benoît Panizzon- @ HomeOffice und normal erreichbar
> -- 
> I m p r o W a r e   A G    -    Leiter Commerce Kunden
> ______________________________________________________
>
> Zurlindenstrasse 29             Tel  +41 61 826 93 00
> CH-4133 Pratteln                Fax  +41 61 826 93 01
> Schweiz                         Web  http://www.imp.ch
> ______________________________________________________
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
  * https://www.asipto.com/sw/kamailio-advanced-training-online/




More information about the sr-users mailing list