I can not connect to my sip provider?

Hello

I am testing all i can seem a few days and i can not conect my freepbx to OVH provider.

My sip is behind a nat with a static ip adress

i have tryed all configs i can chance on my frepbx server.

I hope someone will help me.

below,

I when i connect, on the cli i have :

[2014-07-31 15:01:58] NOTICE[6839]: chan_sip.c:24122 handle_response_peerpoke: Peer ‘ovh’ is now Reachable. (28ms / 2000ms)
[2014-07-31 15:02:30] WARNING[6839]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 6053fb4b5b0bb67b57f1eafb08632f57@[::1] for seqno 102 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response
[2014-07-31 15:02:58] NOTICE[6839]: chan_sip.c:15358 sip_reg_timeout: – Registration for ‘[email protected]’ timed out, trying again (Attempt #2)
[2014-07-31 15:03:30] WARNING[6839]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 6053fb4b5b0bb67b57f1eafb08632f57@[::1] for seqno 103 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response
[2014-07-31 15:03:58] NOTICE[6839]: chan_sip.c:15358 sip_reg_timeout: – Registration for ‘[email protected]’ timed out, trying again (Attempt #3)
[2014-07-31 15:04:30] WARNING[6839]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 6053fb4b5b0bb67b57f1eafb08632f57@[::1] for seqno 104 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response

00339XXXXXXXX is my username
xx.xxx.xxx.xxx is the extern ip of my nat on which freepbx is connected
192.168.0.37 is the internal ip of the freepbx server

192.168.0.37 is in the DMZ of the nat

on the trunk module of freepbx i have :

Outbound Caller ID : 00339XXXXXXXX
CID Options : allow any cid
trunk nbame : ovh
peer details :
username=00339XXXXXXXX
type=peer
secret=password
qualify=yes
insecure=port,invite
host=sip.ovh.fr
fromuser=00339XXXXXXXX
fromdomain=ovh.fr
externip=xx.xxx.xxx.xxx
context=from-trunk
allow=all

USER CONTEXT : 00339XXXXXXXX
USER Details :
type=friend
secret=password
insecure=port,invite
fromuser=00339XXXXXXXX
fromdomain=ovh.fr
externip=xx.xxx.xxx.xxx
context=from-trunk
allow=all

register string : 00339XXXXXXXX:[email protected]/00339XXXXXXXX

when i do a sip show peer ovh
i have :

* Name       : ovh
  Description  :
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : from-trunk
  Record On feature : automon
  Record Off feature : automon
  Subscr.Cont. : <Not set>
  Language     : fr
  Tonezone     : <Not set>
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  FromUser     : 00339XXXXXXXX
  FromDomain   : ovh.fr Port 5060
  Callgroup    :
  Pickupgroup  :
  Named Callgr :
  Nam. Pickupgr:
  MOH Suggest  :
  Mailbox      :
  VM Extension : *97
  LastMsgsSent : 0/0
  Call limit   : 0
  Max forwards : 0
  Dynamic      : No
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : -1
  Insecure     : port,invite
  Force rport  : No
  Symmetric RTP: Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: 4294967295
  DirectMedia  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Path support : No
  Path         : N/A
  TrustIDOutbnd: Legacy
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       : sip.ovh.fr
  Addr->IP     : 91.121.129.20:5060
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: 00339XXXXXXXX
  SIP Options  : (none)
  Codecs       : (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|speex16|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14|testlaw|g719|speex32|slin12|slin24|slin32|slin44|slin48|slin96|slin192|opus|vp8)
  Codec Order  : (ulaw:20,alaw:20,gsm:20,g726:20,g723:30,g729:20,g722:20,adpcm:0,slin:0,lpc10:0,speex:0,speex16:0,ilbc:0,g726aal2:0,slin16:0,jpeg:0,png:0,h261:0,h263:0,h263p:0,h264:0,mpeg4:0,red:0,t140:0,siren7:0,siren14:0,testlaw:0,g719:0,speex32:0,slin12:0,slin24:0,slin32:0slin44:0slin48:0slin96:0slin192:0opus:0vp8:0)
  Auto-Framing : No
  Status       : OK (28 ms)
  Useragent    :
  Reg. Contact :
  Qualify Freq : 60000 ms
  Keepalive    : 0 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No


sip show settings :



   Global Settings:
    ----------------
      UDP Bindaddress:        0.0.0.0:5061
      TCP SIP Bindaddress:    Disabled
      TLS SIP Bindaddress:    Disabled
      Videosupport:           No
      Textsupport:            No
      Ignore SDP sess. ver.:  No
      AutoCreate Peer:        Off
      Match Auth Username:    No
      Allow unknown access:   No
      Allow subscriptions:    Yes
      Allow overlap dialing:  Yes
      Allow promisc. redir:   No
      Enable call counters:   No
      SIP domain support:     No
      Path support :          No
      Realm. auth:            No
      Our auth realm          asterisk
      Use domains as realms:  No
      Call to non-local dom.: Yes
      URI user is phone no:   No
      Always auth rejects:    Yes
      Direct RTP setup:       No
      User Agent:             FPBX-12.0.1beta22(12.3.2)
      SDP Session Name:       Asterisk PBX 12.3.2
      SDP Owner Name:         root
      Reg. context:           (not set)
      Regexten on Qualify:    No
      Trust RPID:             No
      Send RPID:              No
      Legacy userfield parse: No
      Send Diversion:         Yes
      Caller ID:              Unknown
      From: Domain:
      Record SIP history:     Off
      Auth. Failure Events:   Off
      T.38 support:           No
      T.38 EC mode:           Unknown
      T.38 MaxDtgrm:          4294967295
      SIP realtime:           Disabled
      Qualify Freq :          60000 ms
      Q.850 Reason header:    No
      Store SIP_CAUSE:        No
    
    Network QoS Settings:
    ---------------------------
      IP ToS SIP:             CS3
      IP ToS RTP audio:       EF
      IP ToS RTP video:       AF41
      IP ToS RTP text:        CS0
      802.1p CoS SIP:         4
      802.1p CoS RTP audio:   5
      802.1p CoS RTP video:   6
      802.1p CoS RTP text:    5
      Jitterbuffer enabled:   No
    
    Network Settings:
    ---------------------------
      SIP address remapping:  Disabled, no localnet list
      Externhost:             <none>
      Externaddr:             xx.xxx.xxx.xxx:0
      Externrefresh:          10
    
    Global Signalling Settings:
    ---------------------------
      Codecs:                 (g723|gsm|ulaw|alaw|g726|g729|g722)
      Codec Order:            ulaw:20,alaw:20,gsm:20,g726:20,g723:30,g729:20,g722:20
      Relax DTMF:             No
      RFC2833 Compensation:   No
      Symmetric RTP:          Yes
      Compact SIP headers:    No
      RTP Keepalive:          0 (Disabled)
      RTP Timeout:            30
      RTP Hold Timeout:       300
      MWI NOTIFY mime type:   application/simple-message-summary
      DNS SRV lookup:         Yes
      Pedantic SIP support:   Yes
      Reg. min duration       60 secs
      Reg. max duration:      3600 secs
      Reg. default duration:  120 secs
      Sub. min duration       60 secs
      Sub. max duration:      3600 secs
      Outbound reg. timeout:  60 secs
      Outbound reg. attempts: 0
      Outbound reg. retry 403:0
      Notify ringing state:   Yes
        Include CID:          No
      Notify hold state:      Yes
      SIP Transfer mode:      open
      Max Call Bitrate:       384 kbps
      Auto-Framing:           No
      Outb. proxy:            <not set>
      Session Timers:         Accept
      Session Refresher:      uas
      Session Expires:        1800 secs
      Session Min-SE:         90 secs
      Timer T1:               500
      Timer T1 minimum:       100
      Timer B:                32000
      No premature media:     Yes
      Max forwards:           70
    
    Default Settings:
    -----------------
      Allowed transports:     UDP
      Outbound transport:     UDP
      Context:                from-sip-external
      Record on feature:      automon
      Record off feature:     automon
      Force rport:            No
      DTMF:                   rfc2833
      Qualify:                0
      Keepalive:              0
      Use ClientCode:         No
      Progress inband:        Never
      Language:               fr
      Tone zone:              <Not set>
      MOH Interpret:          default
      MOH Suggest:
      Voice Mail Extension:   *97

and for the sip trace :

Reliably Transmitting (no NAT) to 91.121.129.20:5060:
OPTIONS sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK675f6870

Max-Forwards: 70

From: "Unknown" <sip:[email protected]:5061>;tag=as72cf1338

To: <sip:sip.ovh.fr>

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

Call-ID: [email protected]:5061

CSeq: 102 OPTIONS

User-Agent: FPBX-12.0.1beta22(12.3.2)

Date: Thu, 31 Jul 2014 12:48:33 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

Supported: replaces, timer

Content-Length: 0




---

localhost*CLI> 

<--- SIP read from UDP:91.121.129.20:5060 --->
SIP/2.0 501 Not Implemented
Call-ID: [email protected]:5061
CSeq: 102 OPTIONS
From: "Unknown" <sip:[email protected]:5061>;tag=as72cf1338
To: <sip:sip.ovh.fr>;tag=00-24726-0d996d3c-632b1a8f0
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK675f6870
Content-Length: 0

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

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

localhost*CLI> 
[2014-07-31 14:48:33] NOTICE[6839]: chan_sip.c:24122 handle_response_peerpoke: Peer 'ovh' is now Reachable. (42ms / 2000ms)

localhost*CLI> 
Really destroying SIP dialog '[email protected]:5061' Method: OPTIONS

localhost*CLI> 
[2014-07-31 14:48:33] NOTICE[6839]: chan_sip.c:15282 sip_reregister:    -- Re-registration for  [email protected]

localhost*CLI> 
REGISTER 11 headers, 0 lines

localhost*CLI> 
Reliably Transmitting (no NAT) to 91.121.129.20:5060:
REGISTER sip:sip.ovh.fr SIP/2.0

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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 100 Trying
Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(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: 6c46d7660c30b85f4c381b353eaccb53@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: <sip:[email protected]>;tag=as149a36a6
To: <sip:[email protected]>;tag=00-07827-19c34028-3db2ca7c5
Via: SIP/2.0/UDP 192.168.0.37:5061;received=xx.xxx.xxx.xxx;rport=5061;branch=z9hG4bK0d4bf7ed
WWW-Authenticate: Digest realm="sip.ovh.fr",nonce="19c33cdc64ec949c7aec3def57d0c3ea",opaque="19c05aa008792b5",stale=false,algorithm=MD5
Server: Cirpack/v4.56 (gw_sip)
Content-Length: 0

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

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

localhost*CLI> 
[2014-07-31 14:49:05] WARNING[6839]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 6c46d7660c30b85f4c381b353eaccb53@[::1] for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response

localhost*CLI> sip set debug onff

localhost*CLI> 
SIP Debugging Disabled

Nobody can help me for that ?

Can you try to register using only your register string and this config:

PEER section

type=peer
qualify=yes
host=sip.ovh.fr

USER section

type=user
context=from-trunk

Apply config. Type in the asterisk CLI “sip show registry”

Host dnsmgr Username Refresh State Reg.Time
sip.comtube.com:5060 N 105 Registered Mon, 04 Aug 2014 16:07:37
1 SIP registrations.

Can you try to set “externip”=“internal ip of the freepbx server”? Disable port forwarding if exist.

Hello and thank you for your help.

What port forwarding are you talking about ? I just have the computer with freepbx in the dmz on the router.

I have put what you said in peer and user and added externip=xx.xx.xx.xx on peer and user

and i have that on the cli :

 [2014-08-04 15:00:46] NOTICE[2270]: chan_sip.c:24122 handle_response_peerpoke: Peer 'ovh' is now Reachabl                                                           e. (37ms / 2000ms)
[2014-08-04 15:01:18] WARNING[2270]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 65572ab277f98405281fe63a68a33a6e@[::1] for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
localhost*CLI> sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time                                                                 
sip.ovh.fr:5060                         N      00339xxxxxxxx       120 Request Sent                                                                                  
1 SIP registrations.
localhost*CLI> sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time
sip.ovh.fr:5060                         N      00339xxxxxxxx       120 Request Sent
1 SIP registrations.
[2014-08-04 15:01:46] NOTICE[2270]: chan_sip.c:15358 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #2)
[2014-08-04 15:02:18] WARNING[2270]: chan_sip.c:4254 retrans_pkt: Retransmission timeout reached on transmission 65572ab277f98405281fe63a68a33a6e@[::1] for seqno 103 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[2014-08-04 15:02:46] NOTICE[2270]: chan_sip.c:15358 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #3)
localhost*CLI>

Any idea ?

Thank you

Your NAT is misconfigured

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

Via: SIP/2.0/UDP 192.168.0.37:5061;branch=z9hG4bK0d4bf7ed

Max-Forwards: 70

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

To: <sip:[email protected]>

Call-ID: 6c46d7660c30b85f4c381b353eaccb53@[::1]

CSeq: 102 REGISTER

Supported: replaces, timer

User-Agent: FPBX-12.0.1beta22(12.3.2)

Expires: 120

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

Content-Length: 0




---

The last via is

Via: SIP/2.0/UDP 192.168.0.37:5061

so ovh.fr will try to send the reply to 192.168.0.37, this wont work.

Hello

this is what i was thinking.

But what should i do ?
192.168.0.37 is on the DMZ of the NAT. I can not do more on the nat.

Is there a way to tell asterisk to add the right address here ?

Thank you

http://wiki.freepbx.org/display/F2/Asterisk+SIP+Settings

It might be in the DMZ (it shouldn’t be for security reasons) but you will still need to NAT traffic for the external IP to 192.168.0.37/32 on your router

Thank you for your answer but I really don’t understand what you say on last message, i am sorry (it is my english !!!)

What i don’t understand is that there is not another setting on the nat to tell the nat to send the real ip address in sip messages.

But my nat is my modem/router of free and it is the second biggest ISP in France. So i don’t think that i am the only one to use asterisk/freepbx behing this modem/routeur.

Also, when i was using asterisk 8 (without freepbx) behind the same modem/routeur, it was configured exactly the same and it worked perfectly :

[general]
language=fr
allowguest=yes
progressinband=yes
language=fr
canreinvite=no
Externip=tt.ttt.tt.ttt
localnet=192.168.0.0/255.255.255.0
srvlookup=yes
bindport=5060 
bindaddr=0.0.0.0
nat=yes
defaultexpiry = 3600
register => 0033xxxxxxxxx:[email protected]/0033xxxxxxxxx


[ovh2]
useragent="C610 IP/42.072.00.000.000"
disallow=all 
username=0033xxxxxxxxx
type=friend 
secret=pass
qualify=yes 
insecure=port,invite 
host=sip.ovh.fr
fromuser=0033xxxxxxxxx
fromdomain=sip.ovh.fr
context=ov3 
allow=ulaw 
allow=alaw

hello

still nobody have an idea of the issue ?

thank you

Me again.

Do you think if i take one hour of paid support at schmooze, they can fix the issue for me ???

Support specialists can require VPN connection to your system. It can be done from FreePBX module System Admin (commercial edition)

VPN

When the service is running, a secure, encrypted tunnel is connected to FreePBX Professional Support’s infrastructure.
This allows for FreePBX Professional Support’s support personnel to be able to remotely support systems that do not
or can not open required ports.

This is my basic config in FreePBX Trunks module (allow only call to carrier’s ID’s)

That generates code in sip.conf

[general]
register=2168xx:[email protected]/2168xx

[trunk_comtube]
type=peer
qualify=yes
host=sip.comtube.com
disallow=h263
disallow=h263p
disallow=h264
disallow=h261
context=from-trunk-sip-trunk_comtube

[general]
nat=yes
externip=10.169.2.222
localnet=10.0.0.0/255.0.0.0