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.
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 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.
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.
On 10.04.17 18:14, Daniel Tryba wrote:
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
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:
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:
On 10.04.17 17:34, Diego Nadares wrote:
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: