SIP registration fails

Can anyone tell me under what circumstances asterisk decides SIP registration has failed? I.e., when it reports it as “Failed” in sip show registry.

It appears to sometimes set a longer refresh time before it fails - sometimes. I usually get fails reported with refresh time of 105 - which is the same refresh as when it’s registered. However, today i’ve had a couple of fails reported with 120 refresh time.

I get a lot of fails on one particular service and, so far, the only way i’ve found to deal with it is with an hourly cron job that checks for fails and restarts asterisk if it finds them. It always registers ok after a restart. But this is not a satisfactory way of dealing with it.

Ignore this! I just had a brainwave - look at the logs!!! :wink:

The log tells me asterisk gives up trying to register after 10 timed-out attempts.