The function lookup_to_dset() is a config command implemented inside the registrar module.
https://github.com/kamailio/kamailio/blob/351efd29d332703e79104a106ade08c9d1...
As you can see from the link above, It triggers w_lookup_to_dset() and it ends up calling lookup_helper() with the mode flag set to zero that causes lookup_helper() to not overwrite the request uri (and destination uri if it's the case).
For me it's worth documenting lookup_to_dset() inside modules/registrar/README file, this function it was very useful to me and I found out about it only digging into the code.
Thanks
Quite old function, somehow the docs were forgotten to be added. Fixed with the commit referenced above. Thanks!
Closed #2623.