That'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'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'd need more than just a channel variable - you'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"><<a href="mailto:mikael@bjerkeland.com">mikael@bjerkeland.com</a>></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't the file be transcoded if that'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">> From my experience if the native file format is not found then it<br>
> will not play anything, but will show a file not found error.<br>
><br>
> -MC<br>
><br>
> Sent from my iPhone<br>
><br>
> On Jan 2, 2009, at 3:38 AM, "Mikael A. Bjerkeland" <<a href="mailto:mikael@bjerkeland.com">mikael@bjerkeland.com</a><br>
> > wrote:<br>
><br>
> > Michael,<br>
> ><br>
> > let's say G722 isn't found, but .wav is, will FS revert to using<br>
> > the .wav file and transcode if the file extension is not specified in<br>
> > playback?<br>
> ><br>
> > I will be creating a script to convert any file using sox to every<br>
> > specified format so we can avoid transcoding as much as possible.<br>
> > The script will appear at<br>
> > <a href="http://wiki.freeswitch.org/wiki/Mod_native_file" target="_blank">http://wiki.freeswitch.org/wiki/Mod_native_file</a> anytime soon.<br>
> ><br>
> ><br>
> > El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:<br>
> >> Unfortunately mod_native_file hasn't been documented on the wiki yet.<br>
> >> I'm going to work on that. However, the gist of it is this: if you<br>
> >> have a file in the proper format, such as g711, then you can specify<br>
> >> the file name w/o the extension and FreeSWITCH will pick the right<br>
> >> one<br>
> >> for the codec being used. You'll need to make sure that your file<br>
> >> names have the proper extensions, like .pcmu for mu-law. A complete<br>
> >> list is available here:<br>
> >> <a href="http://www.iana.org/assignments/media-types/audio/" target="_blank">http://www.iana.org/assignments/media-types/audio/</a><br>
> >><br>
> >> so if you have these files:<br>
> >> /tmp/hello.wav<br>
> >> /tmp/hello.pcmu<br>
> >> /tmp/hello.gsm<br>
> >> /tmp/hello.g729<br>
> >><br>
> >> you can specify the exact file name, in which case FS will play the<br>
> >> file and do whatever transcoding is needed. Or you can specify the<br>
> >> filename without the extension and FS will pick the appropriate one:<br>
> >><br>
> >> <action application="playback" data="/tmp/hello"/><br>
> >><br>
> >> Look for an update on the wiki in the next day or two. In the<br>
> >> meantime<br>
> >> please report back if you have any issues.<br>
> >><br>
> >> -MC<br>
> >><br>
> >> On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <<a href="mailto:mike@jerris.com">mike@jerris.com</a>><br>
> >> wrote:<br>
> >>> yes, you can use mod_native_file.<br>
> >>><br>
> >>> Mike<br>
> >>><br>
> >>> On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:<br>
> >>><br>
> >>>> I need to support calls using G.711, G.729 and G.722 and I want to<br>
> >>>> avoid transcoding as much as possible. Does FreeSWITCH support<br>
> >>>> playing<br>
> >>>> audios in a raw format that does not require transcoding for any of<br>
> >>>> these codecs? It looks like FS provides WAV audio files with the<br>
> >>>> frequencies of the supported codecs and relies on transcoding all<br>
> >>>> the<br>
> >>>> time. Is my analysis correct? How does everybody else handle this<br>
> >>>> problem?<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>
> >>><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-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
> >> dev<br>
> >> <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>
><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>
<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>