[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Igor Potjevlesch via sr-users
You're right, sorry:

kamcmd dns.add_srv _sip._udp.example.com 3600 0 50 5060 srv1.com 2

kamcmd dns.add_srv _sip._udp.example.com 3600 0 50 5060 srv2.com 2

kamcmd dns.add_a srv1.com 3600 192.168.1.1 2

kamcmd dns.add_a srv2.com 3600 192.168.1.2 2



Finally, it looks to work fine by adding:

dns_srv_lb=yes

use_dns_failover=yes





De : Sergiu Pojoga 
Envoyé : vendredi 12 janvier 2024 14:50
À : Kamailio (SER) - Users Mailing List 
Cc : mico...@gmail.com; Igor Potjevlesch 
Objet : Re: [SR-Users] Re: Internal DNS resolver



Just so ppl you're asking don't lose their minds either trying to be 
clairvoyants of your particular setup, can you post what records exactly were 
added and what makes you think they are not followed by Kam when selecting a 
destination?



So you add records with dns.add and then lookup them up with dns.lookup



Cheers,



On Fri, Jan 12, 2024 at 8:42 AM Igor Potjevlesch via sr-users 
mailto:sr-users@lists.kamailio.org> > wrote:

Hello,



Just to be sure that I'm not losing my time: is there any chance to do a 
load-balancing using add_srv? I just tried with two equal entries but it's 
always the same which is returned.



Regards,



Igor.



De : Daniel-Constantin Mierla mailto:mico...@gmail.com> >
Envoyé : vendredi 12 janvier 2024 11:17
À : Igor Potjevlesch mailto:igor.potjevle...@gmail.com> >; 'Kamailio (SER) - Users Mailing List' 
mailto:sr-users@lists.kamailio.org> >
Objet : Re: [SR-Users] Internal DNS resolver



Hello,

the core rpc lack proper documentation, not like the case of modules. In this 
case, the code should be suggestive of what parameters have to be provided:

  - https://github.com/kamailio/kamailio/blob/master/src/core/dns_cache.c#L4744

For each of those values, the corex docs for dns_cache parameter should give 
details.

Cheers,
Daniel



On 12.01.24 11:05, Igor Potjevlesch wrote:

Hello Daniel,



Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone has the 
exact params lists? Thank you.



Regards,



Igor.



De : Daniel-Constantin Mierla  <mailto:mico...@gmail.com> 
Envoyé : jeudi 11 janvier 2024 19:36
À : Kamailio (SER) - Users Mailing List  <mailto:sr-users@lists.kamailio.org> 

Cc : Igor Potjevlesch  <mailto:igor.potjevle...@gmail.com> 

Objet : Re: [SR-Users] Internal DNS resolver



Hello,



On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:

Hello!



I have a quick question about the internal DNS resolver and cache embedded in 
Kamailio.

Is the ability to add an entry with dns.add_a bypass the "real" DNS lookup? So, 
let's say that sip.example.com <http://sip.example.com>  is publicly resolve 
alternatively with 1.2.3.4 & 5.6.7.8.9, if I do a dns.add_a to add my own 
sip.example.com <http://sip.example.com>  with, alternatively, 127.0.0.1 and 
127.0.0.2, will it work?





yes, it should work, the internal cache is checked first and if entry found, 
then it is used.

You can also add entries in the dns cache at startup via dns_cache modparam 
from corex.

Cheers,
Daniel

--
Daniel-Constantin Mierla (@ asipto.com <http://asipto.com> )
twitter.com/miconda <http://twitter.com/miconda>  -- linkedin.com/in/miconda 
<http://linkedin.com/in/miconda>
Kamailio Consultancy, Training and Development Services -- asipto.com 
<http://asipto.com>
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com 
<http://asipto.com>
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com 
<http://kamailioworld.com>




 
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>

Sans virus. 
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
 www.avast.com

--
Daniel-Constantin Mierla (@ asipto.com <http://asipto.com> )
twitter.com/miconda <http://twitter.com/miconda>  -- linkedin.com/in/miconda 
<http://linkedin.com/in/miconda>
Kamailio Consultancy, Training and Development Services -- asipto.com 
<http://asipto.com>
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com 
<http://asipto.com>
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com 
<http://kamailioworld.com>

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org 
<mailto:sr-users-le...@lists.kamailio.org>
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:



--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Sergiu Pojoga via sr-users
Just so ppl you're asking don't lose their minds either trying to be
clairvoyants of your particular setup, can you post what records exactly
were added and what makes you think they are not followed by Kam when
selecting a destination?

So you add records with *dns.add* and then lookup them up with *dns.lookup*

Cheers,

On Fri, Jan 12, 2024 at 8:42 AM Igor Potjevlesch via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hello,
>
>
>
> Just to be sure that I'm not losing my time: is there any chance to do a
> load-balancing using add_srv? I just tried with two equal entries but it's
> always the same which is returned.
>
>
>
> Regards,
>
>
>
> Igor.
>
>
>
> *De :* Daniel-Constantin Mierla 
> *Envoyé :* vendredi 12 janvier 2024 11:17
> *À :* Igor Potjevlesch ; 'Kamailio (SER) -
> Users Mailing List' 
> *Objet :* Re: [SR-Users] Internal DNS resolver
>
>
>
> Hello,
>
> the core rpc lack proper documentation, not like the case of modules. In
> this case, the code should be suggestive of what parameters have to be
> provided:
>
>   -
> https://github.com/kamailio/kamailio/blob/master/src/core/dns_cache.c#L4744
>
> For each of those values, the corex docs for dns_cache parameter should
> give details.
>
> Cheers,
> Daniel
>
>
>
> On 12.01.24 11:05, Igor Potjevlesch wrote:
>
> Hello Daniel,
>
>
>
> Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone has
> the exact params lists? Thank you.
>
>
>
> Regards,
>
>
>
> Igor.
>
>
>
> *De :* Daniel-Constantin Mierla  
> *Envoyé :* jeudi 11 janvier 2024 19:36
> *À :* Kamailio (SER) - Users Mailing List 
> 
> *Cc :* Igor Potjevlesch 
> 
> *Objet :* Re: [SR-Users] Internal DNS resolver
>
>
>
> Hello,
>
>
>
> On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:
>
> Hello!
>
>
>
> I have a quick question about the internal DNS resolver and cache embedded
> in Kamailio.
>
> Is the ability to add an entry with dns.add_a bypass the "real" DNS
> lookup? So, let's say that sip.example.com is publicly resolve
> alternatively with 1.2.3.4 & 5.6.7.8.9, if I do a dns.add_a to add my own
> sip.example.com with, alternatively, 127.0.0.1 and 127.0.0.2, will it
> work?
>
>
>
>
> yes, it should work, the internal cache is checked first and if entry
> found, then it is used.
>
> You can also add entries in the dns cache at startup via dns_cache
> modparam from corex.
>
> Cheers,
> Daniel
>
> --
>
> Daniel-Constantin Mierla (@ asipto.com)
>
> twitter.com/miconda -- linkedin.com/in/miconda
>
> Kamailio Consultancy, Training and Development Services -- asipto.com
>
> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
>
> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
>
>
>
>
> 
>
> Sans virus.www.avast.com
> 
>
> --
>
> Daniel-Constantin Mierla (@ asipto.com)
>
> twitter.com/miconda -- linkedin.com/in/miconda
>
> Kamailio Consultancy, Training and Development Services -- asipto.com
>
> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
>
> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Igor Potjevlesch via sr-users
Hello,



Just to be sure that I'm not losing my time: is there any chance to do a 
load-balancing using add_srv? I just tried with two equal entries but it's 
always the same which is returned.



Regards,



Igor.



De : Daniel-Constantin Mierla 
Envoyé : vendredi 12 janvier 2024 11:17
À : Igor Potjevlesch ; 'Kamailio (SER) - Users 
Mailing List' 
Objet : Re: [SR-Users] Internal DNS resolver



Hello,

the core rpc lack proper documentation, not like the case of modules. In this 
case, the code should be suggestive of what parameters have to be provided:

  - https://github.com/kamailio/kamailio/blob/master/src/core/dns_cache.c#L4744

For each of those values, the corex docs for dns_cache parameter should give 
details.

Cheers,
Daniel



On 12.01.24 11:05, Igor Potjevlesch wrote:

Hello Daniel,



Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone has the 
exact params lists? Thank you.



Regards,



Igor.



De : Daniel-Constantin Mierla   
Envoyé : jeudi 11 janvier 2024 19:36
À : Kamailio (SER) - Users Mailing List   

Cc : Igor Potjevlesch   

Objet : Re: [SR-Users] Internal DNS resolver



Hello,



On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:

Hello!



I have a quick question about the internal DNS resolver and cache embedded in 
Kamailio.

Is the ability to add an entry with dns.add_a bypass the "real" DNS lookup? So, 
let's say that sip.example.com is publicly resolve alternatively with 1.2.3.4 & 
5.6.7.8.9, if I do a dns.add_a to add my own sip.example.com with, 
alternatively, 127.0.0.1 and 127.0.0.2, will it work?






yes, it should work, the internal cache is checked first and if entry found, 
then it is used.

You can also add entries in the dns cache at startup via dns_cache modparam 
from corex.

Cheers,
Daniel

--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com




 


Sans virus. 

 www.avast.com

--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com


--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Igor Potjevlesch via sr-users
Hello,



Wonderful! Thank you Daniel.



Regards,



Igor.



De : Daniel-Constantin Mierla 
Envoyé : vendredi 12 janvier 2024 11:17
À : Igor Potjevlesch ; 'Kamailio (SER) - Users 
Mailing List' 
Objet : Re: [SR-Users] Internal DNS resolver



Hello,

the core rpc lack proper documentation, not like the case of modules. In this 
case, the code should be suggestive of what parameters have to be provided:

  - https://github.com/kamailio/kamailio/blob/master/src/core/dns_cache.c#L4744

For each of those values, the corex docs for dns_cache parameter should give 
details.

Cheers,
Daniel



On 12.01.24 11:05, Igor Potjevlesch wrote:

Hello Daniel,



Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone has the 
exact params lists? Thank you.



Regards,



Igor.



De : Daniel-Constantin Mierla   
Envoyé : jeudi 11 janvier 2024 19:36
À : Kamailio (SER) - Users Mailing List   

Cc : Igor Potjevlesch   

Objet : Re: [SR-Users] Internal DNS resolver



Hello,



On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:

Hello!



I have a quick question about the internal DNS resolver and cache embedded in 
Kamailio.

Is the ability to add an entry with dns.add_a bypass the "real" DNS lookup? So, 
let's say that sip.example.com is publicly resolve alternatively with 1.2.3.4 & 
5.6.7.8.9, if I do a dns.add_a to add my own sip.example.com with, 
alternatively, 127.0.0.1 and 127.0.0.2, will it work?






yes, it should work, the internal cache is checked first and if entry found, 
then it is used.

You can also add entries in the dns cache at startup via dns_cache modparam 
from corex.

Cheers,
Daniel

--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com




 


Sans virus. 

 www.avast.com

--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com


--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Daniel-Constantin Mierla via sr-users
Hello,

the core rpc lack proper documentation, not like the case of modules. In
this case, the code should be suggestive of what parameters have to be
provided:

  -
https://github.com/kamailio/kamailio/blob/master/src/core/dns_cache.c#L4744

For each of those values, the corex docs for dns_cache parameter should
give details.

Cheers,
Daniel


On 12.01.24 11:05, Igor Potjevlesch wrote:
>
> Hello Daniel,
>
>  
>
> Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone
> has the exact params lists? Thank you.
>
>  
>
> Regards,
>
>  
>
> Igor.
>
>  
>
> *De :*Daniel-Constantin Mierla 
> *Envoyé :* jeudi 11 janvier 2024 19:36
> *À :* Kamailio (SER) - Users Mailing List 
> *Cc :* Igor Potjevlesch 
> *Objet :* Re: [SR-Users] Internal DNS resolver
>
>  
>
> Hello,
>
>  
>
> On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:
>
> Hello!
>
>  
>
> I have a quick question about the internal DNS resolver and cache
> embedded in Kamailio.
>
> Is the ability to add an entry with dns.add_a bypass the "real"
> DNS lookup? So, let's say that sip.example.com is publicly resolve
> alternatively with 1.2.3.4 & 5.6.7.8.9, if I do a dns.add_a to add
> my own sip.example.com with, alternatively, 127.0.0.1 and
> 127.0.0.2, will it work?
>
>
>
> yes, it should work, the internal cache is checked first and if entry
> found, then it is used.
>
> You can also add entries in the dns cache at startup via dns_cache
> modparam from corex.
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla (@ asipto.com)
> twitter.com/miconda -- linkedin.com/in/miconda
> Kamailio Consultancy, Training and Development Services -- asipto.com
> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
>
> 
>   Sans virus.www.avast.com
> 
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-12 Thread Igor Potjevlesch via sr-users
Hello Daniel,



Thanks! I wll try. I didn't find out how to use dns.add_a. Is someone has the 
exact params lists? Thank you.



Regards,



Igor.



De : Daniel-Constantin Mierla 
Envoyé : jeudi 11 janvier 2024 19:36
À : Kamailio (SER) - Users Mailing List 
Cc : Igor Potjevlesch 
Objet : Re: [SR-Users] Internal DNS resolver



Hello,



On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:

Hello!



I have a quick question about the internal DNS resolver and cache embedded in 
Kamailio.

Is the ability to add an entry with dns.add_a bypass the "real" DNS lookup? So, 
let's say that sip.example.com is publicly resolve alternatively with 1.2.3.4 & 
5.6.7.8.9, if I do a dns.add_a to add my own sip.example.com with, 
alternatively, 127.0.0.1 and 127.0.0.2, will it work?





yes, it should work, the internal cache is checked first and if entry found, 
then it is used.

You can also add entries in the dns cache at startup via dns_cache modparam 
from corex.

Cheers,
Daniel

--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com


--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Internal DNS resolver

2024-01-11 Thread Daniel-Constantin Mierla via sr-users
Hello,

On 11.01.24 19:07, Igor Potjevlesch via sr-users wrote:
>
> Hello!
>
>  
>
> I have a quick question about the internal DNS resolver and cache
> embedded in Kamailio.
>
> Is the ability to add an entry with dns.add_a bypass the "real" DNS
> lookup? So, let's say that sip.example.com is publicly resolve
> alternatively with 1.2.3.4 & 5.6.7.8.9, if I do a dns.add_a to add my
> own sip.example.com with, alternatively, 127.0.0.1 and 127.0.0.2, will
> it work?
>
>
yes, it should work, the internal cache is checked first and if entry
found, then it is used.

You can also add entries in the dns cache at startup via dns_cache
modparam from corex.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
Kamailio Advanced Training, February 20-22, 2024 -- asipto.com
Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe: