Registration strange behaviour

hi all,
i’m experienced a strange behavior in my asterisk box 1.4.42 installed from binary rpm packages on centos 5.6.

In my sip.conf i have

register =>

callerid=Interno 401 <401>

Well, if i have internet connection so that the name is resolved everything works fine, but if i the name is not resolved client 401 doesn’t register.

netstat -u -p says me that asterisk is “listening” on 5060
tcpdump says me that client send a sip packet trying to register, but i cant see any sip packet from my asterisk box to the client.

If i comment the registration to eutelia and restart asterisk 401 can register and everything work fine even if the box can’t connect to internet.

Someone can help me?
Thank’s in advance
Accursio Avona

Hi Accursio!

I got the same problem with Asterisk 1.4 when i lost the internet connection.
During the SIP registration to my VoIP service provider I also lost the ZAP connection.

The problem is that when you looses the internet connection, Asterisk will try to make a new connection to
And default it will never stop trying!

What I did in <sip.conf> was to set how many times it will try to register and for how long before time out.

[general] ; registertimeout=4 registerattempts=3
registertimeout = Number of seconds to wait for a response from a SIP Registrar before classifying the SIP REGISTER has timed out. Default 20 seconds.
registerattempts = Number of SIP REGISTER messages to send to a SIP Registrar before giving up. Default 0 (no limit).

The downside of this is when your internet connection gets up, it will NOT try to register with again.

A sip reload is required:
asterisk -rx “sip reload”

and then it worked ok.

I hope this will solve your problem!

Virtually yours // Nypon

Hi Nypon,
thank’s a lot for your reply.
I will try your solution and let you know, but i have a question,
what happen when internet connection will come back?
will i need, manually, to reload sip module or asterisk automatically will register to my voip provider?
Thank’s in advance

I beleve that you need to do that manually.
That is what I did!
For me it was better this way so I could get the ZAP trunk upp and running in a few seconds instead of several minutes.

I setted
and now my clients can register, but if after 3 attemps asterisk will not register to the voip provider even if internet connection come back is really a problem.
Do you know if release 1.6 or 1.8 suffer of the some problem?