Handle_response_register: Got error 400 on register to xxxxxx@sbc5.fr.sip.ovh, giving up (check config)

Hello every one,

I have a strange problem on my Asterisk and I can’t figure out what is happening.
I have some trouble to register on a SIP number hosted by OVH.

here is my SIP.conf :

[general]
nat=comedia
defaultexpiry=1800
rtautoclear=no
context=atmos-default-context
bindport=16060
bindaddr=0.0.0.0
srvlookup=no
register => xxx_my_number_xxx:PASSWORD@sbc5.fr.sip.ovh:5060~1800
disallow=all
allow=ulaw
allow=alaw


[atmos-default-context]
type=friend
host=sbc5.fr.sip.ovh
context=atmos
language=fr
insecure=invite,port
username=xxx_my_number_xxx
secret=PASSWORD


[Guillaume]
secret=PASSWORD_USER
callerid="Guillaume" <200>
context=local
mailbox=200@default
type=friend
host=dynamic

Here is the problem, based on my log this morning :

08:27 (starting asterisk) : sbc5.fr.sip.ovh:5060                    N      xxx_my_number_xxx      1785 Registered           Wed, 27 Oct 2021 08:27:33
08:57 : sbc5.fr.sip.ovh:5060                    N      xxx_my_number_xxx   1785 Registered           Wed, 27 Oct 2021 08:57:33

so we can see on startup it register, after after 1800 seconds, it can register again without any trouble.
But the problem is at 09:27, so 1 hour after start up :

[Oct 27 09:26:50] WARNING[20220]: chan_sip.c:24472 handle_response_register: Got error 400 on register to xxx_my_number_xxx@sbc5.fr.sip.ovh, giving up (check config)
    -- Registered SIP 'Guillaume' at MYIP:48069

and this time it’s rejected :
sbc5.fr.sip.ovh:5060 N xxx_my_number_xxx 1785 Rejected Wed, 27 Oct 2021 08:57:05

So I restarted Asterisk manually : service asterisk restart
and it registered correctly again, and the same scenario happened again and again…

As I can’t restart it manually every hour, what should I do ?
I don’t understand why it fails after 1 hour.

Can someone help me about it :slight_smile:
THank you very much :slight_smile: I’m lost

It could be a NAT related issue. I guess you got your configuration from Asterisk - configuration et utilisation | Documentation OVH

You could post a complete SIP debug trace to see what is going on.

Hello, thank you for your help, actually I don’t know what happened.
After some tests, the server had to restart for some reason, and then the problem disappeared.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.