<h1>Project "FreeSWITCH Source" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: d6cfc2f1e9cfd6462ae4b65753cafee45bfd5a5c (commit)
       via: a8f5bf60a87fb27420846bd9d9af5e61f1f947d6 (commit)
       via: 6e4c30ea377728107e0747d614565eca964fa1d3 (commit)
       via: 7a1dcb69581ba593f3dc3868c94c1124c41e64f3 (commit)
       via: 6294bc1620c94785f23bf6ae6966aaa67cf34c7f (commit)
       via: 0e37dcb5db19592d28eb771edb4a0d394f5275ac (commit)
       via: b88cd3457a847cf05564df51bd8a60036b15bfd8 (commit)
       via: 9adac7c6988df8436c634edaaa13ae39067f8df7 (commit)
       via: 5316bcd9dc648b3874ebddea75ed6f34431c7f35 (commit)
       via: 9fe440b2fe63935331b148ffc1d3c7a5ddffa20b (commit)
       via: 8d6d52e015411649e0591eb7ad667885523b99c3 (commit)
       via: 4eccdfef58a64652ae2a1f0a7a1f11ae55346420 (commit)
       via: f5dafc9911eb892e0ac557bc892638cc9fb67014 (commit)
       via: e0ed0008b1712d00f21d8fedce32eeb531e5da82 (commit)
       via: 3fa3e11ca23f788841e00aef8342e1718675477d (commit)
       via: 3dd9d5c0a399757059c60d9d8c751b97383da676 (commit)
       via: 1cf79386c80712311c656a166b9dec5847857266 (commit)
       via: e086b80632bad6c3afb24320d2fcb74304897a9c (commit)
       via: accc28528009361b4b1e268431d6e2b94112020a (commit)
       via: 6e2b1bd328607b2f0d5175b57389dfd2c3c62066 (commit)
       via: c91b409caa37a115a46f60f7b3725d7dd1b3c50e (commit)
       via: 1561ad2ca695058c79183c07c59fe1dab825deff (commit)
       via: 74de704973086d5cf360578ad9eac5977cfa4770 (commit)
       via: 2e18c5b4d9fc583b76b4c8e4470579b1a21845ae (commit)
       via: 7fbc47f83a5bf455b6ece49deb7771d144bbce4c (commit)
       via: 1c95ad98cd1c0e966b738796e74923db8919b754 (commit)
       via: fd984d03bb629d08ac4192c5a1d3432e94ceb3d5 (commit)
       via: 70700617d3d6bd45904a81be443fe28aa7fd0387 (commit)
       via: d743baefedfbe679a647013adc2718defef90718 (commit)
       via: 1da8339ffb5719ba92ececeb27b6c335f3e6b4aa (commit)
       via: 0cf1d54a05319be2f388e5f2dbb1bfd75a2a9043 (commit)
       via: 978cb111e7971eceb238d396124e10424b148a6c (commit)
       via: 9bb344783d39da5dc3e57d48b59f551ba9a2fa4d (commit)
       via: 7d13655b747ef6f3577138f55ed48ec8c2fa11a5 (commit)
       via: 0fdc272b25c7918359ae5b0f27277ff1926bcb75 (commit)
       via: 7fb1abf7583a22d88f91b2c933a6a379970efbcc (commit)
       via: 6fd468043b284ee30085cf86be16ba99725d6462 (commit)
       via: bc2d331feb7c7e736f2d1289a11518053177a6f4 (commit)
       via: 5ffc6b437d86c800519432359277afb39e604c5e (commit)
       via: 1fcffcfbc3fe6c2f21e5767fc760fdbc0c89aa68 (commit)
       via: ea9021a24a6ce0606a2c12f3cab8f2bf0fc12db3 (commit)
       via: afc027473f7fc8a3ec233fb1848f728fc94f56b6 (commit)
       via: bd39ad2269d302748fd55e96431b221ba6c7be6b (commit)
       via: 54c0d6f7c41d3bc882ff339af8c01545e03606a9 (commit)
       via: 9c8ce46b908e78662d970ce20fa38c2f7b710df1 (commit)
       via: 163dd056605065b2f8221e95a75e422c0f034f05 (commit)
       via: c64f4753b3003a1b091678850f272669926ff12c (commit)
       via: 137de401218c834262b0941e8b47de600a2c9052 (commit)
       via: 9a545bd0c9534eb6e6f7579a1b5f0e57d0a7ee6c (commit)
       via: 51985ca69a1f050b3c724043e01582500882882c (commit)
       via: 44ac5d8b99e035b14a0eac9943dff5886c061017 (commit)
       via: 07fa8a4a72460bf77eac238de0b634896f8d90ca (commit)
       via: 4c5426f2fbf65d1130fee044f4e4acd83f0a4fc7 (commit)
       via: 0a38d7761e1099b4e369da8948f22ac7c0c8d184 (commit)
       via: 1db40e60e4675ce363855ba429ceadd90e800f1c (commit)
       via: 190bd61d8a74678135396f28940655114d9b6513 (commit)
       via: b683bb6585165c29ef883b41b97400d8ebc550df (commit)
       via: 90e87a481145242bf661de4a96a7ccda1476034e (commit)
       via: 10b38944f6e51f33e3d0092ea1dcf3e88538a5a7 (commit)
       via: 54879c381e287b6cf0344c08086bf9d8faf686de (commit)
       via: af0dc500ae8639d2b19c9a1a55937e7bb6f27db2 (commit)
       via: 7438e24d1ab38317d73ace94150573fb84778f59 (commit)
       via: de49305ad501b4bba758679be7b5e80b68eba1cf (commit)
       via: 99cab144b5bc0d7b304a490f27bab6a28cead815 (commit)
       via: f3082c7d75926e77062bc83c0318979e89ad0857 (commit)
      from: 7c99cd9da80ad23cab7e83de31019b2fb2b721db (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Michael S Collins
comments: 
Merge branch &#39;master&#39; of git://git.freeswitch.org/freeswitch
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
fix proper display of meta digit in log lines

<span style="color: #000080; font-weight: bold">diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h</span>
<span style="color: #000080; font-weight: bold">index 2c4de14..a1a93c6 100644</span>
<span style="color: #A00000">--- a/src/include/switch_utils.h</span>
<span style="color: #00A000">+++ b/src/include/switch_utils.h</span>
<span style="color: #800080; font-weight: bold">@@ -192,7 +192,7 @@ static inline char switch_itodtmf(char i)</span>
                 r = i + 55;
         }
 
<span style="color: #A00000">-        return r;</span>
<span style="color: #00A000">+        return r + 48;</span>
 }
 
 static inline int switch_dtmftoi(char *s)
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
update code in mod_celt to match API of 0.10.0

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/codecs/mod_celt/mod_celt.c b/src/mod/codecs/mod_celt/mod_celt.c</span>
<span style="color: #000080; font-weight: bold">index 37983f3..8d36b6a 100644</span>
<span style="color: #A00000">--- a/src/mod/codecs/mod_celt/mod_celt.c</span>
<span style="color: #00A000">+++ b/src/mod/codecs/mod_celt/mod_celt.c</span>
<span style="color: #800080; font-weight: bold">@@ -53,8 +53,8 @@ static switch_status_t switch_celt_init(switch_codec_t *codec, switch_codec_flag</span>
                 return SWITCH_STATUS_FALSE;
         }
 
<span style="color: #A00000">-        context-&gt;mode_object = celt_mode_create(codec-&gt;implementation-&gt;actual_samples_per_second, codec-&gt;implementation-&gt;samples_per_packet, NULL);</span>
<span style="color: #A00000">-</span>
<span style="color: #00A000">+        context-&gt;frame_size = codec-&gt;implementation-&gt;samples_per_packet;</span>
<span style="color: #00A000">+        context-&gt;mode_object = celt_mode_create(codec-&gt;implementation-&gt;actual_samples_per_second, context-&gt;frame_size, NULL);</span>
         context-&gt;bytes_per_packet = (codec-&gt;implementation-&gt;bits_per_second * context-&gt;frame_size / codec-&gt;implementation-&gt;actual_samples_per_second + 4) / 8;
 
         /*
<span style="color: #800080; font-weight: bold">@@ -106,15 +106,22 @@ static switch_status_t switch_celt_encode(switch_codec_t *codec,</span>
                                                                                   unsigned int *flag)
 {
         struct celt_context *context = codec-&gt;private_info;
<span style="color: #00A000">+        int bytes = 0;</span>
 
         if (!context) {
                 return SWITCH_STATUS_FALSE;
         }
 
<span style="color: #A00000">-        *encoded_data_len = (uint32_t) celt_encode(context-&gt;encoder_object, (void *) decoded_data, codec-&gt;implementation-&gt;samples_per_packet,</span>
<span style="color: #A00000">-                                                                                           (unsigned char *) encoded_data, context-&gt;bytes_per_packet);</span>
<span style="color: #00A000">+        bytes = (uint32_t) celt_encode(context-&gt;encoder_object, (void *) decoded_data, codec-&gt;implementation-&gt;samples_per_packet,</span>
<span style="color: #00A000">+                                                                   (unsigned char *) encoded_data, context-&gt;bytes_per_packet);</span>
 
<span style="color: #A00000">-        return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+        if (bytes &gt; 0) {</span>
<span style="color: #00A000">+                *encoded_data_len = (uint32_t) bytes;</span>
<span style="color: #00A000">+                return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Encoder Error!\n&quot;);</span>
<span style="color: #00A000">+        return SWITCH_STATUS_GENERR;</span>
 }
 
 static switch_status_t switch_celt_decode(switch_codec_t *codec,
<span style="color: #800080; font-weight: bold">@@ -152,23 +159,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_celt_load)</span>
 
         SWITCH_ADD_CODEC(codec_interface, &quot;CELT ultra-low delay&quot;);
 
<span style="color: #A00000">-        switch_core_codec_add_implementation(pool, codec_interface, SWITCH_CODEC_TYPE_AUDIO,        /* enumeration defining the type of the codec */</span>
<span style="color: #A00000">-                                                                                 114,        /* the IANA code number */</span>
<span style="color: #A00000">-                                                                                 &quot;CELT&quot;,        /* the IANA code name */</span>
<span style="color: #A00000">-                                                                                 NULL,        /* default fmtp to send (can be overridden by the init function) */</span>
<span style="color: #A00000">-                                                                                 32000,        /* samples transferred per second */</span>
<span style="color: #A00000">-                                                                                 32000,        /* actual samples transferred per second */</span>
<span style="color: #A00000">-                                                                                 32000,        /* bits transferred per second */</span>
<span style="color: #A00000">-                                                                                 10000,        /* number of microseconds per frame */</span>
<span style="color: #A00000">-                                                                                 320,        /* number of samples per frame */</span>
<span style="color: #A00000">-                                                                                 640,        /* number of bytes per frame decompressed */</span>
<span style="color: #A00000">-                                                                                 0,        /* number of bytes per frame compressed */</span>
<span style="color: #A00000">-                                                                                 1,        /* number of channels represented */</span>
<span style="color: #A00000">-                                                                                 1,        /* number of frames per network packet */</span>
<span style="color: #A00000">-                                                                                 switch_celt_init,        /* function to initialize a codec handle using this implementation */</span>
<span style="color: #A00000">-                                                                                 switch_celt_encode,        /* function to encode raw data into encoded data */</span>
<span style="color: #A00000">-                                                                                 switch_celt_decode,        /* function to decode encoded data into raw data */</span>
<span style="color: #A00000">-                                                                                 switch_celt_destroy);        /* deinitalize a codec handle using this implementation */</span>
         ms_per_frame = 2000;
         samples_per_frame = 96;
         bytes_per_frame = 192;
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
add record_restart_time_limit_on_dtmf var

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c</span>
<span style="color: #000080; font-weight: bold">index 523dfde..4e9e7b9 100644</span>
<span style="color: #A00000">--- a/src/switch_ivr_play_say.c</span>
<span style="color: #00A000">+++ b/src/switch_ivr_play_say.c</span>
<span style="color: #800080; font-weight: bold">@@ -372,6 +372,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se</span>
         switch_event_t *event;
         int divisor = 0;
         int file_flags = SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT;
<span style="color: #00A000">+        int restart_limit_on_dtmf = 0;</span>
         const char *prefix;
 
         prefix = switch_channel_get_variable(channel, &quot;sound_prefix&quot;);
<span style="color: #800080; font-weight: bold">@@ -528,6 +529,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se</span>
         if (switch_test_flag(fh, SWITCH_FILE_NATIVE)) {
                 asis = 1;
         }
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+        restart_limit_on_dtmf = switch_true(switch_channel_get_variable(channel, &quot;record_restart_limit_on_dtmf&quot;));</span>
 
         if ((p = switch_channel_get_variable(channel, &quot;RECORD_TITLE&quot;))) {
                 vval = switch_core_session_strdup(session, p);
<span style="color: #800080; font-weight: bold">@@ -637,6 +640,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se</span>
                            if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
                          */
                         if (switch_channel_has_dtmf(channel)) {
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                if (limit &amp;&amp; restart_limit_on_dtmf) {</span>
<span style="color: #00A000">+                                        start = switch_epoch_time_now(NULL);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+</span>
                                 if (!args-&gt;input_callback &amp;&amp; !args-&gt;buf &amp;&amp; !args-&gt;dmachine) {
                                         status = SWITCH_STATUS_BREAK;
                                         break;
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
have samples_out reflect what was written to the FH not the file even with buffering

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_core_file.c b/src/switch_core_file.c</span>
<span style="color: #000080; font-weight: bold">index c00756f..19f2354 100644</span>
<span style="color: #A00000">--- a/src/switch_core_file.c</span>
<span style="color: #00A000">+++ b/src/switch_core_file.c</span>
<span style="color: #800080; font-weight: bold">@@ -391,10 +391,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_write(switch_file_handle_t *fh,</span>
                                 if ((status = fh-&gt;file_interface-&gt;file_write(fh, fh-&gt;pre_buffer_data, &amp;blen)) != SWITCH_STATUS_SUCCESS) {
                                         *len = 0;
                                 }
<span style="color: #A00000">-                                fh-&gt;samples_out += blen;</span>
                         }
                 }
 
<span style="color: #00A000">+                fh-&gt;samples_out += orig_len;</span>
                 return status;
         } else {
                 switch_status_t status;
</pre></div>
<div class="highlight"><pre>committer: Jeff Lenk
comments: 
windows - tweak installer permissions

<span style="color: #000080; font-weight: bold">diff --git a/w32/Setup/Product.wxs b/w32/Setup/Product.wxs</span>
<span style="color: #000080; font-weight: bold">index 2f072aa..1de2ec2 100644</span>
<span style="color: #A00000">--- a/w32/Setup/Product.wxs</span>
<span style="color: #00A000">+++ b/w32/Setup/Product.wxs</span>
<span style="color: #800080; font-weight: bold">@@ -57,6 +57,9 @@</span>
                                                          WorkingDirectory=&quot;INSTALLLOCATION&quot;/&gt;
                                 &lt;RemoveFolder Id=&quot;ApplicationProgramsFolder&quot; On=&quot;uninstall&quot;/&gt;
                                 &lt;RegistryValue Root=&quot;HKCU&quot; Key=&quot;Software\FreeSWITCH\FreeSWITCH&quot; Name=&quot;installed&quot; Type=&quot;integer&quot; Value=&quot;1&quot; KeyPath=&quot;yes&quot;/&gt;
<span style="color: #00A000">+        &lt;CreateFolder Directory=&quot;INSTALLLOCATION&quot;&gt;</span>
<span style="color: #00A000">+          &lt;Permission User=&quot;Authenticated Users&quot; GenericAll=&quot;yes&quot; /&gt;</span>
<span style="color: #00A000">+        &lt;/CreateFolder&gt;</span>
                         &lt;/Component&gt;
                         &lt;Component Id=&quot;FSCliShortcut&quot; Guid=&quot;D209546C-C728-4d8f-BDB2-29AED8824282&quot;&gt;
                                 &lt;Shortcut Id=&quot;FSCliStartMenuShortcut&quot;
<span style="color: #800080; font-weight: bold">@@ -65,6 +68,9 @@</span>
                                                          Target=&quot;[INSTALLLOCATION]fs_cli.exe&quot;
                                                          WorkingDirectory=&quot;INSTALLLOCATION&quot;/&gt;
                                 &lt;RegistryValue Root=&quot;HKCU&quot; Key=&quot;Software\FreeSWITCH\FS_CLI&quot; Name=&quot;installed&quot; Type=&quot;integer&quot; Value=&quot;1&quot; KeyPath=&quot;yes&quot;/&gt;
<span style="color: #00A000">+        &lt;CreateFolder Directory=&quot;INSTALLLOCATION&quot;&gt;</span>
<span style="color: #00A000">+          &lt;Permission User=&quot;Authenticated Users&quot; GenericAll=&quot;yes&quot; /&gt;</span>
<span style="color: #00A000">+        &lt;/CreateFolder&gt;</span>
                         &lt;/Component&gt;
                 &lt;/DirectoryRef&gt;
 
</pre></div>
<div class="highlight"><pre>committer: Jeff Lenk
comments: 
FS-3000 mod_conference: if more digits than the length of the correct pin the remaining digits are accounted for next retry

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #000080; font-weight: bold">index 7f7ee83..e6a47bf 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #800080; font-weight: bold">@@ -5597,6 +5597,7 @@ SWITCH_STANDARD_APP(conference_function)</span>
                         char pin_buf[80] = &quot;&quot;;
                         int pin_retries = 3;        /* XXX - this should be configurable - i&#39;m too lazy to do it right now... */
                         int pin_valid = 0;
<span style="color: #00A000">+                        int be_friendly = 0;</span>
                         switch_status_t status = SWITCH_STATUS_SUCCESS;
                         char *supplied_pin_value;
 
<span style="color: #800080; font-weight: bold">@@ -5631,20 +5632,24 @@ SWITCH_STANDARD_APP(conference_function)</span>
                                 switch_status_t pstatus = SWITCH_STATUS_FALSE;
 
                                 /* be friendly */
<span style="color: #A00000">-                                if (conference-&gt;pin_sound) {</span>
<span style="color: #A00000">-                                        pstatus = conference_local_play_file(conference, session, conference-&gt;pin_sound, 20, pin_buf, sizeof(pin_buf));</span>
<span style="color: #A00000">-                                } else if (conference-&gt;tts_engine &amp;&amp; conference-&gt;tts_voice) {</span>
<span style="color: #A00000">-                                        pstatus =</span>
<span style="color: #A00000">-                                                switch_ivr_speak_text(session, conference-&gt;tts_engine, conference-&gt;tts_voice, &quot;please enter the conference pin number&quot;, NULL);</span>
<span style="color: #A00000">-                                } else {</span>
<span style="color: #A00000">-                                        pstatus = switch_ivr_speak_text(session, &quot;flite&quot;, &quot;slt&quot;, &quot;please enter the conference pin number&quot;, NULL);</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #00A000">+                                if (!be_friendly) {</span>
<span style="color: #00A000">+                                        if (conference-&gt;pin_sound) {</span>
<span style="color: #00A000">+                                                pstatus = conference_local_play_file(conference, session, conference-&gt;pin_sound, 20, pin_buf, sizeof(pin_buf));</span>
<span style="color: #00A000">+                                        } else if (conference-&gt;tts_engine &amp;&amp; conference-&gt;tts_voice) {</span>
<span style="color: #00A000">+                                                pstatus =</span>
<span style="color: #00A000">+                                                        switch_ivr_speak_text(session, conference-&gt;tts_engine, conference-&gt;tts_voice, &quot;please enter the conference pin number&quot;, NULL);</span>
<span style="color: #00A000">+                                        } else {</span>
<span style="color: #00A000">+                                                pstatus = switch_ivr_speak_text(session, &quot;flite&quot;, &quot;slt&quot;, &quot;please enter the conference pin number&quot;, NULL);</span>
<span style="color: #00A000">+                                        }</span>
 
<span style="color: #A00000">-                                if (pstatus != SWITCH_STATUS_SUCCESS &amp;&amp; pstatus != SWITCH_STATUS_BREAK) {</span>
<span style="color: #A00000">-                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot ask the user for a pin, ending call&quot;);</span>
<span style="color: #A00000">-                                        switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);</span>
<span style="color: #00A000">+                                        if (pstatus != SWITCH_STATUS_SUCCESS &amp;&amp; pstatus != SWITCH_STATUS_BREAK) {</span>
<span style="color: #00A000">+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot ask the user for a pin, ending call&quot;);</span>
<span style="color: #00A000">+                                                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);</span>
<span style="color: #00A000">+                                        }</span>
                                 }
 
<span style="color: #00A000">+                                be_friendly = 1;</span>
<span style="color: #00A000">+</span>
                                 /* wait for them if neccessary */
                                 if (strlen(pin_buf) &lt; strlen(dpin)) {
                                         char *buf = pin_buf + strlen(pin_buf);
<span style="color: #800080; font-weight: bold">@@ -5660,13 +5665,12 @@ SWITCH_STANDARD_APP(conference_function)</span>
 
                                 pin_valid = (status == SWITCH_STATUS_SUCCESS &amp;&amp; strcmp(pin_buf, dpin) == 0);
                                 if (!pin_valid) {
<span style="color: #A00000">-                                        /* zero the collected pin */</span>
<span style="color: #A00000">-                                        memset(pin_buf, 0, sizeof(pin_buf));</span>
<span style="color: #A00000">-</span>
                                         /* more friendliness */
                                         if (conference-&gt;bad_pin_sound) {
                                                 conference_local_play_file(conference, session, conference-&gt;bad_pin_sound, 20, pin_buf, sizeof(pin_buf));
                                         }
<span style="color: #00A000">+                                        /* zero the collected pin */</span>
<span style="color: #00A000">+                                        memset(pin_buf, 0, sizeof(pin_buf));</span>
                                 }
                                 pin_retries--;
                         }
</pre></div>
<div class="highlight"><pre>committer: Stefan Knoblich
comments: 
[fsxs] Remove APR and APR-UTIL libraries from fsxs LIBS variable.
&quot;LIBS&quot; in the final fsxs script will be empty now.
We still link against libfreeswitch when building a module,
but we don&#39;t explicitly list (some of) its dependency libs anymore
(this list was not complete anyway).

This fixes a bogus /path_to_source/expat.la entry in LIBS that
came from &quot;apu-config --libs&quot;.

Tested on Gentoo x86_64 (binutils 2.20.1) and Centos 5.5 (binutils 2.17.50).

Tested-by: Stefan Knoblich &lt;s.knoblich@axsentis.de&gt;
Signed-off-by: Stefan Knoblich &lt;s.knoblich@axsentis.de&gt;

<span style="color: #000080; font-weight: bold">diff --git a/Makefile.am b/Makefile.am</span>
<span style="color: #000080; font-weight: bold">index 8d35068..37a01d2 100644</span>
<span style="color: #A00000">--- a/Makefile.am</span>
<span style="color: #00A000">+++ b/Makefile.am</span>
<span style="color: #800080; font-weight: bold">@@ -349,7 +349,7 @@ scripts/fsxs: scripts/fsxs.in</span>
             -e &quot;s|@INCLUDES\@|-I$(prefix)/include|&quot; \
             -e &quot;s|@SOLINK\@|$(SOLINK)|&quot; \
             -e &quot;s|@LDFLAGS\@|-L$(prefix)/lib|&quot; \
<span style="color: #A00000">-            -e &quot;s|@LIBS\@|`./libs/apr/apr-1-config --libs` `./libs/apr-util/apu-1-config --libs`|&quot; \</span>
<span style="color: #00A000">+            -e &quot;s|@LIBS\@||&quot; \</span>
             $(top_srcdir)/scripts/fsxs.in &gt; scripts/fsxs
 
 ##
</pre></div>
<div class="highlight"><pre>committer: Steve Underwood
comments: 
Typo in the spandsp .pc.in file fixed

<span style="color: #000080; font-weight: bold">diff --git a/libs/spandsp/spandsp.pc.in b/libs/spandsp/spandsp.pc.in</span>
<span style="color: #000080; font-weight: bold">index 86a50ff..1a91ba0 100644</span>
<span style="color: #A00000">--- a/libs/spandsp/spandsp.pc.in</span>
<span style="color: #00A000">+++ b/libs/spandsp/spandsp.pc.in</span>
<span style="color: #800080; font-weight: bold">@@ -1,5 +1,5 @@</span>
 prefix=@prefix@
<span style="color: #A00000">-exec_prefix=@exec_prefix@</span>
<span style="color: #00A000">+exec_prefix=@prefix@</span>
 libdir=@libdir@
 includedir=@includedir@
 
