Discussion:
[SR-Users] switch kamailio to domain
Mihai Marin
2014-08-21 17:06:26 UTC
Permalink
Hello Sirs,
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).
I don't understand why is not working but I saw a big difference that I
don't understand:
My environment:
- the domain "domain.com" is pointing to the web server
- kamailio is hosted under sip.domain.com
- DNS has domain.com A record for web server's ip, sip.domain.com A record
for kamailio's ip and SRV record for _sip._tcp.domain.com poting to
sip.domain.dom
Problem:
kamailio presence is not working anymore and I think, the error is:
grep_sock_info - checking if host==us: 11==14 && [domain.com] ==
[xx.xx.xx.xx witch is the sip.domain.com IP]

If, I change domain.com in DNS to point on the same ip as sip.domain.com
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 sip.domain.com (ex: sip:user-CEVS5d6IUk84Q++***@public.gmane.org).


Thank you.


Best regards,
Mihai M
Daniel-Constantin Mierla
2014-08-22 07:38:09 UTC
Permalink
Hello,

if you want to handle the domain.com on the SIP server but the IP of
that domain is pointing elsewhere, just add in kamailio.cfg:

alias=domain.com

An alternative is to use domain module (suitable when you have many
domains and you want to store them in database).

Cheers,
Daniel
Post by Mihai Marin
Hello Sirs,
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).
I don't understand why is not working but I saw a big difference that
- the domain "domain.com <http://domain.com>" is pointing to the web
server
- kamailio is hosted under sip.domain.com <http://sip.domain.com>
- DNS has domain.com <http://domain.com> A record for web server's ip,
sip.domain.com <http://sip.domain.com> A record for kamailio's ip and
SRV record for _sip._tcp.domain.com <http://tcp.domain.com> poting to
sip.domain.dom
grep_sock_info - checking if host==us: 11==14 && [domain.com
<http://domain.com>] == [xx.xx.xx.xx witch is the sip.domain.com
<http://sip.domain.com> IP]
If, I change domain.com <http://domain.com> in DNS to point on the
same ip as sip.domain.com <http://sip.domain.com> 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
Thank you.
Best regards,
Mihai M
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Mihai Marin
2014-08-22 09:21:38 UTC
Permalink
Hello Daniel,
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.

Previous (when this was not working) I had
modparam("rls", "server_address", "sip:rls-9IKiO1iGCm/QT0dZR+***@public.gmane.org")
The fix was:
modparam("rls", "server_address", "sip:rls-CEVS5d6IUk84Q++***@public.gmane.org")
modparam("rls", "outbound_proxy", "sip:sip.domain.com")

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?

As I mentioned in my previous e-mail, my DNS configuration for domain.com
is:
A records:
@ - > a web server ip
sip - > kamailio's ip
SRV records:
_sip._udp.domain.com -> sip.domain.com:5060

In my theory (what I understood) is that kamailio checks for the SRV
record. So, to identify the IP, will follow the steps:
1. check SRV record (_sip._proto.domain.com) for domain.com ......
sip.domain.com:5060
2. check A record for sip.domain.com.......xx.xx.xx.xx
3. send to xx.xx.xx.xx:5060
In a multidomain scenario, all the domains should have the SRV record in
DNS pointing to sip.domain.com:5060.

I can't see how this RLS could work with a multi-domain scenario. Is it
correct? Do I misunderstand something in the theory?

I hope I don't tell stupid things here.

Thank you.

Best regards,
Mihai M


On Fri, Aug 22, 2014 at 10:38 AM, Daniel-Constantin Mierla <
Post by Daniel-Constantin Mierla
Hello,
if you want to handle the domain.com on the SIP server but the IP of that
alias=domain.com
An alternative is to use domain module (suitable when you have many
domains and you want to store them in database).
Cheers,
Daniel
Hello Sirs,
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).
I don't understand why is not working but I saw a big difference that I
- the domain "domain.com" is pointing to the web server
- kamailio is hosted under sip.domain.com
- DNS has domain.com A record for web server's ip, sip.domain.com A
record for kamailio's ip and SRV record for _sip._tcp.domain.com poting
to sip.domain.dom
grep_sock_info - checking if host==us: 11==14 && [domain.com] ==
[xx.xx.xx.xx witch is the sip.domain.com IP]
If, I change domain.com in DNS to point on the same ip as sip.domain.com
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
Thank you.
Best regards,
Mihai M
_______________________________________________
--
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Daniel-Constantin Mierla
2014-08-22 10:34:55 UTC
Permalink
Hello,

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.

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.

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.

Kamailio is used a lot in multi-domain scenarios, in most of the cases
by using domain module.

If it is not working with alias, then send here the relevant log
messages to be able to spot what the problem is.

Cheers,
Daniel
Post by Mihai Marin
Hello Daniel,
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.
Previous (when this was not working) I had
modparam("rls", "outbound_proxy", "sip:sip.domain.com
<http://sip.domain.com>")
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?
As I mentioned in my previous e-mail, my DNS configuration for
@ - > a web server ip
sip - > kamailio's ip
_sip._udp.domain.com <http://udp.domain.com> -> sip.domain.com:5060
<http://sip.domain.com:5060>
In my theory (what I understood) is that kamailio checks for the SRV
1. check SRV record (_sip._proto.domain.com <http://proto.domain.com>)
for domain.com <http://domain.com> ......sip.domain.com:5060
<http://sip.domain.com:5060>
2. check A record for sip.domain.com.......xx.xx.xx.xx
3. send to xx.xx.xx.xx:5060
In a multidomain scenario, all the domains should have the SRV record
in DNS pointing to sip.domain.com:5060 <http://sip.domain.com:5060>.
I can't see how this RLS could work with a multi-domain scenario. Is
it correct? Do I misunderstand something in the theory?
I hope I don't tell stupid things here.
Thank you.
Best regards,
Mihai M
On Fri, Aug 22, 2014 at 10:38 AM, Daniel-Constantin Mierla
Hello,
if you want to handle the domain.com <http://domain.com> on the
SIP server but the IP of that domain is pointing elsewhere, just
alias=domain.com <http://domain.com>
An alternative is to use domain module (suitable when you have
many domains and you want to store them in database).
Cheers,
Daniel
Post by Mihai Marin
Hello Sirs,
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).
I don't understand why is not working but I saw a big difference
- the domain "domain.com <http://domain.com>" is pointing to the
web server
- kamailio is hosted under sip.domain.com <http://sip.domain.com>
- DNS has domain.com <http://domain.com> A record for web
server's ip, sip.domain.com <http://sip.domain.com> A record for
kamailio's ip and SRV record for _sip._tcp.domain.com
<http://tcp.domain.com> poting to sip.domain.dom
grep_sock_info - checking if host==us: 11==14 && [domain.com
<http://domain.com>] == [xx.xx.xx.xx witch is the sip.domain.com
<http://sip.domain.com> IP]
If, I change domain.com <http://domain.com> in DNS to point on
the same ip as sip.domain.com <http://sip.domain.com> 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 sip.domain.com <http://sip.domain.com>
Thank you.
Best regards,
Mihai M
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 -http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Loading...