[asterisk-dev] [Code Review] 4277: Ensure that CHANNEL(pjsip, secure) gives expected value.

Mark Michelson reviewboard at asterisk.org
Thu Dec 18 08:44:01 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4277/
-----------------------------------------------------------

(Updated Dec. 18, 2014, 8:44 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 429739


Repository: Asterisk


Description
-------

We were using the pjsip_dialog's secure flag to indicate if the transport in use was secure. However, there is a difference between dialog security and transport security. In RFC 3261 sections 12.1.1 and 12.1.2, it indicates that for a dialog to be secure, the transport in use must be secure AND the target URI must be a SIPS URI. Since we're only interested in if the transport in use is secure, we have to use a different method to determine that.

This patch seeks to fix this by asking PJSIP for information about the dialog's target URI and then checking if the transport in use is a secure transport.


Diffs
-----

  /branches/13/channels/pjsip/dialplan_functions.c 429672 

Diff: https://reviewboard.asterisk.org/r/4277/diff/


Testing
-------

This has been tested by John Bigelow by placing a call over TLS into the dialplan and seeing the value of ${CHANNEL(pjsip,secure)}. With a TLS transport, this returns 1. When re-run without a TLS transport, this returns 0. It has also been tested that this value functions independently of ${CHANNEL(rtp, secure)} as expected.


Thanks,

Mark Michelson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141218/3fd6aabb/attachment.html>


More information about the asterisk-dev mailing list