<div dir="ltr"><div dir="ltr">Hi Daniel,<div><br></div><div>Thanks for this, much appreciated. Was worried this approach was too much of a hack and not the right approach - but knowing someone else has gone this way gives me confidence it's a reasonable solution. Will try this out tomorrow.</div><div><br></div><div>Thank you.</div><div><br></div><div>Rhys.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2019 at 10:32 PM Daniel Tryba <<a href="mailto:d.tryba@pocos.nl">d.tryba@pocos.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, May 15, 2019 at 09:38:29PM +1000, Rhys Hanrahan wrote:<br>
> Just to add I've also tried adding multiple alias= definitions, but have<br>
> the same issue - kamailio says "user@fqdn" not found in usrloc when doing<br>
> lookup(). Maybe I need to modify my lookup() call to use a hardcoded URI?<br>
> But I haven't seen any examples where this was required for multidomain<br>
> setups.<br>
> <br>
> Would really appreciate some guidance as I'm quite stuck on this.<br>
<br>
That is what I do. <br>
<br>
You can use the 3rd parameter to save()<br>
<a href="https://www.kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.f.save" rel="noreferrer" target="_blank">https://www.kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.f.save</a><br>
to harmonize on save:<br>
save("location","0x00","sip:$au@you.domain.tld")<br>
<br>
For REGISTERs and INVITEs you can check for specific allowed $rd and<br>
rewrite $rd to whatever you use for save().<br>
<br>
if(is_method("INVITE|REGISTER"))<br>
{<br>
 if($rd=="foo" || $rd=="bar")<br>
 {<br>
  $rd="foo";<br>
 }<br>
}<br>
else<br>
{<br>
 send_reply("503","you got the wrong server");<br>
}<br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>