Asterisk SIP registry REJECTED

Hi all,

I have the some asterisk machines as local pbx.
They have sip trunks to VOIP providers.
When, for some reason the trunk registry fail and the state of the registry becomes REJECTED, asterisk stops trying to register.
Can someone help me figuring out why this occur and a way to prevent asterisk from stop sending the registration requests.


More information:

The REJECTED state of the registration is showed with “sip show registry”.
The peer part is saying that is online in “sip show peers”.

what is the output in your cli when you do a sip reload command with verbosity 5

The correct would be set verbose in 30


Executing a sip reload, asterisk registers again without problems.
The problem is that i have to do this on many machines and i want to know why asterisk stops trying to register.
I switched on sip debug and i dont see any sip messages REGISTER.


The asterisk as a registration part and a peer part to the same destination server.
When for some reason the registration is rejected by the other server, the state os the registration in my asterisk becomes REJECTED and he stops trying to register again.

change the TCP port in your soft-phone from 5060 to 5062 or something else. because SIP by default in asterisk work on 5060 port. the port is conflict that why is rejecting. please check that one and update here after done successfully.


My problem is not with soft phones.
My asterisk has a sip trunk to other asterisk and i have a registry string to that server and a peer configuration.
The problem is that, if for some reason (i do not control the other end, so it does not matter why) the registry gets rejected, my asterisk stops trying to register.
This is my problem. I want asterisk to continue sending the registration attempts.



From sip.conf.sample:

;registertimeout=20             ; retry registration calls every 20 seconds (default)
;registerattempts=10            ; Number of registration attempts before we give up
                                ; 0 = continue forever, hammering the other server
                                ; until it accepts the registration
                                ; Default is 0 tries, continue forever


I already verified that parameter.
Result of the command “sip show settings”:

Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0



I have the same problem as the OP and it is easily reproducible:

  • Configure a gateway with a host name (not its IP address)
  • The server on which Asterisk is installed is connected to a router but I disconnected that router from the Internet
  • Reboot the server (a simple DNS flush would be enough I guess)
  • Look at Asterisk failing to register and settings the gateway to Rejected state, without trying to register again EVER (I once had it in this Rejected state for more than 12 hours without anything in the logs)
  • I checked and sip show settings shows the same as the OP

Asterisk should obviously retry at some point. Is there any other option to look for ?

Thank you forward,

I am having same issue as well. I had been running 1.4 until recently, and problem only started after switch to 1.6. Once register request is marked REJECTED, asterisk will stop making registration attempts. A manual “sip reload” will fix the registration. Short of adding a cron script to “sip reload” every so often, I can find no asterisk configuration variable to prevent this UNDESIRABLE behavior.

I’ve configured a new SIP trunk on my TB server.
The new trunk has “status OK” in sip show peers as other SIP trunks (from another SIP provider).
But in sip show registry it is displayed as “State rejected” with Refresh=120 (when other trunks of the second SIP provider has State Registered with a different Refresh = 285)
At the same time I can place calls on this “rejected” trunk .
I haven’t understood exactly what happen.
Any idea?
Thanks in advance :unamused:

Does anybody have an idea about that problem ? How can we configure Asterisk to retry after some time in case of rejection ?