[SR-Users] Using a single virtual domain in a multi-domain setup

Rhys Hanrahan rhys.hanrahan at gmail.com
Wed May 15 16:37:50 CEST 2019


Hi Daniel,

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.

Thank you.

Rhys.

On Wed, May 15, 2019 at 10:32 PM Daniel Tryba <d.tryba at pocos.nl> wrote:

> On Wed, May 15, 2019 at 09:38:29PM +1000, Rhys Hanrahan wrote:
> > Just to add I've also tried adding multiple alias= definitions, but have
> > the same issue - kamailio says "user at fqdn" not found in usrloc when
> doing
> > lookup(). Maybe I need to modify my lookup() call to use a hardcoded URI?
> > But I haven't seen any examples where this was required for multidomain
> > setups.
> >
> > Would really appreciate some guidance as I'm quite stuck on this.
>
> That is what I do.
>
> You can use the 3rd parameter to save()
>
> https://www.kamailio.org/docs/modules/5.2.x/modules/registrar.html#registrar.f.save
> to harmonize on save:
> save("location","0x00","sip:$au at you.domain.tld")
>
> For REGISTERs and INVITEs you can check for specific allowed $rd and
> rewrite $rd to whatever you use for save().
>
> if(is_method("INVITE|REGISTER"))
> {
>  if($rd=="foo" || $rd=="bar")
>  {
>   $rd="foo";
>  }
> }
> else
> {
>  send_reply("503","you got the wrong server");
> }
>
>
> _______________________________________________
> 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/20190516/37108100/attachment.html>


More information about the sr-users mailing list