Registration timed out trunk OVH

Hello,

I changed my server recently, and the registration of OVH trunks is denied.

siptrunk.ovh.net:5060 Y PHONENUMBER120 Request Sent

In the console, there are:
[2017-09-28 14:10:22] NOTICE [9992] chan_sip.c: - Registration for ‘[email protected]’ timed out, trying again

(ping siptrunk.ovh.net is OK)

In verbose mode:
2017-09-28 13:56:02] VERBOSE [9992] chan_sip.c: REGISTER 11 headers, 0 lines
[2017-09-28 13:56:02] VERBOSE [9992] chan_sip.c: Reliably Transmitting (NAT) to SIPTRUNK.OVH.NET:5060:
REGISTER sip: siptrunk.ovh.net SIP / 2.0
Via: SIP / 2.0 / UDP MYIP; branch = xxx;
Max-Forwards: 70
From: <sip: [email protected]>; tag = xxx
To: <sip: [email protected]>
Call-ID: xxxxx
CSeq: 102 REGISTER
Supported: replaces, timer
User-Agent: FPBX-13.0.192.18 (13.17.2)
Expires: 120
Contact: <sip: s @ MYIP: 5160>
Content-Length: 0


[2017-09-28 13:56:02] VERBOSE [9992] chan_sip.c:
<— SIP read from UDP: SIPTRUNK.OVH.NET: 5060 —>
SIP / 2.0 100 Trying
Call-ID: xxxxx
CSeq: 102 REGISTER
From: <sip: [email protected]>; tag = xxxxx
To: <sip: [email protected]>
Via: SIP / 2.0 / UDP MYIP: 5160; received = MYIP; rport = 5160; branch = xxx
Content-Length: 0

<------------->
[2017-09-28 13:56:02] VERBOSE [9992] chan_sip.c: — (7 headers 0 lines) —
[2017-09-28 13:56:02] VERBOSE [9992] chan_sip.c:
<— SIP read from UDP: SIPTRUNK.OVH.NET: 5060 —>
SIP / 2.0 401 Unauthorized
Call-ID: xxxx
CSeq: 102 REGISTER
From: <sip: [email protected]>; tag = xxxx
To: <sip: [email protected]>; tag = xxxx
Via: SIP / 2.0 / UDP MYIP: 5160; received = MYIP; rport = 5160; branch = xxxx
WWW-Authenticate: Digest realm = “siptrunk.ovh.net”, nonce = “xx”, opaque = “xxxx”, stale = false, algorithm = MD5
Server: Cirpack / v4.70 (gw_sip)
Content-Length: 0

peer details:
username=phonenumber
type=peer
secret=password
restrictcid=no
nat=yes
language=fr
insecure=port,invite
host=siptrunk.ovh.net
fromuser=phonenumber
dtmfmode=inband
defaultexpiry=1800
context=custom-get-did-ovh
canreinvite=no
amaflags=default

incoming Register String: phonenumber:[email protected]

extensions_custom.conf:
[custom-get-did-ovh]
exten => _X.,1,Goto(from-trunk,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)

I have exactly the same config in the “trunk” menu of freepbx, sip.conf / sip_additional.conf, on the old and new server (copy paste, checked and re-checked).

The new server’s IP is added in the OVH interface as allowed
siptrunk.ovh.net is in the firewall’s whitelist (firewall off, same probleme)

The old server can register on this trunk, but not the new one …

Do you have any ideas ?

Thank you

Hello

I have not much in common with your config, I use Freepbx 14, chan_pjsip and another provider. All I can say is that the debug you have included is very much similar to what I see with my config, but for me everything works. The difference is that after the 401 reply from the provider my Freepbx sends another register with the proper response in the Authorization field.
The mystery is not that your provider responds with a 401 since md5 is pretty expected (in fact there are better authentication mechanisms these days), it’s that your system don’t send a md5 register then.
Are you sure that you included everything in your debug log ?
If yes, my only idea is that maybe your previous server has another Asterisk version, much older, where some options have slightly different meanings or even worse default values. In this case all your explicit parameters are identical but the implicit parameters differ. Doing a comparison between log from old server and new server could be interesting.

I can’t say much on your configuration parameters since I use pjsip where parameters are different. I have not seen something that could explain the lack of reaction after the first registration rejection, the one without authentication. But what do I know about chan_sip ? nothing. Hopes this helps nevertheless…