Hi Guys,
Is it possible to disable using of dns in kamailio?
The thing is that not all INVITES that arrives to the proxy comes with ip 172.16.205.25/PUB_IP in the ruri. Some gateways sends a string in ruri -> @myproxysip and others sends @other.domain.com
Request-Line: INVITE sip:1111111@myproxysip:5060;user=phone SIP/2.0 Request-Line: INVITE sip:1111111@other.domain.com:5060;user=phone SIP/2.0
Sometimes, myproxysip is from a public ip and sometimes is from a private ip. So, it's difficult to know to which of kamailio's interfaces (pub or priv) is.
ERROR: <core> [resolve.c:1694]: sip_hostport2su(): could not resolve hostn ame.
Reconfigure those gw it's not possible. There are a lot of them and a lot of people that won't like that idea.
Is possible to disable it? or What do you recommend me to do? Maybe using /etc/hosts?
Any suggestion will be very appreciated.
Diego.
On Sat, Apr 08, 2017 at 09:24:29PM -0300, Diego Nadares wrote:
ERROR: <core> [resolve.c:1694]: sip_hostport2su(): could not resolve hostn ame.
Reconfigure those gw it's not possible. There are a lot of them and a lot of people that won't like that idea.
Is possible to disable it? or What do you recommend me to do? Maybe using /etc/hosts?
Wouldn't the easiest solution be to set $rd to your domain?
Hi Daniel,
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); } ....
Cheers,
Diego
2017-04-10 5:28 GMT-03:00 Daniel Tryba d.tryba@pocos.nl:
On Sat, Apr 08, 2017 at 09:24:29PM -0300, Diego Nadares wrote:
ERROR: <core> [resolve.c:1694]: sip_hostport2su(): could not resolve
hostn
ame.
Reconfigure those gw it's not possible. There are a lot of them and a lot of people that won't like that idea.
Is possible to disable it? or What do you recommend me to do? Maybe using /etc/hosts?
Wouldn't the easiest solution be to set $rd to your domain?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Mon, Apr 10, 2017 at 12:34:51PM -0300, Diego Nadares wrote:
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
Just took a look at the dns options, strangely enough there is no way to disable it apparently.
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); }
Any place is fine, unless you forward/proxy for some specific domains. In my default setups I set $rd to a known value just before location() stuff.
Thanks again Daniel.
Cheers,
Diego
2017-04-10 13:14 GMT-03:00 Daniel Tryba d.tryba@pocos.nl:
On Mon, Apr 10, 2017 at 12:34:51PM -0300, Diego Nadares wrote:
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
Just took a look at the dns options, strangely enough there is no way to disable it apparently.
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); }
Any place is fine, unless you forward/proxy for some specific domains. In my default setups I set $rd to a known value just before location() stuff.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 10.04.17 18:14, Daniel Tryba wrote:
On Mon, Apr 10, 2017 at 12:34:51PM -0300, Diego Nadares wrote:
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
Just took a look at the dns options, strangely enough there is no way to disable it apparently.
If DNS would be disabled, then how the request should be routed?
DNS query is done only when requesting to send out via t_relay(), forward() or similar functions. It is not done for scripts operations such as:
$rd= "invalid.domain.com";
Cheers, Daniel
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); }
Any place is fine, unless you forward/proxy for some specific domains. In my default setups I set $rd to a known value just before location() stuff.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel,
I'm using rtjson and an external script for routing.
Cheers,
Diego
2017-04-11 9:58 GMT-03:00 Daniel-Constantin Mierla miconda@gmail.com:
On 10.04.17 18:14, Daniel Tryba wrote:
On Mon, Apr 10, 2017 at 12:34:51PM -0300, Diego Nadares wrote:
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
Just took a look at the dns options, strangely enough there is no way to disable it apparently.
If DNS would be disabled, then how the request should be routed?
DNS query is done only when requesting to send out via t_relay(), forward() or similar functions. It is not done for scripts operations such as:
$rd= "invalid.domain.com";
Cheers, Daniel
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); }
Any place is fine, unless you forward/proxy for some specific domains. In my default setups I set $rd to a known value just before location() stuff.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
I don't remember by heart now, is rtjson requiring r-uri to be set/updated always? If yes, I think we should update it, next hop address can be set via $du as well.
Cheers, Daniel
On 11.04.17 15:07, Diego Nadares wrote:
Hi Daniel,
I'm using rtjson and an external script for routing.
Cheers,
Diego
2017-04-11 9:58 GMT-03:00 Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
On 10.04.17 18:14, Daniel Tryba wrote: > On Mon, Apr 10, 2017 at 12:34:51PM -0300, Diego Nadares wrote: >> Thanks for your response. Your suggestion helped me a lot. We don't use >> domains so instead a domain I set the ip address ($Ri). > Just took a look at the dns options, strangely enough there is no way to > disable it apparently. If DNS would be disabled, then how the request should be routed? DNS query is done only when requesting to send out via t_relay(), forward() or similar functions. It is not done for scripts operations such as: $rd= "invalid.domain.com <http://invalid.domain.com>"; Cheers, Daniel > >> I added this to my cfg. I don't know if is the right place. Whay do you >> think? >> >> request_route { >> >> ..... >> remove_hf("Route"); >> if (is_method("INVITE|SUBSCRIBE")) { >> *$rd = $Ri; * >> record_route(); >> } > Any place is fine, unless you forward/proxy for some specific domains. > In my default setups I set $rd to a known value just before location() > stuff. > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
On Tue, Apr 11, 2017 at 02:58:23PM +0200, Daniel-Constantin Mierla wrote:
Just took a look at the dns options, strangely enough there is no way to disable it apparently.
If DNS would be disabled, then how the request should be routed?
By using dispatcher with ip adresses, which sets $du as you mentioned in an other response as possible workaround.
On 10.04.17 17:34, Diego Nadares wrote:
Hi Daniel,
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); } ....
If you want to preserve a domain without DNS in the R-URI, but still be able to send to a specific IP address, just update $du (known as destination uri or outbound proxy address):
$du = "sip:x.y.z.w";
If $du is set, upon doing t_relay(), forward() or a similar function, then it is used for routing.
Cheers, Daniel
Thanks, I will take this into account.
Cheers,
Diego
2017-04-11 10:01 GMT-03:00 Daniel-Constantin Mierla miconda@gmail.com:
On 10.04.17 17:34, Diego Nadares wrote:
Hi Daniel,
Thanks for your response. Your suggestion helped me a lot. We don't use domains so instead a domain I set the ip address ($Ri).
I added this to my cfg. I don't know if is the right place. Whay do you think?
request_route {
..... remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) { *$rd = $Ri; * record_route(); } ....
If you want to preserve a domain without DNS in the R-URI, but still be able to send to a specific IP address, just update $du (known as destination uri or outbound proxy address):
$du = "sip:x.y.z.w";
If $du is set, upon doing t_relay(), forward() or a similar function, then it is used for routing.
Cheers, Daniel
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users