</pre></div>
<div class="highlight"><pre>committer: Andrew Thompson
comments: 
mod_erlang_event Add proper locking for the list of XML bindings

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_erlang_event/handle_msg.c b/src/mod/event_handlers/mod_erlang_event/handle_msg.c</span>
<span style="color: #000080; font-weight: bold">index 9ae1527..87f91fc 100644</span>
<span style="color: #A00000">--- a/src/mod/event_handlers/mod_erlang_event/handle_msg.c</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_erlang_event/handle_msg.c</span>
<span style="color: #800080; font-weight: bold">@@ -778,7 +778,7 @@ static switch_status_t handle_msg_bind(listener_t *listener, erlang_msg * msg, e</span>
                         binding-&gt;process.pid = msg-&gt;from;
                         binding-&gt;listener = listener;
 
<span style="color: #A00000">-                        switch_thread_rwlock_wrlock(globals.listener_rwlock);</span>
<span style="color: #00A000">+                        switch_thread_rwlock_wrlock(globals.bindings_rwlock);</span>
 
                         for (ptr = bindings.head; ptr &amp;&amp; ptr-&gt;next; ptr = ptr-&gt;next);
 
<span style="color: #800080; font-weight: bold">@@ -789,7 +789,7 @@ static switch_status_t handle_msg_bind(listener_t *listener, erlang_msg * msg, e</span>
                         }
 
                         switch_xml_set_binding_sections(bindings.search_binding, switch_xml_get_binding_sections(bindings.search_binding) | section);
<span style="color: #A00000">-                        switch_thread_rwlock_unlock(globals.listener_rwlock);</span>
<span style="color: #00A000">+                        switch_thread_rwlock_unlock(globals.bindings_rwlock);</span>
 
                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;sections %d\n&quot;, switch_xml_get_binding_sections(bindings.search_binding));
 
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c</span>
<span style="color: #000080; font-weight: bold">index 1a8bd00..900b965 100644</span>
<span style="color: #A00000">--- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c</span>
<span style="color: #800080; font-weight: bold">@@ -90,7 +90,7 @@ static void remove_binding(listener_t *listener, erlang_pid * pid)</span>
 {
         struct erlang_binding *ptr, *lst = NULL;
 
<span style="color: #A00000">-        switch_thread_rwlock_wrlock(globals.listener_rwlock);</span>
<span style="color: #00A000">+        switch_thread_rwlock_wrlock(globals.bindings_rwlock);</span>
 
         switch_xml_set_binding_sections(bindings.search_binding, SWITCH_XML_SECTION_MAX);
 
<span style="color: #800080; font-weight: bold">@@ -100,7 +100,7 @@ static void remove_binding(listener_t *listener, erlang_pid * pid)</span>
                                 if (ptr-&gt;next) {
                                         bindings.head = ptr-&gt;next;
                                 } else {
<span style="color: #A00000">-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Removed all (only?) listeners\n&quot;);</span>
<span style="color: #00A000">+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Removed all (only?) binding\n&quot;);</span>
                                         bindings.head = NULL;
                                         break;
                                 }
<span style="color: #800080; font-weight: bold">@@ -111,13 +111,13 @@ static void remove_binding(listener_t *listener, erlang_pid * pid)</span>
                                         lst-&gt;next = NULL;
                                 }
                         }
<span style="color: #A00000">-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Removed listener\n&quot;);</span>
<span style="color: #00A000">+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Removed binding\n&quot;);</span>
                 } else {
                         switch_xml_set_binding_sections(bindings.search_binding, switch_xml_get_binding_sections(bindings.search_binding) | ptr-&gt;section);
                 }
         }
 
<span style="color: #A00000">-        switch_thread_rwlock_unlock(globals.listener_rwlock);</span>
<span style="color: #00A000">+        switch_thread_rwlock_unlock(globals.bindings_rwlock);</span>
 }
 
 
<span style="color: #800080; font-weight: bold">@@ -381,6 +381,8 @@ static switch_xml_t erlang_fetch(const char *sectionstr, const char *tag_name, c</span>
 
         section = switch_xml_parse_section_string((char *) sectionstr);
 
<span style="color: #00A000">+        switch_thread_rwlock_rdlock(globals.bindings_rwlock);</span>
<span style="color: #00A000">+</span>
         for (ptr = bindings.head; ptr; ptr = ptr-&gt;next) {
                 if (ptr-&gt;section != section)
                         continue;
<span style="color: #800080; font-weight: bold">@@ -417,6 +419,8 @@ static switch_xml_t erlang_fetch(const char *sectionstr, const char *tag_name, c</span>
                 switch_mutex_unlock(ptr-&gt;listener-&gt;sock_mutex);
         }
 
<span style="color: #00A000">+        switch_thread_rwlock_unlock(globals.bindings_rwlock);</span>
<span style="color: #00A000">+</span>
         ei_x_free(&amp;buf);
 
         if (!p) {
<span style="color: #800080; font-weight: bold">@@ -1638,6 +1642,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_erlang_event_load)</span>
         memset(&amp;prefs, 0, sizeof(prefs));
 
         switch_thread_rwlock_create(&amp;globals.listener_rwlock, pool);
<span style="color: #00A000">+        switch_thread_rwlock_create(&amp;globals.bindings_rwlock, pool);</span>
         switch_mutex_init(&amp;globals.fetch_reply_mutex, SWITCH_MUTEX_DEFAULT, pool);
         switch_mutex_init(&amp;globals.listener_count_mutex, SWITCH_MUTEX_UNNESTED, pool);
         switch_core_hash_init(&amp;globals.fetch_reply_hash, pool);
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.h b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.h</span>
<span style="color: #000080; font-weight: bold">index dacfbd6..121e7b4 100644</span>
<span style="color: #A00000">--- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.h</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.h</span>
<span style="color: #800080; font-weight: bold">@@ -161,6 +161,7 @@ struct api_command_struct {</span>
 
 struct globals_struct {
         switch_thread_rwlock_t *listener_rwlock;
<span style="color: #00A000">+        switch_thread_rwlock_t *bindings_rwlock;</span>
         switch_event_node_t *node;
         switch_mutex_t *ref_mutex;
         switch_mutex_t *fetch_reply_mutex;
</pre></div>
<div class="highlight"><pre>committer: Andrew Thompson
comments: 
mod_conference Add energy level to conference_add_event_member_data
This is useful when you want to find the energy a member joined with
without having to pull the XML list

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #000080; font-weight: bold">index 2d9341a..7f7ee83 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_conference/mod_conference.c</span>
<span style="color: #800080; font-weight: bold">@@ -477,6 +477,7 @@ static switch_status_t conference_add_event_member_data(conference_member_t *mem</span>
         switch_event_add_header(event, SWITCH_STACK_BOTTOM, &quot;Mute-Detect&quot;, &quot;%s&quot;, switch_test_flag(member, MFLAG_MUTE_DETECT) ? &quot;true&quot; : &quot;false&quot; );
         switch_event_add_header(event, SWITCH_STACK_BOTTOM, &quot;Member-ID&quot;, &quot;%u&quot;, member-&gt;id);
         switch_event_add_header(event, SWITCH_STACK_BOTTOM, &quot;Member-Type&quot;, &quot;%s&quot;, switch_test_flag(member, MFLAG_MOD) ? &quot;moderator&quot; : &quot;member&quot;);
<span style="color: #00A000">+        switch_event_add_header(event, SWITCH_STACK_BOTTOM, &quot;Energy-Level&quot;, &quot;%d&quot;, member-&gt;energy_level);</span>
 
         return status;
 }
</pre></div>
<div class="highlight"><pre>committer: Andrew Thompson
comments: 
mod_erlang_event: Don&#39;t urlencode events (and destroy an event after use)

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_erlang_event/ei_helpers.c b/src/mod/event_handlers/mod_erlang_event/ei_helpers.c</span>
<span style="color: #000080; font-weight: bold">index a99b520..db4f778 100644</span>
<span style="color: #A00000">--- a/src/mod/event_handlers/mod_erlang_event/ei_helpers.c</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_erlang_event/ei_helpers.c</span>
<span style="color: #800080; font-weight: bold">@@ -111,6 +111,7 @@ void ei_encode_switch_event_headers(ei_x_buff * ebuf, switch_event_t *event)</span>
         for (hp = event-&gt;headers; hp; hp = hp-&gt;next) {
                 ei_x_encode_tuple_header(ebuf, 2);
                 _ei_x_encode_string(ebuf, hp-&gt;name);
<span style="color: #00A000">+                switch_url_decode(hp-&gt;value);</span>
                 _ei_x_encode_string(ebuf, hp-&gt;value);
         }
 
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c</span>
<span style="color: #000080; font-weight: bold">index 8d3c594..1a8bd00 100644</span>
<span style="color: #A00000">--- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c</span>
<span style="color: #800080; font-weight: bold">@@ -532,6 +532,7 @@ static switch_status_t notify_new_session(listener_t *listener, session_elem_t *</span>
                                                   session_element-&gt;uuid_str);
         }
 
<span style="color: #00A000">+        switch_event_destroy(&amp;call_event);</span>
         ei_x_free(&amp;lbuf);
         return SWITCH_STATUS_SUCCESS;
 }
</pre></div>
<div class="highlight"><pre>committer: Daniel Swarbrick
comments: 
add mod_snmp to modules.conf.in and modules.conf.xml (commented out)

<span style="color: #000080; font-weight: bold">diff --git a/build/modules.conf.in b/build/modules.conf.in</span>
<span style="color: #000080; font-weight: bold">index 2be000f..84a9e9a 100644</span>
<span style="color: #A00000">--- a/build/modules.conf.in</span>
<span style="color: #00A000">+++ b/build/modules.conf.in</span>
<span style="color: #800080; font-weight: bold">@@ -78,6 +78,7 @@ event_handlers/mod_cdr_sqlite</span>
 #event_handlers/mod_cdr_pg_csv
 #event_handlers/mod_radius_cdr
 #event_handlers/mod_erlang_event
<span style="color: #00A000">+#event_handlers/mod_snmp</span>
 formats/mod_native_file
 formats/mod_sndfile
 #formats/mod_shout
<span style="color: #000080; font-weight: bold">diff --git a/conf/autoload_configs/modules.conf.xml b/conf/autoload_configs/modules.conf.xml</span>
<span style="color: #000080; font-weight: bold">index b7100bd..2e7ebfa 100644</span>
<span style="color: #A00000">--- a/conf/autoload_configs/modules.conf.xml</span>
<span style="color: #00A000">+++ b/conf/autoload_configs/modules.conf.xml</span>
<span style="color: #800080; font-weight: bold">@@ -24,6 +24,7 @@</span>
     &lt;load module=&quot;mod_event_socket&quot;/&gt;
     &lt;!-- &lt;load module=&quot;mod_zeroconf&quot;/&gt; --&gt;
     &lt;!-- &lt;load module=&quot;mod_erlang_event&quot;/&gt; --&gt;
<span style="color: #00A000">+    &lt;!-- &lt;load module=&quot;mod_snmp&quot;/&gt; --&gt;</span>
 
     &lt;!-- Directory Interfaces --&gt;
     &lt;!-- &lt;load module=&quot;mod_ldap&quot;/&gt; --&gt;
</pre></div>
<div class="highlight"><pre>committer: Brian West
comments: 
Fix ZRTP

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_rtp.c b/src/switch_rtp.c</span>
<span style="color: #000080; font-weight: bold">index faf2868..4acadfe 100644</span>
<span style="color: #A00000">--- a/src/switch_rtp.c</span>
<span style="color: #00A000">+++ b/src/switch_rtp.c</span>
<span style="color: #800080; font-weight: bold">@@ -2726,14 +2726,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
                         }
                 }
 
<span style="color: #A00000">-                if (bytes &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) &amp;&amp;</span>
<span style="color: #A00000">-                        rtp_session-&gt;recv_msg.header.pt != 13 &amp;&amp; </span>
<span style="color: #A00000">-                        rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;recv_te &amp;&amp; </span>
<span style="color: #A00000">-                        (!rtp_session-&gt;cng_pt || rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;cng_pt) &amp;&amp; </span>
<span style="color: #A00000">-                        rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;payload) {</span>
<span style="color: #A00000">-                        /* drop frames of incorrect payload number and return CNG frame instead */</span>
<span style="color: #A00000">-                        return_cng_frame();</span>
<span style="color: #A00000">-                }</span>
 
                 if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_ENABLE_RTCP) &amp;&amp; rtp_session-&gt;rtcp_read_pollfd) {
                         rtcp_poll_status = switch_poll(rtp_session-&gt;rtcp_read_pollfd, 1, &amp;rtcp_fdr, 0);
<span style="color: #800080; font-weight: bold">@@ -2812,6 +2804,15 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
                         goto end;
                 }
 
