No Such Host (newbie)

I have a really nasty problem configuring SIP gateway, I tried everything pls help.


Apr 10 13:11:49 WARNING[30266]: chan_sip.c:1973 create_addr: No such host:
Destroying call '69bb43810815958b1c09228e0582a640@’
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.



exten => 2001,1,Dial(SIP/2001)
exten => 2002,1,Dial(SIP/2002)

exten =>_X.,1,SetCallerID()
exten =>_X.,2,Dial(SIP/${EXTEN}
exten =>_X.,2,Hangup


Try one of these two possible resolutions.


  • change 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. 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 to for clearing the prsenstation (but not in each line so I confused You)
Normally all is and The problem is the same:

cannot find host : despie it works from xlite, and I can ping it from server

You might want to try running ‘dig’, to make sure that your machine can resolve the dns name properly.

Have you tried replacing the domain name with the IP address in your config files?


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 multiple IP’s could be causing a problem. I’d recommend posting a new question on the developer’s forum.



Add with the correct IP address to your /etc/hosts file.

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, it will always use the same IP address from the etc/host file that you specified for

For example, say is the address you said worked, and 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???

true, but completely irrelevant to the OP’s problem.

There maybe timeout problems, you never know your response time from those resovled DNS addresses.

Besides, why not do it the right way to begin with, and set the correct IP for your area in /etc/hosts?

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,,,, 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. (-:

So they obviously have an unreachable server listed in DNS. Their service is broken and they need to fix it.

I just started to connect my Asterisk to SIP service provider and have the same problem.

Apr 14 21:38:08 NOTICE[12289]: chan_sip.c:5285 sip_reg_timeout: – Registration for '’ timed out, trying again (Attempt #1)
Apr 14 21:38:09 WARNING[12289]: chan_sip.c:1973 create_addr: No such host:
Apr 14 21:38:09 WARNING[12289]: chan_sip.c:5368 transmit_register: Probably a DNS error for registration to, trying REGISTER again (after 20 seconds)

I can ping the host “” and get resolved IP:
root@marfa:/home/mavac# ping
PING ( 56 data bytes
64 bytes from ( seq=0 ttl=58 time=10.3 ms.
64 bytes from ( seq=1 ttl=58 time=10.9 ms.
64 bytes from ( seq=2 ttl=58 time=9.34 ms.
64 bytes from ( seq=3 ttl=58 time=9.43 ms.

---- ( PING Statistics ----
4 packets transmitted, 4 packets received, 0% packet loss

What the hell is wrong?? :imp: