<div dir="ltr">Hi,<div>I'm not sure I fully understand the problem. See my comments inline</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 2:24 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
tsilo is not using the uri parameter for looking up location for new<br>
destinations. It passes the uas request from transaction module to<br>
registrar lookup_to_dset() function, so the r-uri from that request is used.<br>
<br>
However, there is at least one scenario that makes tsilo not working<br>
properly:<br>
<br>
- invite comes in<br>
- lookup location finds a contact<br>
- request is forwarded with a new r-uri (the contact of the location<br>
record) -- t_relay() is used and trasaction created, r-uri stored for<br>
uas is contact header<br>
- a new registration comes and ts_append() is executed, failing to find<br>
contacts for r-uri in uas because the r-uri there can be anything<br>
pointing to the first device found in location<br></blockquote><div><br></div><div>This happens because since commit <span style="color:rgb(178,104,24);font-family:monospace">1e5bad019c450a003e812ee051d84134aad6c5f0, </span>we are using the current uri to store the transaction. </div><div>That's why I was wondering (probably I have not been clear in my other mail :)) if, since now ts_store accepts uris as parameter, we still need this.</div><div>In this case, the scenario you describe would work flawlessly and, if one need to store the transaction under a new ruri after some kind of message manipulation (like using alias etc) he can always call ts_store with the specific uri he wants to use.</div><div>Am I missing something?</div>



<div><span style="font-family:monospace"><br></span></div><div> Some solutions can be found by creating transaction earlier, but not</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
easy to tackle always.<br>
<br>
I think it would be better to just pass the uri parameter from<br>
ts_append() to lookup_to_dset(). But I noticed that the uri can be just<br>
username if use_domain is 0, which makes things a little more complex,<br>
because registrar/usrloc expect full sip uri.<br>
<br>
The solution would be to 'force' always that the uri parameters for<br>
tsilo functions are full SIP uri, and let the code extract only username<br>
when use_domain is 0. If someone has only the username in config, it can<br>
simply put the uri parameter as "sip:username@localhost" -- domain will<br>
be ignored anyhow.<br>
<br></blockquote><div><br></div><div> Agree that this could avoid future headaches and provide more flexibility for other use cases. In this case, should we totally remove the dependency on usrloc "use_domain" parameter?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Alternative, if the parameter is just username, built a temporary uri<br>
for it before passing to lookup_to_dset().<br>
<br>
I find first solution a bit better because the parameter for tsilo<br>
functions is called uri and building an internal one can end up in some<br>
limitations if it is going to be something that requires tel: or sips:<br>
or parameters such as instance.<br>
<br></blockquote><div><br></div><div>Agree.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Any comments/suggestions?<br>
<br>
Cheers,<br>
Daniel<br><br></blockquote><div><br></div><div>Cheers,</div><div><br></div><div>Federico </div></div><br></div></div>