That&#39;s a reasonable expectation. However, if there is more than one file format from which the sound could be played then a decision must be made as to which one to use. You could default to .wav and hope that there&#39;s a .wav file present or you could create a logic tree that looks for various file types and chooses the most appropriate under the circumstances. Most likely you&#39;d need more than just a channel variable - you&#39;d need to do a small script in your preferred language, be it Lua, Perl, Python, JavaScript...<br>
<br>-MC<br><br><div class="gmail_quote">On Fri, Jan 2, 2009 at 7:38 AM, Mikael A. Bjerkeland <span dir="ltr">&lt;<a href="mailto:mikael@bjerkeland.com">mikael@bjerkeland.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hmm, what about setting a channel variable to change this behaviour? I<br>
might be off track, but shouldn&#39;t the file be transcoded if that&#39;s the<br>
only way to play it?<br>
<br>
<br>
El vie, 02-01-2009 a las 07:09 -0800, Michael S Collins escribió:<br>
<div><div></div><div class="Wj3C7c">&gt; From my experience if the native file format is not found then it<br>
&gt; will not play anything, but will show a file not found error.<br>
&gt;<br>
&gt; -MC<br>
&gt;<br>
&gt; Sent from my iPhone<br>
&gt;<br>
&gt; On Jan 2, 2009, at 3:38 AM, &quot;Mikael A. Bjerkeland&quot; &lt;<a href="mailto:mikael@bjerkeland.com">mikael@bjerkeland.com</a><br>
&gt; &nbsp;&gt; wrote:<br>
&gt;<br>
&gt; &gt; Michael,<br>
&gt; &gt;<br>
&gt; &gt; let&#39;s say G722 isn&#39;t found, but .wav is, will FS revert to using<br>
&gt; &gt; the .wav file and transcode if the file extension is not specified in<br>
&gt; &gt; playback?<br>
&gt; &gt;<br>
&gt; &gt; I will be creating a script to convert any file using sox to every<br>
&gt; &gt; specified format so we can avoid transcoding as much as possible.<br>
&gt; &gt; The script will appear at<br>
&gt; &gt; <a href="http://wiki.freeswitch.org/wiki/Mod_native_file" target="_blank">http://wiki.freeswitch.org/wiki/Mod_native_file</a> anytime soon.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:<br>
&gt; &gt;&gt; Unfortunately mod_native_file hasn&#39;t been documented on the wiki yet.<br>
&gt; &gt;&gt; I&#39;m going to work on that. However, the gist of it is this: if you<br>
&gt; &gt;&gt; have a file in the proper format, such as g711, then you can specify<br>
&gt; &gt;&gt; the file name w/o the extension and FreeSWITCH will pick the right<br>
&gt; &gt;&gt; one<br>
&gt; &gt;&gt; for the codec being used. You&#39;ll need to make sure that your file<br>
&gt; &gt;&gt; names have the proper extensions, like .pcmu for mu-law. A complete<br>
&gt; &gt;&gt; list is available here:<br>
&gt; &gt;&gt; <a href="http://www.iana.org/assignments/media-types/audio/" target="_blank">http://www.iana.org/assignments/media-types/audio/</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; so if you have these files:<br>
&gt; &gt;&gt; /tmp/hello.wav<br>
&gt; &gt;&gt; /tmp/hello.pcmu<br>
&gt; &gt;&gt; /tmp/hello.gsm<br>
&gt; &gt;&gt; /tmp/hello.g729<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; you can specify the exact file name, in which case FS will play the<br>
&gt; &gt;&gt; file and do whatever transcoding is needed. Or you can specify the<br>
&gt; &gt;&gt; filename without the extension and FS will pick the appropriate one:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &lt;action application=&quot;playback&quot; data=&quot;/tmp/hello&quot;/&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Look for an update on the wiki in the next day or two. In the<br>
&gt; &gt;&gt; meantime<br>
&gt; &gt;&gt; please report back if you have any issues.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; -MC<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris &lt;<a href="mailto:mike@jerris.com">mike@jerris.com</a>&gt;<br>
&gt; &gt;&gt; wrote:<br>
&gt; &gt;&gt;&gt; yes, you can use mod_native_file.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Mike<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; I need to support calls using G.711, G.729 and G.722 and I want to<br>
&gt; &gt;&gt;&gt;&gt; avoid transcoding as much as possible. Does FreeSWITCH support<br>
&gt; &gt;&gt;&gt;&gt; playing<br>
&gt; &gt;&gt;&gt;&gt; audios in a raw format that does not require transcoding for any of<br>
&gt; &gt;&gt;&gt;&gt; these codecs? It looks like FS provides WAV audio files with the<br>
&gt; &gt;&gt;&gt;&gt; frequencies of the supported codecs and relies on transcoding all<br>
&gt; &gt;&gt;&gt;&gt; the<br>
&gt; &gt;&gt;&gt;&gt; time. Is my analysis correct? How does everybody else handle this<br>
&gt; &gt;&gt;&gt;&gt; problem?<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; _______________________________________________<br>
&gt; &gt;&gt;&gt; Freeswitch-dev mailing list<br>
&gt; &gt;&gt;&gt; <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
&gt; &gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; &gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; &gt;&gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; Freeswitch-dev mailing list<br>
&gt; &gt;&gt; <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
&gt; &gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; &gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
&gt; &gt;&gt; dev<br>
&gt; &gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Freeswitch-dev mailing list<br>
&gt; &gt; <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
&gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; &gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-dev mailing list<br>
&gt; <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>