http_cache with mod_httapi
Hi, I want to use http_cache to play a file in httapi dialplan but its not working. Here is what im getting. Here is my httapi xml: <document xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xml/freeswitch-httapi"> <params/> <variables> <dtmf>null</dtmf> </variables> <work> <execute application="export" data="app_id=${app_id}"/> <execute application="log" data="DEBUG: Matching calendar: opening_hours, status:open"/> <execute application="flush_dtmf"/> <execute application="log" data="INFO: application=ivr;value=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"/> <execute application="set" data="${http_prefetch(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}"/> <execute application="set" data="file_cached=${http_get(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}"/> <execute application="set" data="app_id=593924623"/> <execute application="set" data="story_id=1"/> <playback name="user_entry" file="${http_get(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}" error_file="" digit-timeout="1500" input-timeout="2000"> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> </playback> </work> </document> Here is what im getting in logs: 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046640 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046680 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd5240466c0 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [ERR] switch_core_file.c:112 Unknown file Format [$] Thank you -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7... Sent from the freeswitch-users mailing list archive at Nabble.com.
This is not correct. If you have mod_httapi loaded you can just put http urls in as a playback format, no need to use http_cache On Tue, Apr 23, 2013 at 9:53 AM, Srigo <ksrigo@gmail.com> wrote:
Hi,
I want to use http_cache to play a file in httapi dialplan but its not working. Here is what im getting.
Here is my httapi xml:
<document xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xml/freeswitch-httapi"> <params/> <variables> <dtmf>null</dtmf> </variables> <work> <execute application="export" data="app_id=${app_id}"/> <execute application="log" data="DEBUG: Matching calendar: opening_hours, status:open"/> <execute application="flush_dtmf"/> <execute application="log" data="INFO: application=ivr;value= http://xxxxxxx.com:8080/tel/media_srv/ib_fr_wel.wav;user_entry=null;max_fail... "/> <execute application="set"
data="${http_prefetch( http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}"/> <execute application="set"
data="file_cached=${http_get( http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}"/> <execute application="set" data="app_id=593924623"/> <execute application="set" data="story_id=1"/> <playback name="user_entry"
file="${http_get( http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}" error_file="" digit-timeout="1500" input-timeout="2000"> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> </playback> </work> </document>
Here is what im getting in logs:
2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046640 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046680 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd5240466c0 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [ERR] switch_core_file.c:112 Unknown file Format [$]
Thank you
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Thank you Anthony for the quick replay So it will download and cache the file ? Is there any parmaters somewhere to define like cache duration and destination folder? Thnk you From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: mardi 23 avril 2013 17:15 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] http_cache with mod_httapi This is not correct. If you have mod_httapi loaded you can just put http urls in as a playback format, no need to use http_cache On Tue, Apr 23, 2013 at 9:53 AM, Srigo <ksrigo@gmail.com> wrote: Hi, I want to use http_cache to play a file in httapi dialplan but its not working. Here is what im getting. Here is my httapi xml: <document xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xml/freeswitch-httapi"> <params/> <variables> <dtmf>null</dtmf> </variables> <work> <execute application="export" data="app_id=${app_id}"/> <execute application="log" data="DEBUG: Matching calendar: opening_hours, status:open"/> <execute application="flush_dtmf"/> <execute application="log" data="INFO: application=ivr;value=http://xxxxxxx.com:8080/tel/media_srv/ib_fr_wel.wav;us er_entry=null;max_failure=0;loop=0;app_id=593924623;story_id=1;status=start" /> <execute application="set" data="${http_prefetch(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_ fr_wel.wav)}"/> <execute application="set" data="file_cached=${http_get(http://xxxxxxx.com:8080/tel/media_srv/data/iBro wse/ib_fr_wel.wav)}"/> <execute application="set" data="app_id=593924623"/> <execute application="set" data="story_id=1"/> <playback name="user_entry" file="${http_get(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_we l.wav)}" error_file="" digit-timeout="1500" input-timeout="2000"> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> </playback> </work> </document> Here is what im getting in logs: 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046640 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046680 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd5240466c0 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [ERR] switch_core_file.c:112 Unknown file Format [$] Thank you -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7 590025.html Sent from the freeswitch-users mailing list archive at Nabble.com. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
You can define the duration with "file-cache-ttl". Check http://wiki.freeswitch.org/wiki/Mod_httapi#Configuration 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. On Tue, Apr 23, 2013 at 11:26 AM, Srigo KANA <ksrigo@gmail.com> wrote:
Thank you Anthony for the quick replay****
So it will download and cache the file ? Is there any parmaters somewhere to define like cache duration and destination folder?****
** **
Thnk you****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *Anthony Minessale *Sent:* mardi 23 avril 2013 17:15 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] http_cache with mod_httapi****
** **
This is not correct.****
** **
If you have mod_httapi loaded you can just put http urls in as a playback format, no need to use http_cache****
** **
** **
On Tue, Apr 23, 2013 at 9:53 AM, Srigo <ksrigo@gmail.com> wrote:****
Hi,
I want to use http_cache to play a file in httapi dialplan but its not working. Here is what im getting.
Here is my httapi xml:
<document xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xml/freeswitch-httapi"> <params/> <variables> <dtmf>null</dtmf> </variables> <work> <execute application="export" data="app_id=${app_id}"/> <execute application="log" data="DEBUG: Matching calendar: opening_hours, status:open"/> <execute application="flush_dtmf"/> <execute application="log" data="INFO: application=ivr;value= http://xxxxxxx.com:8080/tel/media_srv/ib_fr_wel.wav;user_entry=null;max_fail... "/> <execute application="set"
data="${http_prefetch( http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}"/> <execute application="set"
data="file_cached=${http_get( http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}"/> <execute application="set" data="app_id=593924623"/> <execute application="set" data="story_id=1"/> <playback name="user_entry"
file="${http_get( http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_wel.wav)}" error_file="" digit-timeout="1500" input-timeout="2000"> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> </playback> </work> </document>
Here is what im getting in logs:
2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046640 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046680 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd5240466c0 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [ERR] switch_core_file.c:112 Unknown file Format [$]
Thank you
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org****
****
** **
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900 ****
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thank you !!! I tested with the param "file-cache-ttl" and check the folder storage, you are right! Thank you. Srigo From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Gabe Shepard Sent: mardi 23 avril 2013 17:42 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] http_cache with mod_httapi You can define the duration with "file-cache-ttl". Check http://wiki.freeswitch.org/wiki/Mod_httapi#Configuration 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. On Tue, Apr 23, 2013 at 11:26 AM, Srigo KANA <ksrigo@gmail.com> wrote: Thank you Anthony for the quick replay So it will download and cache the file ? Is there any parmaters somewhere to define like cache duration and destination folder? Thnk you From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: mardi 23 avril 2013 17:15 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] http_cache with mod_httapi This is not correct. If you have mod_httapi loaded you can just put http urls in as a playback format, no need to use http_cache On Tue, Apr 23, 2013 at 9:53 AM, Srigo <ksrigo@gmail.com> wrote: Hi, I want to use http_cache to play a file in httapi dialplan but its not working. Here is what im getting. Here is my httapi xml: <document xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xml/freeswitch-httapi"> <params/> <variables> <dtmf>null</dtmf> </variables> <work> <execute application="export" data="app_id=${app_id}"/> <execute application="log" data="DEBUG: Matching calendar: opening_hours, status:open"/> <execute application="flush_dtmf"/> <execute application="log" data="INFO: application=ivr;value=http://xxxxxxx.com:8080/tel/media_srv/ib_fr_wel.wav;us er_entry=null;max_failure=0;loop=0;app_id=593924623;story_id=1;status=start" /> <execute application="set" data="${http_prefetch(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_ fr_wel.wav)}"/> <execute application="set" data="file_cached=${http_get(http://xxxxxxx.com:8080/tel/media_srv/data/iBro wse/ib_fr_wel.wav)}"/> <execute application="set" data="app_id=593924623"/> <execute application="set" data="story_id=1"/> <playback name="user_entry" file="${http_get(http://xxxxxxx.com:8080/tel/media_srv/data/iBrowse/ib_fr_we l.wav)}" error_file="" digit-timeout="1500" input-timeout="2000"> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> <bind strip="#">~\d+</bind> </playback> </work> </document> Here is what im getting in logs: 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046640 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd524046680 2013-04-23 14:40:59.234148 [DEBUG] switch_ivr_async.c:285 Digit parser HTTAPI: binding \d+/default/0 callback: 0x7fd528bf0840 data: 0x7fd5240466c0 2013-04-23 14:40:59.234148 [INFO] switch_ivr_async.c:194 Digit parser HTTAPI: Setting realm to 'default' 2013-04-23 14:40:59.234148 [ERR] switch_core_file.c:112 Unknown file Format [$] Thank you -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/http-cache-with-mod-httapi-tp7 590025.html Sent from the freeswitch-users mailing list archive at Nabble.com. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900 <tel:%2B19193869900> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Anthony Minessale
-
Gabe Shepard
-
Srigo
-
Srigo KANA