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

Mark Michelson reviewboard at asterisk.org
Wed Dec 17 09:36:33 CST 2014


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

Review request for Asterisk Developers.


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/20141217/0c950651/attachment.html>


More information about the asterisk-dev mailing list