Summary: | ASTERISK-27341: [patch] res_pjsip_session: SIP/SDP origin (o=) contains local address. | ||
Reporter: | Alexander Traud (traud) | Labels: | patch pjsip |
Date Opened: | 2017-10-13 09:39:34 | Date Closed: | 2017-10-17 06:27:28 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Resources/res_pjsip_session |
Versions: | 13.18.0 14.7.0 15.1.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) pjsip_dynamic_external_media_address_for_origin.patch | |
Description: | Since 1st of August 2017 ([Commit 114602f|http://github.com/asterisk/asterisk/commit/114602f43436b91bb043f832285180e74332c941], [Gerrit 6068|http://gerrit.asterisk.org/6068]) in the upcoming Asterisk 13.18.0, I am able to use the channel driver based on PJSIP not only behind a NAT but also with my daily changing IP, by using my domain name for {{external_media_address}} and {{external_signaling_address}}. See also the [Wiki…|http://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip+to+work+through+NAT]
However, the current implementation changes only the connection address (c=) in SDP, not the originator of the session (o=). Therefore, o= contains the local address of my Asterisk, for example IP4 192.168.x.x. However, [RFC 4566|http://tools.ietf.org/html/rfc4566#section-5.2] (and its predecessor RFC 2327) state: bq. A local IP address MUST NOT be used in any context where the SDP description might leave the scope in which the address is meaningful \[…\]. Nevertheless, local addresses are accepted by many (all?) VoIP/SIP user agents in that place. Anyway, to be compliant with that RFC, I would have to set the attribute {{media_address}} on each endpoint, which requires the current IP address and does not allow a domain name. Consequently, to be compliant with the RFC, I would have to overwrite/disable that new dynamic IP feature of {{external_media_address}}. The attached patch also rewrites the origin address. Not sure, which affected versions I should mention in the issue tracker. Because I am not aware of any implementation which is affected by this, I classified the severity as Minor. If somebody knows an implementation, please, raise the severity here. | ||
Comments: | By: Friendly Automation (friendly-automation) 2017-10-17 06:27:29.255-0500 Change 6793 merged by Jenkins2: res_pjsip_session: Rewrite o= with external_media_address. [https://gerrit.asterisk.org/6793|https://gerrit.asterisk.org/6793] By: Friendly Automation (friendly-automation) 2017-10-17 06:31:01.093-0500 Change 6794 merged by Jenkins2: res_pjsip_session: Rewrite o= with external_media_address. [https://gerrit.asterisk.org/6794|https://gerrit.asterisk.org/6794] By: Friendly Automation (friendly-automation) 2017-10-17 06:35:23.642-0500 Change 6792 merged by Jenkins2: res_pjsip_session: Rewrite o= with external_media_address. [https://gerrit.asterisk.org/6792|https://gerrit.asterisk.org/6792] |