<span style="color: #00A000">+                if (bytes &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) &amp;&amp;</span>
<span style="color: #00A000">+                        rtp_session-&gt;recv_msg.header.pt != 13 &amp;&amp; </span>
<span style="color: #00A000">+                        rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;recv_te &amp;&amp; </span>
<span style="color: #00A000">+                        (!rtp_session-&gt;cng_pt || rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;cng_pt) &amp;&amp; </span>
<span style="color: #00A000">+                        rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;payload) {</span>
<span style="color: #00A000">+                        /* drop frames of incorrect payload number and return CNG frame instead */</span>
<span style="color: #00A000">+                        return_cng_frame();</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+</span>
                 if (!bytes &amp;&amp; (io_flags &amp; SWITCH_IO_FLAG_NOBLOCK)) {
                         rtp_session-&gt;missed_count = 0;
                         ret = 0;
</pre></div>
<div class="highlight"><pre>committer: Michael Jerris
comments: 
FS-3002: handle 2833 in do_flush instead of dropping valid dtmf

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_apr.c b/src/switch_apr.c</span>
<span style="color: #000080; font-weight: bold">index 4c99662..3798d6e 100644</span>
<span style="color: #A00000">--- a/src/switch_apr.c</span>
<span style="color: #00A000">+++ b/src/switch_apr.c</span>
<span style="color: #800080; font-weight: bold">@@ -833,7 +833,7 @@ SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t *from,</span>
                  */
         }
 
<span style="color: #A00000">-        if (r == 35) {</span>
<span style="color: #00A000">+        if (r == 35 || r == 730035) {</span>
                 r = SWITCH_STATUS_BREAK;
         }
 
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_rtp.c b/src/switch_rtp.c</span>
<span style="color: #000080; font-weight: bold">index 3ce7a07..faf2868 100644</span>
<span style="color: #A00000">--- a/src/switch_rtp.c</span>
<span style="color: #00A000">+++ b/src/switch_rtp.c</span>
<span style="color: #800080; font-weight: bold">@@ -32,6 +32,7 @@</span>
  */
 //#define DEBUG_2833
 //#define RTP_DEBUG_WRITE_DELTA
<span style="color: #00A000">+//#define DEBUG_MISSED_SEQ</span>
 #include &lt;switch.h&gt;
 #include &lt;switch_stun.h&gt;
 #undef PACKAGE_NAME
<span style="color: #800080; font-weight: bold">@@ -245,6 +246,9 @@ struct switch_rtp {</span>
         switch_time_t send_time;
         switch_byte_t auto_adj_used;
         uint8_t pause_jb;
<span style="color: #00A000">+        uint16_t last_seq;</span>
<span style="color: #00A000">+        switch_time_t last_read_time;</span>
<span style="color: #00A000">+        switch_size_t last_flush_packet_count;</span>
 };
 
 struct switch_rtcp_senderinfo {
<span style="color: #800080; font-weight: bold">@@ -256,6 +260,180 @@ struct switch_rtcp_senderinfo {</span>
         unsigned oc:32;
 };
 
<span style="color: #00A000">+typedef enum {</span>
<span style="color: #00A000">+        RESULT_CONTINUE,</span>
<span style="color: #00A000">+        RESULT_GOTO_END,</span>
<span style="color: #00A000">+        RESULT_GOTO_RECVFROM,</span>
<span style="color: #00A000">+        RESULT_GOTO_TIMERCHECK</span>
<span style="color: #00A000">+} handle_rfc2833_result_t;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+static handle_rfc2833_result_t handle_rfc2833(switch_rtp_t *rtp_session, switch_size_t bytes, int *do_cng)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+        if (rtp_session-&gt;dtmf_data.in_digit_sanity &amp;&amp; !(rtp_session-&gt;dtmf_data.in_digit_sanity % 100)) {</span>
<span style="color: #00A000">+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;sanity %d\n&quot;, rtp_session-&gt;dtmf_data.in_digit_sanity);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if (rtp_session-&gt;dtmf_data.in_digit_sanity &amp;&amp; !--rtp_session-&gt;dtmf_data.in_digit_sanity) {</span>
<span style="color: #00A000">+                rtp_session-&gt;dtmf_data.last_digit = 0;</span>
<span style="color: #00A000">+                rtp_session-&gt;dtmf_data.in_digit_ts = 0;</span>
<span style="color: #00A000">+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed DTMF sanity check.\n&quot;);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        /* RFC2833 ... like all RFC RE: VoIP, guaranteed to drive you to insanity! </span>
<span style="color: #00A000">+           We know the real rules here, but if we enforce them, it&#39;s an interop nightmare so,</span>
<span style="color: #00A000">+           we put up with as much as we can so we don&#39;t have to deal with being punished for</span>
<span style="color: #00A000">+           doing it right. Nice guys finish last!</span>
<span style="color: #00A000">+        */</span>
<span style="color: #00A000">+        if (bytes &gt; rtp_header_len &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &amp;&amp;</span>
<span style="color: #00A000">+                !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PASS_RFC2833) &amp;&amp; rtp_session-&gt;recv_te &amp;&amp; rtp_session-&gt;recv_msg.header.pt == rtp_session-&gt;recv_te) {</span>
<span style="color: #00A000">+                switch_size_t len = bytes - rtp_header_len;</span>
<span style="color: #00A000">+                unsigned char *packet = (unsigned char *) rtp_session-&gt;recv_msg.body;</span>
<span style="color: #00A000">+                int end;</span>
<span style="color: #00A000">+                uint16_t duration;</span>
<span style="color: #00A000">+                char key;</span>
<span style="color: #00A000">+                uint16_t in_digit_seq;</span>
<span style="color: #00A000">+                uint32_t ts;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (!(packet[0] || packet[1] || packet[2] || packet[3]) &amp;&amp; len &gt;= 8) {</span>
<span style="color: #00A000">+                        packet += 4;</span>
<span style="color: #00A000">+                        len -= 4;</span>
<span style="color: #00A000">+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;DTMF payload offset by 4 bytes.\n&quot;);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (!(packet[0] || packet[1] || packet[2] || packet[3])) {</span>
<span style="color: #00A000">+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed DTMF payload check.\n&quot;);</span>
<span style="color: #00A000">+                        rtp_session-&gt;dtmf_data.last_digit = 0;</span>
<span style="color: #00A000">+                        rtp_session-&gt;dtmf_data.in_digit_ts = 0;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                end = packet[1] &amp; 0x80 ? 1 : 0;</span>
<span style="color: #00A000">+                duration = (packet[2] &lt;&lt; 8) + packet[3];</span>
<span style="color: #00A000">+                key = switch_rfc2833_to_char(packet[0]);</span>
<span style="color: #00A000">+                in_digit_seq = ntohs((uint16_t) rtp_session-&gt;recv_msg.header.seq);</span>
<span style="color: #00A000">+                ts = htonl(rtp_session-&gt;recv_msg.header.ts);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (in_digit_seq &lt; rtp_session-&gt;dtmf_data.in_digit_seq) {</span>
<span style="color: #00A000">+                        if (rtp_session-&gt;dtmf_data.in_digit_seq - in_digit_seq &gt; 100) {</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.in_digit_seq = 0;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;packet[%d]: %02x %02x %02x %02x\n&quot;, (int) len, (unsigned) packet[0], (unsigned)</span>
<span style="color: #00A000">+                           packet[1], (unsigned) packet[2], (unsigned) packet[3]);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (in_digit_seq &gt; rtp_session-&gt;dtmf_data.in_digit_seq) {</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        rtp_session-&gt;dtmf_data.in_digit_seq = in_digit_seq;</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;read: %c %u %u %u %u %d %d %s\n&quot;,</span>
<span style="color: #00A000">+                                   key, in_digit_seq, rtp_session-&gt;dtmf_data.in_digit_seq,</span>
<span style="color: #00A000">+                                   ts, duration, rtp_session-&gt;recv_msg.header.m, end, end &amp;&amp; !rtp_session-&gt;dtmf_data.in_digit_ts ? &quot;ignored&quot; : &quot;&quot;);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (!rtp_session-&gt;dtmf_data.in_digit_queued &amp;&amp; (rtp_session-&gt;rtp_bugs &amp; RTP_BUG_IGNORE_DTMF_DURATION) &amp;&amp;</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                                switch_dtmf_t dtmf = { key, switch_core_min_dtmf_duration(0) };</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Early Queuing digit %c:%d\n&quot;, dtmf.digit, dtmf.duration / 8);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                                switch_rtp_queue_rfc2833_in(rtp_session, &amp;dtmf);</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.in_digit_queued = 1;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        /* only set sanity if we do NOT ignore the packet */</span>
<span style="color: #00A000">+                        if (rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.in_digit_sanity = 2000;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (rtp_session-&gt;dtmf_data.last_duration &gt; duration &amp;&amp; </span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.last_duration &gt; 0xFC17 &amp;&amp; ts == rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.flip++;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (end) {</span>
<span style="color: #00A000">+                                if (rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                                        switch_dtmf_t dtmf = { key, duration };</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        if (ts &gt; rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                                                dtmf.duration += (ts - rtp_session-&gt;dtmf_data.in_digit_ts);</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                        if (rtp_session-&gt;dtmf_data.flip) {</span>
<span style="color: #00A000">+                                                dtmf.duration += rtp_session-&gt;dtmf_data.flip * 0xFFFF;</span>
<span style="color: #00A000">+                                                rtp_session-&gt;dtmf_data.flip = 0;</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;you&#39;re welcome!\n&quot;);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;done digit=%c ts=%u start_ts=%u dur=%u ddur=%u\n&quot;,</span>
<span style="color: #00A000">+                                                   dtmf.digit, ts, rtp_session-&gt;dtmf_data.in_digit_ts, duration, dtmf.duration);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                                                </span>
<span style="color: #00A000">+                                        if (!(rtp_session-&gt;rtp_bugs &amp; RTP_BUG_IGNORE_DTMF_DURATION) &amp;&amp; !rtp_session-&gt;dtmf_data.in_digit_queued) {</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Queuing digit %c:%d\n&quot;, dtmf.digit, dtmf.duration / 8);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                                                switch_rtp_queue_rfc2833_in(rtp_session, &amp;dtmf);</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        rtp_session-&gt;dtmf_data.last_digit = rtp_session-&gt;dtmf_data.first_digit;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        rtp_session-&gt;dtmf_data.in_digit_ts = 0;</span>
<span style="color: #00A000">+                                        rtp_session-&gt;dtmf_data.in_digit_sanity = 0;</span>
<span style="color: #00A000">+                                        rtp_session-&gt;dtmf_data.in_digit_queued = 0;</span>
<span style="color: #00A000">+                                        *do_cng = 1;</span>
<span style="color: #00A000">+                                } else {</span>
<span style="color: #00A000">+                                        if (!switch_rtp_ready(rtp_session)) {</span>
<span style="color: #00A000">+                                                return RESULT_GOTO_END;</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                        switch_cond_next();</span>
<span style="color: #00A000">+                                        return RESULT_GOTO_RECVFROM;</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        } else if (!rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.in_digit_ts = ts;</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.first_digit = key;</span>
<span style="color: #00A000">+                                rtp_session-&gt;dtmf_data.in_digit_sanity = 2000;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        rtp_session-&gt;dtmf_data.last_duration = duration;</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;drop: %c %u %u %u %u %d %d\n&quot;,</span>
<span style="color: #00A000">+                                   key, in_digit_seq, rtp_session-&gt;dtmf_data.in_digit_seq, ts, duration, rtp_session-&gt;recv_msg.header.m, end);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                        switch_cond_next();</span>
<span style="color: #00A000">+                        return RESULT_GOTO_RECVFROM;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if (bytes &amp;&amp; rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #00A000">+                if (!switch_rtp_ready(rtp_session)) {</span>
<span style="color: #00A000">+                        return RESULT_GOTO_END;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (!rtp_session-&gt;dtmf_data.in_interleaved &amp;&amp; rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;recv_te) {</span>
<span style="color: #00A000">+                        /* Drat, they are sending audio still as well as DTMF ok fine..... *sigh* */</span>
<span style="color: #00A000">+                        rtp_session-&gt;dtmf_data.in_interleaved = 1;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                        </span>
<span style="color: #00A000">+                if (rtp_session-&gt;dtmf_data.in_interleaved || (rtp_session-&gt;rtp_bugs &amp; RTP_BUG_IGNORE_DTMF_DURATION)) {</span>
<span style="color: #00A000">+                        if (rtp_session-&gt;recv_msg.header.pt == rtp_session-&gt;recv_te) {</span>
<span style="color: #00A000">+                                return RESULT_GOTO_RECVFROM;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        *do_cng = 1;</span>
<span style="color: #00A000">+                        return RESULT_GOTO_TIMERCHECK;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return RESULT_CONTINUE;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
 static int global_init = 0;
 static int rtp_common_write(switch_rtp_t *rtp_session,
                                                         rtp_msg_t *send_msg, void *data, uint32_t datalen, switch_payload_t payload, uint32_t timestamp, switch_frame_flag_t *flags);
<span style="color: #800080; font-weight: bold">@@ -2157,6 +2335,15 @@ static void do_flush(switch_rtp_t *rtp_session)</span>
                                 bytes = sizeof(rtp_msg_t);
                                 status = switch_socket_recvfrom(rtp_session-&gt;from_addr, rtp_session-&gt;sock_input, 0, (void *) &amp;rtp_session-&gt;recv_msg, &amp;bytes);
                                 if (bytes) {
<span style="color: #00A000">+                                        int do_cng = 0;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        /* Make sure to handle RFC2833 packets, even if we&#39;re flushing the packets */</span>
<span style="color: #00A000">+                                        if (bytes &gt; rtp_header_len &amp;&amp; rtp_session-&gt;recv_te &amp;&amp; rtp_session-&gt;recv_msg.header.pt == rtp_session-&gt;recv_te) {</span>
<span style="color: #00A000">+                                                handle_rfc2833(rtp_session, bytes, &amp;do_cng);</span>
<span style="color: #00A000">+#ifdef DEBUG_2833</span>
<span style="color: #00A000">+                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;*** RTP packet handled in flush loop ***\n&quot;);</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                                        }</span>
 
                                         flushed++;
 
<span style="color: #800080; font-weight: bold">@@ -2195,7 +2382,52 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t</span>
         *bytes = sizeof(rtp_msg_t);
         status = switch_socket_recvfrom(rtp_session-&gt;from_addr, rtp_session-&gt;sock_input, 0, (void *) &amp;rtp_session-&gt;recv_msg, bytes);
         ts = ntohl(rtp_session-&gt;recv_msg.header.ts);
<span style="color: #A00000">-        </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if (*bytes ) {</span>
<span style="color: #00A000">+                uint16_t seq = ntohs((uint16_t) rtp_session-&gt;recv_msg.header.seq);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (rtp_session-&gt;last_seq &amp;&amp; rtp_session-&gt;last_seq+1 != seq) {</span>
<span style="color: #00A000">+#ifdef DEBUG_MISSED_SEQ</span>
<span style="color: #00A000">+                        switch_size_t flushed_packets_diff = rtp_session-&gt;stats.inbound.flush_packet_count - rtp_session-&gt;last_flush_packet_count;</span>
<span style="color: #00A000">+                        switch_size_t num_missed = (switch_size_t)seq - (rtp_session-&gt;last_seq+1);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (num_missed == 1) { /* We missed one packet */</span>
<span style="color: #00A000">+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Missed one RTP frame with sequence [%d]%s. Time since last read [%d]\n&quot;,</span>
<span style="color: #00A000">+                                                                  rtp_session-&gt;last_seq+1, (flushed_packets_diff == 1) ? &quot; (flushed by FS)&quot; : &quot; (missed)&quot;,</span>
<span style="color: #00A000">+                                                                  rtp_session-&gt;last_read_time ? switch_micro_time_now()-rtp_session-&gt;last_read_time : 0);</span>
<span style="color: #00A000">+                        } else { /* We missed multiple packets */</span>
<span style="color: #00A000">+                                if (flushed_packets_diff == 0) { </span>
<span style="color: #00A000">+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,</span>
<span style="color: #00A000">+                                                                          &quot;Missed %d RTP frames from sequence [%d] to [%d] (missed). Time since last read [%d]\n&quot;,</span>
<span style="color: #00A000">+                                                                          num_missed, rtp_session-&gt;last_seq+1, seq-1,</span>
<span style="color: #00A000">+                                                                          rtp_session-&gt;last_read_time ? switch_micro_time_now()-rtp_session-&gt;last_read_time : 0);</span>
<span style="color: #00A000">+                                } else if (flushed_packets_diff == num_missed) {</span>
<span style="color: #00A000">+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,</span>
<span style="color: #00A000">+                                                                          &quot;Missed %d RTP frames from sequence [%d] to [%d] (flushed by FS). Time since last read [%d]\n&quot;,</span>
<span style="color: #00A000">+                                                                          num_missed, rtp_session-&gt;last_seq+1, seq-1,</span>
<span style="color: #00A000">+                                                                          rtp_session-&gt;last_read_time ? switch_micro_time_now()-rtp_session-&gt;last_read_time : 0);</span>
<span style="color: #00A000">+                                } else if (num_missed &gt; flushed_packets_diff) {</span>
<span style="color: #00A000">+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,</span>
<span style="color: #00A000">+                                                                          &quot;Missed %d RTP frames from sequence [%d] to [%d] (%d packets flushed by FS, %d packets missed).&quot;</span>
<span style="color: #00A000">+                                                                          &quot; Time since last read [%d]\n&quot;,</span>
<span style="color: #00A000">+                                                                          num_missed, rtp_session-&gt;last_seq+1, seq-1,</span>
<span style="color: #00A000">+                                                                          flushed_packets_diff, num_missed-flushed_packets_diff,</span>
<span style="color: #00A000">+                                                                          rtp_session-&gt;last_read_time ? switch_micro_time_now()-rtp_session-&gt;last_read_time : 0);</span>
<span style="color: #00A000">+                                } else {</span>
<span style="color: #00A000">+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,</span>
<span style="color: #00A000">+                                                                          &quot;Missed %d RTP frames from sequence [%d] to [%d] (%d packets flushed by FS). Time since last read [%d]\n&quot;,</span>
<span style="color: #00A000">+                                                                          num_missed, rtp_session-&gt;last_seq+1, seq-1,</span>
<span style="color: #00A000">+                                                                          flushed_packets_diff, rtp_session-&gt;last_read_time ? switch_micro_time_now()-rtp_session-&gt;last_read_time : 0);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                rtp_session-&gt;last_seq = seq;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        rtp_session-&gt;last_flush_packet_count = rtp_session-&gt;stats.inbound.flush_packet_count;</span>
<span style="color: #00A000">+        rtp_session-&gt;last_read_time = switch_micro_time_now();</span>
<span style="color: #00A000">+</span>
         if (*bytes &amp;&amp; (!rtp_session-&gt;recv_te || rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;recv_te) &amp;&amp; 
                 ts &amp;&amp; !rtp_session-&gt;jb &amp;&amp; !rtp_session-&gt;pause_jb &amp;&amp; ts == rtp_session-&gt;last_cng_ts) {
                 /* we already sent this frame..... */
<span style="color: #800080; font-weight: bold">@@ -2836,173 +3068,20 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
 
                         bytes = sbytes;
                 }
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                if (rtp_session-&gt;dtmf_data.in_digit_sanity &amp;&amp; !(rtp_session-&gt;dtmf_data.in_digit_sanity % 100)) {</span>
<span style="color: #A00000">-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;sanity %d\n&quot;, rtp_session-&gt;dtmf_data.in_digit_sanity);</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                if (rtp_session-&gt;dtmf_data.in_digit_sanity &amp;&amp; !--rtp_session-&gt;dtmf_data.in_digit_sanity) {</span>
<span style="color: #A00000">-                        rtp_session-&gt;dtmf_data.last_digit = 0;</span>
<span style="color: #A00000">-                        rtp_session-&gt;dtmf_data.in_digit_ts = 0;</span>
<span style="color: #A00000">-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed DTMF sanity check.\n&quot;);</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                /* RFC2833 ... like all RFC RE: VoIP, guaranteed to drive you to insanity! </span>
<span style="color: #A00000">-                   We know the real rules here, but if we enforce them, it&#39;s an interop nightmare so,</span>
<span style="color: #A00000">-                   we put up with as much as we can so we don&#39;t have to deal with being punished for</span>
<span style="color: #A00000">-                   doing it right. Nice guys finish last!</span>
<span style="color: #A00000">-                */</span>
<span style="color: #A00000">-                if (bytes &gt; rtp_header_len &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &amp;&amp;</span>
<span style="color: #A00000">-                        !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PASS_RFC2833) &amp;&amp; rtp_session-&gt;recv_msg.header.pt == rtp_session-&gt;recv_te) {</span>
<span style="color: #A00000">-                        switch_size_t len = bytes - rtp_header_len;</span>
<span style="color: #A00000">-                        unsigned char *packet = (unsigned char *) rtp_session-&gt;recv_msg.body;</span>
<span style="color: #A00000">-                        int end;</span>
<span style="color: #A00000">-                        uint16_t duration;</span>
<span style="color: #A00000">-                        char key;</span>
<span style="color: #A00000">-                        uint16_t in_digit_seq;</span>
<span style="color: #A00000">-                        uint32_t ts;</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        if (!(packet[0] || packet[1] || packet[2] || packet[3]) &amp;&amp; len &gt;= 8) {</span>
<span style="color: #A00000">-                                packet += 4;</span>
<span style="color: #A00000">-                                len -= 4;</span>
<span style="color: #A00000">-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;DTMF payload offset by 4 bytes.\n&quot;);</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        if (!(packet[0] || packet[1] || packet[2] || packet[3])) {</span>
<span style="color: #A00000">-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Failed DTMF payload check.\n&quot;);</span>
<span style="color: #A00000">-                                rtp_session-&gt;dtmf_data.last_digit = 0;</span>
<span style="color: #A00000">-                                rtp_session-&gt;dtmf_data.in_digit_ts = 0;</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        end = packet[1] &amp; 0x80 ? 1 : 0;</span>
<span style="color: #A00000">-                        duration = (packet[2] &lt;&lt; 8) + packet[3];</span>
<span style="color: #A00000">-                        key = switch_rfc2833_to_char(packet[0]);</span>
<span style="color: #A00000">-                        in_digit_seq = ntohs((uint16_t) rtp_session-&gt;recv_msg.header.seq);</span>
<span style="color: #A00000">-                        ts = htonl(rtp_session-&gt;recv_msg.header.ts);</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        if (in_digit_seq &lt; rtp_session-&gt;dtmf_data.in_digit_seq) {</span>
<span style="color: #A00000">-                                if (rtp_session-&gt;dtmf_data.in_digit_seq - in_digit_seq &gt; 100) {</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.in_digit_seq = 0;</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;packet[%d]: %02x %02x %02x %02x\n&quot;, (int) len, (unsigned) packet[0], (unsigned)</span>
<span style="color: #A00000">-                                   packet[1], (unsigned) packet[2], (unsigned) packet[3]);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        if (in_digit_seq &gt; rtp_session-&gt;dtmf_data.in_digit_seq) {</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                rtp_session-&gt;dtmf_data.in_digit_seq = in_digit_seq;</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;read: %c %u %u %u %u %d %d %s\n&quot;,</span>
<span style="color: #A00000">-                                           key, in_digit_seq, rtp_session-&gt;dtmf_data.in_digit_seq,</span>
<span style="color: #A00000">-                                           ts, duration, rtp_session-&gt;recv_msg.header.m, end, end &amp;&amp; !rtp_session-&gt;dtmf_data.in_digit_ts ? &quot;ignored&quot; : &quot;&quot;);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                if (!rtp_session-&gt;dtmf_data.in_digit_queued &amp;&amp; (rtp_session-&gt;rtp_bugs &amp; RTP_BUG_IGNORE_DTMF_DURATION) &amp;&amp;</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                                        switch_dtmf_t dtmf = { key, switch_core_min_dtmf_duration(0) };</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Early Queuing digit %c:%d\n&quot;, dtmf.digit, dtmf.duration / 8);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-                                        switch_rtp_queue_rfc2833_in(rtp_session, &amp;dtmf);</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.in_digit_queued = 1;</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                /* only set sanity if we do NOT ignore the packet */</span>
<span style="color: #A00000">-                                if (rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.in_digit_sanity = 2000;</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                if (rtp_session-&gt;dtmf_data.last_duration &gt; duration &amp;&amp; </span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.last_duration &gt; 0xFC17 &amp;&amp; ts == rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.flip++;</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                if (end) {</span>
<span style="color: #A00000">-                                        if (rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                                                switch_dtmf_t dtmf = { key, duration };</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                                if (ts &gt; rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                                                        dtmf.duration += (ts - rtp_session-&gt;dtmf_data.in_digit_ts);</span>
<span style="color: #A00000">-                                                }</span>
<span style="color: #A00000">-                                                if (rtp_session-&gt;dtmf_data.flip) {</span>
<span style="color: #A00000">-                                                        dtmf.duration += rtp_session-&gt;dtmf_data.flip * 0xFFFF;</span>
<span style="color: #A00000">-                                                        rtp_session-&gt;dtmf_data.flip = 0;</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;you&#39;re welcome!\n&quot;);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-                                                }</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;done digit=%c ts=%u start_ts=%u dur=%u ddur=%u\n&quot;,</span>
<span style="color: #A00000">-                                                           dtmf.digit, ts, rtp_session-&gt;dtmf_data.in_digit_ts, duration, dtmf.duration);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-                                                </span>
<span style="color: #A00000">-                                                if (!(rtp_session-&gt;rtp_bugs &amp; RTP_BUG_IGNORE_DTMF_DURATION) &amp;&amp; !rtp_session-&gt;dtmf_data.in_digit_queued) {</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Queuing digit %c:%d\n&quot;, dtmf.digit, dtmf.duration / 8);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-                                                        switch_rtp_queue_rfc2833_in(rtp_session, &amp;dtmf);</span>
<span style="color: #A00000">-                                                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                                rtp_session-&gt;dtmf_data.last_digit = rtp_session-&gt;dtmf_data.first_digit;</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                                rtp_session-&gt;dtmf_data.in_digit_ts = 0;</span>
<span style="color: #A00000">-                                                rtp_session-&gt;dtmf_data.in_digit_sanity = 0;</span>
<span style="color: #A00000">-                                                rtp_session-&gt;dtmf_data.in_digit_queued = 0;</span>
<span style="color: #A00000">-                                                do_cng = 1;</span>
<span style="color: #A00000">-                                        } else {</span>
<span style="color: #A00000">-                                                if (!switch_rtp_ready(rtp_session)) {</span>
<span style="color: #A00000">-                                                        goto end;</span>
<span style="color: #A00000">-                                                }</span>
<span style="color: #A00000">-                                                switch_cond_next();</span>
<span style="color: #A00000">-                                                goto recvfrom;</span>
<span style="color: #A00000">-                                        }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                } else if (!rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.in_digit_ts = ts;</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.first_digit = key;</span>
<span style="color: #A00000">-                                        rtp_session-&gt;dtmf_data.in_digit_sanity = 2000;</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                                rtp_session-&gt;dtmf_data.last_duration = duration;</span>
<span style="color: #A00000">-                        } else {</span>
<span style="color: #A00000">-#ifdef DEBUG_2833</span>
<span style="color: #A00000">-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;drop: %c %u %u %u %u %d %d\n&quot;,</span>
<span style="color: #A00000">-                                           key, in_digit_seq, rtp_session-&gt;dtmf_data.in_digit_seq, ts, duration, rtp_session-&gt;recv_msg.header.m, end);</span>
<span style="color: #A00000">-#endif</span>
<span style="color: #A00000">-                                switch_cond_next();</span>
<span style="color: #A00000">-                                goto recvfrom;</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                if (rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                if (bytes &amp;&amp; rtp_session-&gt;dtmf_data.in_digit_ts) {</span>
<span style="color: #A00000">-                        if (!switch_rtp_ready(rtp_session)) {</span>
<span style="color: #A00000">-                                goto end;</span>
<span style="color: #A00000">-                        }</span>
 
<span style="color: #A00000">-                        if (!rtp_session-&gt;dtmf_data.in_interleaved &amp;&amp; rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;recv_te) {</span>
<span style="color: #A00000">-                                /* Drat, they are sending audio still as well as DTMF ok fine..... *sigh* */</span>
<span style="color: #A00000">-                                rtp_session-&gt;dtmf_data.in_interleaved = 1;</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #A00000">-                        </span>
<span style="color: #A00000">-                        if (rtp_session-&gt;dtmf_data.in_interleaved || (rtp_session-&gt;rtp_bugs &amp; RTP_BUG_IGNORE_DTMF_DURATION)) {</span>
<span style="color: #A00000">-                                if (rtp_session-&gt;recv_msg.header.pt == rtp_session-&gt;recv_te) {</span>
<span style="color: #A00000">-                                        goto recvfrom;</span>
<span style="color: #A00000">-                                }</span>
<span style="color: #A00000">-                        } else {</span>
<span style="color: #A00000">-                                return_cng_frame();</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #00A000">+                /* Handle incoming RFC2833 packets */</span>
<span style="color: #00A000">+                switch (handle_rfc2833(rtp_session, bytes, &amp;do_cng)) {</span>
<span style="color: #00A000">+                case RESULT_GOTO_END:</span>
<span style="color: #00A000">+                        goto end;</span>
<span style="color: #00A000">+                case RESULT_GOTO_RECVFROM:</span>
<span style="color: #00A000">+                        goto recvfrom;</span>
<span style="color: #00A000">+                case RESULT_GOTO_TIMERCHECK:</span>
<span style="color: #00A000">+                        goto timer_check;</span>
<span style="color: #00A000">+                case RESULT_CONTINUE:</span>
<span style="color: #00A000">+                        goto result_continue;</span>
                 }
 
<span style="color: #00A000">+        result_continue:</span>
         timer_check:
 
                 if (do_cng) {
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
FS-3007

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c</span>
<span style="color: #000080; font-weight: bold">index 94fef61..19125c6 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_sofia/sofia_presence.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_sofia/sofia_presence.c</span>
<span style="color: #800080; font-weight: bold">@@ -630,6 +630,11 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)</span>
                         char *probe_user = NULL, *probe_euser, *probe_host, *p;
                         struct dialog_helper dh = { { 0 } };
 
<span style="color: #00A000">+                        if (strcasecmp(proto, SOFIA_CHAT_PROTO) != 0) {</span>
<span style="color: #00A000">+                                goto done;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
                         if (!to || !(probe_user = strdup(to))) {
                                 goto done;
                         }
<span style="color: #800080; font-weight: bold">@@ -2405,6 +2410,20 @@ void sofia_presence_handle_sip_i_subscribe(int status,</span>
                         switch_event_fire(&amp;sevent);
                 }
 
<span style="color: #00A000">+        } else if (to_user &amp;&amp; (strcasecmp(proto, SOFIA_CHAT_PROTO) != 0)) {</span>
<span style="color: #00A000">+                if (switch_event_create(&amp;sevent, SWITCH_EVENT_PRESENCE_PROBE) == SWITCH_STATUS_SUCCESS) {</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;proto&quot;, proto);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;long&quot;, profile-&gt;name);</span>
<span style="color: #00A000">+                        switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, &quot;from&quot;, &quot;%s@%s&quot;, from_user, from_host);</span>
<span style="color: #00A000">+                        switch_event_add_header(sevent, SWITCH_STACK_BOTTOM, &quot;to&quot;, &quot;%s%s%s@%s&quot;, proto, &quot;+&quot;, to_user, to_host);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;proto-specific-event-name&quot;, event);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;expires&quot;, exp_delta_str);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;event_type&quot;, &quot;presence&quot;);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;alt_event_type&quot;, &quot;dialog&quot;);</span>
<span style="color: #00A000">+                        switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;expires&quot;, exp_delta_str);</span>
<span style="color: #00A000">+                        switch_event_fire(&amp;sevent);</span>
<span style="color: #00A000">+        </span>
<span style="color: #00A000">+                }</span>
         } else {
                 if (switch_event_create(&amp;sevent, SWITCH_EVENT_PRESENCE_PROBE) == SWITCH_STATUS_SUCCESS) {
                         switch_event_add_header_string(sevent, SWITCH_STACK_BOTTOM, &quot;proto&quot;, SOFIA_CHAT_PROTO);
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
FS-2917

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_core.c b/src/switch_core.c</span>
<span style="color: #000080; font-weight: bold">index b531111..43fb36d 100644</span>
<span style="color: #A00000">--- a/src/switch_core.c</span>
<span style="color: #00A000">+++ b/src/switch_core.c</span>
<span style="color: #800080; font-weight: bold">@@ -151,13 +151,21 @@ static void check_ip(void)</span>
 SWITCH_STANDARD_SCHED_FUNC(heartbeat_callback)
 {
         send_heartbeat();
<span style="color: #A00000">-        check_ip();</span>
 
         /* reschedule this task */
         task-&gt;runtime = switch_epoch_time_now(NULL) + 20;
 }
 
 
<span style="color: #00A000">+SWITCH_STANDARD_SCHED_FUNC(check_ip_callback)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        check_ip();</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        /* reschedule this task */</span>
<span style="color: #00A000">+        task-&gt;runtime = switch_epoch_time_now(NULL) + 60;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
 SWITCH_DECLARE(switch_status_t) switch_core_set_console(const char *console)
 {
         if ((runtime.console = fopen(console, &quot;a&quot;)) == 0) {
<span style="color: #800080; font-weight: bold">@@ -1357,6 +1365,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc</span>
         
         switch_scheduler_add_task(switch_epoch_time_now(NULL), heartbeat_callback, &quot;heartbeat&quot;, &quot;core&quot;, 0, NULL, SSHF_NONE | SSHF_NO_DEL);
 
<span style="color: #00A000">+        switch_scheduler_add_task(switch_epoch_time_now(NULL), check_ip_callback, &quot;check_ip&quot;, &quot;core&quot;, 0, NULL, SSHF_NONE | SSHF_NO_DEL | SSHF_OWN_THREAD);</span>
<span style="color: #00A000">+</span>
         switch_uuid_get(&amp;uuid);
         switch_uuid_format(runtime.uuid_str, &amp;uuid);
 
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
Merge branch &#39;master&#39; of git.freeswitch.org:freeswitch
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: ftmod_wanpipe dummy for disabling echotrain

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #000080; font-weight: bold">index 3b384cd..e08fd61 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #800080; font-weight: bold">@@ -664,6 +664,8 @@ static FIO_COMMAND_FUNCTION(wanpipe_command)</span>
                         }
                 }
                 break;
<span style="color: #00A000">+        case FTDM_COMMAND_DISABLE_ECHOTRAIN: { err = 0; }</span>
<span style="color: #00A000">+                break;</span>
         case FTDM_COMMAND_ENABLE_DTMF_DETECT:
                 {
 #ifdef WP_API_FEATURE_DTMF_EVENTS
</pre></div>
<div class="highlight"><pre>committer: Daniel Swarbrick
comments: 
initial checkin of mod_snmp

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB b/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..9584c8b</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,110 @@</span>
<span style="color: #00A000">+FREESWITCH-MIB DEFINITIONS ::= BEGIN</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+IMPORTS</span>
<span style="color: #00A000">+    OBJECT-TYPE, MODULE-IDENTITY,</span>
<span style="color: #00A000">+    Integer32, Gauge32, Counter32, Counter64, TimeTicks,</span>
<span style="color: #00A000">+    enterprises,</span>
<span style="color: #00A000">+        FROM SNMPv2-SMI</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+    DisplayString</span>
<span style="color: #00A000">+        FROM SNMPv2-TC</span>
<span style="color: #00A000">+;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+freeswitch MODULE-IDENTITY</span>
<span style="color: #00A000">+    LAST-UPDATED    &quot;201101170000Z&quot;</span>
<span style="color: #00A000">+    ORGANIZATION    &quot;www.freeswitch.org&quot;</span>
<span style="color: #00A000">+    CONTACT-INFO</span>
<span style="color: #00A000">+        &quot;Primary contact: Anthony Minessale II</span>
<span style="color: #00A000">+         Email: anthm@freeswitch.org&quot;</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;This file defines the private FreeSWITCH SNMP MIB extensions.&quot;</span>
<span style="color: #00A000">+    REVISION        &quot;201101170000Z&quot;</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;First draft by daniel.swarbrick@seventhsignal.de&quot;</span>
<span style="color: #00A000">+    ::= { enterprises 27880 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+core        OBJECT IDENTIFIER ::= { freeswitch 1 }</span>
<span style="color: #00A000">+mod-sofia   OBJECT IDENTIFIER ::= { freeswitch 1001 }</span>
<span style="color: #00A000">+mod-skinny  OBJECT IDENTIFIER ::= { freeswitch 1002 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+identity    OBJECT IDENTIFIER ::= { core 1 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+versionString OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      DisplayString</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;FreeSWITCH version as a string&quot;</span>
<span style="color: #00A000">+    ::= { identity 1 } </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+uuid OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      DisplayString</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;FreeSWITCH core UUID&quot;</span>
<span style="color: #00A000">+    ::= { identity 2 } </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+systemStats OBJECT IDENTIFIER ::= { core 2 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+uptime OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      TimeTicks</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;FreeSWITCH process uptime in hundredths of seconds&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 1 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+sessionsSinceStartup OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      Counter32</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;Number of sessions since FreeSWITCH process was started&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 2 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+currentSessions OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      Gauge32</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;Currently active sessions&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 3 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+maxSessions OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      Gauge32</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;Maximum permissible active sessions&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 4 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+currentCalls OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      Gauge32</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;Currently active calls&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 5 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+sessionsPerSecond OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      Gauge32</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;Current sessions per second&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 6 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+maxSessionsPerSecond OBJECT-TYPE</span>
<span style="color: #00A000">+    SYNTAX      Gauge32</span>
<span style="color: #00A000">+    MAX-ACCESS  read-only</span>
<span style="color: #00A000">+    STATUS      current</span>
<span style="color: #00A000">+    DESCRIPTION</span>
<span style="color: #00A000">+        &quot;Maximum permissible sessions per second&quot;</span>
<span style="color: #00A000">+    ::= { systemStats 7 }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+END</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_snmp/Makefile b/src/mod/event_handlers/mod_snmp/Makefile</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..1d8827d</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_snmp/Makefile</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,7 @@</span>
<span style="color: #00A000">+include ../../../../build/modmake.rules</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+LOCAL_CFLAGS=-I `net-snmp-config --cflags`</span>
<span style="color: #00A000">+LOCAL_LDFLAGS=`net-snmp-config --agent-libs`</span>
<span style="color: #00A000">+LOCAL_OBJS=subagent.o</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+local_depend: $(LOCAL_OBJS)</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_snmp/mod_snmp.c b/src/mod/event_handlers/mod_snmp/mod_snmp.c</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..040e82b</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_snmp/mod_snmp.c</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,138 @@</span>
<span style="color: #00A000">+/* </span>
<span style="color: #00A000">+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application</span>
<span style="color: #00A000">+ * Copyright (C) 2005-2011, Anthony Minessale II &lt;anthm@freeswitch.org&gt;</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Version: MPL 1.1</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The contents of this file are subject to the Mozilla Public License Version</span>
<span style="color: #00A000">+ * 1.1 (the &quot;License&quot;); you may not use this file except in compliance with</span>
<span style="color: #00A000">+ * the License. You may obtain a copy of the License at</span>
<span style="color: #00A000">+ * http://www.mozilla.org/MPL/</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Software distributed under the License is distributed on an &quot;AS IS&quot; basis,</span>
<span style="color: #00A000">+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License</span>
<span style="color: #00A000">+ * for the specific language governing rights and limitations under the</span>
<span style="color: #00A000">+ * License.</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The Initial Developer of the Original Code is</span>
<span style="color: #00A000">+ * Anthony Minessale II &lt;anthm@freeswitch.org&gt;</span>
<span style="color: #00A000">+ * Portions created by the Initial Developer are Copyright (C)</span>
<span style="color: #00A000">+ * the Initial Developer. All Rights Reserved.</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Contributor(s):</span>
<span style="color: #00A000">+ * Daniel Swarbrick &lt;daniel.swarbrick@seventhsignal.de&gt;</span>
<span style="color: #00A000">+ * Stefan Knoblich &lt;s.knoblich@axsentis.de&gt;</span>
<span style="color: #00A000">+ * </span>
<span style="color: #00A000">+ * mod_snmp.c -- SNMP AgentX Subagent Module</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ */</span>
<span style="color: #00A000">+#include &lt;switch.h&gt;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+#include &lt;net-snmp/net-snmp-config.h&gt;</span>
<span style="color: #00A000">+#include &lt;net-snmp/net-snmp-includes.h&gt;</span>
<span style="color: #00A000">+#include &lt;net-snmp/agent/net-snmp-agent-includes.h&gt;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+#include &quot;subagent.h&quot;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+static struct {</span>
<span style="color: #00A000">+        switch_memory_pool_t *pool;</span>
<span style="color: #00A000">+        int shutdown;</span>
<span style="color: #00A000">+} globals;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SWITCH_MODULE_LOAD_FUNCTION(mod_snmp_load);</span>
<span style="color: #00A000">+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_snmp_shutdown);</span>
<span style="color: #00A000">+SWITCH_MODULE_RUNTIME_FUNCTION(mod_snmp_runtime);</span>
<span style="color: #00A000">+SWITCH_MODULE_DEFINITION(mod_snmp, mod_snmp_load, mod_snmp_shutdown, mod_snmp_runtime);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+static int snmp_callback_log(int major, int minor, void *serverarg, void *clientarg)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        struct snmp_log_message *slm = (struct snmp_log_message *) serverarg;</span>
<span style="color: #00A000">+        switch_log_printf(SWITCH_CHANNEL_LOG, slm-&gt;priority, &quot;%s&quot;, slm-&gt;msg);</span>
<span style="color: #00A000">+        return SNMP_ERR_NOERROR;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+static switch_state_handler_table_t state_handlers = {</span>
<span style="color: #00A000">+        /*.on_init */ NULL,</span>
<span style="color: #00A000">+        /*.on_routing */ NULL,</span>
<span style="color: #00A000">+        /*.on_execute */ NULL,</span>
<span style="color: #00A000">+        /*.on_hangup */ NULL,</span>
<span style="color: #00A000">+        /*.on_exchange_media */ NULL,</span>
<span style="color: #00A000">+        /*.on_soft_execute */ NULL,</span>
<span style="color: #00A000">+        /*.on_consume_media */ NULL,</span>
<span style="color: #00A000">+        /*.on_hibernate */ NULL,</span>
<span style="color: #00A000">+        /*.on_reset */ NULL,</span>
<span style="color: #00A000">+        /*.on_park */ NULL,</span>
<span style="color: #00A000">+        /*.on_reporting */ NULL</span>
<span style="color: #00A000">+};</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+static switch_status_t load_config(switch_memory_pool_t *pool)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        switch_status_t status = SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        memset(&amp;globals, 0, sizeof(globals));</span>
<span style="color: #00A000">+        globals.pool = pool;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return status;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SWITCH_MODULE_LOAD_FUNCTION(mod_snmp_load)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        switch_status_t status = SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        load_config(pool);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        switch_core_add_state_handler(&amp;state_handlers);</span>
<span style="color: #00A000">+        *module_interface = switch_loadable_module_create_module_interface(pool, modname);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        /* Register callback function so we get Net-SNMP logging handled by FreeSWITCH */</span>
<span style="color: #00A000">+        snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_LOGGING, snmp_callback_log, NULL);</span>
<span style="color: #00A000">+        snmp_enable_calllog();</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DONT_PERSIST_STATE, 1);</span>
<span style="color: #00A000">+        netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        init_agent(&quot;mod_snmp&quot;);</span>
<span style="color: #00A000">+        init_subagent();  </span>
<span style="color: #00A000">+        init_snmp(&quot;mod_snmp&quot;);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return status;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SWITCH_MODULE_RUNTIME_FUNCTION(mod_snmp_runtime)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        /* block on select() */</span>
<span style="color: #00A000">+        agent_check_and_process(1);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_snmp_shutdown)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        globals.shutdown = 1;</span>
<span style="color: #00A000">+        switch_core_remove_state_handler(&amp;state_handlers);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        snmp_shutdown(&quot;mod_snmp&quot;);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/* For Emacs:</span>
<span style="color: #00A000">+ * Local Variables:</span>
<span style="color: #00A000">+ * mode:c</span>
<span style="color: #00A000">+ * indent-tabs-mode:t</span>
<span style="color: #00A000">+ * tab-width:4</span>
<span style="color: #00A000">+ * c-basic-offset:4</span>
<span style="color: #00A000">+ * End:</span>
<span style="color: #00A000">+ * For VIM:</span>
<span style="color: #00A000">+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4:</span>
<span style="color: #00A000">+ */</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_snmp/subagent.c b/src/mod/event_handlers/mod_snmp/subagent.c</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..8a9f2da</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_snmp/subagent.c</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,189 @@</span>
<span style="color: #00A000">+/* </span>
<span style="color: #00A000">+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application</span>
<span style="color: #00A000">+ * Copyright (C) 2005-2011, Anthony Minessale II &lt;anthm@freeswitch.org&gt;</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Version: MPL 1.1</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The contents of this file are subject to the Mozilla Public License Version</span>
<span style="color: #00A000">+ * 1.1 (the &quot;License&quot;); you may not use this file except in compliance with</span>
<span style="color: #00A000">+ * the License. You may obtain a copy of the License at</span>
<span style="color: #00A000">+ * http://www.mozilla.org/MPL/</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Software distributed under the License is distributed on an &quot;AS IS&quot; basis,</span>
<span style="color: #00A000">+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License</span>
<span style="color: #00A000">+ * for the specific language governing rights and limitations under the</span>
<span style="color: #00A000">+ * License.</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The Initial Developer of the Original Code is</span>
<span style="color: #00A000">+ * Anthony Minessale II &lt;anthm@freeswitch.org&gt;</span>
<span style="color: #00A000">+ * Portions created by the Initial Developer are Copyright (C)</span>
<span style="color: #00A000">+ * the Initial Developer. All Rights Reserved.</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Contributor(s):</span>
<span style="color: #00A000">+ * Daniel Swarbrick &lt;daniel.swarbrick@seventhsignal.de&gt;</span>
<span style="color: #00A000">+ * Stefan Knoblich &lt;s.knoblich@axsentis.de&gt;</span>
<span style="color: #00A000">+ * </span>
<span style="color: #00A000">+ * mod_snmp.c -- SNMP AgentX Subagent Module</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ */</span>
<span style="color: #00A000">+#include &lt;switch.h&gt;</span>
<span style="color: #00A000">+#include &lt;switch_version.h&gt;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+#include &lt;net-snmp/net-snmp-config.h&gt;</span>
<span style="color: #00A000">+#include &lt;net-snmp/net-snmp-includes.h&gt;</span>
<span style="color: #00A000">+#include &lt;net-snmp/agent/net-snmp-agent-includes.h&gt;</span>
<span style="color: #00A000">+#include &quot;subagent.h&quot;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+static oid identity_oid[] = { 1,3,6,1,4,1,27880,1,1 };</span>
<span style="color: #00A000">+static oid systemStats_oid[] = { 1,3,6,1,4,1,27880,1,2 };</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/* identity sub-IDs - these must match MIB */</span>
<span style="color: #00A000">+enum {</span>
<span style="color: #00A000">+        versionString_oid = 1,</span>
<span style="color: #00A000">+        uuid_oid</span>
<span style="color: #00A000">+};</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/* systemStats sub-IDs - these must match MIB */</span>
<span style="color: #00A000">+enum {</span>
<span style="color: #00A000">+        uptime_oid = 1,</span>
<span style="color: #00A000">+        sessionsSinceStartup_oid,</span>
<span style="color: #00A000">+        currentSessions_oid,</span>
<span style="color: #00A000">+        maxSessions_oid,</span>
<span style="color: #00A000">+        currentCalls_oid,</span>
<span style="color: #00A000">+        sessionsPerSecond_oid,</span>
<span style="color: #00A000">+        maxSessionsPerSecond_oid</span>
<span style="color: #00A000">+};</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+void init_subagent(void)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        DEBUGMSGTL((&quot;init_nstAgentSubagentObject&quot;, &quot;Initializing\n&quot;));</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        netsnmp_register_handler(netsnmp_create_handler_registration(&quot;identity&quot;, handle_identity, identity_oid, OID_LENGTH(identity_oid), HANDLER_CAN_RONLY));</span>
<span style="color: #00A000">+        netsnmp_register_handler(netsnmp_create_handler_registration(&quot;systemStats&quot;, handle_systemStats, systemStats_oid, OID_LENGTH(systemStats_oid), HANDLER_CAN_RONLY));</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+int handle_identity(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        static char const version[] = SWITCH_VERSION_FULL;</span>
<span style="color: #00A000">+        char uuid[40] = &quot;&quot;;</span>
<span style="color: #00A000">+        netsnmp_request_info *request = NULL;</span>
<span style="color: #00A000">+        oid subid;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        switch(reqinfo-&gt;mode) {</span>
<span style="color: #00A000">+                case MODE_GET:</span>
<span style="color: #00A000">+                        for (request = requests; request; request = request-&gt;next) {</span>
<span style="color: #00A000">+                                subid = request-&gt;requestvb-&gt;name[OID_LENGTH(systemStats_oid)];</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                switch (subid) {</span>
<span style="color: #00A000">+                                        case versionString_oid:</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_OCTET_STR, (u_char *) &amp;version, strlen(version));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case uuid_oid:</span>
<span style="color: #00A000">+                                                strncpy(uuid, switch_core_get_uuid(), sizeof(uuid));</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_OCTET_STR, (u_char *) &amp;uuid, strlen(uuid));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        default:</span>
<span style="color: #00A000">+                                                snmp_log(LOG_WARNING, &quot;Unregistered OID-suffix requested (%d)\n&quot;, (int) subid);</span>
<span style="color: #00A000">+                                                netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                case MODE_GETNEXT:</span>
<span style="color: #00A000">+                        snmp_log(LOG_ERR, &quot;MODE_GETNEXT not supported (yet)\n&quot;);</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                default:</span>
<span style="color: #00A000">+                        /* we should never get here, so this is a really bad error */</span>
<span style="color: #00A000">+                        snmp_log(LOG_ERR, &quot;Unknown mode (%d) in handle_versionString\n&quot;, reqinfo-&gt;mode );</span>
<span style="color: #00A000">+                        return SNMP_ERR_GENERR;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return SNMP_ERR_NOERROR;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+int handle_systemStats(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        netsnmp_request_info *request = NULL;</span>
<span style="color: #00A000">+        oid subid;</span>
<span style="color: #00A000">+        switch_time_t uptime;</span>
<span style="color: #00A000">+        uint32_t int_val;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        switch(reqinfo-&gt;mode) {</span>
<span style="color: #00A000">+                case MODE_GET:</span>
<span style="color: #00A000">+                        for (request = requests; request; request = request-&gt;next) {</span>
<span style="color: #00A000">+                                subid = request-&gt;requestvb-&gt;name[OID_LENGTH(systemStats_oid)];</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                switch (subid) {</span>
<span style="color: #00A000">+                                        case uptime_oid:</span>
<span style="color: #00A000">+                                                uptime = switch_core_uptime() / 10000;</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_TIMETICKS, (u_char *) &amp;uptime, sizeof(uptime));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case sessionsSinceStartup_oid:</span>
<span style="color: #00A000">+                                                int_val = switch_core_session_id() - 1;</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_COUNTER, (u_char *) &amp;int_val, sizeof(int_val));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case currentSessions_oid:</span>
<span style="color: #00A000">+                                                int_val = switch_core_session_count();</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_GAUGE, (u_char *) &amp;int_val, sizeof(int_val));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case maxSessions_oid:</span>
<span style="color: #00A000">+                                                switch_core_session_ctl(SCSC_MAX_SESSIONS, &amp;int_val);;</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_GAUGE, (u_char *) &amp;int_val, sizeof(int_val));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case currentCalls_oid:</span>
<span style="color: #00A000">+                                                /*</span>
<span style="color: #00A000">+                                                 * This is zero for now, since there is no convenient way to get total call</span>
<span style="color: #00A000">+                                                 * count (not to be confused with session count), without touching the</span>
<span style="color: #00A000">+                                                 * database.</span>
<span style="color: #00A000">+                                                 */</span>
<span style="color: #00A000">+                                                int_val = 0;</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_GAUGE, (u_char *) &amp;int_val, sizeof(int_val));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case sessionsPerSecond_oid:</span>
<span style="color: #00A000">+                                                switch_core_session_ctl(SCSC_LAST_SPS, &amp;int_val);</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_GAUGE, (u_char *) &amp;int_val, sizeof(int_val));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        case maxSessionsPerSecond_oid:</span>
<span style="color: #00A000">+                                                switch_core_session_ctl(SCSC_SPS, &amp;int_val);</span>
<span style="color: #00A000">+                                                snmp_set_var_typed_value(requests-&gt;requestvb, ASN_GAUGE, (u_char *) &amp;int_val, sizeof(int_val));</span>
<span style="color: #00A000">+                                                break;</span>
<span style="color: #00A000">+                                        default:</span>
<span style="color: #00A000">+                                                snmp_log(LOG_WARNING, &quot;Unregistered OID-suffix requested (%d)\n&quot;, (int) subid);</span>
<span style="color: #00A000">+                                                netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                case MODE_GETNEXT:</span>
<span style="color: #00A000">+                        snmp_log(LOG_ERR, &quot;MODE_GETNEXT not supported (yet)\n&quot;);</span>
<span style="color: #00A000">+                        break;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                default:</span>
<span style="color: #00A000">+                        /* we should never get here, so this is a really bad error */</span>
<span style="color: #00A000">+                        snmp_log(LOG_ERR, &quot;Unknown mode (%d) in handle_systemStats\n&quot;, reqinfo-&gt;mode);</span>
<span style="color: #00A000">+                        return SNMP_ERR_GENERR;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return SNMP_ERR_NOERROR;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/* For Emacs:</span>
<span style="color: #00A000">+ * Local Variables:</span>
<span style="color: #00A000">+ * mode:c</span>
<span style="color: #00A000">+ * indent-tabs-mode:t</span>
<span style="color: #00A000">+ * tab-width:4</span>
<span style="color: #00A000">+ * c-basic-offset:4</span>
<span style="color: #00A000">+ * End:</span>
<span style="color: #00A000">+ * For VIM:</span>
<span style="color: #00A000">+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4:</span>
<span style="color: #00A000">+ */</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/event_handlers/mod_snmp/subagent.h b/src/mod/event_handlers/mod_snmp/subagent.h</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..8a57d8a</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/event_handlers/mod_snmp/subagent.h</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,8 @@</span>
<span style="color: #00A000">+#ifndef subagent_H</span>
<span style="color: #00A000">+#define subagent_H</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+void init_subagent(void);</span>
<span style="color: #00A000">+Netsnmp_Node_Handler handle_identity;</span>
<span style="color: #00A000">+Netsnmp_Node_Handler handle_systemStats;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+#endif /* subagent_H */</span>
</pre></div>
<div class="highlight"><pre>committer: Mathieu Rene
comments: 
Tricky preprocessor... try again

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #000080; font-weight: bold">index 0b73c66..377cfe5 100644</span>
<span style="color: #A00000">--- a/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #00A000">+++ b/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #800080; font-weight: bold">@@ -584,8 +584,11 @@ static void launch_write_stream_thread(shout_context_t *context)</span>
 }
 
 #define TC_BUFFER_SIZE 1024 * 32
<span style="color: #A00000">-#define STR(_x) #_x</span>
<span style="color: #A00000">-#define MPGERROR() {err = &quot;MPG123 Error at &quot; __FILE__ &quot;:&quot; STR(__LINE__) &quot;.&quot;; mpg123err = mpg123_strerror(context-&gt;mh); goto error; }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+#define CONCAT_LOCATION(_x,_y) _x &quot;:&quot; #_y</span>
<span style="color: #00A000">+#define MAKE_LOCATION(_x,_y) CONCAT_LOCATION(_x,_y)</span>
<span style="color: #00A000">+#define HERE MAKE_LOCATION(__FILE__, __LINE__)</span>
<span style="color: #00A000">+#define MPGERROR() {err = &quot;MPG123 Error at &quot; HERE &quot;.&quot;; mpg123err = mpg123_strerror(context-&gt;mh); goto error; }</span>
 static switch_status_t shout_file_open(switch_file_handle_t *handle, const char *path)
 {
         shout_context_t *context;
</pre></div>
<div class="highlight"><pre>committer: Mathieu Rene
comments: 
extra spaces &lt;/ocd&gt;

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #000080; font-weight: bold">index 1542be4..0b73c66 100644</span>
<span style="color: #A00000">--- a/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #00A000">+++ b/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #800080; font-weight: bold">@@ -585,7 +585,7 @@ static void launch_write_stream_thread(shout_context_t *context)</span>
 
 #define TC_BUFFER_SIZE 1024 * 32
 #define STR(_x) #_x
<span style="color: #A00000">-#define MPGERROR() {err = &quot;MPG123 Error at &quot; __FILE__ &quot; : &quot; STR(__LINE__) &quot;.&quot;; mpg123err = mpg123_strerror(context-&gt;mh); goto error; }</span>
<span style="color: #00A000">+#define MPGERROR() {err = &quot;MPG123 Error at &quot; __FILE__ &quot;:&quot; STR(__LINE__) &quot;.&quot;; mpg123err = mpg123_strerror(context-&gt;mh); goto error; }</span>
 static switch_status_t shout_file_open(switch_file_handle_t *handle, const char *path)
 {
         shout_context_t *context;
</pre></div>
<div class="highlight"><pre>committer: Mathieu Rene
comments: 
FS-2942 - At least display __FILE__ and __LINE__ properly so we can have more data

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #000080; font-weight: bold">index a4965c4..1542be4 100644</span>
<span style="color: #A00000">--- a/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #00A000">+++ b/src/mod/formats/mod_shout/mod_shout.c</span>
<span style="color: #800080; font-weight: bold">@@ -584,7 +584,8 @@ static void launch_write_stream_thread(shout_context_t *context)</span>
 }
 
 #define TC_BUFFER_SIZE 1024 * 32
<span style="color: #A00000">-#define MPGERROR() {err = &quot;MPG123 Error at __FILE__:__LINE__.&quot;; mpg123err = mpg123_strerror(context-&gt;mh); goto error; }</span>
<span style="color: #00A000">+#define STR(_x) #_x</span>
<span style="color: #00A000">+#define MPGERROR() {err = &quot;MPG123 Error at &quot; __FILE__ &quot; : &quot; STR(__LINE__) &quot;.&quot;; mpg123err = mpg123_strerror(context-&gt;mh); goto error; }</span>
 static switch_status_t shout_file_open(switch_file_handle_t *handle, const char *path)
 {
         shout_context_t *context;
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: added threaded media to the TODO

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/TODO b/libs/freetdm/TODO</span>
<span style="color: #000080; font-weight: bold">index 6b8ef8f..6b4cf71 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/TODO</span>
<span style="color: #00A000">+++ b/libs/freetdm/TODO</span>
<span style="color: #800080; font-weight: bold">@@ -11,3 +11,12 @@</span>
   cannot be shown to end users, we already provide extensive logging for problem
   troubleshooting.
 
<span style="color: #00A000">+- Implement threaded IO.</span>
<span style="color: #00A000">+  Currently IO modules only work on-demand, where the user (ie, FreeSWITCH) drives the read/write</span>
<span style="color: #00A000">+  of media. If the user stops reading, some functions are not possible </span>
<span style="color: #00A000">+  (DTMF detection or Hangup tone detection). It would be useful to implement a FreeTDM mode</span>
<span style="color: #00A000">+  where the media is driven by a group of threads that are always reading (and possibly writing)</span>
<span style="color: #00A000">+  then when the user does ftdm_channel_read(), the media would be read from the buffers filled</span>
<span style="color: #00A000">+  by the media thread and not from the underlying IO device, this gives a chance to FreeTDM to</span>
<span style="color: #00A000">+  still perform hangup detection or other media services even if the application is not reading.</span>
<span style="color: #00A000">+</span>
</pre></div>
<div class="highlight"><pre>committer: Jeff Lenk
comments: 
FS-2973 Fix possible segfaults and memory leak during unload, and add new setting odbc-retries

<span style="color: #000080; font-weight: bold">diff --git a/conf/autoload_configs/easyroute.conf.xml b/conf/autoload_configs/easyroute.conf.xml</span>
<span style="color: #000080; font-weight: bold">index 7cd4909..350a509 100644</span>
<span style="color: #A00000">--- a/conf/autoload_configs/easyroute.conf.xml</span>
<span style="color: #00A000">+++ b/conf/autoload_configs/easyroute.conf.xml</span>
<span style="color: #800080; font-weight: bold">@@ -11,6 +11,9 @@</span>
     &lt;!-- IP or Hostname of Default Route --&gt;
     &lt;param name=&quot;default-gateway&quot; value=&quot;192.168.66.6&quot;/&gt;
 
<span style="color: #00A000">+    &lt;!-- Number of times to retry ODBC connection on connection problems, default is 120 --&gt;</span>
<span style="color: #00A000">+    &lt;param name=&quot;odbc-retries&quot; value=&quot;120&quot;/&gt;</span>
<span style="color: #00A000">+</span>
     &lt;!-- Customer Query. Use this with Care!!! We are not responsible if you mess
          This up!!! Query *MUST* return columns in the following order!
          gateway varchar(128) - contains destination gateway host:port pair (ex: 192.168.1.1:5060 )
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_easyroute/mod_easyroute.c b/src/mod/applications/mod_easyroute/mod_easyroute.c</span>
<span style="color: #000080; font-weight: bold">index 481df95..75b4712 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_easyroute/mod_easyroute.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_easyroute/mod_easyroute.c</span>
<span style="color: #800080; font-weight: bold">@@ -65,6 +65,7 @@ static struct {</span>
         switch_mutex_t *mutex;
         char *custom_query;
         switch_odbc_handle_t *master_odbc;
<span style="color: #00A000">+        int odbc_num_retries;</span>
 } globals;
 
 SWITCH_MODULE_LOAD_FUNCTION(mod_easyroute_load);
<span style="color: #800080; font-weight: bold">@@ -120,6 +121,8 @@ static switch_status_t load_config(void)</span>
                                 set_global_default_gateway(val);
                         } else if (!strcasecmp(var, &quot;custom-query&quot;)) {
                                 set_global_custom_query(val);
<span style="color: #00A000">+                        } else if (!strcasecmp(var, &quot;odbc-retries&quot;)) {</span>
<span style="color: #00A000">+                                globals.odbc_num_retries = atoi(val);</span>
                         }
                 }
         }
<span style="color: #800080; font-weight: bold">@@ -143,6 +146,9 @@ static switch_status_t load_config(void)</span>
                 } else {
                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Opened ODBC Database!\n&quot;);
                 }
<span style="color: #00A000">+                if (globals.odbc_num_retries) {</span>
<span style="color: #00A000">+                        switch_odbc_set_num_retries(globals.master_odbc, globals.odbc_num_retries);</span>
<span style="color: #00A000">+                }</span>
                 if (switch_odbc_handle_connect(globals.master_odbc) != SWITCH_ODBC_SUCCESS) {
                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot Open ODBC Database!\n&quot;);
                         status = SWITCH_STATUS_FALSE;
<span style="color: #800080; font-weight: bold">@@ -205,7 +211,7 @@ static switch_status_t route_lookup(char *dn, easyroute_results_t *results, int</span>
                 switch_mutex_lock(globals.mutex);
         }
         /* Do the Query */
<span style="color: #A00000">-        if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, route_callback, &amp;pdata, NULL) == SWITCH_ODBC_SUCCESS) {</span>
<span style="color: #00A000">+        if (globals.master_odbc &amp;&amp; switch_odbc_handle_callback_exec(globals.master_odbc, sql, route_callback, &amp;pdata, NULL) == SWITCH_ODBC_SUCCESS) {</span>
                 char tmp_profile[129];
                 char tmp_gateway[129];
 
<span style="color: #800080; font-weight: bold">@@ -418,7 +424,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_easyroute_load)</span>
 
 SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_easyroute_shutdown)
 {
<span style="color: #A00000">-        switch_odbc_handle_disconnect(globals.master_odbc);</span>
<span style="color: #00A000">+        if (globals.master_odbc) {</span>
<span style="color: #00A000">+                switch_odbc_handle_disconnect(globals.master_odbc);</span>
<span style="color: #00A000">+                switch_odbc_handle_destroy(&amp;globals.master_odbc);</span>
<span style="color: #00A000">+        }</span>
         switch_safe_free(globals.db_username);
         switch_safe_free(globals.db_password);
         switch_safe_free(globals.db_dsn);
</pre></div>
<div class="highlight"><pre>committer: Joao Mesquita
comments: 
Export the variables to the b leg as well

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c</span>
<span style="color: #000080; font-weight: bold">index 4141725..5a3be03 100755</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_dptools/mod_dptools.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_dptools/mod_dptools.c</span>
<span style="color: #800080; font-weight: bold">@@ -2982,6 +2982,8 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,</span>
                         }
                 }
         }
<span style="color: #00A000">+        switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, &quot;dialed_user&quot;, user);</span>
<span style="color: #00A000">+        switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, &quot;dialed_domain&quot;, domain);</span>
 
         if (!dest) {
                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No dial-string available, please check your user directory.\n&quot;);
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
D&#39;oh Over zealous packet eating

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_rtp.c b/src/switch_rtp.c</span>
<span style="color: #000080; font-weight: bold">index 4e5450d..3ce7a07 100644</span>
<span style="color: #A00000">--- a/src/switch_rtp.c</span>
<span style="color: #00A000">+++ b/src/switch_rtp.c</span>
<span style="color: #800080; font-weight: bold">@@ -2494,7 +2494,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
                         }
                 }
 
<span style="color: #A00000">-                if (rtp_session-&gt;recv_msg.header.pt != 13 &amp;&amp; </span>
<span style="color: #00A000">+                if (bytes &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) &amp;&amp; !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) &amp;&amp;</span>
<span style="color: #00A000">+                        rtp_session-&gt;recv_msg.header.pt != 13 &amp;&amp; </span>
                         rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;recv_te &amp;&amp; 
                         (!rtp_session-&gt;cng_pt || rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;cng_pt) &amp;&amp; 
                         rtp_session-&gt;recv_msg.header.pt != rtp_session-&gt;payload) {
</pre></div>
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
add execute_on_originate var &#39;&lt;app&gt; &lt;arg&gt;&#39; to run in origination thread or &#39;&lt;app&gt;::&lt;arg&gt;&#39; to run async. also originating_leg_uuid variable to show the uuid of the originating leg on an outbound channel

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c</span>
<span style="color: #000080; font-weight: bold">index d156c70..78743e6 100644</span>
<span style="color: #A00000">--- a/src/switch_ivr_originate.c</span>
<span style="color: #00A000">+++ b/src/switch_ivr_originate.c</span>
<span style="color: #800080; font-weight: bold">@@ -2755,6 +2755,26 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess</span>
                                                         }
                                                 }
                                         }
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        if (session) {</span>
<span style="color: #00A000">+                                                switch_channel_set_variable(originate_status[i].peer_channel, &quot;originating_leg_uuid&quot;, switch_core_session_get_uuid(session));</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        if ((vvar = switch_channel_get_variable_dup(originate_status[i].peer_channel, &quot;execute_on_originate&quot;, SWITCH_FALSE))) {</span>
<span style="color: #00A000">+                                                char *app = switch_core_session_strdup(originate_status[i].peer_session, vvar);</span>
<span style="color: #00A000">+                                                char *arg = NULL;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                                if (strstr(app, &quot;::&quot;)) {</span>
<span style="color: #00A000">+                                                        switch_core_session_execute_application_async(originate_status[i].peer_session, app, arg);</span>
<span style="color: #00A000">+                                                } else {</span>
<span style="color: #00A000">+                                                        if ((arg = strchr(app, &#39; &#39;))) {</span>
<span style="color: #00A000">+                                                                *arg++ = &#39;\0&#39;;</span>
<span style="color: #00A000">+                                                        }</span>
<span style="color: #00A000">+                                                        </span>
<span style="color: #00A000">+                                                        switch_core_session_execute_application(originate_status[i].peer_session, app, arg);</span>
<span style="color: #00A000">+                                                }</span>
<span style="color: #00A000">+                                                </span>
<span style="color: #00A000">+                                        }</span>
                                 }
 
                                 if (table) {
<span style="color: #800080; font-weight: bold">@@ -2773,7 +2793,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess</span>
                                         *cause = SWITCH_CAUSE_SUCCESS;
                                         goto outer_for;
                                 }
<span style="color: #A00000">-</span>
<span style="color: #00A000">+                                </span>
                                 if (!switch_core_session_running(originate_status[i].peer_session)) {
                                         if (originate_status[i].per_channel_delay_start) {
                                                 switch_channel_set_flag(originate_status[i].peer_channel, CF_BLOCK_STATE);
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
freetdm: Fix for defaulting to wrong codec

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #000080; font-weight: bold">index afba96a..bd5b13b 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -389,10 +389,11 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_</span>
         }
 
         if (span-&gt;default_caller_data.bearer_layer1 == FTDM_INVALID_INT_PARM) {
<span style="color: #A00000">-                if (signal_data-&gt;switchtype == SNGISDN_SWITCH_EUROISDN) {</span>
<span style="color: #A00000">-                        span-&gt;default_caller_data.bearer_layer1 = IN_UIL1_G711ULAW;</span>
<span style="color: #A00000">-                } else {</span>
<span style="color: #00A000">+                if (signal_data-&gt;switchtype == SNGISDN_SWITCH_EUROISDN ||</span>
<span style="color: #00A000">+                        signal_data-&gt;switchtype == SNGISDN_SWITCH_QSIG) {</span>
                         span-&gt;default_caller_data.bearer_layer1 = IN_UIL1_G711ALAW;
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        span-&gt;default_caller_data.bearer_layer1 = IN_UIL1_G711ULAW;</span>
                 }
         }
         return FTDM_SUCCESS;
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
freetdm: added support for early-media-override

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c</span>
<span style="color: #000080; font-weight: bold">index e7053c1..df528ae 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c</span>
<span style="color: #800080; font-weight: bold">@@ -676,6 +676,9 @@ static ftdm_status_t ftdm_sangoma_isdn_process_state_change(ftdm_channel_t *ftdm</span>
                                 /*OUTBOUND...so we were told by the line of this so noifiy the user*/
                                 sigev.event_id = FTDM_SIGEVENT_PROCEED;
                                 ftdm_span_send_signal(ftdmchan-&gt;span, &amp;sigev);
<span style="color: #00A000">+                                if (sngisdn_test_flag(sngisdn_info, FLAG_MEDIA_READY)) {</span>
<span style="color: #00A000">+                                        ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);</span>
<span style="color: #00A000">+                                }</span>
                         } else {
                                 if (!sngisdn_test_flag(sngisdn_info, FLAG_SENT_PROCEED)) {
                                         /* By default, we do not send a progress indicator in the proceed */
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h</span>
<span style="color: #000080; font-weight: bold">index 58fcc07..80dc73f 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h</span>
<span style="color: #800080; font-weight: bold">@@ -112,6 +112,11 @@ typedef enum {</span>
         SNGISDN_OPT_FALSE = 2,
 } sngisdn_opt_t;
 
<span style="color: #00A000">+typedef enum {</span>
<span style="color: #00A000">+        SNGISDN_EARLY_MEDIA_ON_PROCEED = (1 &lt;&lt; 0),</span>
<span style="color: #00A000">+        SNGISDN_EARLY_MEDIA_ON_PROGRESS = (1 &lt;&lt; 1),</span>
<span style="color: #00A000">+        SNGISDN_EARLY_MEDIA_ON_ALERT= (1 &lt;&lt; 2),</span>
<span style="color: #00A000">+} sngisdn_early_media_opt_t;</span>
 
 typedef enum {
         SNGISDN_AVAIL_DOWN = 1,
<span style="color: #800080; font-weight: bold">@@ -188,7 +193,8 @@ typedef struct sngisdn_span_data {</span>
         uint8_t                 span_id;
         uint8_t                        tei;
         uint8_t                        min_digits;
<span style="color: #A00000">-        uint8_t                        trace_flags;                /* TODO: change to flags, so we can use ftdm_test_flag etc.. */</span>
<span style="color: #00A000">+        uint8_t                        trace_flags;                /* TODO change to bit map of sngisdn_tracetype_t */</span>
<span style="color: #00A000">+        uint8_t                        early_media_flags;        /* bit map of ftdm_sngisdn_early_media_opt_t */</span>
         uint8_t                        overlap_dial;
         uint8_t                        setup_arb;
         uint8_t                        facility_ie_decode;
<span style="color: #800080; font-weight: bold">@@ -196,10 +202,10 @@ typedef struct sngisdn_span_data {</span>
         int8_t                        facility_timeout;
         uint8_t                        num_local_numbers;
         uint8_t                 ignore_cause_value;
<span style="color: #A00000">-        uint8_t                        raw_trace_q931;</span>
<span style="color: #A00000">-        uint8_t                        raw_trace_q921;</span>
<span style="color: #00A000">+        uint8_t                        raw_trace_q931; /* TODO: combine with trace_flags */</span>
<span style="color: #00A000">+        uint8_t                        raw_trace_q921; /* TODO: combine with trace_flags */</span>
         uint8_t                        timer_t3;
<span style="color: #A00000">-        uint8_t                        restart_opt;</span>
<span style="color: #00A000">+        uint8_t                        restart_opt;        </span>
         char*                        local_numbers[SNGISDN_NUM_LOCAL_NUMBERS];
         ftdm_sched_t         *sched;
         ftdm_queue_t         *event_queue;
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #000080; font-weight: bold">index aad68e1..afba96a 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c</span>
<span style="color: #800080; font-weight: bold">@@ -192,6 +192,24 @@ static ftdm_status_t parse_signalling(const char* signalling, ftdm_span_t *span)</span>
         return FTDM_SUCCESS;
 }
 
<span style="color: #00A000">+static ftdm_status_t parse_early_media(const char* opt, ftdm_span_t *span)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) span-&gt;signal_data;</span>
<span style="color: #00A000">+        if (!strcasecmp(opt, &quot;on-proceed&quot;)) {</span>
<span style="color: #00A000">+                signal_data-&gt;early_media_flags |= SNGISDN_EARLY_MEDIA_ON_PROCEED;</span>
<span style="color: #00A000">+        } else if (!strcasecmp(opt, &quot;on-progress&quot;)) {</span>
<span style="color: #00A000">+                signal_data-&gt;early_media_flags |= SNGISDN_EARLY_MEDIA_ON_PROGRESS;</span>
<span style="color: #00A000">+        } else if (!strcasecmp(opt, &quot;on-alert&quot;)) {</span>
<span style="color: #00A000">+                signal_data-&gt;early_media_flags |= SNGISDN_EARLY_MEDIA_ON_ALERT;</span>
<span style="color: #00A000">+        } else {</span>
<span style="color: #00A000">+                ftdm_log(FTDM_LOG_ERROR, &quot;Unsupported early-media option %s\n&quot;, opt);</span>
<span style="color: #00A000">+                return FTDM_FAIL;</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+        ftdm_log(FTDM_LOG_DEBUG, &quot;Early media opt:0x%x\n&quot;, signal_data-&gt;early_media_flags);</span>
<span style="color: #00A000">+        return FTDM_SUCCESS;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
 static ftdm_status_t set_switchtype_defaults(ftdm_span_t *span)
 {
         sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) span-&gt;signal_data;
<span style="color: #800080; font-weight: bold">@@ -249,6 +267,7 @@ static ftdm_status_t set_switchtype_defaults(ftdm_span_t *span)</span>
         return FTDM_SUCCESS;
 }
 
<span style="color: #00A000">+</span>
 ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_span_t *span)
 {
         unsigned paramindex;
<span style="color: #800080; font-weight: bold">@@ -351,10 +370,14 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_</span>
                         parse_yesno(var, val, &amp;signal_data-&gt;raw_trace_q931);
                 } else if (!strcasecmp(var, &quot;q921-raw-trace&quot;)) {
                         parse_yesno(var, val, &amp;signal_data-&gt;raw_trace_q921);
<span style="color: #00A000">+                } else if (!strcasecmp(var, &quot;early-media-override&quot;)) {</span>
<span style="color: #00A000">+                        if (parse_early_media(val, span) != FTDM_SUCCESS) {</span>
<span style="color: #00A000">+                                return FTDM_FAIL;</span>
<span style="color: #00A000">+                        }</span>
                 } else {
                         ftdm_log(FTDM_LOG_WARNING, &quot;Ignoring unknown parameter %s\n&quot;, ftdm_parameters[paramindex].var);
                 }
<span style="color: #A00000">-        }</span>
<span style="color: #00A000">+        } /* for (paramindex = 0; ftdm_parameters[paramindex].var; paramindex++) */</span>
         
         if (signal_data-&gt;switchtype == SNGISDN_SWITCH_INVALID) {
                 ftdm_log(FTDM_LOG_ERROR, &quot;%s: switchtype not specified&quot;, span-&gt;name);
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c</span>
<span style="color: #000080; font-weight: bold">index 7b7c748..0b52011 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c</span>
<span style="color: #800080; font-weight: bold">@@ -167,12 +167,12 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)</span>
                                 char retrieved_str[255];
 
                                 ret_val = sng_isdn_retrieve_facility_caller_name(conEvnt-&gt;facilityStr.facilityStr.val, conEvnt-&gt;facilityStr.facilityStr.len, retrieved_str);
<span style="color: #A00000">-                                        /*</span>
<span style="color: #A00000">-                                                return values for &quot;sng_isdn_retrieve_facility_information_following&quot;:</span>
<span style="color: #A00000">-                                If there will be no information following, or fails to decode IE, returns -1</span>
<span style="color: #A00000">-                                If there will be no information following, but current FACILITY IE contains a caller name, returns 0</span>
<span style="color: #A00000">-                                If there will be information following, returns 1</span>
<span style="color: #A00000">-                                                                                */</span>
<span style="color: #00A000">+                                /*</span>
<span style="color: #00A000">+                                        return values for &quot;sng_isdn_retrieve_facility_information_following&quot;:</span>
<span style="color: #00A000">+                                        If there will be no information following, or fails to decode IE, returns -1</span>
<span style="color: #00A000">+                                        If there will be no information following, but current FACILITY IE contains a caller name, returns 0</span>
<span style="color: #00A000">+                                        If there will be information following, returns 1</span>
<span style="color: #00A000">+                                */</span>
 
                                 if (ret_val == 1) {
                                         ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Expecting Caller name in FACILITY\n&quot;);
<span style="color: #800080; font-weight: bold">@@ -346,6 +346,7 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)</span>
         
         sngisdn_chan_data_t *sngisdn_info = sngisdn_event-&gt;sngisdn_info;
         ftdm_channel_t *ftdmchan = sngisdn_info-&gt;ftdmchan;
<span style="color: #00A000">+        sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) ftdmchan-&gt;span-&gt;signal_data;</span>
         
         CnStEvnt *cnStEvnt = &amp;sngisdn_event-&gt;event.cnStEvnt;
 
<span style="color: #800080; font-weight: bold">@@ -384,7 +385,7 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)</span>
                                 case FTDM_CHANNEL_STATE_DIALING:
                                 case FTDM_CHANNEL_STATE_PROCEED:
                                 case FTDM_CHANNEL_STATE_PROGRESS:
