Not connecting to provider

Hello

when i try to conect to my provider, with new server, i get this.

Someone knows what can be the issue ?

Thank you

sip port of my freepbx is 5061
xx.xxx.xxx.xxx is the public address of my nat
0033972xxxxxx is my username at the provider

localhost*CLI> sip debug on

localhost*CLI> 
No such command 'sip debug on' (type 'core show help sip debug on' for other possible commands)

localhost*CLI> sip debug on set debug on

localhost*CLI> 
SIP Debugging enabled

localhost*CLI> 
Retransmitting #7 (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK3548ab4e;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 106 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 106 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08105-29caee29-7b8e469b6
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK3548ab4e
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29cae986286cd65c7f19a6da73002878",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> 
REGISTER 11 headers, 0 lines
Reliably Transmitting (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK2ac88076;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 107 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---
[2014-08-27 23:08:15] NOTICE[2218]: chan_sip.c:15358 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #6)
Really destroying SIP dialog '1a3938112a0921984374d5ab687b9200@[::1]' Method: REGISTER

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 100 Trying
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
Content-Length: 0

<------------->

localhost*CLI> 
--- (7 headers 0 lines) ---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08136-29caf7dd-2313770e7
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29caf43802381d231a1dcbce1bbfb473",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> 
Retransmitting #1 (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK2ac88076;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 107 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08136-29caf7dd-2313770e7
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29caf43802381d231a1dcbce1bbfb473",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> 
Retransmitting #2 (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK2ac88076;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 107 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08136-29caf7dd-2313770e7
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29caf43802381d231a1dcbce1bbfb473",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> 
Retransmitting #3 (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK2ac88076;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 107 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08136-29caf7dd-2313770e7
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29caf43802381d231a1dcbce1bbfb473",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> 
Retransmitting #4 (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK2ac88076;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 107 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08136-29caf7dd-2313770e7
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29caf43802381d231a1dcbce1bbfb473",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> 
Retransmitting #5 (NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;branch=z9hG4bK2ac88076;rport

Max-Forwards: 70

From: <sip:[email protected]>;tag=as254b1943

To: <sip:[email protected]>

Call-ID: 1a3938112a0921984374d5ab687b9200@[::1]

CSeq: 107 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta34(12.3.2)

Expires: 120

Contact: <sip:[email protected]:5061>

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 401 Unauthorized
Call-ID: 1a3938112a0921984374d5ab687b9200@[0:0:0:0:0:0:0:1]
CSeq: 107 REGISTER
From: <sip:[email protected]>;tag=as254b1943
To: <sip:[email protected]>;tag=00-08136-29caf7dd-2313770e7
Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK2ac88076
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="29caf43802381d231a1dcbce1bbfb473",opaque="29c82f4a616660d",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

<------------->

localhost*CLI> 
--- (9 headers 0 lines) ---

localhost*CLI> sip set debug onff

localhost*CLI> 
SIP Debugging Disabled

localhost*CLI>

For whatever reason

sip.ovh.fr

is rejecting your calls with an unauthorized 401, you will have to get help from them as to how to properly set your trunk.

You also have a VIA on xx.xxx.xxx.xxx:5061

Via: SIP/2.0/UDP xx.xxx.xxx.xxx:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK3548ab4e

that only you can resolve. because you hide the from xx.xxx.xxx.xxx and the to xx.xxx.xxx.xxx and the agent at xx.xxx.xxx.xxx:5061

@Parisien99 do yourself a favor, unless you need it for some reason switch your Asterisk Version to Asterisk 11, via CLI run the command:

asterisk-version-switch

Eliminate the possibility that your carrier isn’t ready for Asterisk 12… Asterisk 11 is an LTS release and should work great for just about everything you need to do. Using the Distro it will only take you about 15 minutes to change versions.

Hello.

I have already made tests with asterisk 12 and it should work.

Here is my peer section :

username=0033972xxxxxx
type=peer
secret=pass
qualify=yes
localnet=192.168.0.0/255.255.255.0
insecure=port,invite
host=sip.ovh.fr
fromuser=0033972xxxxxx
fromdomain=sip.ovh.fr
externip=xx.xxx.xxx.xxx
context=from-pstn-toheader
canreinvite=yes
bindport=5061
allow=all

my user section :

username=0033972xxxxxx
type=user
secret=pass
localnet=192.168.0.0/255.255.255.0
insecure=no
host=sip.ovh.fr
fromuser=0033972xxxxxx
context=from-trunk
bindport=5061

Someone knows what is wrong ?

Thank you

rzally nobody knows ?