[Home]

Summary:ASTERISK-24981: PJSIP: In-dialog NOTIFYs sent to private NAT IP address
Reporter:Mark Michelson (mmichelson)Labels:
Date Opened:2015-04-20 14:31:21Date Closed:2015-04-22 05:29:38
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-25007 Notify packet to private IP endpoint behind nat with pjsip tls transport
Environment:Attachments:
Description:When a device behind NAT creates a SUBSCRIBE dialog with Asterisk (and the rewrite_contact option is enabled), the initial SUBSCRIBE and NOTIFY transactions from Asterisk send traffic to the public IP address as expected. However, if the subscription state changes, requiring an in-dialog NOTIFY to be sent, Asterisk sends the NOTIFY to the private IP address instead.

This is due to the fact that when the 200 OK for the initial NOTIFY transaction arrives into Asterisk, {{res_pjsip_nat}} does not rewrite the contact as it is expected to. This results in the PJSIP dialog layer re-targeting the dialog to the private IP address since that IP address appears in the Contact header of the inbound 200 OK.
Comments: