[asterisk-bugs] [JIRA] (ASTERISK-20572) Realtime Peers behind NAT are Set to RFC1918 private address after sip reload

Paul Mathews (JIRA) noreply at issues.asterisk.org
Thu Feb 13 03:55:03 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215194#comment-215194 ] 

Paul Mathews commented on ASTERISK-20572:
-----------------------------------------

I have 1.8.20.1 and have the same problem. Here is the problem I am facing:

I have a realtime peer behind NAT. Things work perfectly. I then did an asterisk reload, which caused the peer cache to be cleared, I then attempted to reach the peer. The private IP address from the Reg. Contact was copied over to the IP address, which caused the peer to be unreachable. 

Here is the sip show peer 10116 before reload
ip-10-0-0-94*CLI> sip show peer 10116


  * Name       : 10116
  Realtime peer: Yes, cached
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : from-internal
  Subscr.Cont. : <Not set>
  Language     :
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    :
  Pickupgroup  :
  MOH Suggest  :
  Mailbox      :
  VM Extension : *97
  LastMsgsSent : 32767/65535
  Call limit   : 0
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : 191
  Insecure     : no
  Force rport  : Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: -1
  DirectMedia  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       :
  Addr->IP     : 27.122.12.75:50427
  Defaddr->IP  : (null)
  Prim.Transp. : TCP
  Allowed.Trsp : TCP,UDP
  Def. Username: 10116
  SIP Options  : (none)
  Codecs       : 0x50e (gsm|ulaw|alaw|g729|ilbc)
  Codec Order  : (g729:20,ilbc:30,gsm:20,ulaw:20,alaw:20)
  Auto-Framing :  No
  Status       : OK (471 ms)
  Useragent    : MicroSIP/3.3.31
  Reg. Contact : sip:10116 at 10.185.1.6:5060;transport=TCP;ob
  Qualify Freq : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No


Here is the sip show peer after reload

ip-10-0-0-94*CLI> sip show peer 10116


  * Name       : 10116
  Realtime peer: Yes, cached
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : from-internal
  Subscr.Cont. : <Not set>
  Language     :
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    :
  Pickupgroup  :
  MOH Suggest  :
  Mailbox      :
  VM Extension : *97
  LastMsgsSent : 32767/65535
  Call limit   : 0
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : -1
  Insecure     : no
  Force rport  : Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: -1
  DirectMedia  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       :
  Addr->IP     : 10.185.1.6:50427
  Defaddr->IP  : (null)
  Prim.Transp. : TCP
  Allowed.Trsp : TCP,UDP
  Def. Username: 10116
  SIP Options  : (none)
  Codecs       : 0x50e (gsm|ulaw|alaw|g729|ilbc)
  Codec Order  : (g729:20,ilbc:30,gsm:20,ulaw:20,alaw:20)
  Auto-Framing :  No
  Status       : UNREACHABLE
  Useragent    : MicroSIP/3.3.31
  Reg. Contact : sip:10116 at 10.185.1.6:5060;transport=TCP;ob
  Qualify Freq : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No



                
> Realtime Peers behind NAT are Set to RFC1918 private address after sip reload
> -----------------------------------------------------------------------------
>
>                 Key: ASTERISK-20572
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20572
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General, PBX/pbx_realtime
>    Affects Versions: 10.9.0
>            Reporter: JoshE
>            Severity: Critical
>      Target Release: 1.8.19.0, 10.11.0, 10.11.0-digiumphones, 11.1.0
>
>         Attachments: fix_nat_realtime.diff
>
>
> Repro steps:
> Realtime peer behind RFC1918 NAT.
> Register the peer and verify public IP address shows up under 'sip show peers'.
> Issue a SIP reload.
> Perform any dial action that will cause the peer reload process to happen.
> Check 'sip show peers'.
> The private IP address will be listed.  If that peer is qualified, it will immediately go offline and remain so until it re-registers.
> Traced problem back to dynamic host detection nulling out the ast_sockaddr if it is in !found state.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list