<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    rls shouldn't do any dns query internally (I haven't really checked
    the code, but I don't see a reason for it) -- all dns things
    (including srv) are done at relaying time by core and tm module.<br>
    <br>
    On the other hand, kamailio needs to know what are the local domains
    (which domains are to be served by kamailio). This is done by doing
    reverse dns query on all IPs kamailio is listening on, and afaik,
    that cannot follow to dns srv.<br>
    <br>
    It the case that Kamailio has to server a domain that doesn't point
    via DNS A record to kamailio, then set that domain as value to
    'alias' global parameter. The alternative is using domain module
    with register_myself.<br>
    <br>
    Kamailio is used a lot in multi-domain scenarios, in most of the
    cases by using domain module.<br>
    <br>
    If it is not working with alias, then send here the relevant log
    messages to be able to spot what the problem is.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 22/08/14 11:21, Mihai Marin wrote:<br>
    </div>
    <blockquote
cite="mid:CACKuv4WZkrhz8Z+k=ZzTFZJuQ901r3vp4Pio25GXZHdwH7J25g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello Daniel,
        <div>Thank you for your answer. I managed to fix 20 minutes ago
          but the issue (I think) is in the RLS module. I had to
          add outbound_proxy and change the server_address parameters
          for the RLS to the real domain that ponts to kamailio.</div>
        <div><br>
        </div>
        <div>Previous (when this was not working) I had</div>
        <div>modparam("rls", "server_address", "<a
            moz-do-not-send="true" href="mailto:sip%3Arls@domain.com">sip:rls@domain.com</a>")<br>
        </div>
        <div>The fix was:</div>
        <div>modparam("rls", "server_address", "<a
            moz-do-not-send="true"
            href="mailto:sip%3Arls@sip.domain.com">sip:rls@sip.domain.com</a>")<br>
        </div>
        <div>modparam("rls", "outbound_proxy", "sip:<a
            moz-do-not-send="true" href="http://sip.domain.com">sip.domain.com</a>")<br>
        </div>
        <div><br>
        </div>
        <div>I'm like a beginner with this beautiful technology but I
          can't understand why this is happening. The RLS module checks
          for A record instead of SRV record in the DNS? </div>
        <div><br>
        </div>
        <div>As I mentioned in my previous e-mail, my DNS configuration
          for <a moz-do-not-send="true" href="http://domain.com">domain.com</a>
          is:</div>
        <div>A records:</div>
        <div>@  - > a web server ip</div>
        <div>sip - > kamailio's ip</div>
        <div>
          SRV records:</div>
        <div>_sip._<a moz-do-not-send="true"
            href="http://udp.domain.com">udp.domain.com</a> -> <a
            moz-do-not-send="true" href="http://sip.domain.com:5060">sip.domain.com:5060</a></div>
        <div><br>
        </div>
        <div>In my theory (what I understood) is that kamailio checks
          for the SRV record. So, to identify the IP, will follow the
          steps:</div>
        <div>1. check SRV record (_sip._<a moz-do-not-send="true"
            href="http://proto.domain.com">proto.domain.com</a>) for <a
            moz-do-not-send="true" href="http://domain.com">domain.com</a>
          ......<a moz-do-not-send="true"
            href="http://sip.domain.com:5060">sip.domain.com:5060</a></div>
        <div>2. check A record for sip.domain.com.......xx.xx.xx.xx</div>
        <div>3. send to xx.xx.xx.xx:5060</div>
        <div>In a multidomain scenario, all the domains should have the
          SRV record in DNS pointing to <a moz-do-not-send="true"
            href="http://sip.domain.com:5060">sip.domain.com:5060</a>.</div>
        <div><br>
        </div>
        <div>I can't see how this RLS could work with a multi-domain
          scenario. Is it correct? Do I misunderstand something in the
          theory?</div>
        <div><br>
        </div>
        <div>I hope I don't tell stupid things here.</div>
        <div><br>
        </div>
        <div>Thank you.</div>
        <div><br>
        </div>
        <div>Best regards,</div>
        <div>Mihai M</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Fri, Aug 22, 2014 at 10:38 AM, Daniel-Constantin Mierla <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
              <br>
              if you want to handle the <a moz-do-not-send="true"
                href="http://domain.com" target="_blank">domain.com</a>
              on the SIP server but the IP of that domain is pointing
              elsewhere, just add in kamailio.cfg:<br>
              <br>
              alias=<a moz-do-not-send="true" href="http://domain.com"
                target="_blank">domain.com</a><br>
              <br>
              An alternative is to use domain module (suitable when you
              have many domains and you want to store them in database).<br>
              <br>
              Cheers,<br>
              Daniel
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 21/08/14 19:06, Mihai Marin wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hello Sirs,
                      <div>The RLS module is eating my life. I just
                        managed to make it work 2 months ago and now is
                        not working anymore after I tried to put the
                        kamailio under domain (until now it was simple
                        ip).</div>
                      <div>I don't understand why is not working but I
                        saw a big difference that I don't understand:</div>
                      <div>My environment:</div>
                      <div>- the domain "<a moz-do-not-send="true"
                          href="http://domain.com" target="_blank">domain.com</a>"
                        is pointing to the web server</div>
                      <div>- kamailio is hosted under <a
                          moz-do-not-send="true"
                          href="http://sip.domain.com" target="_blank">sip.domain.com</a></div>
                      <div>- DNS has <a moz-do-not-send="true"
                          href="http://domain.com" target="_blank">domain.com</a>
                        A record for web server's ip, <a
                          moz-do-not-send="true"
                          href="http://sip.domain.com" target="_blank">sip.domain.com</a>
                        A record for kamailio's ip and SRV record for
                        _sip._<a moz-do-not-send="true"
                          href="http://tcp.domain.com" target="_blank">tcp.domain.com</a>
                        poting to sip.domain.dom</div>
                      <div>Problem:</div>
                      <div>kamailio presence is not working anymore and
                        I think, the error is:</div>
                      <div>grep_sock_info - checking if host==us: 11==14
                        && [<a moz-do-not-send="true"
                          href="http://domain.com" target="_blank">domain.com</a>]
                        == [xx.xx.xx.xx witch is the <a
                          moz-do-not-send="true"
                          href="http://sip.domain.com" target="_blank">sip.domain.com</a>
                        IP]</div>
                      <div><br>
                      </div>
                      <div>If, I change <a moz-do-not-send="true"
                          href="http://domain.com" target="_blank">domain.com</a>
                        in DNS to point on the same ip as <a
                          moz-do-not-send="true"
                          href="http://sip.domain.com" target="_blank">sip.domain.com</a>
                        RLS is working. This, I can't understand. Can
                        anyone explain me why is not working using this
                        configuration? Also, the RLS is working if i
                        change my domain to be <a
                          moz-do-not-send="true"
                          href="http://sip.domain.com" target="_blank">sip.domain.com</a>
                        (ex: <a moz-do-not-send="true"
                          href="mailto:sip%3Auser@sip.domain.com"
                          target="_blank">sip:user@sip.domain.com</a>).</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>Thank you.</div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>Best regards,</div>
                      <div>Mihai M</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
  </body>
</html>