Hi,
I have a really nasty problem configuring SIP gateway, I tried everything pls help.
ERROR:
Apr 10 13:11:49 WARNING[30266]: chan_sip.c:1973 create_addr: No such host: sip.mydomain.com
Destroying call '69bb43810815958b1c09228e0582a640@194.213.226.203’
Apr 10 13:11:49 NOTICE[30266]: app_dial.c:1012 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)
I can connest to it with Xlite phone so it is ok, I can also ping it form server.
change sip.mydomain.com to ‘myprovider’ (or any other name, not formatted like a dns name).
** Don’t forget to change both sip.conf and extensions.conf.
SIP addresses are in the format, number@domain, just like email. When the domain portion is a fully qualified domain name, it appears that Asterisk is trying to resolve the IP of that fqdn. sip.mydomain.com is not going to resolve because it a bogus fqdn, which is what causes the error to be generated. Either make the fqdn resolve properly or change the domain part to something that isn’t a fqdn, and Asterisk should handle it properly.
Sorry for confusinf post - I replaced sparvoip.de to maindomain.com for clearing the prsenstation (but not in each line so I confused You)
Normally all mydomain.com is sparvoip.de and The problem is the same:
cannot find host : sip.sparvoip.de despie it works from xlite, and I can ping it from server
dig resolves domian without problems.
however when I changed hostname to IP - it connested to sparvoip but rejected due to wrong passsword - I will try to solve it now myself.
however it is not nice to enter IPs instead of names, because later on it can mess.
Thanks for help, ofcourse if You know what to do in order to enter names instead of IP’s I will be grateful.
I saw that this domain has more one IP - amd it changes the default IP, may it be that srvlooku in asterisk works wrong as it selects always the first form list? is there any fix for it?
the problem is that there is no “correct ip” DNS resolves 5 different IPs with different priorities, each time You can get different accoridng to pririty, If You try to connect via others You will be rejected.
“ofcourse if You know what to do in order to enter names instead of IP’s I will be grateful”.
Well, ok, here’s how…
If you know the IP address that you said worked, put it in the “etc/hosts” file, then your computer will not use DNS to resolve sip.mydomain.com, it will always use the same IP address from the etc/host file that you specified for sip.mydomain.com.
For example, say 167.123.123.123 is the address you said worked, and sip.mydomain.com is the correct domain name, add the following to your etc/hosts file:
something sounds wrong here. there is nothing wrong with having multiple IPs for a single name. The “no route to host” sounds almost like one (or more?) of the names have bogus mappings. If so, that’s the problem, no?
True, but a lot of providers have many IP addresses accross the country. You should ALWAYS ping the addresses, and use the one(s) with the fastest response time.
For example, If you lived in LA, would you want to use a NY IP address for your gateway???
because that isn’t the right way. why even bother using DNS then? if you are using any kind of internet service with geographically diverse servers, such that latency IS an issue, the provider should not be mapping these servers onto the same name. granted that’s beyond the OP’s control, but still
also, this has nothing to do with a timeout - “no route to host” has a very specific meaning, per RFC…
Well, I have to strongly disagree, it is the right way…
Most providers provide many addresses, they don’t know their clients locations, and they recommend pinging, and using the IP with the fastest response time. Unless of course, they don’t use round robin, and have many host records for each area, such as ny.provider.com, la.provider.com, west.provider.com, east.provider.com, ect…, then ping wouldn’t be needed.
But anyway, this isn’t a thread on networking 101, nor my thread, so I will politely be quiet. I was just trying to help.
Please note, that this “no root to host” also appear when I enter IP - one of the IPs form list but no the “best” one instead of name.
Please also note that this “best” IP changes for me every 10 minutes despite I dont change my geografical location. (-: