<h1>Project "FreeSWITCH user-contributed scripts, etc" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
  discards  9ff716208ae05c3e9cb55d639243371e8553bb17 (commit)
  discards  a4349bbeba56858b0c17f8b69ed69ecebba0bc58 (commit)
  discards  d93d8a0e353b8a112167961178bffda485356ee7 (commit)
  discards  f192c27939941db18bdf2c543a9e14b21ae16fd0 (commit)
       via: 319c6bf92e7368d4ce0c7bfdd2efb569368579f2 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (9ff716208ae05c3e9cb55d639243371e8553bb17)
            \
             N -- N -- N (319c6bf92e7368d4ce0c7bfdd2efb569368579f2)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Mitch Capper
comments: 
Fixed TLS / secure params and support secure media outbound dialing. Added checks to make sure certs are where they need to be for TLS to work properly.

<span style="color: #000080; font-weight: bold">diff --git a/mitchcapper/FSClient/Account.cs b/mitchcapper/FSClient/Account.cs</span>
<span style="color: #000080; font-weight: bold">index 59f0197..5d86035 100644</span>
<span style="color: #A00000">--- a/mitchcapper/FSClient/Account.cs</span>
<span style="color: #00A000">+++ b/mitchcapper/FSClient/Account.cs</span>
<span style="color: #800080; font-weight: bold">@@ -2,6 +2,7 @@</span>
 using System;
 using System.Collections.ObjectModel;
 using System.Linq;
<span style="color: #00A000">+using System.Windows;</span>
 using System.Xml;
 using FreeSWITCH.Native;
 using System.Xml.Serialization;
<span style="color: #800080; font-weight: bold">@@ -49,15 +50,17 @@ namespace FSClient {</span>
                                                                         new        Field(Field.FIELD_TYPE.String, &quot;SIP URL for Checking Voicemail&quot;,&quot;sip_check_voicemail_url&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;),
                                                                         new        Field(Field.FIELD_TYPE.String, &quot;SIP URL for Sending to Voicemail&quot;,&quot;sip_send_voicemail_url&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;),
                                                                         new Field(Field.FIELD_TYPE.Bool,&quot;Register&quot;,&quot;register&quot;,&quot;register&quot;,&quot;true&quot;,&quot;&quot;),
<span style="color: #00A000">+                                                                        new Field(Field.FIELD_TYPE.Combo,&quot;Register Transport&quot;,&quot;register-transport&quot;,&quot;register-transport&quot;,&quot;udp&quot;,&quot;&quot;, &quot;udp&quot;,&quot;tcp&quot;,&quot;sctp&quot;,&quot;tls&quot;),</span>
<span style="color: #00A000">+                                                                        new Field(Field.FIELD_TYPE.Bool,&quot;SIP Secure Media&quot;,&quot;sip_secure_media&quot;,&quot;sip_secure_media&quot;,&quot;false&quot;,&quot;&quot;),</span>
<span style="color: #00A000">+</span>
                                                                         new Field(Field.FIELD_TYPE.String,&quot;Proxy&quot;,&quot;proxy&quot;,&quot;proxy&quot;,&quot;&quot;,&quot;Advanced&quot;),
<span style="color: #00A000">+                                                                        new Field(Field.FIELD_TYPE.Int,&quot;Ping Seconds&quot;,&quot;ping&quot;,&quot;ping&quot;,&quot;30&quot;,&quot;Advanced&quot;),</span>
                                                                         new Field(Field.FIELD_TYPE.String,&quot;Outbound Proxy&quot;,&quot;outbound-proxy&quot;,&quot;outbound-proxy&quot;,&quot;&quot;,&quot;Advanced&quot;),
                                                                         new Field(Field.FIELD_TYPE.String,&quot;Register Proxy&quot;,&quot;register-proxy&quot;,&quot;register-proxy&quot;,&quot;&quot;,&quot;Advanced&quot;),
<span style="color: #A00000">-                                                                        </span>
                                                                         new Field(Field.FIELD_TYPE.Int,&quot;Expire Seconds&quot;,&quot;expire-seconds&quot;,&quot;expire-seconds&quot;,&quot;3600&quot;,&quot;Advanced&quot;),
                                                                         new Field(Field.FIELD_TYPE.Int,&quot;Retry Seconds&quot;,&quot;retry-seconds&quot;,&quot;retry-seconds&quot;,&quot;30&quot;,&quot;Advanced&quot;),
<span style="color: #A00000">-                                                                        new Field(Field.FIELD_TYPE.Int,&quot;Ping Seconds&quot;,&quot;ping&quot;,&quot;ping&quot;,&quot;30&quot;,&quot;Advanced&quot;),</span>
<span style="color: #A00000">-                                                                        new Field(Field.FIELD_TYPE.Combo,&quot;Register Transport&quot;,&quot;register-transport&quot;,&quot;register-transport&quot;,&quot;udp&quot;,&quot;Advanced&quot;, &quot;udp&quot;,&quot;tcp&quot;,&quot;sctp&quot;,&quot;tls&quot;),</span>
<span style="color: #A00000">-                                                                        new Field(Field.FIELD_TYPE.Bool,&quot;SIP Secure Media&quot;,&quot;sip_secure_media&quot;,&quot;sip_secure_media&quot;,&quot;false&quot;,&quot;&quot;)</span>
<span style="color: #00A000">+                                                                        new Field(Field.FIELD_TYPE.String,&quot;Contact Params&quot;,&quot;contact-params&quot;,&quot;contact-params&quot;,&quot;&quot;,&quot;Advanced&quot;)</span>
<span style="color: #00A000">+</span>
                                                                   };
                 #region Static Methods
 
