From fec1046db2e464e1b543458b3d4c3a9da365966a Mon Sep 17 00:00:00 2001
From: Brian West <brian@freeswitch.org>
Date: Thu, 8 Nov 2012 12:54:57 -0600
Subject: [PATCH] FS-4807 clear up an example for people that don't want to
 bother with learning how things work

---
 conf/vanilla/dialplan/default.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/conf/vanilla/dialplan/default.xml b/conf/vanilla/dialplan/default.xml
index 82189d6633..7f5002152f 100644
--- a/conf/vanilla/dialplan/default.xml
+++ b/conf/vanilla/dialplan/default.xml
@@ -141,6 +141,18 @@
 	<!-- <action application="export" data="sip_secure_media=true"/> -->
       </condition>
 
+      <!--
+	 Since we have inbound-late-negotation on by default now the
+	 above behavior isn't the same so you have to do one extra step.
+	-->
+      <condition field="${endpoint_disposition}" expression="^(DELAYED NEGOTIATION)"/>
+      <condition field="${switch_r_sdp}" expression="(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)" break="never">
+	<action application="set" data="sip_secure_media=true"/>
+	<!-- Offer SRTP on outbound legs if we have it on inbound. -->
+	<!-- <action application="export" data="sip_secure_media=true"/> -->
+      </condition>
+
+
       <condition>
 	<action application="hash" data="insert/${domain_name}-spymap/${caller_id_number}/${uuid}"/>
 	<action application="hash" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/>