<span style="color: #A00000">-                                case FTDM_CHANNEL_STATE_RINGING:</span>
<span style="color: #00A000">+                                case FTDM_CHANNEL_STATE_RINGING:                                        </span>
                                         if (cnStEvnt-&gt;progInd.eh.pres &amp;&amp; cnStEvnt-&gt;progInd.progDesc.val == IN_PD_IBAVAIL) {
                                                 ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Early media available\n&quot;);
                                                 sngisdn_set_flag(sngisdn_info, FLAG_MEDIA_READY);
<span style="color: #800080; font-weight: bold">@@ -393,16 +394,34 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)</span>
                                         }
                                         switch (evntType) {
                                                 case MI_CALLPROC:
<span style="color: #00A000">+                                                        if (!sngisdn_test_flag(sngisdn_info, FLAG_MEDIA_READY) &amp;&amp;</span>
<span style="color: #00A000">+                                                                (signal_data-&gt;early_media_flags &amp; SNGISDN_EARLY_MEDIA_ON_PROCEED)) {</span>
<span style="color: #00A000">+                                                                </span>
<span style="color: #00A000">+                                                                ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Early media override on proceed\n&quot;);</span>
<span style="color: #00A000">+                                                                sngisdn_set_flag(sngisdn_info, FLAG_MEDIA_READY);</span>
<span style="color: #00A000">+                                                        }</span>
                                                         if (ftdmchan-&gt;state == FTDM_CHANNEL_STATE_DIALING) {
                                                                 ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROCEED);
                                                         }
                                                         break;
                                                 case MI_ALERTING:
<span style="color: #00A000">+                                                        if (!sngisdn_test_flag(sngisdn_info, FLAG_MEDIA_READY) &amp;&amp;</span>
<span style="color: #00A000">+                                                                (signal_data-&gt;early_media_flags &amp; SNGISDN_EARLY_MEDIA_ON_ALERT)) {</span>
<span style="color: #00A000">+                                                                </span>
<span style="color: #00A000">+                                                                ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Early media override on alert\n&quot;);</span>
<span style="color: #00A000">+                                                                sngisdn_set_flag(sngisdn_info, FLAG_MEDIA_READY);</span>
<span style="color: #00A000">+                                                        }</span>
                                                         if (ftdmchan-&gt;state == FTDM_CHANNEL_STATE_PROCEED) {
                                                                 ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_RINGING);
                                                         }
                                                         break;
                                                 case MI_PROGRESS:
<span style="color: #00A000">+                                                        if (!sngisdn_test_flag(sngisdn_info, FLAG_MEDIA_READY) &amp;&amp;</span>
<span style="color: #00A000">+                                                                (signal_data-&gt;early_media_flags &amp; SNGISDN_EARLY_MEDIA_ON_PROGRESS)) {</span>
<span style="color: #00A000">+                                                                </span>
<span style="color: #00A000">+                                                                ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Early media override on progress\n&quot;);</span>
<span style="color: #00A000">+                                                                sngisdn_set_flag(sngisdn_info, FLAG_MEDIA_READY);</span>
<span style="color: #00A000">+                                                        }</span>
                                                         if (sngisdn_test_flag(sngisdn_info, FLAG_MEDIA_READY)) {
                                                                 ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_PROGRESS_MEDIA);
                                                         } else if (ftdmchan-&gt;state != FTDM_CHANNEL_STATE_PROGRESS) {
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
Merge branch &#39;master&#39; of git.freeswitch.org:freeswitch
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
freetdm - improved default bearer-cap code

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c</span>
<span style="color: #000080; font-weight: bold">index 9c1b7ba..64147b7 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c</span>
<span style="color: #800080; font-weight: bold">@@ -881,18 +881,27 @@ ftdm_status_t set_bear_cap_ie(ftdm_channel_t *ftdmchan, BearCap *bearCap)</span>
                 bearCap-&gt;usrInfoLyr1Prot.pres = PRSNT_NODEF;
                 bearCap-&gt;usrInfoLyr1Prot.val = sngisdn_get_usrInfoLyr1Prot_from_user(ftdmchan-&gt;caller_data.bearer_layer1);
 
<span style="color: #A00000">-                if (signal_data-&gt;switchtype == SNGISDN_SWITCH_EUROISDN &amp;&amp;</span>
<span style="color: #A00000">-                        bearCap-&gt;usrInfoLyr1Prot.val == IN_UIL1_G711ULAW) {</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        /* We are bridging a call from T1 */</span>
<span style="color: #A00000">-                        bearCap-&gt;usrInfoLyr1Prot.val = IN_UIL1_G711ALAW;</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                } else if (bearCap-&gt;usrInfoLyr1Prot.val == IN_UIL1_G711ALAW) {</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-                        /* We are bridging a call from E1 */</span>
<span style="color: #A00000">-                        bearCap-&gt;usrInfoLyr1Prot.val = IN_UIL1_G711ULAW;</span>
<span style="color: #00A000">+                switch (signal_data-&gt;switchtype) {</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_NI2:</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_4ESS:</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_5ESS:</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_DMS100:</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_INSNET:</span>
<span style="color: #00A000">+                                if (bearCap-&gt;usrInfoLyr1Prot.val == IN_UIL1_G711ALAW) {</span>
<span style="color: #00A000">+                                        ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Overriding bearer cap to u-law\n&quot;);</span>
<span style="color: #00A000">+                                        bearCap-&gt;usrInfoLyr1Prot.val = IN_UIL1_G711ULAW;</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                break;</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_EUROISDN:</span>
<span style="color: #00A000">+                        case SNGISDN_SWITCH_QSIG:</span>
<span style="color: #00A000">+                                if (bearCap-&gt;usrInfoLyr1Prot.val == IN_UIL1_G711ULAW) {</span>
<span style="color: #00A000">+                                        ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, &quot;Overriding bearer cap to a-law\n&quot;);</span>
<span style="color: #00A000">+                                        bearCap-&gt;usrInfoLyr1Prot.val = IN_UIL1_G711ALAW;</span>
<span style="color: #00A000">+                                }</span>
<span style="color: #00A000">+                                break;</span>
                 }
 
<span style="color: #00A000">+                </span>
                 bearCap-&gt;lyr1Ident.pres = PRSNT_NODEF;
                 bearCap-&gt;lyr1Ident.val = IN_L1_IDENT;
         }
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: remove collision event string

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/freetdm.h b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #000080; font-weight: bold">index 8d67df3..aed4054 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #800080; font-weight: bold">@@ -430,7 +430,7 @@ typedef enum {</span>
 } ftdm_signal_event_t;
 #define SIGNAL_STRINGS &quot;START&quot;, &quot;STOP&quot;, &quot;RELEASED&quot;, &quot;UP&quot;, &quot;FLASH&quot;, &quot;PROCEED&quot;, &quot;RINGING&quot;, &quot;PROGRESS&quot;, \
                 &quot;PROGRESS_MEDIA&quot;, &quot;ALARM_TRAP&quot;, &quot;ALARM_CLEAR&quot;, \
<span style="color: #A00000">-                &quot;COLLECTED_DIGIT&quot;, &quot;ADD_CALL&quot;, &quot;RESTART&quot;, &quot;SIGSTATUS_CHANGED&quot;, &quot;COLLISION&quot;, &quot;FACILITY&quot;, \</span>
<span style="color: #00A000">+                &quot;COLLECTED_DIGIT&quot;, &quot;ADD_CALL&quot;, &quot;RESTART&quot;, &quot;SIGSTATUS_CHANGED&quot;, &quot;FACILITY&quot;, \</span>
                 &quot;TRACE&quot;, &quot;TRACE_RAW&quot;, &quot;INDICATION_COMPLETED&quot;, &quot;DIALING&quot;, &quot;INVALID&quot;
 /*! \brief Move from string to ftdm_signal_event_t and viceversa */
 FTDM_STR2ENUM_P(ftdm_str2ftdm_signal_event, ftdm_signal_event2str, ftdm_signal_event_t)
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
Merge branch &#39;master&#39; of git.sangoma.com:smg_freeswitch
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: open wanpipe devices as non-exclusive if possible

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #000080; font-weight: bold">index e2b0825..3b384cd 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #800080; font-weight: bold">@@ -239,7 +239,11 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start</span>
                         ftdm_log(FTDM_LOG_ERROR, &quot;span %d channel %d cannot be configured as smg_prid_nfas, you need to compile freetdm with newer libsangoma\n&quot;, spanno, x);
 #endif
                 } else {
<span style="color: #00A000">+#ifdef LIBSANGOMA_VERSION</span>
<span style="color: #00A000">+                        sockfd = __tdmv_api_open_span_chan(spanno, x);</span>
<span style="color: #00A000">+#else</span>
                         sockfd = tdmv_api_open_span_chan(spanno, x);
<span style="color: #00A000">+#endif</span>
                 }
 
                 if (sockfd == FTDM_INVALID_SOCKET) {
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
Merge branch &#39;master&#39; of git://git.freeswitch.org/freeswitch
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
freetdm: fix for closing d-channel when channel is already closed by freetdm core

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c</span>
<span style="color: #000080; font-weight: bold">index f2afd1c..e7053c1 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c</span>
<span style="color: #800080; font-weight: bold">@@ -394,8 +394,7 @@ static void *ftdm_sangoma_isdn_dchan_run(ftdm_thread_t *me, void *obj)</span>
                         default:
                                 ftdm_log_chan_msg(dchan, FTDM_LOG_CRIT, &quot;Unhandled IO event\n&quot;);
                 }
<span style="color: #A00000">-        }</span>
<span style="color: #A00000">-        ftdm_channel_close(&amp;dchan);</span>
<span style="color: #00A000">+        }        </span>
         return NULL;
 }
 
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
Merge branch &#39;master&#39; of git://git.freeswitch.org/freeswitch
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
Merge branch &#39;master&#39; of git.freeswitch.org:freeswitch
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
added documentation

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/docs/io_modules.txt b/libs/freetdm/docs/io_modules.txt</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..a164bbb</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/libs/freetdm/docs/io_modules.txt</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,13 @@</span>
<span style="color: #00A000">+Last Updated: Jan 19, 2011</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+== BACKGROUND ==</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+The IO module provides an abstracted IO interface to FreeTDM. </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+== SHUTDOWN ==</span>
<span style="color: #00A000">+Upon global shutdown, for each channel FIO_CLOSE_FUNCTION will be called. </span>
<span style="color: #00A000">+When FIO_CLOSE_FUNCTION is called, all waiters on this channel shall be signalled.</span>
<span style="color: #00A000">+If FIO_WAIT_FUNCTION is called on a function that has already been closed, this function shall return FTDM_TIMEOUT without blocking.</span>
<span style="color: #00A000">+FIO_CHANNEL_DESTROY will eventually be called, and IO module is responsible for clearing all internal states and free allocated memory upon channel destroy. </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
</pre></div>
<div class="highlight"><pre>committer: Brian West
comments: 
FS-2998: prefix-a-leg not respected for url submission

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c b/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c</span>
<span style="color: #000080; font-weight: bold">index a439ab8..78d97ce 100644</span>
<span style="color: #A00000">--- a/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c</span>
<span style="color: #00A000">+++ b/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c</span>
<span style="color: #800080; font-weight: bold">@@ -340,7 +340,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)</span>
                                 switch_yield(globals.delay * 1000000);
                         }
 