<span style="color: #800080; font-weight: bold">@@ -131,10 +134,10 @@ namespace FSClient {</span>
                         ReloadSofia();
                 }
 
<span style="color: #A00000">-                public static void create_gateway_nodes(XmlNode gateways_node) {</span>
<span style="color: #00A000">+                public static void create_gateway_nodes(XmlNode gateways_node, bool tls_enabled) {</span>
                         foreach (Account account in accounts) {
                                 if (account.enabled)
<span style="color: #A00000">-                                        account.create_gateway_node(gateways_node);</span>
<span style="color: #00A000">+                                        account.create_gateway_node(gateways_node,tls_enabled);</span>
                         }
                 }
                 public static void HandleGatewayEvent(FSEvent evt) {
<span style="color: #800080; font-weight: bold">@@ -197,7 +200,8 @@ namespace FSClient {</span>
                 public void CreateCall(String number) {
                         if (!enabled)
                                 return;
<span style="color: #A00000">-                        PortAudio.Call(&quot;sofia/gateway/&quot; + gateway_id + &quot;/&quot; + number);</span>
<span style="color: #00A000">+                        String sec_media = secure_media ? &quot;{sip_secure_media=true}&quot; : &quot;&quot;;</span>
<span style="color: #00A000">+                        PortAudio.Call(sec_media + &quot;sofia/gateway/&quot; + gateway_id + &quot;/&quot; + number);</span>
                 }
                 private void KillGateway() {
                         if (!String.IsNullOrEmpty(old_gateway_id))
<span style="color: #800080; font-weight: bold">@@ -269,6 +273,16 @@ namespace FSClient {</span>
                 }
                 private bool _enabled;
 
<span style="color: #00A000">+                public bool secure_media {</span>
<span style="color: #00A000">+                        get { return _secure_media; }</span>
<span style="color: #00A000">+                        private set {</span>
<span style="color: #00A000">+                                if (value == _secure_media)</span>
<span style="color: #00A000">+                                        return;</span>
<span style="color: #00A000">+                                _secure_media = value;</span>
<span style="color: #00A000">+                                RaisePropertyChanged(&quot;secure_media&quot;);</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                private bool _secure_media;</span>
 
                 public string name {
                         get { return _name.value; }
<span style="color: #800080; font-weight: bold">@@ -317,13 +331,22 @@ namespace FSClient {</span>
                                 Broker.get_instance().reload_sofia(Sofia.RELOAD_CONFIG_MODE.SOFT);
 
                 }
<span style="color: #A00000">-                private void create_gateway_node(XmlNode gateways_node) {</span>
<span style="color: #00A000">+                private void create_gateway_node(XmlNode gateways_node, bool tls_enabled) {</span>
                         XmlNode node = XmlUtils.AddNodeNode(gateways_node, &quot;gateway&quot;);
                         XmlUtils.AddNodeAttrib(node, &quot;name&quot;, gateway_id);
                         old_gateway_id = gateway_id;
                         foreach (FieldValue value in values) {
<span style="color: #A00000">-                                if (!String.IsNullOrEmpty(value.field.xml_name))</span>
<span style="color: #00A000">+                                if (!String.IsNullOrEmpty(value.field.xml_name)){</span>
<span style="color: #00A000">+                                        if (value.field.name == &quot;register-transport&quot; &amp;&amp; value.value == &quot;tls&quot; &amp;&amp; ! tls_enabled){</span>
<span style="color: #00A000">+                                                MessageBox.Show(&quot;Warning the register-transport for account: &quot; + name + &quot; is set to tls, however you have tls disabled in your sofia settings this account will be disabled for now&quot;);</span>
<span style="color: #00A000">+                                                gateways_node.RemoveChild(node);</span>
<span style="color: #00A000">+                                                enabled = false;</span>
<span style="color: #00A000">+                                                return;</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                        if (value.field.name == &quot;sip_secure_media&quot;)</span>
<span style="color: #00A000">+                                                secure_media = value.value == &quot;true&quot;;</span>
                                         Utils.add_xml_param(node, value.field.xml_name, value.value);
<span style="color: #00A000">+                                }</span>
                         }
                         //Was preventing gateway ID from being passed to create_channel so removed (needed for incoming calls)
                         //FieldValue user = FieldValue.GetByName(values, &quot;username&quot;);
<span style="color: #000080; font-weight: bold">diff --git a/mitchcapper/FSClient/Sofia.cs b/mitchcapper/FSClient/Sofia.cs</span>
<span style="color: #000080; font-weight: bold">index b3f3b3d..4051172 100644</span>
<span style="color: #A00000">--- a/mitchcapper/FSClient/Sofia.cs</span>
<span style="color: #00A000">+++ b/mitchcapper/FSClient/Sofia.cs</span>
<span style="color: #800080; font-weight: bold">@@ -46,11 +46,13 @@ namespace FSClient {</span>
 
                                                                                         /*Security*/
                                                                                         new Field(Field.FIELD_TYPE.Bool,&quot;TLS&quot;,&quot;tls&quot;,&quot;tls&quot;,&quot;false&quot;,&quot;Security&quot;),
<span style="color: #A00000">-                                                                                        new Field(Field.FIELD_TYPE.Combo,&quot;TLS Version&quot;,&quot;tls-version&quot;,&quot;tls-version&quot;,&quot;tlsv1&quot;,&quot;Security&quot;,&quot;tlsv1&quot;,&quot;sslv23&quot;),</span>
<span style="color: #00A000">+                                                                                        new Field(Field.FIELD_TYPE.Combo,&quot;TLS Verify Policy&quot;,&quot;tls-verify-policy&quot;,&quot;tls-verify-policy&quot;,&quot;subjects_out&quot;,&quot;Security&quot;,new Field.FieldOption{display_value=&quot;None&quot;, value=&quot;&quot;},new Field.FieldOption{display_value=&quot;Outbound Certificates&quot;, value=&quot;out&quot;},new Field.FieldOption{display_value=&quot;Outbound Certs &amp; Hostnames&quot;, value=&quot;subjects_out&quot;}),</span>
<span style="color: #00A000">+                                                                                        new Field(Field.FIELD_TYPE.Combo,&quot;TLS Version&quot;,&quot;tls-version&quot;,&quot;tls-version&quot;,&quot;sslv23&quot;,&quot;Security&quot;,&quot;sslv23&quot;,&quot;tlsv1&quot;),</span>
                                                                                         new Field(Field.FIELD_TYPE.String,&quot;TLS Bind Params&quot;,&quot;tls-bind-params&quot;,&quot;tls-bind-params&quot;,&quot;transport=tls&quot;,&quot;Security&quot;),
                                                                                         new Field(Field.FIELD_TYPE.Int,&quot;TLS SIP Port&quot;,&quot;tls-sip-port&quot;,&quot;tls-sip-port&quot;,&quot;12347&quot;,&quot;Security&quot;),
<span style="color: #A00000">-                                                                                        new Field(Field.FIELD_TYPE.Bool,&quot;Auth All Packets&quot;,&quot;auth-all-packets&quot;,&quot;auth-all-packets&quot;,&quot;false&quot;,&quot;Security&quot;),</span>
<span style="color: #A00000">-                                                                                        new Field(Field.FIELD_TYPE.Bool,&quot;Auth Calls&quot;,&quot;auth-calls&quot;,&quot;auth-calls&quot;,&quot;false&quot;,&quot;Security&quot;),</span>
<span style="color: #00A000">+                                                                                        new Field(Field.FIELD_TYPE.String,&quot;TLS Certificate Directory&quot;,&quot;tls-cert-dir&quot;,&quot;tls-cert-dir&quot;,&quot;conf/ssl&quot;,&quot;Security&quot;),</span>
<span style="color: #00A000">+                                                                                        new Field(Field.FIELD_TYPE.Int,&quot;TLS Max Verify Depth&quot;,&quot;tls-verify-depth&quot;,&quot;tls-verify-depth&quot;,&quot;2&quot;,&quot;Security&quot;),</span>
<span style="color: #00A000">+                                                                                        new Field(Field.FIELD_TYPE.Bool,&quot;TLS No Certificate Date Validation&quot;,&quot;tls-no-verify-date&quot;,&quot;tls-no-verify-date&quot;,&quot;false&quot;,&quot;Security&quot;),</span>
 
                                                                                         /*Advanced*/
                                                                                         new Field(Field.FIELD_TYPE.String,&quot;Challenge Realm&quot;,&quot;challenge-realm&quot;,&quot;challenge-realm&quot;,&quot;auto_from&quot;,&quot;Advanced&quot;),
<span style="color: #800080; font-weight: bold">@@ -66,7 +68,7 @@ namespace FSClient {</span>
                                                                                         new Field(Field.FIELD_TYPE.Int,&quot;RTP Hold Timeout Seconds&quot;,&quot;rtp-hold-timeout-sec&quot;,&quot;rtp-hold-timeout-sec&quot;,&quot;1800&quot;,&quot;Advanced&quot;),
                                                                                         new Field(Field.FIELD_TYPE.Int,&quot;RTP Tiemout Seconds&quot;,&quot;rtp-timeout-sec&quot;,&quot;rtp-timeout-sec&quot;,&quot;300&quot;,&quot;Advanced&quot;),
                                                                                         new Field(Field.FIELD_TYPE.String,&quot;RTP Timer Name&quot;,&quot;rtp-timer-name&quot;,&quot;rtp-timer-name&quot;,&quot;soft&quot;,&quot;Advanced&quot;),
<span style="color: #A00000">-                                                                                        </span>
<span style="color: #00A000">+</span>
 
 
                                                                            };
<span style="color: #800080; font-weight: bold">@@ -80,18 +82,35 @@ namespace FSClient {</span>
                         XmlNode profile = XmlUtils.AddNodeNode(profiles, &quot;profile&quot;);
                         XmlUtils.AddNodeAttrib(profile, &quot;name&quot;, &quot;softphone&quot;);
                         XmlNode gateways = XmlUtils.AddNodeNode(profile, &quot;gateways&quot;);
<span style="color: #A00000">-                        Account.create_gateway_nodes(gateways);</span>
<span style="color: #00A000">+                        Account.create_gateway_nodes(gateways,FieldValue.GetByName(values, &quot;tls&quot;).value == &quot;true&quot;);</span>
                         XmlNode settings = XmlUtils.AddNodeNode(profile, &quot;settings&quot;);
 
                         Utils.add_xml_param(settings, &quot;context&quot;, &quot;public&quot;);
                         Utils.add_xml_param(settings, &quot;dialplan&quot;, &quot;xml&quot;);
                         Utils.add_xml_param(settings, &quot;disable-register&quot;, &quot;true&quot;);
                         foreach (FieldValue value in values) {
<span style="color: #A00000">-                                if (!String.IsNullOrEmpty(value.field.xml_name))</span>
<span style="color: #A00000">-                                        Utils.add_xml_param(settings, value.field.xml_name, value.value);</span>
<span style="color: #00A000">+                                if (!String.IsNullOrEmpty(value.field.xml_name)){</span>
<span style="color: #00A000">+                                        String param_value = value.value;</span>
<span style="color: #00A000">+                                        if (value.field.name == &quot;tls&quot; &amp;&amp; value.value == &quot;true&quot;) {//lets make sure that we have a cafile.pem</span>
<span style="color: #00A000">+                                                </span>
<span style="color: #00A000">+                                                String base_dir = FieldValue.GetByName(values, &quot;tls-cert-dir&quot;).value;</span>
<span style="color: #00A000">+                                                if (String.IsNullOrWhiteSpace(base_dir))</span>
<span style="color: #00A000">+                                                        base_dir = &quot;conf/ssl&quot;;</span>
<span style="color: #00A000">+                                                                //this is what freeswitch uses by default if its empty, if this changes this code needs to be updated</span>
<span style="color: #00A000">+                                                base_dir = base_dir.Replace(&#39;/&#39;, &#39;\\&#39;); //windows file path</span>
<span style="color: #00A000">+                                                if (base_dir[base_dir.Length - 1] != &#39;\\&#39;)</span>
<span style="color: #00A000">+                                                        base_dir += &#39;\\&#39;;</span>
<span style="color: #00A000">+                                                if (!System.IO.File.Exists(base_dir + &quot;cafile.pem&quot;)){</span>
<span style="color: #00A000">+                                                        MessageBox.Show(&quot;Your sofia settings have TLS enabled however you do not have a cafile.pem in your cert folder, this will most likely cause the entire softphone profile not to load so I am disabling TLS in the profile for now&quot;);</span>
<span style="color: #00A000">+                                                        param_value = &quot;false&quot;;</span>
<span style="color: #00A000">+                                                }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                        Utils.add_xml_param(settings, value.field.xml_name, param_value);</span>
<span style="color: #00A000">+                                }</span>
                         }
 
<span style="color: #A00000">-</span>
<span style="color: #00A000">+                        DelayedFunction.DelayedCall(&quot;SofiaProfileCheck&quot;, sofia_profile_check, 1200);</span>
                 }
 
                 public enum RELOAD_CONFIG_MODE {
<span style="color: #800080; font-weight: bold">@@ -106,11 +125,9 @@ namespace FSClient {</span>
                                         break;
                                 case RELOAD_CONFIG_MODE.HARD:
                                         Utils.api_exec(&quot;sofia&quot;, &quot;profile softphone restart reloadxml&quot;);
<span style="color: #A00000">-                                        DelayedFunction.DelayedCall(&quot;SofiaProfileCheck&quot;, sofia_profile_check, 100);</span>
                                         break;
                                 case RELOAD_CONFIG_MODE.MODULE:
                                         Utils.api_exec(&quot;reload&quot;, &quot;mod_sofia&quot;);
<span style="color: #A00000">-                                        DelayedFunction.DelayedCall(&quot;SofiaProfileCheck&quot;, sofia_profile_check, 500);</span>
                                         break;
                         }
                 }
</pre></div>
========================================================================<pre>

Summary of changes:
 hunmonk/jester/conf.lua                    |    1 -
 hunmonk/jester/modules/record/help.lua     |    4 +-
 hunmonk/jester/modules/service/conf.lua    |    5 --
 hunmonk/jester/modules/service/help.lua    |   39 ------------
 hunmonk/jester/modules/service/service.lua |   91 ----------------------------
 mitchcapper/FSClient/Account.cs            |   41 ++++++++++---
 mitchcapper/FSClient/Sofia.cs              |   37 ++++++++---
 7 files changed, 61 insertions(+), 157 deletions(-)
 delete mode 100644 hunmonk/jester/modules/service/conf.lua
 delete mode 100644 hunmonk/jester/modules/service/help.lua
 delete mode 100644 hunmonk/jester/modules/service/service.lua
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH user-contributed scripts, etc</p>