Summary:ASTERISK-09172: "request sent" hang on sip show regitry...
Reporter:Mirko (panciom)Labels:
Date Opened:2007-04-03 06:21:21Date Closed:2011-06-07 14:03:02
Versions:Frequency of
Environment:Attachments:( 0) sipdebug.fulvio.zip
( 1) sipdebug.zip
Description:The present bug note is the continuation for bug Nr. 8091 (http://bugs.digium.com/view.php?id=8091).
Asterisk is version 1.4.1.
The problem is the same.
My last registration is on 2 April 14:30:xx (with sip show registry).
After 14:30 "request sent" is always present and call from remote never reach my asterisk.
I attach sipdebug.txt created with info on note 0052589.


Some info on my conf:

sip.provider.it => my asterisk @ work (to PSTN network). Registered with user and number 24.
ProviderIP => is the ip number of sip.provider.it in xxx.yyy.zzz.kkk format.
mymachine.dyndns.org => is the name of my machine form the internet (i have only a dynamic public IP number). is my home LAN. => gw.pancio.lan (Gateway and the Asterisk under debug). => VoIP phone GXP2000 Grandstream (SIP Account "studio"). => VoIP ATA HT386 Grandstream (2 SIP Accounts: "salotto" and "mirko")
Comments:By: Olle Johansson (oej) 2007-05-09 09:49:12

there's no SIP debug output in this debug file. Please try again. THanks!

By: Olle Johansson (oej) 2007-05-15 11:15:02

I have seen this on one of my systems. Need more time to debug. Still missing proper debug file from reporter.

By: Mirko (panciom) 2007-05-17 04:11:06

I'm very happy the bug is appeared on your machine Oej.
I followed these instruction to make the debug file:

As per bug guidelines, you need to attach a SIP debug trace illustrating the problem. Please do the following:
1) Prepare test environment (reduce the amount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterik.
4) Enable SIP transaction logging with the following CLI commands:
set debug 4
set verbose 4
sip debug
5) Save complete console log to file and _attach_ said file to the bug.
 i.e. asterisk -Tvvvvvdddddgc | tee /tmp/sipdebug.txt

I will try to remake this debug file but i think the result is the same.
Sorry for my english and a big thank you to oej.

By: Mirko (panciom) 2007-05-30 07:59:17

[Semi OT]
I have made a very simple bash script that verify the "request sent" string and make a "sip reload" automatically. With crond it run every minute.
It's not the best solution but it works for me.

# By Pancio 28 Maggio 2007.


READAST=$(asterisk -rx "sip show registry")
STRSENT=$(echo $READAST | grep -i "sent")

# Debug...
# echo "$DATA :: Debug!" >> $LOGFILE

if [ -n "$STRSENT" ]; then
       echo "$DATA :: Trovato Request Sent!" >> $LOGFILE
       asterisk -rx "sip reload"

By: Fulvio P. (fulvio) 2007-07-26 17:30:39

Got the same problem (Asterisk 1.4.9). Italian Voip provider Eutelia seams to have connectivity issues with the USA so from time to time their servers are unreachable for a while, when they are back Asterisk does not recover automatically.

I'll try to record some debug output but the bug is not easy to replicate so the file might turn "huge"...

regards Fulvio.

By: Fulvio P. (fulvio) 2007-07-27 12:38:43

As promised here is my sipdebug.fulvio.zip
for your info: is the ASTERISK box
Voip provider is Eutelia as voip.eutelia.it
My external ip address is :
Asterisk hanged at 12.05, with the last Registration Request Sent.
Any help will be much appreciated.
regards Fulvio

By: Terry Wilson (twilson) 2007-11-07 16:45:48.000-0600

I've just tried with trunk and 1.4svn between two asterisk boxes (and stopping sip on one of them for a few minutes).  I still see registration attempts going on.  Have you tried with 1.4 from SVN or trunk?  Is this  still a problem?

By: Terry Wilson (twilson) 2007-11-07 19:43:34.000-0600

fulvio: I was looking at your debug info and it looks like the IP address lookup via SRV record changed voip.eutelia.it from to and then the new host sends back a 404.  It is at this point that Asterisk stops attempting to register.  According to the RFC this is what Asterisk should do since the server has authoritatively said "I do not have the what you are looking for here."  From the RFC:

21.4 Request Failure 4xx

  4xx responses are definite failure responses from a particular
  server.  The client SHOULD NOT retry the same request without
  modification (for example, adding appropriate authorization).
  However, the same request to a different server might be successful.

By: Fulvio P. (fulvio) 2007-11-07 20:08:47.000-0600

twilson: since I reported the issue I regularly updated asterisk to the released 1.4.X. Now I'm using 1.4.13 and the problem is still there. At the moment I'm using Panciom script which has the double effect of keeping asterisk from hanging but also logs how many times it happens a day and there are days when it happens just a few times, and others (like today) it happened 15 more times. What you noticed is interesting: is voip.eutelia.it, is my IP address. Asterisk sits behind a LINKSYS WRT54GS router. What I cannot understand is why it happens "from time to time"... I would expect that any DNS or asterisk misconfiguration would appear always. Any idea on how to continue with debugging ?

By: Terry Wilson (twilson) 2007-11-07 20:53:44.000-0600

What is the dns address in /etc/resolv.conf on your asterisk box?  Is it the IP of the linksys (in the linksys acting as a dns proxy)?  It could be that the linksys is screwing up the DNS srv lookup?  If so, try putting a static dns address in resolv.conf for your ISP, restart asterisk, and see if the problem is still there.

By: Terry Wilson (twilson) 2007-11-07 20:59:25.000-0600

Also if you do not rely on SRV lookups, could you try setting srvlookup=no and see if you still have the problem?

By: Fulvio P. (fulvio) 2007-11-08 08:46:48.000-0600

twilson: yes I'm using the DNS relay function of LINKSYS. I'll try to point directly to my ISP's DNS.

By: Terry Wilson (twilson) 2007-11-08 16:57:20.000-0600

any difference?

By: Fulvio P. (fulvio) 2007-11-08 18:21:09.000-0600

twilson: hard to say, now I'm pointing directly to the DNS of the ISP, I got only one instance of "Request Sent" ... Now I do not know if this is getting better or it's just a coincidence. I would run it in the present config. for a while longer and I'll report back... in a day I would say ...

By: Terry Wilson (twilson) 2007-11-12 10:40:59.000-0600

So, how's it going?  Working better?

By: Fulvio P. (fulvio) 2007-11-12 10:46:25.000-0600

twilson: it is now a couple of days after pointing DNS directly to ISP and no hangups ... it seams to work :-)))))) ... (hopefully Mr. Murphy is not listening)

Cheers Fulvio.

By: Terry Wilson (twilson) 2007-11-12 12:11:42.000-0600

Glad it worked.

Since asterisk is following the RFC by not hammering a registrar that has told us that the user is not available on their system and since the problem originally presented itself through a DNS problem that caused the request to be sent to the local asterisk box--I'm going to go ahead and close this one.  Thanks.