<div dir="ltr"><div>Anthony,</div><div><br></div><div>Thaks for your quick response!</div><div><br></div>I have verified that it works with the previous commit (<span style="font-size:12.8px">ae1cdce).  Commit </span><span style="font-size:12.8px">38621e47bad3b63f03a0a27f6ca9ed</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">92f6969032 is the first one that breaks it.</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I just removed the following lines from </span><span style="font-size:12.8px">switch_core_file.c and recompiled:</span></div><div><span style="font-size:12.8px"><br></span></div><div><div style="font-size:12.8px">+               if ((val = switch_event_get_header(fh-><wbr>params, "auth_username"))) {</div><div style="font-size:12.8px">+                       fh->mm.auth_username = switch_core_strdup(fh->memory_<wbr>pool, val);</div><div style="font-size:12.8px">+               }</div><div style="font-size:12.8px">+</div><div style="font-size:12.8px">+               if ((val = switch_event_get_header(fh-><wbr>params, "auth_password"))) {</div><div style="font-size:12.8px">+                       fh->mm.auth_password = switch_core_strdup(fh->memory_<wbr>pool, val);</div><div style="font-size:12.8px">+               }</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Still broken...</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I will try removing other bits to see what happens.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Guillermo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 23, 2017 at 8:16 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">My advise is to verify by removing bits or even all of the patch and double check you did not mess up on the bisect.<div>like if you can manually reproduce going to the version before this patch and having it work then go to the version with the patch and try again etc.</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 23, 2017 at 6:14 PM, Guillermo Ruiz Camauer <span dir="ltr"><<a href="mailto:grcamauer@gmail.com" target="_blank">grcamauer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I will try removing just those lines in <span style="font-size:12.8px">switch_core_file.c.  Maybe it's one of the other changes, I was just guessing...</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Guillermo</span></div></div><div class="gmail_extra"><div><div class="m_-659401334450529993h5"><br><div class="gmail_quote">On Fri, Jun 23, 2017 at 8:03 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also does removing just that change in switch_core_file.c from latest version actually make it work?  It seems unlikely the next line in the file looking for FPS field is no different really.<div><br><div><br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-659401334450529993m_9023455610212683541h5">On Fri, Jun 23, 2017 at 6:01 PM, Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-659401334450529993m_9023455610212683541h5"><div style="word-wrap:break-word">can you drop a core file and see where its stuck?<div><div class="m_-659401334450529993m_9023455610212683541m_1854165609332797280h5"><div><br><div><blockquote type="cite"><div>On Jun 23, 2017, at 6:57 PM, Guillermo Ruiz Camauer <<a href="mailto:grcamauer@gmail.com" target="_blank">grcamauer@gmail.com</a>> wrote:</div><br class="m_-659401334450529993m_9023455610212683541m_1854165609332797280m_-2122342998879570416Apple-interchange-newline"><div><div dir="ltr">I have created a small utility program based on fs_encode which will take ALL files in a directory and convert them from .WAV to .G729 and .PCMU formats.  The utility is called wavBatchEncode and takes just a directory path as an argument.<div><br></div><div>This program was working very well until I upgraded FreeSwitch. Now the program seems to hang when it tries to write out the first converted files.  I have to KILL the program from another terminal.  It leaves 2 0 byte files with .PCMU and .G729 extension.</div><div><br></div><div> I have run through a GIT bisect to find where things broke.  The last working version is Version 1.6.16 git ae1cdce 2017-04-11.</div><div>The first broken version is 38621e47bad3b63f03a0a27f6ca<wbr>9ed92f6969032.</div><div><br></div><div>I then used GIT DIFF to see if I could see what had happened.  There are very few modifications between these two commits:</div><div><br></div><div><div>root@fs3:/usr/src/freeswitch.g<wbr>it# git diff ae1cdce 38621e47bad3b63f03a0a27f6ca9ed<wbr>92f6969032</div><div>diff --git a/src/include/switch_module_in<wbr>terfaces.h b/src/include/switch_module_in<wbr>terfaces.h</div><div>index e0a5c20..7ca027d 100644</div><div>--- a/src/include/switch_module_in<wbr>terfaces.h</div><div>+++ b/src/include/switch_module_in<wbr>terfaces.h</div><div>@@ -329,6 +329,11 @@ typedef struct switch_mm_s {</div><div>        switch_video_profile_t vprofile;</div><div>        switch_video_encode_speed_t vencspd;</div><div>        uint8_t try_hardware_encoder;</div><div>+       int scale_w;</div><div>+       int scale_h;</div><div>+       switch_img_fmt_t fmt;</div><div>+       char *auth_username;</div><div>+       char *auth_password;</div><div> } switch_mm_t;</div><div> </div><div> /*! an abstract representation of a file handle (some parameters based on compat with libsndfile) */</div><div>diff --git a/src/mod/applications/mod_av/<wbr>avformat.c b/src/mod/applications/mod_av/<wbr>avformat.c</div><div>index b944625..4b92801 100644</div><div>--- a/src/mod/applications/mod_av/<wbr>avformat.c</div><div>+++ b/src/mod/applications/mod_av/<wbr>avformat.c</div><div>@@ -906,7 +906,7 @@ SWITCH_STANDARD_APP(record_av_<wbr>function)</div><div>                char codec_str[256];</div><div>                const AVCodecDescriptor *desc;</div><div> </div><div>-               if (!strncmp(data, "rtmp://", 7)) {</div><div>+               if (!strncmp(data, "rtmp://", 7) || !strncmp(data, "rtsp://", 7)) {</div><div>                        fmt->video_codec = AV_CODEC_ID_H264;</div><div>                        fmt->audio_codec = AV_CODEC_ID_AAC;</div><div>                }</div><div>@@ -1694,9 +1694,20 @@ static switch_status_t av_file_open(switch_file_handl<wbr>e_t *handle, const char *pa</div><div>                return SWITCH_STATUS_GENERR;</div><div>        } else if (handle->stream_name && (!strcasecmp(handle->stream_na<wbr>me, "rtmp") || !strcasecmp(handle->stream_nam<wbr>e, "youtube"))) {</div><div>                format = "flv";</div><div>-               switch_snprintf(file, sizeof(file), "<a>rtmp://%s</a>", path);</div><div>+</div><div>+               // meh really silly format for the user / pass libav.....</div><div>+               if (handle->mm.auth_username && handle->mm.auth_password) { </div><div>+                       switch_snprintf(file, sizeof(file), "<a>rtmp://%s</a> pubUser=%s pubPasswd=%s flashver=FMLE/3.0", path, handle->mm.auth_username, handle->mm.auth_password);</div><div>+               } else {</div><div>+                       switch_snprintf(file, sizeof(file), "<a>rtmp://%s</a>", path);</div><div>+               }</div><div>+</div><div>+       } else if (handle->stream_name && !strcasecmp(handle->stream_nam<wbr>e, "rtsp")) {</div><div>+               format = "rtsp";</div><div>+               switch_snprintf(file, sizeof(file), "<a>rtsp://%s</a>", path);</div><div>        }</div><div> </div><div>+</div><div>        ext++;</div><div> </div><div>        if ((context = (av_file_context_t *)switch_core_alloc(handle->me<wbr>mory_pool, sizeof(av_file_context_t))) == 0) {</div><div>@@ -1783,7 +1794,7 @@ static switch_status_t av_file_open(switch_file_handl<wbr>e_t *handle, const char *pa</div><div>        if (fmt->video_codec != AV_CODEC_ID_NONE) {</div><div>                const AVCodecDescriptor *desc;</div><div> </div><div>-               if ((handle->stream_name && (!strcasecmp(handle->stream_na<wbr>me, "rtmp") || !strcasecmp(handle->stream_nam<wbr>e, "youtube")))) {</div><div>+               if ((handle->stream_name && (!strcasecmp(handle->stream_na<wbr>me, "rtmp") || !strcasecmp(handle->stream_nam<wbr>e, "rtsp") || !strcasecmp(handle->stream_nam<wbr>e, "youtube")))) {</div><div> </div><div>                        if (fmt->video_codec != AV_CODEC_ID_H264 ) {</div><div>                                fmt->video_codec = AV_CODEC_ID_H264; // force H264</div><div>@@ -2525,6 +2536,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mo<wbr>d_avformat_load)</div><div> </div><div>        supported_formats[i++] = "av";</div><div>        supported_formats[i++] = "rtmp";</div><div>+       supported_formats[i++] = "rtsp";</div><div>        supported_formats[i++] = "mp4";</div><div>        supported_formats[i++] = "m4a";</div><div>        supported_formats[i++] = "mov";</div><div>diff --git a/src/mod/applications/mod_av/<wbr>mod_av.c b/src/mod/applications/mod_av/<wbr>mod_av.c</div><div>index 3d3bd82..141fcdc 100644</div><div>--- a/src/mod/applications/mod_av/<wbr>mod_av.c</div><div>+++ b/src/mod/applications/mod_av/<wbr>mod_av.c</div><div>@@ -93,7 +93,7 @@ int mod_av_lockmgr_cb(void **m, enum AVLockOp op)</div><div> static void log_callback(void *ptr, int level, const char *fmt, va_list vl)</div><div> {</div><div>        switch_log_level_t switch_level = SWITCH_LOG_DEBUG;</div><div>-</div><div>+       return;</div><div>        /* naggy messages */</div><div>        if (level == AV_LOG_DEBUG || level == AV_LOG_WARNING) return;</div><div> </div><div>diff --git a/src/switch_core_file.c b/src/switch_core_file.c</div><div>index 46ee539..aff9442 100644</div><div>--- a/src/switch_core_file.c</div><div>+++ b/src/switch_core_file.c</div><div>@@ -177,6 +177,14 @@ SWITCH_DECLARE(switch_status_t<wbr>) switch_core_perform_file_open(<wbr>const char *file,</div><div>                        fh->mm.try_hardware_encoder = switch_true(val);</div><div>                }</div><div> </div><div>+               if ((val = switch_event_get_header(fh->pa<wbr>rams, "auth_username"))) {</div><div>+                       fh->mm.auth_username = switch_core_strdup(fh->memory_<wbr>pool, val);</div><div>+               }</div><div>+</div><div>+               if ((val = switch_event_get_header(fh->pa<wbr>rams, "auth_password"))) {</div><div>+                       fh->mm.auth_password = switch_core_strdup(fh->memory_<wbr>pool, val);</div><div>+               }</div><div>+</div><div>                if ((val = switch_event_get_header(fh->pa<wbr>rams, "fps"))) {</div><div>                        float ftmp = atof(val);</div><div>                        if (ftmp > 0.0f) {</div><div>(END)</div><div><br></div><div><br></div><div>I believe that it is the changes in switch_core_file.c that break my utility program, but I can't be sure.  Just o add some detail, I have a Digium TCE400 card in my system which handles the G729 conversion.</div><div><br></div><div>I have no idea of what those auth_username and auth_password parameters are, but that seems to break things for me.  Any idea of what I can do to get things working again?</div><div><br></div><div>I have created a PasteBin with the code of my fs_encode derived utility: <a href="https://pastebin.freeswitch.org/view/a3d64c69" style="font-size:13px;color:rgb(0,136,204);text-decoration-line:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif" target="_blank">https://pastebin.free<wbr>switch.org/view/a3d64c69</a>  It is pretty short.</div><div><br></div></div></div></div></blockquote></div><br></div></div></div></div><br></div></div>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><span class="m_-659401334450529993m_9023455610212683541HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="m_-659401334450529993m_9023455610212683541HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-659401334450529993m_9023455610212683541m_1854165609332797280gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch<wbr>.org</a>  ☎ <a href="tel:(919)%20386-9900" value="+19193869900" target="_blank">+19193869900</a> </div><div><br></div></div></div><div><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">https://www.youtube.com/watch?<wbr>v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?<wbr>v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><span class="m_-659401334450529993HOEnZb"><font color="#888888"><div class="m_-659401334450529993m_9023455610212683541gmail_signature" data-smartmail="gmail_signature">Guillermo Ruiz Camauer<br></div>
</font></span></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-659401334450529993gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.<wbr>freeswitch.org</a>  ☎ +19193869900 </div><div><br></div></div></div><div><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">https://www.youtube.com/watch?<wbr>v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?<wbr>v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</div>
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Guillermo Ruiz Camauer<br></div>
</div>