<div dir="ltr">You can define the duration with "file-cache-ttl". Check <a href="http://wiki.freeswitch.org/wiki/Mod_httapi#Configuration">http://wiki.freeswitch.org/wiki/Mod_httapi#Configuration</a> for some other config options. I don't know of one for the destination folder. By default, it'll use a "http_file_cache" directory in the FreeSWITCH storage directory.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 23, 2013 at 11:26 AM, Srigo KANA <span dir="ltr"><<a href="mailto:ksrigo@gmail.com" target="_blank">ksrigo@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 lang="FR" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thank you Anthony for the quick replay<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">So it will download and cache the file ? Is there any parmaters somewhere to define like cache duration and destination folder?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thnk you<u></u><u></u></span></p>
<p class="MsoNormal"><a name="13e3786215789b49__MailEndCompose"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Anthony Minessale<br>
<b>Sent:</b> mardi 23 avril 2013 17:15<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] http_cache with mod_httapi<u></u><u></u></span></p></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p>
<div><p class="MsoNormal">This is not correct.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">If you have mod_httapi loaded you can just put http urls in as a playback format, no need to use http_cache<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Apr 23, 2013 at 9:53 AM, Srigo <<a href="mailto:ksrigo@gmail.com" target="_blank">ksrigo@gmail.com</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal">Hi,<br><br>I want to use http_cache to play a file in httapi dialplan but its not<br>working. Here is what im getting.<br><br>Here is my httapi xml:<br><br><document xmlns:xs="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>"<br>
type="xml/freeswitch-httapi"><br> <params/><br> <variables><br> <dtmf>null</dtmf><br> </variables><br> <work><br> <execute application="export" data="app_id=${app_id}"/><br>
<execute application="log"<br> data="DEBUG: Matching calendar: opening_hours, status:open"/><br> <execute application="flush_dtmf"/><br> <execute application="log"<br>
data="INFO:<br>application=ivr;value=<a href="http://xxxxxxx.com:8080/tel/media_srv/ib_fr_wel.wav;user_entry=null;max_failure=0;loop=0;app_id=593924623;story_id=1;status=start" target="_blank">http://xxxxxxx.com:8080/tel/media_srv/ib_fr_wel.wav;user_entry=null;max_failure=0;loop=0;app_id=593924623;story_id=1;status=start</a>"/><br>
<execute application="set"<br><br>data="${http_prefetch(<a href="http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)" target="_blank">http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)</a>}"/><br>
<execute application="set"<br><br>data="file_cached=${http_get(<a href="http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)" target="_blank">http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)</a>}"/><br>
<execute application="set" data="app_id=593924623"/><br> <execute application="set" data="story_id=1"/><br> <playback name="user_entry"<br><br>
file="${http_get(<a href="http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)" target="_blank">http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)</a>}"<br> error_file=""<br>
digit-timeout="1500"<br> input-timeout="2000"><br> <bind strip="#">~\d+</bind><br> <bind strip="#">~\d+</bind><br>
<bind strip="#">~\d+</bind><br> </playback><br> </work><br></document><br><br><br>Here is what im getting in logs:<br><br>2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser<br>
HTTAPI: Setting realm to 'default'<br>2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser<br>HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046640<br>2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser<br>
HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046680<br>2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser<br>HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd5240466c0<br>
2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser<br>HTTAPI: Setting realm to 'default'<br>2013-04-23 14:40:59.234148 [ERR] switch_core_file.c:112 Unknown file Format<br>[$]<br><br>Thank you<br>
<br><br><br><br>--<br>View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7590025.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7590025.html</a><br>
Sent from the freeswitch-users mailing list archive at Nabble.com.<br><br>_________________________________________________________________________<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" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" 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.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:<a href="tel:%2B19193869900" value="+19193869900" target="_blank">+19193869900</a> <u></u><u></u></p></div></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" 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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>