<span style="color: #A00000">-                        destUrl = switch_mprintf(&quot;%s?uuid=%s&quot;, globals.urls[globals.url_index], switch_core_session_get_uuid(session));</span>
<span style="color: #00A000">+                        destUrl = switch_mprintf(&quot;%s?uuid=%s%s&quot;, globals.urls[globals.url_index], a_prefix, switch_core_session_get_uuid(session));</span>
                         curl_easy_setopt(curl_handle, CURLOPT_URL, destUrl);
 
                         if (!strncasecmp(destUrl, &quot;https&quot;, 5)) {
</pre></div>
<div class="highlight"><pre>committer: Brian West
comments: 
FS-2989: Places ;fs_path= within the contact string &lt;...&gt; when using NDLB-connectile-dysfunction-2.0, instead of just appending to the end of the contact string.

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c</span>
<span style="color: #000080; font-weight: bold">index f644ff7..631cbdb 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_sofia/sofia_reg.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_sofia/sofia_reg.c</span>
<span style="color: #800080; font-weight: bold">@@ -1139,7 +1139,13 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand</span>
                                         switch_url_encode(my_contact_str, path_encoded + 20, path_encoded_len - 20);
                                         reg_desc = &quot;Registered(AUTO-NAT-2.0)&quot;;
                                         exptime = 30;
<span style="color: #A00000">-                                        switch_snprintf(contact_str + strlen(contact_str), sizeof(contact_str) - strlen(contact_str), &quot;%s&quot;, path_encoded);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        /* place fs_path (the encoded path) inside the &lt;...&gt; of the contact string, if possible */</span>
<span style="color: #00A000">+                                        if (contact_str[strlen(contact_str) - 1] == &#39;&gt;&#39;) {</span>
<span style="color: #00A000">+                                                switch_snprintf(contact_str + strlen(contact_str) - 1, sizeof(contact_str) - strlen(contact_str) + 1, &quot;%s&gt;&quot;, path_encoded);</span>
<span style="color: #00A000">+                                        } else {</span>
<span style="color: #00A000">+                                                switch_snprintf(contact_str + strlen(contact_str), sizeof(contact_str) - strlen(contact_str), &quot;%s&quot;, path_encoded);</span>
<span style="color: #00A000">+                                        }</span>
                                         free(path_encoded);
                                 } else {
                                         if (*received_data &amp;&amp; sofia_test_pflag(profile, PFLAG_RECIEVED_IN_NAT_REG_CONTACT)) {
</pre></div>
<div class="highlight"><pre>committer: Brian West
comments: 
FS-2995: sigh... mr collins you said you fixed this

<span style="color: #000080; font-weight: bold">diff --git a/conf/lang/en/dir/sounds.xml b/conf/lang/en/dir/sounds.xml</span>
<span style="color: #000080; font-weight: bold">index 2bdc149..15ecec3 100644</span>
<span style="color: #A00000">--- a/conf/lang/en/dir/sounds.xml</span>
<span style="color: #00A000">+++ b/conf/lang/en/dir/sounds.xml</span>
<span style="color: #800080; font-weight: bold">@@ -16,7 +16,7 @@</span>
                         &lt;match&gt;
                                 &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_search_by.wav&quot;/&gt;
                                 &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-first_name.wav&quot;/&gt;
<span style="color: #A00000">-                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;</span>
<span style="color: #00A000">+                                &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;</span>
                                 &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
                         &lt;/match&gt;
                 &lt;/input&gt;
<span style="color: #800080; font-weight: bold">@@ -24,7 +24,7 @@</span>
                         &lt;match&gt;
                                 &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_search_by.wav&quot;/&gt;
                                 &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-last_name.wav&quot;/&gt;
<span style="color: #A00000">-                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;</span>
<span style="color: #00A000">+                                &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;</span>
                                 &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
                         &lt;/match&gt;
                 &lt;/input&gt;
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: workaround for Visual C++ 9.0 failing to compile ftdm feature macros

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/private/ftdm_core.h b/libs/freetdm/src/include/private/ftdm_core.h</span>
<span style="color: #000080; font-weight: bold">index fbe42d3..7cf0934 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/private/ftdm_core.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/private/ftdm_core.h</span>
<span style="color: #800080; font-weight: bold">@@ -132,8 +132,8 @@ extern &quot;C&quot; {</span>
 
 
 #define ftdm_channel_test_feature(obj, flag) ((obj)-&gt;features &amp; flag)
<span style="color: #A00000">-#define ftdm_channel_set_feature(obj, flag) (obj)-&gt;features |= (flag)</span>
<span style="color: #A00000">-#define ftdm_channel_clear_feature(obj, flag) (obj)-&gt;features &amp;= ~(flag)</span>
<span style="color: #00A000">+#define ftdm_channel_set_feature(obj, flag) (obj)-&gt;features = (ftdm_channel_feature_t)((obj)-&gt;features | flag)</span>
<span style="color: #00A000">+#define ftdm_channel_clear_feature(obj, flag) (obj)-&gt;features = (ftdm_channel_feature_t)((obj)-&gt;features &amp; ( ~(flag) ))</span>
 #define ftdm_channel_set_member_locked(obj, _m, _v) ftdm_mutex_lock(obj-&gt;mutex); obj-&gt;_m = _v; ftdm_mutex_unlock(obj-&gt;mutex)
 
 /*!
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
Merge branch &#39;netborder&#39;
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: add ftdm_call_utils.h to the installed headers

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/Makefile.am b/libs/freetdm/Makefile.am</span>
<span style="color: #000080; font-weight: bold">index 2ab5c29..96f1c9a 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/Makefile.am</span>
<span style="color: #00A000">+++ b/libs/freetdm/Makefile.am</span>
<span style="color: #800080; font-weight: bold">@@ -94,6 +94,7 @@ library_include_HEADERS = \</span>
         $(SRC)/include/ftdm_declare.h \
         $(SRC)/include/ftdm_threadmutex.h \
         $(SRC)/include/ftdm_os.h \
<span style="color: #00A000">+        $(SRC)/include/ftdm_call_utils.h \</span>
         $(SRC)/include/ftdm_dso.h 
 
 lib_LTLIBRARIES               = libfreetdm.la
</pre></div>
<div class="highlight"><pre>committer: David Yat Sin
comments: 
freetdm: added missing cause enums from Q.850

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/freetdm.h b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #000080; font-weight: bold">index 517d6b9..8d67df3 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #800080; font-weight: bold">@@ -82,8 +82,12 @@ typedef enum {</span>
         FTDM_CAUSE_UNALLOCATED = 1,
         FTDM_CAUSE_NO_ROUTE_TRANSIT_NET = 2,
         FTDM_CAUSE_NO_ROUTE_DESTINATION = 3,
<span style="color: #00A000">+        FTDM_CAUSE_SEND_SPECIAL_INFO_TONE = 4,</span>
<span style="color: #00A000">+         FTDM_CAUSE_MISDIALED_TRUNK_PREFIX = 5,</span>
         FTDM_CAUSE_CHANNEL_UNACCEPTABLE = 6,
         FTDM_CAUSE_CALL_AWARDED_DELIVERED = 7,
<span style="color: #00A000">+        FTDM_CAUSE_PREEMPTION = 8,</span>
<span style="color: #00A000">+        FTDM_CAUSE_PREEMPTION_CIRCUIT_RESERVED = 9,</span>
         FTDM_CAUSE_NORMAL_CLEARING = 16,
         FTDM_CAUSE_USER_BUSY = 17,
         FTDM_CAUSE_NO_USER_RESPONSE = 18,
<span style="color: #800080; font-weight: bold">@@ -100,23 +104,38 @@ typedef enum {</span>
         FTDM_CAUSE_NORMAL_UNSPECIFIED = 31,
         FTDM_CAUSE_NORMAL_CIRCUIT_CONGESTION = 34,
         FTDM_CAUSE_NETWORK_OUT_OF_ORDER = 38,
<span style="color: #00A000">+        FTDM_CAUSE_PERMANENT_FRAME_MODE_CONNECTION_OOS = 39,</span>
<span style="color: #00A000">+        FTDM_CAUSE_PERMANENT_FRAME_MODE_OPERATIONAL = 40,</span>
         FTDM_CAUSE_NORMAL_TEMPORARY_FAILURE = 41,
         FTDM_CAUSE_SWITCH_CONGESTION = 42,
         FTDM_CAUSE_ACCESS_INFO_DISCARDED = 43,
         FTDM_CAUSE_REQUESTED_CHAN_UNAVAIL = 44,
         FTDM_CAUSE_PRE_EMPTED = 45,
<span style="color: #00A000">+        FTDM_CAUSE_PRECEDENCE_CALL_BLOCKED = 46,</span>
<span style="color: #00A000">+        FTDM_CAUSE_RESOURCE_UNAVAILABLE_UNSPECIFIED = 47,</span>
<span style="color: #00A000">+        FTDM_CAUSE_QOS_NOT_AVAILABLE = 49,</span>
         FTDM_CAUSE_FACILITY_NOT_SUBSCRIBED = 50,
<span style="color: #A00000">-        FTDM_CAUSE_OUTGOING_CALL_BARRED = 52,</span>
<span style="color: #A00000">-        FTDM_CAUSE_INCOMING_CALL_BARRED = 54,</span>
<span style="color: #00A000">+        FTDM_CAUSE_OUTGOING_CALL_BARRED = 53,</span>
<span style="color: #00A000">+        FTDM_CAUSE_INCOMING_CALL_BARRED = 55,</span>
         FTDM_CAUSE_BEARERCAPABILITY_NOTAUTH = 57,
         FTDM_CAUSE_BEARERCAPABILITY_NOTAVAIL = 58,
<span style="color: #00A000">+        FTDM_CAUSE_INCONSISTENCY_IN_INFO = 62,</span>
         FTDM_CAUSE_SERVICE_UNAVAILABLE = 63,
         FTDM_CAUSE_BEARERCAPABILITY_NOTIMPL = 65,
         FTDM_CAUSE_CHAN_NOT_IMPLEMENTED = 66,
         FTDM_CAUSE_FACILITY_NOT_IMPLEMENTED = 69,
<span style="color: #00A000">+        FTDM_CAUSE_ONLY_DIGITAL_INFO_BC_AVAIL = 70,</span>
         FTDM_CAUSE_SERVICE_NOT_IMPLEMENTED = 79,
         FTDM_CAUSE_INVALID_CALL_REFERENCE = 81,
<span style="color: #00A000">+        FTDM_CAUSE_IDENTIFIED_CHAN_NOT_EXIST = 82,</span>
<span style="color: #00A000">+        FTDM_CAUSE_SUSPENDED_CALL_EXISTS_BUT_CALL_ID_DOES_NOT = 83,</span>
<span style="color: #00A000">+        FTDM_CAUSE_CALL_ID_IN_USE = 84,</span>
<span style="color: #00A000">+        FTDM_CAUSE_NO_CALL_SUSPENDED = 85,</span>
<span style="color: #00A000">+        FTDM_CAUSE_CALL_WITH_CALL_ID_CLEARED = 86,</span>
<span style="color: #00A000">+        FTDM_CAUSE_USER_NOT_CUG = 87,</span>
         FTDM_CAUSE_INCOMPATIBLE_DESTINATION = 88,
<span style="color: #00A000">+        FTDM_CAUSE_NON_EXISTENT_CUG = 90,</span>
<span style="color: #00A000">+        FTDM_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = 91,</span>
         FTDM_CAUSE_INVALID_MSG_UNSPECIFIED = 95,
         FTDM_CAUSE_MANDATORY_IE_MISSING = 96,
         FTDM_CAUSE_MESSAGE_TYPE_NONEXIST = 97,
<span style="color: #800080; font-weight: bold">@@ -126,6 +145,7 @@ typedef enum {</span>
         FTDM_CAUSE_WRONG_CALL_STATE = 101,
         FTDM_CAUSE_RECOVERY_ON_TIMER_EXPIRE = 102,
         FTDM_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103,
<span style="color: #00A000">+        FTDM_CAUSE_MSG_WITH_UNRECOGNIZED_PARAM_DISCARDED = 110,</span>
         FTDM_CAUSE_PROTOCOL_ERROR = 111,
         FTDM_CAUSE_INTERWORKING = 127,
         FTDM_CAUSE_SUCCESS = 142,
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: ftmod_r2 - change warning to notice for hangup cause mapping

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #000080; font-weight: bold">index 6e2b292..0217a51 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #800080; font-weight: bold">@@ -295,7 +295,7 @@ static ftdm_call_cause_t ftdm_r2_cause_to_ftdm_cause(ftdm_channel_t *fchan, open</span>
         case OR2_CAUSE_GLARE:
                 return FTDM_CAUSE_REQUESTED_CHAN_UNAVAIL;
         }
<span style="color: #A00000">-        ftdm_log_chan(fchan, FTDM_LOG_WARNING, &quot;Mapping openr2 cause %d to unspecified\n&quot;, cause);</span>
<span style="color: #00A000">+        ftdm_log_chan(fchan, FTDM_LOG_NOTICE, &quot;Mapping openr2 cause %d to unspecified\n&quot;, cause);</span>
         return FTDM_CAUSE_NORMAL_UNSPECIFIED;
 }
 
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: doh

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #000080; font-weight: bold">index be4e370..e2b0825 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #800080; font-weight: bold">@@ -1267,11 +1267,11 @@ static __inline__ ftdm_status_t wanpipe_channel_process_event(ftdm_channel_t *fc</span>
                         switch(tdm_api-&gt;wp_tdm_cmd.event.wp_tdm_api_event_link_status) {
                         case WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED:
                                 /* *event_id = FTDM_OOB_ALARM_CLEAR; */
<span style="color: #A00000">-                                ftdm_log_chan(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link connected event\n&quot;);</span>
<span style="color: #00A000">+                                ftdm_log_chan_msg(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link connected event\n&quot;);</span>
                                 break;
                         default:
                                 /* *event_id = FTDM_OOB_ALARM_TRAP; */
<span style="color: #A00000">-                                ftdm_log_chan(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link disconnected event\n&quot;);</span>
<span style="color: #00A000">+                                ftdm_log_chan_msg(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link disconnected event\n&quot;);</span>
                                 break;
                         };
                         /* The WP_API_EVENT_ALARM event should be used to clear alarms */
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: fix FTDM_IS_DCHAN macro

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/freetdm.h b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #000080; font-weight: bold">index 142dff8..517d6b9 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #800080; font-weight: bold">@@ -171,7 +171,7 @@ FTDM_STR2ENUM_P(ftdm_str2ftdm_chan_type, ftdm_chan_type2str, ftdm_chan_type_t)</span>
 #define FTDM_IS_VOICE_CHANNEL(fchan) ((fchan)-&gt;type != FTDM_CHAN_TYPE_DQ921 &amp;&amp; (fchan)-&gt;type != FTDM_CHAN_TYPE_DQ931)
 
 /*! \brief Test if a channel is a D-channel */
<span style="color: #A00000">-#define FTDM_IS_DCHAN(ftdm_chan) ((fchan)-&gt;type == FTDM_CHAN_TYPE_DQ921 || (fchan)-&gt;type == FTDM_CHAN_TYPE_DQ931)</span>
<span style="color: #00A000">+#define FTDM_IS_DCHAN(fchan) ((fchan)-&gt;type == FTDM_CHAN_TYPE_DQ921 || (fchan)-&gt;type == FTDM_CHAN_TYPE_DQ931)</span>
 
 /*! \brief Test if a channel is digital channel */
 #define FTDM_IS_DIGITAL_CHANNEL(fchan) ((fchan)-&gt;span-&gt;trunk_type == FTDM_TRUNK_E1 || \
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
Merge branch &#39;master&#39; of git.sangoma.com:smg_freeswitch
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: fix windows ftmod_wanpipe bug on link connect/disconnect

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #000080; font-weight: bold">index 1f2ad84..d3e2116 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #800080; font-weight: bold">@@ -1257,20 +1257,18 @@ static __inline__ ftdm_status_t wanpipe_channel_process_event(ftdm_channel_t *fc</span>
         switch(tdm_api-&gt;wp_tdm_cmd.event.wp_tdm_api_event_type) {
         case WP_API_EVENT_LINK_STATUS:
                 {
<span style="color: #A00000">-#if 0</span>
                         switch(tdm_api-&gt;wp_tdm_cmd.event.wp_tdm_api_event_link_status) {
                         case WP_TDMAPI_EVENT_LINK_STATUS_CONNECTED:
<span style="color: #A00000">-                                *event_id = FTDM_OOB_ALARM_CLEAR;</span>
<span style="color: #00A000">+                                /* *event_id = FTDM_OOB_ALARM_CLEAR; */</span>
<span style="color: #00A000">+                                ftdm_log_chan(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link connected event\n&quot;);</span>
                                 break;
                         default:
<span style="color: #A00000">-                                *event_id = FTDM_OOB_ALARM_TRAP;</span>
<span style="color: #00A000">+                                /* *event_id = FTDM_OOB_ALARM_TRAP; */</span>
<span style="color: #00A000">+                                ftdm_log_chan(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link disconnected event\n&quot;);</span>
                                 break;
                         };
<span style="color: #A00000">-#else</span>
                         /* The WP_API_EVENT_ALARM event should be used to clear alarms */
<span style="color: #A00000">-                        ftdm_log_chan(fchan, FTDM_LOG_DEBUG, &quot;Ignoring wanpipe link status event\n&quot;, ftdm_oob_event2str(*event_id));</span>
                         *event_id = FTDM_OOB_NOOP;
<span style="color: #A00000">-#endif</span>
                 }
                 break;
 
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
Merge remote branch &#39;fsorig/master&#39;
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: set explicit numbers for channel commands to aid debugging

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/freetdm.h b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #000080; font-weight: bold">index 2666a26..142dff8 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/freetdm.h</span>
<span style="color: #800080; font-weight: bold">@@ -574,84 +574,84 @@ typedef struct ftdm_iterator ftdm_iterator_t;</span>
 
 /*! \brief Channel commands that can be executed through ftdm_channel_command() */
 typedef enum {
<span style="color: #A00000">-        FTDM_COMMAND_NOOP,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_INTERVAL,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_INTERVAL,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_CODEC,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_CODEC,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_NATIVE_CODEC,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_NATIVE_CODEC,</span>
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_DTMF_DETECT,</span>
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_DTMF_DETECT,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SEND_DTMF,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_DTMF_ON_PERIOD,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_DTMF_ON_PERIOD,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_DTMF_OFF_PERIOD,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_DTMF_OFF_PERIOD,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GENERATE_RING_ON,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GENERATE_RING_OFF,</span>
<span style="color: #A00000">-        FTDM_COMMAND_OFFHOOK,</span>
<span style="color: #A00000">-        FTDM_COMMAND_ONHOOK,</span>
<span style="color: #A00000">-        FTDM_COMMAND_FLASH,</span>
<span style="color: #A00000">-        FTDM_COMMAND_WINK,</span>
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_PROGRESS_DETECT,</span>
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_PROGRESS_DETECT,</span>
<span style="color: #00A000">+        FTDM_COMMAND_NOOP = 0,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_INTERVAL = 1,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_INTERVAL = 2,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_CODEC = 3,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_CODEC = 4,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_NATIVE_CODEC = 5,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_NATIVE_CODEC = 6,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_DTMF_DETECT = 7,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_DTMF_DETECT = 8,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SEND_DTMF = 9,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_DTMF_ON_PERIOD = 10,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_DTMF_ON_PERIOD = 11,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_DTMF_OFF_PERIOD = 12,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_DTMF_OFF_PERIOD = 13,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GENERATE_RING_ON = 14,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GENERATE_RING_OFF = 15,</span>
<span style="color: #00A000">+        FTDM_COMMAND_OFFHOOK = 16,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ONHOOK = 17,</span>
<span style="color: #00A000">+        FTDM_COMMAND_FLASH = 18,</span>
<span style="color: #00A000">+        FTDM_COMMAND_WINK = 19,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_PROGRESS_DETECT = 20,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_PROGRESS_DETECT = 21,</span>
 
         /*!&lt; Start tracing input and output from channel to the given file */
<span style="color: #A00000">-        FTDM_COMMAND_TRACE_INPUT,</span>
<span style="color: #A00000">-        FTDM_COMMAND_TRACE_OUTPUT,</span>
<span style="color: #00A000">+        FTDM_COMMAND_TRACE_INPUT = 22,</span>
<span style="color: #00A000">+        FTDM_COMMAND_TRACE_OUTPUT = 23,</span>
 
         /*!&lt; Stop both Input and Output trace, closing the files */
<span style="color: #A00000">-        FTDM_COMMAND_TRACE_END_ALL,</span>
<span style="color: #00A000">+        FTDM_COMMAND_TRACE_END_ALL = 24,</span>
 
         /*!&lt; Enable DTMF debugging */
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_DEBUG_DTMF,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_DEBUG_DTMF = 25,</span>
 
         /*!&lt; Disable DTMF debugging (if not disabled explicitly, it is disabled automatically when calls hangup) */
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_DEBUG_DTMF,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_DEBUG_DTMF = 26,</span>
 
         /*!&lt; Start dumping all input to a circular buffer. The size of the circular buffer can be specified, default used otherwise */
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_INPUT_DUMP,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_INPUT_DUMP = 27,</span>
 
         /*!&lt; Stop dumping all input to a circular buffer. */
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_INPUT_DUMP,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_INPUT_DUMP = 28,</span>
 
         /*!&lt; Start dumping all output to a circular buffer. The size of the circular buffer can be specified, default used otherwise */
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_OUTPUT_DUMP,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_OUTPUT_DUMP = 29,</span>
 
         /*!&lt; Stop dumping all output to a circular buffer. */
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_OUTPUT_DUMP,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_OUTPUT_DUMP = 30,</span>
 
         /*!&lt; Dump the current input circular buffer to the specified FILE* structure */
<span style="color: #A00000">-        FTDM_COMMAND_DUMP_INPUT,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DUMP_INPUT = 31,</span>
 
         /*!&lt; Dump the current output circular buffer to the specified FILE* structure */
<span style="color: #A00000">-        FTDM_COMMAND_DUMP_OUTPUT,</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_CALLERID_DETECT,</span>
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_CALLERID_DETECT,</span>
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_ECHOCANCEL,</span>
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_ECHOCANCEL,</span>
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_ECHOTRAIN,</span>
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_ECHOTRAIN,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_CAS_BITS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_CAS_BITS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_RX_GAIN,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_RX_GAIN,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_TX_GAIN,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_TX_GAIN,</span>
<span style="color: #A00000">-        FTDM_COMMAND_FLUSH_TX_BUFFERS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_FLUSH_RX_BUFFERS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_FLUSH_BUFFERS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_FLUSH_IOSTATS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_PRE_BUFFER_SIZE,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_LINK_STATUS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_GET_LINK_STATUS,</span>
<span style="color: #A00000">-        FTDM_COMMAND_ENABLE_LOOP,</span>
<span style="color: #A00000">-        FTDM_COMMAND_DISABLE_LOOP,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_RX_QUEUE_SIZE,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_TX_QUEUE_SIZE,</span>
<span style="color: #A00000">-        FTDM_COMMAND_SET_POLARITY,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DUMP_OUTPUT = 32,</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_CALLERID_DETECT = 33,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_CALLERID_DETECT = 34,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_ECHOCANCEL = 35,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_ECHOCANCEL = 36,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_ECHOTRAIN = 37,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_ECHOTRAIN = 38,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_CAS_BITS = 39,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_CAS_BITS = 40,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_RX_GAIN = 41,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_RX_GAIN = 42,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_TX_GAIN = 43,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_TX_GAIN = 44,</span>
<span style="color: #00A000">+        FTDM_COMMAND_FLUSH_TX_BUFFERS = 45,</span>
<span style="color: #00A000">+        FTDM_COMMAND_FLUSH_RX_BUFFERS = 46,</span>
<span style="color: #00A000">+        FTDM_COMMAND_FLUSH_BUFFERS = 47,</span>
<span style="color: #00A000">+        FTDM_COMMAND_FLUSH_IOSTATS = 48,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_PRE_BUFFER_SIZE = 49,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_LINK_STATUS = 50,</span>
<span style="color: #00A000">+        FTDM_COMMAND_GET_LINK_STATUS = 51,</span>
<span style="color: #00A000">+        FTDM_COMMAND_ENABLE_LOOP = 52,</span>
<span style="color: #00A000">+        FTDM_COMMAND_DISABLE_LOOP = 53,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_RX_QUEUE_SIZE = 54,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_TX_QUEUE_SIZE = 55,</span>
<span style="color: #00A000">+        FTDM_COMMAND_SET_POLARITY = 56,</span>
         FTDM_COMMAND_COUNT,
 } ftdm_command_t;
 
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: improved logic to enable/disable EC on call start/stop          - MFC-R2 requires tone signaling that gets screwed sometimes            if the EC is enabled during call setup.          - EC is now enabled only when switching to a state requiring          media (UP and PROGRESS_MEDIA)          - The logic is aware of EC persist option in Wanpipe          - Improved logging in ftmod_wanpipe to print EC state on startup

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #000080; font-weight: bold">index c13fe76..b5f9fab 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #800080; font-weight: bold">@@ -404,39 +404,39 @@ static __inline__ void ftdm_std_free(void *pool, void *ptr)</span>
         free(ptr);
 }
 
<span style="color: #A00000">-static void ftdm_set_echocancel_call_begin(ftdm_channel_t *chan)</span>
<span style="color: #00A000">+FT_DECLARE(void) ftdm_set_echocancel_call_begin(ftdm_channel_t *chan)</span>
 {
         ftdm_caller_data_t *caller_data = ftdm_channel_get_caller_data(chan);
         if (ftdm_channel_test_feature(chan, FTDM_CHANNEL_FEATURE_HWEC)) {
                 if (ftdm_channel_test_feature(chan, FTDM_CHANNEL_FEATURE_HWEC_DISABLED_ON_IDLE)) {
<span style="color: #00A000">+                        /* If the ec is disabled on idle, we need to enable it unless is a digital call */</span>
                         if (caller_data-&gt;bearer_capability != FTDM_BEARER_CAP_64K_UNRESTRICTED) {
<span style="color: #00A000">+                                ftdm_log_chan(chan, FTDM_LOG_DEBUG, &quot;Enabling ec for call in channel state %s\n&quot;, ftdm_channel_state2str(chan-&gt;state));</span>
                                 ftdm_channel_command(chan, FTDM_COMMAND_ENABLE_ECHOCANCEL, NULL);
                         }
                 } else {
<span style="color: #00A000">+                        /* If the ec is enabled on idle, we do nothing unless is a digital call that needs it disabled */</span>
                         if (caller_data-&gt;bearer_capability == FTDM_BEARER_CAP_64K_UNRESTRICTED) {
<span style="color: #00A000">+                                ftdm_log_chan(chan, FTDM_LOG_DEBUG, &quot;Disabling ec for digital call in channel state %s\n&quot;, ftdm_channel_state2str(chan-&gt;state));</span>
                                 ftdm_channel_command(chan, FTDM_COMMAND_DISABLE_ECHOCANCEL, NULL);
                         }
                 }
         }
 }
 
<span style="color: #A00000">-static void ftdm_set_echocancel_call_end(ftdm_channel_t *chan)</span>
<span style="color: #00A000">+FT_DECLARE(void) ftdm_set_echocancel_call_end(ftdm_channel_t *chan)</span>
 {
<span style="color: #A00000">-        ftdm_caller_data_t *caller_data = ftdm_channel_get_caller_data(chan);</span>
         if (ftdm_channel_test_feature(chan, FTDM_CHANNEL_FEATURE_HWEC)) {
                 if (ftdm_channel_test_feature(chan, FTDM_CHANNEL_FEATURE_HWEC_DISABLED_ON_IDLE)) {
<span style="color: #A00000">-                        if (caller_data-&gt;bearer_capability != FTDM_BEARER_CAP_64K_UNRESTRICTED) {</span>
<span style="color: #A00000">-                                ftdm_channel_command(chan, FTDM_COMMAND_DISABLE_ECHOCANCEL, NULL);</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #00A000">+                        ftdm_log_chan(chan, FTDM_LOG_DEBUG, &quot;Disabling ec on call end in channel state %s\n&quot;, ftdm_channel_state2str(chan-&gt;state));</span>
<span style="color: #00A000">+                        ftdm_channel_command(chan, FTDM_COMMAND_DISABLE_ECHOCANCEL, NULL);</span>
                 } else {
<span style="color: #A00000">-                        if (caller_data-&gt;bearer_capability == FTDM_BEARER_CAP_64K_UNRESTRICTED) {</span>
<span style="color: #A00000">-                                ftdm_channel_command(chan, FTDM_COMMAND_ENABLE_ECHOCANCEL, NULL);</span>
<span style="color: #A00000">-                        }</span>
<span style="color: #00A000">+                        ftdm_log_chan(chan, FTDM_LOG_DEBUG, &quot;Enabling ec back on call end in channel state %s\n&quot;, ftdm_channel_state2str(chan-&gt;state));</span>
<span style="color: #00A000">+                        ftdm_channel_command(chan, FTDM_COMMAND_ENABLE_ECHOCANCEL, NULL);</span>
                 }
         }
 }
 
<span style="color: #A00000">-</span>
 FT_DECLARE_DATA ftdm_memory_handler_t g_ftdm_mem_handler = 
 {
         /*.pool =*/ NULL,
<span style="color: #800080; font-weight: bold">@@ -5548,25 +5548,44 @@ FT_DECLARE(ftdm_status_t) ftdm_span_send_signal(ftdm_span_t *span, ftdm_sigmsg_t</span>
 
         case FTDM_SIGEVENT_PROGRESS_MEDIA:
                 {
<span style="color: #A00000">-                        ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Enabling echo cancellation on progress media\n&quot;);</span>
<span style="color: #A00000">-                        ftdm_set_echocancel_call_begin(sigmsg-&gt;channel);</span>
<span style="color: #00A000">+                        /* test signaling module compliance */</span>
<span style="color: #00A000">+                        if (sigmsg-&gt;channel-&gt;state != FTDM_CHANNEL_STATE_PROGRESS_MEDIA) {</span>
<span style="color: #00A000">+                                ftdm_log_chan(sigmsg-&gt;channel, FTDM_LOG_WARNING, &quot;FTDM_SIGEVENT_PROGRESS_MEDIA sent in state %s\n&quot;, ftdm_channel_state2str(sigmsg-&gt;channel-&gt;state));</span>
<span style="color: #00A000">+                        }</span>
                 }
                 break;
 
<span style="color: #A00000">-        case FTDM_SIGEVENT_STOP:</span>
<span style="color: #A00000">-                if (!ftdm_test_flag(sigmsg-&gt;channel, FTDM_CHANNEL_CALL_STARTED)) {</span>
<span style="color: #A00000">-                        /* this happens for FXS devices which blindly send SIGEVENT_STOP, we should fix it there ... */</span>
<span style="color: #A00000">-                        ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Ignoring SIGEVENT_STOP since user never knew about a call in this channel\n&quot;);</span>
<span style="color: #A00000">-                        goto done;</span>
<span style="color: #A00000">-                }</span>
<span style="color: #A00000">-                if (ftdm_test_flag(sigmsg-&gt;channel, FTDM_CHANNEL_USER_HANGUP)) {</span>
<span style="color: #A00000">-                        ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Ignoring SIGEVENT_STOP since user already requested hangup\n&quot;);</span>
<span style="color: #A00000">-                        goto done;</span>
<span style="color: #00A000">+        case FTDM_SIGEVENT_UP:</span>
<span style="color: #00A000">+                {</span>
<span style="color: #00A000">+                        /* test signaling module compliance */</span>
<span style="color: #00A000">+                        if (sigmsg-&gt;channel-&gt;state != FTDM_CHANNEL_STATE_UP) {</span>
<span style="color: #00A000">+                                ftdm_log_chan(sigmsg-&gt;channel, FTDM_LOG_WARNING, &quot;FTDM_SIGEVENT_UP sent in state %s\n&quot;, ftdm_channel_state2str(sigmsg-&gt;channel-&gt;state));</span>
<span style="color: #00A000">+                        }</span>
                 }
<span style="color: #A00000">-                if (sigmsg-&gt;channel-&gt;state == FTDM_CHANNEL_STATE_TERMINATING) {</span>
<span style="color: #A00000">-                        ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Scheduling safety hangup timer\n&quot;);</span>
<span style="color: #A00000">-                        /* if the user does not move us to hangup in 2 seconds, we will do it ourselves */</span>
<span style="color: #A00000">-                        ftdm_sched_timer(globals.timingsched, &quot;safety-hangup&quot;, FORCE_HANGUP_TIMER, execute_safety_hangup, sigmsg-&gt;channel, &amp;sigmsg-&gt;channel-&gt;hangup_timer);</span>
<span style="color: #00A000">+                break;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        case FTDM_SIGEVENT_STOP:</span>
<span style="color: #00A000">+                {</span>
<span style="color: #00A000">+                        /* TODO: we could test for compliance here and check the state is FTDM_CHANNEL_STATE_TERMINATING</span>
<span style="color: #00A000">+                         * but several modules need to be updated first */</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        /* if the call was never started, do not send SIGEVENT_STOP</span>
<span style="color: #00A000">+                           this happens for FXS devices in ftmod_analog which blindly send SIGEVENT_STOP, we should fix it there ... */</span>
<span style="color: #00A000">+                        if (!ftdm_test_flag(sigmsg-&gt;channel, FTDM_CHANNEL_CALL_STARTED)) {</span>
<span style="color: #00A000">+                                ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Ignoring SIGEVENT_STOP since user never knew about a call in this channel\n&quot;);</span>
<span style="color: #00A000">+                                goto done;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (ftdm_test_flag(sigmsg-&gt;channel, FTDM_CHANNEL_USER_HANGUP)) {</span>
<span style="color: #00A000">+                                ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Ignoring SIGEVENT_STOP since user already requested hangup\n&quot;);</span>
<span style="color: #00A000">+                                goto done;</span>
<span style="color: #00A000">+                        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        if (sigmsg-&gt;channel-&gt;state == FTDM_CHANNEL_STATE_TERMINATING) {</span>
<span style="color: #00A000">+                                ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Scheduling safety hangup timer\n&quot;);</span>
<span style="color: #00A000">+                                /* if the user does not move us to hangup in 2 seconds, we will do it ourselves */</span>
<span style="color: #00A000">+                                ftdm_sched_timer(globals.timingsched, &quot;safety-hangup&quot;, FORCE_HANGUP_TIMER, execute_safety_hangup, sigmsg-&gt;channel, &amp;sigmsg-&gt;channel-&gt;hangup_timer);</span>
<span style="color: #00A000">+                        }</span>
                 }
                 break;
 
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftdm_state.c b/libs/freetdm/src/ftdm_state.c</span>
<span style="color: #000080; font-weight: bold">index 574d858..de62c0f 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftdm_state.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftdm_state.c</span>
<span style="color: #800080; font-weight: bold">@@ -70,13 +70,13 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_complete_state(const char *file, const c</span>
 
         if (state == FTDM_CHANNEL_STATE_PROGRESS) {
                 ftdm_set_flag(fchan, FTDM_CHANNEL_PROGRESS);
<span style="color: #00A000">+        } else if (state == FTDM_CHANNEL_STATE_PROGRESS_MEDIA) {</span>
<span style="color: #00A000">+                ftdm_set_flag(fchan, FTDM_CHANNEL_PROGRESS);        </span>
<span style="color: #00A000">+                ftdm_test_and_set_media(fchan);</span>
         } else if (state == FTDM_CHANNEL_STATE_UP) {
                 ftdm_set_flag(fchan, FTDM_CHANNEL_PROGRESS);
<span style="color: #A00000">-                ftdm_set_flag(fchan, FTDM_CHANNEL_MEDIA);        </span>
                 ftdm_set_flag(fchan, FTDM_CHANNEL_ANSWERED);        
<span style="color: #A00000">-        } else if (state == FTDM_CHANNEL_STATE_PROGRESS_MEDIA) {</span>
<span style="color: #A00000">-                ftdm_set_flag(fchan, FTDM_CHANNEL_PROGRESS);        </span>
<span style="color: #A00000">-                ftdm_set_flag(fchan, FTDM_CHANNEL_MEDIA);        </span>
<span style="color: #00A000">+                ftdm_test_and_set_media(fchan);</span>
         } else if (state == FTDM_CHANNEL_STATE_DIALING) {
                 ftdm_sigmsg_t msg;
                 memset(&amp;msg, 0, sizeof(msg));
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #000080; font-weight: bold">index 4344177..6e2b292 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #800080; font-weight: bold">@@ -647,9 +647,6 @@ static void ftdm_r2_on_call_init(openr2_chan_t *r2chan)</span>
                 return;
         }
 
<span style="color: #A00000">-        /* mark the channel in use (so no outgoing calls can be placed here) */</span>
<span style="color: #A00000">-        ftdm_channel_use(ftdmchan);        </span>
<span style="color: #A00000">-</span>
         memset(ftdmchan-&gt;caller_data.dnis.digits, 0, sizeof(ftdmchan-&gt;caller_data.collected));
         memset(ftdmchan-&gt;caller_data.ani.digits, 0, sizeof(ftdmchan-&gt;caller_data.collected));
 
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #000080; font-weight: bold">index 1f2ad84..7bcb69c 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c</span>
<span style="color: #800080; font-weight: bold">@@ -230,6 +230,8 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start</span>
                 ftdm_channel_t *chan;
                 ftdm_socket_t sockfd = FTDM_INVALID_SOCKET;
                 const char *dtmf = &quot;none&quot;;
<span style="color: #00A000">+                const char *hwec_str = &quot;none&quot;;</span>
<span style="color: #00A000">+                const char *hwec_idle = &quot;none&quot;;</span>
                 if (!strncasecmp(span-&gt;name, &quot;smg_prid_nfas&quot;, 8) &amp;&amp; span-&gt;trunk_type == FTDM_TRUNK_T1 &amp;&amp; x == 24) {
 #ifdef LIBSANGOMA_VERSION
                         sockfd = __tdmv_api_open_span_chan(spanno, x);
<span style="color: #800080; font-weight: bold">@@ -271,6 +273,8 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start</span>
                         || type == FTDM_CHAN_TYPE_B) {
                                 int err;
                                 
<span style="color: #00A000">+                                hwec_str = &quot;unavailable&quot;;</span>
<span style="color: #00A000">+                                hwec_idle = &quot;enabled&quot;;</span>
                                 dtmf = &quot;software&quot;;
 
                                 err = sangoma_tdm_get_hw_coding(chan-&gt;sockfd, &amp;tdm_api);
<span style="color: #800080; font-weight: bold">@@ -289,6 +293,7 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start</span>
 
                                 err = sangoma_tdm_get_hw_ec(chan-&gt;sockfd, &amp;tdm_api);
                                 if (err &gt; 0) {
<span style="color: #00A000">+                                        hwec_str = &quot;available&quot;;</span>
                                         ftdm_channel_set_feature(chan, FTDM_CHANNEL_FEATURE_HWEC);
                                 }
                                 
<span style="color: #800080; font-weight: bold">@@ -296,6 +301,7 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start</span>
                                 err = sangoma_tdm_get_hwec_persist_status(chan-&gt;sockfd, &amp;tdm_api);
                                 if (err == 0) {
                                         ftdm_channel_set_feature(chan, FTDM_CHANNEL_FEATURE_HWEC_DISABLED_ON_IDLE);
<span style="color: #00A000">+                                        hwec_idle = &quot;disabled&quot;;</span>
                                 }
 #else
                                 if (span-&gt;trunk_type ==  FTDM_TRUNK_BRI || span-&gt;trunk_type ==  FTDM_TRUNK_BRI_PTMP) {
<span style="color: #800080; font-weight: bold">@@ -365,7 +371,8 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start</span>
                                 ftdm_copy_string(chan-&gt;chan_number, number, sizeof(chan-&gt;chan_number));
                         }
                         configured++;
<span style="color: #A00000">-                        ftdm_log_chan(chan, FTDM_LOG_INFO, &quot;Configured wanpipe device fd:%d DTMF: %s\n&quot;, sockfd, dtmf);</span>
<span style="color: #00A000">+                        ftdm_log_chan(chan, FTDM_LOG_INFO, &quot;Configured wanpipe device FD: %d, DTMF: %s, HWEC: %s, HWEC_IDLE: %s\n&quot;, </span>
<span style="color: #00A000">+                                        sockfd, dtmf, hwec_str, hwec_idle);</span>
 
                 } else {
                         ftdm_log(FTDM_LOG_ERROR, &quot;ftdm_span_add_channel failed for wanpipe span %d channel %d\n&quot;, spanno, x);
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/private/ftdm_core.h b/libs/freetdm/src/include/private/ftdm_core.h</span>
<span style="color: #000080; font-weight: bold">index 4fd8ec6..fbe42d3 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/private/ftdm_core.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/private/ftdm_core.h</span>
<span style="color: #800080; font-weight: bold">@@ -622,6 +622,9 @@ FT_DECLARE(ftdm_status_t) ftdm_span_trigger_signals(const ftdm_span_t *span);</span>
 /*! \brief clear the tone detector state */
 FT_DECLARE(void) ftdm_channel_clear_detected_tones(ftdm_channel_t *ftdmchan);
 
<span style="color: #00A000">+/* start/stop echo cancelling at the beginning/end of a call */</span>
<span style="color: #00A000">+FT_DECLARE(void) ftdm_set_echocancel_call_begin(ftdm_channel_t *chan);</span>
<span style="color: #00A000">+FT_DECLARE(void) ftdm_set_echocancel_call_end(ftdm_channel_t *chan);</span>
 
 /*!
   \brief Assert condition
<span style="color: #800080; font-weight: bold">@@ -677,6 +680,14 @@ FT_DECLARE(void) ftdm_channel_clear_detected_tones(ftdm_channel_t *ftdmchan);</span>
 #define ftdm_span_lock(span) ftdm_mutex_lock(span-&gt;mutex)
 #define ftdm_span_unlock(span) ftdm_mutex_unlock(span-&gt;mutex)
 
<span style="color: #00A000">+#define ftdm_test_and_set_media(fchan) \</span>
<span style="color: #00A000">+                do { \</span>
<span style="color: #00A000">+                        if (!ftdm_test_flag((fchan), FTDM_CHANNEL_MEDIA)) { \</span>
<span style="color: #00A000">+                                ftdm_set_flag((fchan), FTDM_CHANNEL_MEDIA); \</span>
<span style="color: #00A000">+                                ftdm_set_echocancel_call_begin((fchan)); \</span>
<span style="color: #00A000">+                        } \</span>
<span style="color: #00A000">+                } while (0);</span>
<span style="color: #00A000">+</span>
 FT_DECLARE_DATA extern const char *FTDM_LEVEL_NAMES[9];
 
 static __inline__ void ftdm_abort(void)
<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/include/private/ftdm_types.h b/libs/freetdm/src/include/private/ftdm_types.h</span>
<span style="color: #000080; font-weight: bold">index 3bc986d..9e8df1f 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/include/private/ftdm_types.h</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/include/private/ftdm_types.h</span>
<span style="color: #800080; font-weight: bold">@@ -227,16 +227,11 @@ typedef enum {</span>
 #define FTDM_CHANNEL_OUTBOUND        (1ULL &lt;&lt; 18)
 #define FTDM_CHANNEL_SUSPENDED       (1ULL &lt;&lt; 19)
 #define FTDM_CHANNEL_3WAY            (1ULL &lt;&lt; 20)
<span style="color: #A00000">-</span>
<span style="color: #A00000">-/* this 3 flags are really nonsense used by boost module only, as soon</span>
<span style="color: #A00000">- * as we deprecate/delete boost module we can get rid of them </span>
<span style="color: #A00000">- * ==================</span>
<span style="color: #A00000">- * */</span>
 #define FTDM_CHANNEL_PROGRESS        (1ULL &lt;&lt; 21)
<span style="color: #00A000">+/*!&lt; There is media on the channel already */</span>
 #define FTDM_CHANNEL_MEDIA           (1ULL &lt;&lt; 22)
<span style="color: #00A000">+/*!&lt; The channel was answered */</span>
 #define FTDM_CHANNEL_ANSWERED        (1ULL &lt;&lt; 23)
<span style="color: #A00000">-/* ================== */</span>
<span style="color: #A00000">-</span>
 #define FTDM_CHANNEL_MUTE            (1ULL &lt;&lt; 24)
 #define FTDM_CHANNEL_USE_RX_GAIN     (1ULL &lt;&lt; 25)
 #define FTDM_CHANNEL_USE_TX_GAIN     (1ULL &lt;&lt; 26)
</pre></div>
<div class="highlight"><pre>committer: Michal Bielicki
comments: 
typo in freeswitch.spec

<span style="color: #000080; font-weight: bold">diff --git a/freeswitch.spec b/freeswitch.spec</span>
<span style="color: #000080; font-weight: bold">index c434af6..7fb9f80 100644</span>
<span style="color: #A00000">--- a/freeswitch.spec</span>
<span style="color: #00A000">+++ b/freeswitch.spec</span>
<span style="color: #800080; font-weight: bold">@@ -89,7 +89,7 @@ BuildRequires: libtool &gt;= 1.5.17</span>
 BuildRequires: ncurses-devel
 BuildRequires: openssl-devel
 BuildRequires: perl
<span style="color: #A00000">-% 0%{?fedora_version} &gt;= 8</span>
<span style="color: #00A000">+%if 0%{?fedora_version} &gt;= 8</span>
 BuildRequires: perl-ExtUtils-Embed
 %endif
 BuildRequires: pkgconfig
</pre></div>
<div class="highlight"><pre>committer: Michal Bielicki
comments: 
final version I hope

<span style="color: #000080; font-weight: bold">diff --git a/freeswitch-sounds-en-us-callie.spec b/freeswitch-sounds-en-us-callie.spec</span>
<span style="color: #000080; font-weight: bold">index 2dbb91a..c476457 100644</span>
<span style="color: #A00000">--- a/freeswitch-sounds-en-us-callie.spec</span>
<span style="color: #00A000">+++ b/freeswitch-sounds-en-us-callie.spec</span>
<span style="color: #800080; font-weight: bold">@@ -46,10 +46,7 @@ BuildArch: noarch</span>
 BuildRequires: sox
 Requires: freeswitch
 Requires: freeswitch-sounds-en-us-callie-48000
<span style="color: #A00000">-</span>
<span style="color: #A00000">-%if %{is_rhel5}0</span>
<span style="color: #A00000">-%BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)</span>
<span style="color: #A00000">-%endif</span>
<span style="color: #00A000">+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)</span>
 
 %description
 FreeSWITCH 48kHz en-us Callie prompts plus, during the installation,
<span style="color: #800080; font-weight: bold">@@ -111,9 +108,24 @@ FreeSWITCH Callie prompts package that pulls in the 8KHz, 16KHz,</span>
 
 %prep
 %setup -b0 -q -n en
<span style="color: #A00000">-</span>
<span style="color: #A00000">-# copy buildsounds-callie.sh script to working dir</span>
<span style="color: #A00000">-%{__install} -m 0750 build/buildsounds-callie.sh ./us/callie</span>
<span style="color: #00A000">+mkdir -p ./usr/callie</span>
<span style="color: #00A000">+# create buildsounds-callie.sh script in working dir</span>
<span style="color: #00A000">+echo  &#39;#!/bin/bash</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+sounds_location=$1</span>
<span style="color: #00A000">+for rate in 32000 16000 8000</span>
<span style="color: #00A000">+do </span>
<span style="color: #00A000">+    for i in ascii base256 conference currency digits directory ivr misc phonetic-ascii time voicemail zrtp</span>
<span style="color: #00A000">+    do</span>
<span style="color: #00A000">+        mkdir -p $sounds_location/$i/$rate</span>
<span style="color: #00A000">+        for f in `find $sounds_location/$i/48000 -name \*.wav`</span>
<span style="color: #00A000">+        do</span>
<span style="color: #00A000">+            echo &quot;generating&quot; $sounds_location/$i/$rate/`basename $f`</span>
<span style="color: #00A000">+            sox $f -r $rate $sounds_location/$i/$rate/`basename $f`</span>
<span style="color: #00A000">+        done</span>
<span style="color: #00A000">+    done</span>
<span style="color: #00A000">+done&#39; &gt; ./us/callie/buildsounds-callie.sh</span>
<span style="color: #00A000">+%{__chmod} 0750 ./us/callie/buildsounds-callie.sh</span>
 
 ##############################################################################
 # Build
<span style="color: #800080; font-weight: bold">@@ -179,6 +191,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/8000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/8000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/8000
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)   %dir    %{_prefix}/sounds/en/us/callie/directory/8000</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/8000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/8000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/8000
<span style="color: #800080; font-weight: bold">@@ -190,6 +203,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/8000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/8000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/8000/*.wav
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)           %{_prefix}/sounds/en/us/callie/directory/8000/*.wav</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/8000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/8000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/8000/*.wav
<span style="color: #800080; font-weight: bold">@@ -204,6 +218,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/16000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/16000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/16000
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)   %dir    %{_prefix}/sounds/en/us/callie/directory/16000</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/16000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/16000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/16000
<span style="color: #800080; font-weight: bold">@@ -215,6 +230,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/16000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/16000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/16000/*.wav
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)           %{_prefix}/sounds/en/us/callie/directory/16000/*.wav</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/16000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/16000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/16000/*.wav
<span style="color: #800080; font-weight: bold">@@ -229,6 +245,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/32000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/32000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/32000
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)   %dir    %{_prefix}/sounds/en/us/callie/directory/32000</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/32000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/32000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/32000
<span style="color: #800080; font-weight: bold">@@ -240,6 +257,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/32000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/32000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/32000/*.wav
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)           %{_prefix}/sounds/en/us/callie/directory/32000/*.wav</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/32000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/32000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/32000/*.wav
<span style="color: #800080; font-weight: bold">@@ -254,6 +272,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/48000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/48000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/48000
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)   %dir    %{_prefix}/sounds/en/us/callie/directory/48000</span>
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/48000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/48000
 %attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/48000
<span style="color: #800080; font-weight: bold">@@ -265,6 +284,7 @@ cd %{_prefix}/sounds/en/us/callie</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/48000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/48000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/48000/*.wav
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)           %{_prefix}/sounds/en/us/callie/directory/48000/*.wav</span>
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/48000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/48000/*.wav
 %attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/48000/*.wav
</pre></div>
<div class="highlight"><pre>committer: Michal Bielicki
comments: 
this file is not needed anymore, included in spec file for sounds

<span style="color: #000080; font-weight: bold">diff --git a/build/buildsounds-callie.sh b/build/buildsounds-callie.sh</span>
deleted file mode 100755
<span style="color: #000080; font-weight: bold">index 06099e6..0000000</span>
<span style="color: #A00000">--- a/build/buildsounds-callie.sh</span>
<span style="color: #00A000">+++ /dev/null</span>
<span style="color: #800080; font-weight: bold">@@ -1,15 +0,0 @@</span>
<span style="color: #A00000">-#!/bin/bash</span>
<span style="color: #A00000">-</span>
<span style="color: #A00000">-sounds_location=$1</span>
<span style="color: #A00000">-for rate in 32000 16000 8000</span>
<span style="color: #A00000">-do </span>
<span style="color: #A00000">-    for i in ascii base256 conference currency digits ivr misc phonetic-ascii time voicemail zrtp</span>
<span style="color: #A00000">-    do</span>
<span style="color: #A00000">-        mkdir -p $sounds_location/$i/$rate</span>
<span style="color: #A00000">-        for f in `find $sounds_location/$i/48000 -name \*.wav`</span>
<span style="color: #A00000">-        do</span>
<span style="color: #A00000">-            echo &quot;generating&quot; $sounds_location/$i/$rate/`basename $f`</span>
<span style="color: #A00000">-            sox $f -r $rate $sounds_location/$i/$rate/`basename $f`</span>
<span style="color: #A00000">-        done</span>
<span style="color: #A00000">-    done</span>
<span style="color: #A00000">-done</span>
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments: 
updated sounds version in version file

<span style="color: #000080; font-weight: bold">diff --git a/build/sounds_version.txt b/build/sounds_version.txt</span>
<span style="color: #000080; font-weight: bold">index cb0c481..20cb29c 100644</span>
<span style="color: #A00000">--- a/build/sounds_version.txt</span>
<span style="color: #00A000">+++ b/build/sounds_version.txt</span>
<span style="color: #800080; font-weight: bold">@@ -1,3 +1,3 @@</span>
<span style="color: #A00000">-en-us-callie 1.0.13</span>
<span style="color: #00A000">+en-us-callie 1.0.14</span>
 ru-RU-elena 1.0.12
 
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments: 
added rpm building for callie soundfiles

<span style="color: #000080; font-weight: bold">diff --git a/build/buildsounds-callie.sh b/build/buildsounds-callie.sh</span>
new file mode 100755
<span style="color: #000080; font-weight: bold">index 0000000..06099e6</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/build/buildsounds-callie.sh</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,15 @@</span>
<span style="color: #00A000">+#!/bin/bash</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+sounds_location=$1</span>
<span style="color: #00A000">+for rate in 32000 16000 8000</span>
<span style="color: #00A000">+do </span>
<span style="color: #00A000">+    for i in ascii base256 conference currency digits ivr misc phonetic-ascii time voicemail zrtp</span>
<span style="color: #00A000">+    do</span>
<span style="color: #00A000">+        mkdir -p $sounds_location/$i/$rate</span>
<span style="color: #00A000">+        for f in `find $sounds_location/$i/48000 -name \*.wav`</span>
<span style="color: #00A000">+        do</span>
<span style="color: #00A000">+            echo &quot;generating&quot; $sounds_location/$i/$rate/`basename $f`</span>
<span style="color: #00A000">+            sox $f -r $rate $sounds_location/$i/$rate/`basename $f`</span>
<span style="color: #00A000">+        done</span>
<span style="color: #00A000">+    done</span>
<span style="color: #00A000">+done</span>
<span style="color: #000080; font-weight: bold">diff --git a/freeswitch-sounds-en-us-callie.spec b/freeswitch-sounds-en-us-callie.spec</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..2dbb91a</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/freeswitch-sounds-en-us-callie.spec</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,319 @@</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Copyright and license</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+# Spec file for package freeswitch-sounds-en-us-callie (version 1.0.12-8)</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+# Copyright (c) 2009 Patrick Laimbock </span>
<span style="color: #00A000">+# Some fixes and additions (c) 2011 Michal Bielicki</span>
<span style="color: #00A000">+# This file and all modifications and additions to the pristine</span>
<span style="color: #00A000">+# package are under the same license as the package itself.</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Determine distribution</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%define is_rhel5 %(test -f /etc/redhat-release &amp;&amp; egrep -q &#39;release 5&#39; /etc/redhat-release &amp;&amp; echo 1 || echo 0)</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Set variables</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%define version        1.0.14</span>
<span style="color: #00A000">+%define release        1</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%define fsname  freeswitch</span>
<span style="color: #00A000">+# you could add a version number to be more strict</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%define prefix        /opt/freeswitch</span>
<span style="color: #00A000">+%define _prefix        %{prefix}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# General</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+Summary: FreeSWITCH en-us Callie prompts</span>
<span style="color: #00A000">+Name: freeswitch-sounds-en-us-callie</span>
<span style="color: #00A000">+Version: %{version}</span>
<span style="color: #00A000">+Release: %{release}%{?dist}</span>
<span style="color: #00A000">+License: MPL</span>
<span style="color: #00A000">+Group: Applications/Communications</span>
<span style="color: #00A000">+Packager: Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt;</span>
<span style="color: #00A000">+URL: http://www.freeswitch.org</span>
<span style="color: #00A000">+Source0:http://files.freeswitch.org/%{name}-48000-%{version}.tar.gz</span>
<span style="color: #00A000">+BuildArch: noarch</span>
<span style="color: #00A000">+BuildRequires: sox</span>
<span style="color: #00A000">+Requires: freeswitch</span>
<span style="color: #00A000">+Requires: freeswitch-sounds-en-us-callie-48000</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%if %{is_rhel5}0</span>
<span style="color: #00A000">+%BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)</span>
<span style="color: #00A000">+%endif</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%description</span>
<span style="color: #00A000">+FreeSWITCH 48kHz en-us Callie prompts plus, during the installation,</span>
<span style="color: #00A000">+it will also install locally generated 8KHz, 16KHz and 32KHz prompts</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%package -n freeswitch-sounds-en-us-callie-8000</span>
<span style="color: #00A000">+Summary: FreeSWITCH 8kHz en-us Callie prompts</span>
<span style="color: #00A000">+Group: Applications/Communications</span>
<span style="color: #00A000">+BuildArch: noarch</span>
<span style="color: #00A000">+Requires: %{fsname}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%description -n freeswitch-sounds-en-us-callie-8000</span>
<span style="color: #00A000">+FreeSWITCH 8kHz en-us Callie prompts</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%package -n freeswitch-sounds-en-us-callie-16000</span>
<span style="color: #00A000">+Summary: FreeSWITCH 16kHz en-us Callie prompts</span>
<span style="color: #00A000">+Group: Applications/Communications</span>
<span style="color: #00A000">+BuildArch: noarch</span>
<span style="color: #00A000">+Requires: %{fsname}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%description -n freeswitch-sounds-en-us-callie-16000</span>
<span style="color: #00A000">+FreeSWITCH 16kHz en-us Callie prompts</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%package -n freeswitch-sounds-en-us-callie-32000</span>
<span style="color: #00A000">+Summary: FreeSWITCH 32kHz en-us Callie prompts</span>
<span style="color: #00A000">+Group: Applications/Communications</span>
<span style="color: #00A000">+BuildArch: noarch</span>
<span style="color: #00A000">+Requires: %{fsname}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%description -n freeswitch-sounds-en-us-callie-32000</span>
<span style="color: #00A000">+FreeSWITCH 32kHz en-us Callie prompts</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%package -n freeswitch-sounds-en-us-callie-48000</span>
<span style="color: #00A000">+Summary: FreeSWITCH 48kHz en-us Callie prompts</span>
<span style="color: #00A000">+Group: Applications/Communications</span>
<span style="color: #00A000">+BuildArch: noarch</span>
<span style="color: #00A000">+Requires: %{fsname}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%description -n freeswitch-sounds-en-us-callie-48000</span>
<span style="color: #00A000">+FreeSWITCH 48kHz en-us Callie prompts</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%package -n freeswitch-sounds-en-us-callie-all</span>
<span style="color: #00A000">+Summary: FreeSWITCH en-us Callie prompts</span>
<span style="color: #00A000">+Group: Applications/Communications</span>
<span style="color: #00A000">+BuildArch: noarch</span>
<span style="color: #00A000">+Requires: %{fsname}</span>
<span style="color: #00A000">+Requires: freeswitch-sounds-en-us-callie-8000 = %{version}</span>
<span style="color: #00A000">+Requires: freeswitch-sounds-en-us-callie-16000 = %{version}</span>
<span style="color: #00A000">+Requires: freeswitch-sounds-en-us-callie-32000 = %{version}</span>
<span style="color: #00A000">+Requires: freeswitch-sounds-en-us-callie-48000 = %{version}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%description -n freeswitch-sounds-en-us-callie-all</span>
<span style="color: #00A000">+FreeSWITCH Callie prompts package that pulls in the 8KHz, 16KHz,</span>
<span style="color: #00A000">+32KHz and 48KHz RPMs</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Prep</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%prep</span>
<span style="color: #00A000">+%setup -b0 -q -n en</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# copy buildsounds-callie.sh script to working dir</span>
<span style="color: #00A000">+%{__install} -m 0750 build/buildsounds-callie.sh ./us/callie</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Build</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%build</span>
<span style="color: #00A000">+# nothing to do here</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Install</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%install</span>
<span style="color: #00A000">+[ &quot;%{buildroot}&quot; != &#39;/&#39; ] &amp;&amp; rm -rf %{buildroot}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# create the sounds directories</span>
<span style="color: #00A000">+%{__install} -d -m 0750 %{buildroot}%{_prefix}/sounds/en/us/callie</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+pushd us/callie</span>
<span style="color: #00A000">+# first install the 48KHz sounds</span>
<span style="color: #00A000">+%{__cp} -prv ./* %{buildroot}%{_prefix}/sounds/en/us/callie</span>
<span style="color: #00A000">+# now resample the 48KHz ones to 8KHz, 16KHz and 32KHz</span>
<span style="color: #00A000">+./buildsounds-callie.sh %{buildroot}%{_prefix}/sounds/en/us/callie</span>
<span style="color: #00A000">+popd</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Clean</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%clean</span>
<span style="color: #00A000">+[ &quot;%{buildroot}&quot; != &#39;/&#39; ] &amp;&amp; rm -rf %{buildroot}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Post</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%post</span>
<span style="color: #00A000">+# generate the 8KHz, 16KHz and 32KHz prompts from the 48KHz ones</span>
<span style="color: #00A000">+cd %{_prefix}/sounds/en/us/callie</span>
<span style="color: #00A000">+./buildsounds-callie.sh %{_prefix}/sounds/en/us/callie</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Postun</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%postun</span>
<span style="color: #00A000">+# you could check if there are sound files in 8000/ or</span>
<span style="color: #00A000">+# 16000/ or 32000/ and remove them *only* if the files</span>
<span style="color: #00A000">+# do not belong to an rpm</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Files</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%files</span>
<span style="color: #00A000">+%defattr(-,root,root)</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/buildsounds-callie.sh</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%files -n freeswitch-sounds-en-us-callie-8000</span>
<span style="color: #00A000">+%defattr(-,root,root,-)</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ascii/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/base256/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/time/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/voicemail/8000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/zrtp/8000</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ascii/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/base256/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/time/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/voicemail/8000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/zrtp/8000/*.wav</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%files -n freeswitch-sounds-en-us-callie-16000</span>
<span style="color: #00A000">+%defattr(-,root,root,-)</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ascii/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/base256/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/time/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/voicemail/16000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/zrtp/16000</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ascii/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/base256/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/time/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/voicemail/16000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/zrtp/16000/*.wav</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%files -n freeswitch-sounds-en-us-callie-32000</span>
<span style="color: #00A000">+%defattr(-,root,root,-)</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ascii/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/base256/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/time/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/voicemail/32000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/zrtp/32000</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ascii/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/base256/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/time/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/voicemail/32000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/zrtp/32000/*.wav</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%files -n freeswitch-sounds-en-us-callie-48000</span>
<span style="color: #00A000">+%defattr(-,root,root,-)</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ascii/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/base256/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/conference/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/currency/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/digits/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/ivr/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/misc/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/phonetic-ascii/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/time/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/voicemail/48000</span>
<span style="color: #00A000">+%attr(0750,freeswitch,daemon)        %dir        %{_prefix}/sounds/en/us/callie/zrtp/48000</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ascii/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/base256/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/conference/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/currency/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/digits/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/ivr/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/misc/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/phonetic-ascii/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/time/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/voicemail/48000/*.wav</span>
<span style="color: #00A000">+%attr(0640,freeswitch,daemon)                %{_prefix}/sounds/en/us/callie/zrtp/48000/*.wav</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%files -n freeswitch-sounds-en-us-callie-all</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+# Changelog</span>
<span style="color: #00A000">+##############################################################################</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+%changelog</span>
<span style="color: #00A000">+* Tue Jan 18 2011 Michal Bielicki &lt;michal.bielicki@seventhsignal.de&gt; - 1.0.14-1</span>
<span style="color: #00A000">+- bump up version</span>
<span style="color: #00A000">+- include script into freeswitch core</span>
<span style="color: #00A000">+- include specfile into freeswitch core</span>
<span style="color: #00A000">+- runtime does not require sox, only building</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Thu Dec 17 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-8</span>
<span style="color: #00A000">+- update perms and user/group to sync with the old situation</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Wed Dec 16 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-7</span>
<span style="color: #00A000">+- make main package require freeswitch-sounds-en-us-callie-48000 and</span>
<span style="color: #00A000">+- generate the 8KHz, 16KHz and 32KHz sounds from there</span>
<span style="color: #00A000">+- add license to spec file</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Wed Dec 16 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-5</span>
<span style="color: #00A000">+- put 48KHz in a separate package and let the main package Require 48KHz</span>
<span style="color: #00A000">+- and then use the script to generate the 8KHz, 16KHz and 32KHz sounds</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Wed Dec 16 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-4</span>
<span style="color: #00A000">+- add freeswitch-sounds-en-us-callie-all package that pulls in the 8KHz,</span>
<span style="color: #00A000">+- 16KHz, 32KHz and 48KHz RPM packages </span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Tue Dec 15 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-3</span>
<span style="color: #00A000">+- override subpackage name with -n so it no longer builds an empty main RPM</span>
<span style="color: #00A000">+- rework spec file</span>
<span style="color: #00A000">+- add sox as a requirement</span>
<span style="color: #00A000">+- run buildsounds-callie.sh in post to generate 8KHz, 16KHz and 32KHz prompts</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Tue Dec 15 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-2</span>
<span style="color: #00A000">+- can&#39;t override Name in subpackage so put all versions in RPM subpackages </span>
<span style="color: #00A000">+- with an empty main RPM package</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+* Tue Dec 15 2009 Patrick Laimbock &lt;vc-rpms@voipconsulting.nl&gt; - 1.0.12-1</span>
<span style="color: #00A000">+- create spec file with the following requirement:</span>
<span style="color: #00A000">+- source only contains the 48KHz sound prompts</span>
<span style="color: #00A000">+- during build the 48KHz sound prompts are resampled to 8KHz, 16KHz and 32KHz</span>
<span style="color: #00A000">+- the 8KHz, 16KHz, 32KHz and 48KHz sound prompts are packaged separately</span>
<span style="color: #00A000">+</span>
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments: 
more fedora fixes

<span style="color: #000080; font-weight: bold">diff --git a/freeswitch.spec b/freeswitch.spec</span>
<span style="color: #000080; font-weight: bold">index cb83ffb..c434af6 100644</span>
<span style="color: #A00000">--- a/freeswitch.spec</span>
<span style="color: #00A000">+++ b/freeswitch.spec</span>
<span style="color: #800080; font-weight: bold">@@ -89,11 +89,13 @@ BuildRequires: libtool &gt;= 1.5.17</span>
 BuildRequires: ncurses-devel
 BuildRequires: openssl-devel
 BuildRequires: perl
<span style="color: #A00000">-%if %{_vendor} == redhat &amp;&amp; 0%{?fedora} &lt;= 8</span>
<span style="color: #00A000">+% 0%{?fedora_version} &gt;= 8</span>
 BuildRequires: perl-ExtUtils-Embed
 %endif
 BuildRequires: pkgconfig
<span style="color: #00A000">+%if %{_vendor} == redhat &amp;&amp; 0%{?fedora} &lt;= 6</span>
 BuildRequires: termcap
<span style="color: #00A000">+%endif</span>
 BuildRequires: unixODBC-devel
 BuildRequires: gdbm-devel
 BuildRequires: db4-devel
<span style="color: #800080; font-weight: bold">@@ -954,6 +956,8 @@ fi</span>
 #
 ######################################################################################################################
 %changelog
<span style="color: #00A000">+* Tue Jan 18 2011 - michal.bielicki@seventhsignal.de</span>
<span style="color: #00A000">+- Fedora adjustments</span>
 * Fri Oct 15 2010 - michal.bielicki@seventhsignal.de
 - added mod_curl
 * Sat Oct 09 2010 - michal.bielicki@seventhsignal.de
</pre></div>
<div class="highlight"><pre>committer: cypromis
comments: 
fix a fedora dep and fix python path to be variable in sopec file

<span style="color: #000080; font-weight: bold">diff --git a/freeswitch.spec b/freeswitch.spec</span>
<span style="color: #000080; font-weight: bold">index 66db65c..cb83ffb 100644</span>
<span style="color: #A00000">--- a/freeswitch.spec</span>
<span style="color: #00A000">+++ b/freeswitch.spec</span>
<span style="color: #800080; font-weight: bold">@@ -53,7 +53,7 @@ Vendor:               http://www.freeswitch.org/</span>
 #                                        Source files and where to get them
 #
 ######################################################################################################################
<span style="color: #A00000">-Source0:              http://files.freeswitch.org/%{name}-%{version}.tar.bz2</span>
<span style="color: #00A000">+Source0:    http://files.freeswitch.org/%{name}-%{version}.tar.bz2</span>
 Source1:        http://files.freeswitch.org/downloads/libs/celt-0.7.1.tar.gz
 Source2:        http://files.freeswitch.org/downloads/libs/flite-1.3.99-latest.tar.gz
 Source3:        http://files.freeswitch.org/downloads/libs/lame-3.97.tar.gz
<span style="color: #800080; font-weight: bold">@@ -89,6 +89,9 @@ BuildRequires: libtool &gt;= 1.5.17</span>
 BuildRequires: ncurses-devel
 BuildRequires: openssl-devel
 BuildRequires: perl
<span style="color: #00A000">+%if %{_vendor} == redhat &amp;&amp; 0%{?fedora} &lt;= 8</span>
<span style="color: #00A000">+BuildRequires: perl-ExtUtils-Embed</span>
<span style="color: #00A000">+%endif</span>
 BuildRequires: pkgconfig
 BuildRequires: termcap
 BuildRequires: unixODBC-devel
<span style="color: #800080; font-weight: bold">@@ -893,7 +896,7 @@ fi</span>
 %files python
 %defattr(-,freeswitch,daemon)
 %{prefix}/mod/mod_python*.so*
<span style="color: #A00000">-%attr(0644, root, bin) /usr/lib/python2.4/site-packages/freeswitch.py*</span>
<span style="color: #00A000">+%attr(0644, root, bin) /usr/lib/python*/site-packages/freeswitch.py*</span>
 %dir %attr(0750, freeswitch, daemon) %{prefix}/conf/autoload_configs
 %config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/autoload_configs/python.conf.xml
 
</pre></div>
<div class="highlight"><pre>committer: Travis Cross
comments: 
let vmain-key and operator-key be set empty
The defaults for these keys are empty.  This change allows them to be
set empty in the XML config without error.

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #000080; font-weight: bold">index 1799e5c..76870f7 100644</span>
<span style="color: #A00000">--- a/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #00A000">+++ b/src/mod/applications/mod_voicemail/mod_voicemail.c</span>
<span style="color: #800080; font-weight: bold">@@ -311,6 +311,7 @@ static void destroy_profile(const char *profile_name, switch_bool_t block)</span>
 
 /* Static buffer, 2 bytes */
 static switch_xml_config_string_options_t config_dtmf = { NULL, 2, &quot;[0-9#\\*]&quot; };
<span style="color: #00A000">+static switch_xml_config_string_options_t config_dtmf_optional = { NULL, 2, &quot;[0-9#\\*]?&quot; };</span>
 static switch_xml_config_string_options_t config_login_keys = { NULL, 16, &quot;[0-9#\\*]*&quot; };
 static switch_xml_config_string_options_t config_file_ext = { NULL, 10, NULL };
 static switch_xml_config_int_options_t config_int_0_10000 = { SWITCH_TRUE, 0, SWITCH_TRUE, 10000 };
<span style="color: #800080; font-weight: bold">@@ -520,8 +521,8 @@ vm_profile_t *profile_set_config(vm_profile_t *profile)</span>
         SWITCH_CONFIG_SET_ITEM(profile-&gt;config[i++], &quot;urgent-key&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
                                                    &amp;profile-&gt;urgent_key, &quot;*&quot;, &amp;config_dtmf, NULL, NULL);
         SWITCH_CONFIG_SET_ITEM(profile-&gt;config[i++], &quot;operator-key&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
<span style="color: #A00000">-                                                   &amp;profile-&gt;operator_key, &quot;&quot;, &amp;config_dtmf, NULL, NULL);</span>
<span style="color: #A00000">-        SWITCH_CONFIG_SET_ITEM(profile-&gt;config[i++], &quot;vmain-key&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &amp;profile-&gt;vmain_key, &quot;&quot;, &amp;config_dtmf, NULL, NULL);</span>
<span style="color: #00A000">+                                                   &amp;profile-&gt;operator_key, &quot;&quot;, &amp;config_dtmf_optional, NULL, NULL);</span>
<span style="color: #00A000">+        SWITCH_CONFIG_SET_ITEM(profile-&gt;config[i++], &quot;vmain-key&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &amp;profile-&gt;vmain_key, &quot;&quot;, &amp;config_dtmf_optional, NULL, NULL);</span>
         SWITCH_CONFIG_SET_ITEM(profile-&gt;config[i++], &quot;vmain-extension&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
                                                    &amp;profile-&gt;vmain_ext, &quot;&quot;, &amp;profile-&gt;config_str_pool, NULL, NULL);
         SWITCH_CONFIG_SET_ITEM(profile-&gt;config[i++], &quot;forward-key&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE,
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
Merge branch &#39;master&#39; of git.sangoma.com:smg_freeswitch
</pre></div>
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: enable ec only upon SIGEVENT_PROGRESS_MEDIA

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #000080; font-weight: bold">index 6bfa375..c13fe76 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftdm_io.c</span>
<span style="color: #800080; font-weight: bold">@@ -2417,8 +2417,6 @@ static ftdm_status_t _ftdm_channel_call_place_nl(const char *file, const char *f</span>
         ftdm_assert_return(ftdmchan != NULL, FTDM_FAIL, &quot;null channel&quot;);
         ftdm_assert_return(ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OUTBOUND), FTDM_FAIL, &quot;Call place, but outbound flag not set\n&quot;);
 
<span style="color: #A00000">-        ftdm_set_echocancel_call_begin(ftdmchan);</span>
<span style="color: #A00000">-</span>
         if (!ftdmchan-&gt;span-&gt;outgoing_call) {
                 ftdm_log_chan_msg(ftdmchan, FTDM_LOG_ERROR, &quot;outgoing_call method not implemented in this span!\n&quot;);
                 status = FTDM_ENOSYS;
<span style="color: #800080; font-weight: bold">@@ -5548,6 +5546,13 @@ FT_DECLARE(ftdm_status_t) ftdm_span_send_signal(ftdm_span_t *span, ftdm_sigmsg_t</span>
                 }
                 break;
 
<span style="color: #00A000">+        case FTDM_SIGEVENT_PROGRESS_MEDIA:</span>
<span style="color: #00A000">+                {</span>
<span style="color: #00A000">+                        ftdm_log_chan_msg(sigmsg-&gt;channel, FTDM_LOG_DEBUG, &quot;Enabling echo cancellation on progress media\n&quot;);</span>
<span style="color: #00A000">+                        ftdm_set_echocancel_call_begin(sigmsg-&gt;channel);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+                break;</span>
<span style="color: #00A000">+</span>
         case FTDM_SIGEVENT_STOP:
                 if (!ftdm_test_flag(sigmsg-&gt;channel, FTDM_CHANNEL_CALL_STARTED)) {
                         /* this happens for FXS devices which blindly send SIGEVENT_STOP, we should fix it there ... */
</pre></div>
========================================================================<pre>

Summary of changes:
 Makefile.am                                        |    2 +-
 build/modules.conf.in                              |    1 +
 conf/autoload_configs/easyroute.conf.xml           |    3 +
 conf/autoload_configs/modules.conf.xml             |    1 +
 conf/lang/en/dir/sounds.xml                        |    4 +-
 freeswitch-sounds-en-us-callie.spec                |  339 ++++++++++++++++
 freeswitch.spec                                    |   11 +-
 libs/freetdm/Makefile.am                           |    1 +
 libs/freetdm/TODO                                  |    9 +
 libs/freetdm/docs/io_modules.txt                   |   13 +
 libs/freetdm/src/ftdm_io.c                         |   72 +++--
 libs/freetdm/src/ftdm_state.c                      |    8 +-
 libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c         |    5 +-
 .../ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.c  |    6 +-
 .../ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h  |   14 +-
 .../ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c    |   32 ++-
 .../ftmod_sangoma_isdn_stack_hndl.c                |   33 ++-
 .../ftmod_sangoma_isdn_support.c                   |   29 +-
 .../src/ftmod/ftmod_wanpipe/ftmod_wanpipe.c        |   25 +-
 libs/freetdm/src/include/freetdm.h                 |  144 ++++---
 libs/freetdm/src/include/private/ftdm_core.h       |   15 +-
 libs/freetdm/src/include/private/ftdm_types.h      |    9 +-
 libs/spandsp/spandsp.pc.in                         |    2 +-
 src/include/switch_utils.h                         |    2 +-
 .../applications/mod_conference/mod_conference.c   |   33 +-
 src/mod/applications/mod_dptools/mod_dptools.c     |    2 +
 src/mod/applications/mod_easyroute/mod_easyroute.c |   13 +-
 src/mod/applications/mod_voicemail/mod_voicemail.c |    5 +-
 src/mod/codecs/mod_celt/mod_celt.c                 |   34 +-
 src/mod/endpoints/mod_sofia/sofia_presence.c       |   19 +
 src/mod/endpoints/mod_sofia/sofia_reg.c            |    8 +-
 .../event_handlers/mod_erlang_event/ei_helpers.c   |    1 +
 .../event_handlers/mod_erlang_event/handle_msg.c   |    4 +-
 .../mod_erlang_event/mod_erlang_event.c            |   14 +-
 .../mod_erlang_event/mod_erlang_event.h            |    1 +
 src/mod/event_handlers/mod_snmp/FREESWITCH-MIB     |  110 +++++
 src/mod/event_handlers/mod_snmp/Makefile           |    7 +
 src/mod/event_handlers/mod_snmp/mod_snmp.c         |  138 +++++++
 src/mod/event_handlers/mod_snmp/subagent.c         |  189 +++++++++
 src/mod/event_handlers/mod_snmp/subagent.h         |    8 +
 src/mod/formats/mod_shout/mod_shout.c              |    6 +-
 src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c          |    2 +-
 src/switch_apr.c                                   |    2 +-
 src/switch_core.c                                  |   12 +-
 src/switch_core_file.c                             |    2 +-
 src/switch_ivr_originate.c                         |   22 +-
 src/switch_ivr_play_say.c                          |    8 +
 src/switch_rtp.c                                   |  425 ++++++++++++--------
 w32/Setup/Product.wxs                              |    6 +
 49 files changed, 1482 insertions(+), 369 deletions(-)
 create mode 100644 freeswitch-sounds-en-us-callie.spec
 create mode 100644 libs/freetdm/docs/io_modules.txt
 create mode 100644 src/mod/event_handlers/mod_snmp/FREESWITCH-MIB
 create mode 100644 src/mod/event_handlers/mod_snmp/Makefile
 create mode 100644 src/mod/event_handlers/mod_snmp/mod_snmp.c
 create mode 100644 src/mod/event_handlers/mod_snmp/subagent.c
 create mode 100644 src/mod/event_handlers/mod_snmp/subagent.h
</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 Source</p>