Hello, I'm using Httapi for dynamic application service. The problem, I'm getting is when im using httapi with the application "playback", freeswitch is crashing. Seems the crashed is caused by the parameter of "file" in playback. Thats mean when i'm getting a file from a remote server (http://xxxxxx.com/test.wav) its crashing but when using a local wav file everthing is fine. here is the httapi xml: <document type="xml/freeswitch-httapi"> <params/> <variables> <sou>someval</sou> </variables> <work> <execute application="flush_dtmf"/> <execute application="set" data="${http_prefetch(http://xxxxxxx.com/test.wav)}"></execute> <execute application="info"/> <playback name="user_entry" file="http://xxxxxxx.com/test.wav" loops="3" digit-timeout="1000" input-timeout="1000"> <bind strip="#">~\d+</bind> </playback> </work> </document> Here the log before the freeswitch crash: freeswitch: src/switch_event.c:710: switch_event_get_header_ptr: Assertion `event' failed. I try to use http_cache to try to resolve the prob: <playback name="user_entry" file="${http_get(http://xxxxxxx.com/test.wav)}" loops="3" digit-timeout="1000" input-timeout="1000"> <bind strip="#">~\d+</bind> </playback> but i'm getting the following error in the log: 2012-11-23 19:06:10.015936 [ERR] switch_core_file.c:112 Unknown file Format [$] Finally i try the following idea: - set a variable (<execute application="set" data="play=${http_get(http://xxxxxxx.com/test.wav)}"></execute> then use in playback parameter the variable ${play} but the variable is not parsed! 2012-11-23 17:30:09.855933 [ERR] mod_native_file.c:74 Error opening /usr/share/freeswitch/sounds/en/us/callie/${play}.PCMA Could anyone please tell me where i did the mistake ? thx a lot -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Freeswitch-is-crashing-when-ht... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi Srigo, It looks like you're new to the list, so let me welcome you to the community! In a case like this, any time there is a crash, we need the user to open a jira. You've already collected most of the necessary data. Go to jira.freeswitch.org, open an account, and then add this data to a new jira ticket. If you need help on how to file a jira then join us in #freeswitch on irc.freenode.net. Also, our wiki has some good information here: http://wiki.freeswitch.org/wiki/Reporting_Bugs Also, make sure you test with the latest git version because our devs work fast and sometimes they've caught and fixed bugs before you finish opening your jira ticket. :) -MC On Thu, Nov 29, 2012 at 9:40 AM, Srigo <ksrigo@gmail.com> wrote:
Hello,
I'm using Httapi for dynamic application service. The problem, I'm getting is when im using httapi with the application "playback", freeswitch is crashing.
Seems the crashed is caused by the parameter of "file" in playback. Thats mean when i'm getting a file from a remote server (http://xxxxxx.com/test.wav) its crashing but when using a local wav file everthing is fine.
here is the httapi xml:
<document type="xml/freeswitch-httapi"> <params/> <variables> <sou>someval</sou> </variables> <work> <execute application="flush_dtmf"/> <execute application="set" data="${http_prefetch(http://xxxxxxx.com/test.wav)}"></execute> <execute application="info"/> <playback name="user_entry" file="http://xxxxxxx.com/test.wav" loops="3" digit-timeout="1000" input-timeout="1000"> <bind strip="#">~\d+</bind> </playback> </work> </document>
Here the log before the freeswitch crash:
freeswitch: src/switch_event.c:710: switch_event_get_header_ptr: Assertion `event' failed.
I try to use http_cache to try to resolve the prob:
<playback name="user_entry" file="${http_get(http://xxxxxxx.com/test.wav) }" loops="3" digit-timeout="1000" input-timeout="1000"> <bind strip="#">~\d+</bind> </playback>
but i'm getting the following error in the log:
2012-11-23 19:06:10.015936 [ERR] switch_core_file.c:112 Unknown file Format [$]
Finally i try the following idea:
- set a variable (<execute application="set" data="play=${http_get(http://xxxxxxx.com/test.wav)}"></execute>
then use in playback parameter the variable ${play} but the variable is not parsed!
2012-11-23 17:30:09.855933 [ERR] mod_native_file.c:74 Error opening /usr/share/freeswitch/sounds/en/us/callie/${play}.PCMA
Could anyone please tell me where i did the mistake ?
thx a lot
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Freeswitch-is-crashing-when-ht... 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Hi Michael, I already opened a bug report here http://jira.freeswitch.org/browse/FS-4886. Thank you for all details. Srigo -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Freeswitch-is-crashing-when-ht... Sent from the freeswitch-users mailing list archive at Nabble.com.
Hi, I have now more details about this crashed. Here is what i did (I used the FS you compiled as 'minessale"): - Start FS as minessale: su minessale /usr/local/stow/freeswitch_20121130/bin/freeswitch -nonat -rp -nc -conf /etc/freeswitch/ -db /var/lib/freeswitch/db/ -log /var/log/freeswitch Everthing worked fine, NO CRASH!! - Then i tried samething by starting FS as "freeswitch" su - freeswitch -s /bin/bash /usr/local/stow/freeswitch_20121130/bin/freeswitch -nonat -rp -nc -conf /etc/freeswitch/ -db /var/lib/freeswitch/db/ -log /var/log/freeswitch This time FS crashed. According to "strace", we have a permission denied when accessing to /usr/local/stow/freeswitch_20121130/storage/http_file_cache. By changing the rights on "storage" I was able to run httapi without crash with the user "freeswitch" I joined the trace file. Additionnaly, we got the same issue with the compiled debian package: It's looking for its cache in /usr/storage which does nt exist. I would like to suggest to you: - Checking return code when opening a file in "storage/http_file_cache" and log failures. - Fix the build system to create the storage cache with the correct rights - Add in httapi configuration file parameters to set the storage path Regards, Srigo -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Freeswitch-is-crashing-when-ht... Sent from the freeswitch-users mailing list archive at Nabble.com.
Once we have a jira open, its ok to just put the details there. On Mon, Dec 3, 2012 at 8:17 AM, Srigo <ksrigo@gmail.com> wrote:
Hi,
I have now more details about this crashed. Here is what i did (I used the FS you compiled as 'minessale"):
- Start FS as minessale:
su minessale /usr/local/stow/freeswitch_20121130/bin/freeswitch -nonat -rp -nc -conf /etc/freeswitch/ -db /var/lib/freeswitch/db/ -log /var/log/freeswitch
Everthing worked fine, NO CRASH!!
- Then i tried samething by starting FS as "freeswitch" su - freeswitch -s /bin/bash /usr/local/stow/freeswitch_20121130/bin/freeswitch -nonat -rp -nc -conf /etc/freeswitch/ -db /var/lib/freeswitch/db/ -log /var/log/freeswitch
This time FS crashed. According to "strace", we have a permission denied when accessing to /usr/local/stow/freeswitch_20121130/storage/http_file_cache. By changing the rights on "storage" I was able to run httapi without crash with the user "freeswitch"
I joined the trace file.
Additionnaly, we got the same issue with the compiled debian package: It's looking for its cache in /usr/storage which does nt exist.
I would like to suggest to you: - Checking return code when opening a file in "storage/http_file_cache" and log failures. - Fix the build system to create the storage cache with the correct rights - Add in httapi configuration file parameters to set the storage path
Regards, Srigo
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Freeswitch-is-crashing-when-ht... 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
Ok Anthony...Good to knw for next times. Srigo -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Freeswitch-is-crashing-when-ht... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (3)
-
Anthony Minessale
-
Michael Collins
-
Srigo