[Freeswitch-users] Re- LUA audio playback on Windows 64bit not working? (FOUND & FIXED)
Борисов, Дмитрий
bordmi at rarus.ru
Mon Dec 8 10:17:12 MSK 2014
But "inline" directive force FS to run script on hunting phase
My yesturday`s sunday have died with this issue... :(
2014-12-08 10:14 GMT+03:00 Борисов, Дмитрий <bordmi at rarus.ru>:
> In the hunting state of dialplan treatment FS doesn`t permit to work with
> media, only in execution state.
>
> 2014-12-08 9:12 GMT+03:00 Andrew Keil <andrew.keil at visytel.com>:
>
>> To all,
>>
>>
>>
>> Found the issue below:
>>
>>
>>
>> Removed the inline=”true” from the xml dialplan and everything works as
>> expected.
>>
>>
>>
>> <action inline="true" application="lua" data="ASKTestLua.lua $2"/>
>>
>>
>>
>> Now:
>>
>>
>>
>> <action application="lua" data="ASKTestLua.lua $2"/>
>>
>>
>>
>> Not sure why I put it there in the first place.
>>
>>
>>
>> Sorry about that.
>>
>>
>>
>> Andrew
>>
>>
>>
>> *From:* Andrew Keil
>> *Sent:* Monday, 8 December 2014 1:18 PM
>> *To:* 'freeswitch-users at lists.freeswitch.org'
>> *Subject:* Re- LUA audio playback on Windows 64bit not working?
>>
>>
>>
>> To FreeSWITCH users,
>>
>>
>>
>> I am just starting to use Lua inside FreeSWITCH and I am having
>> difficulty with playing back audio to the caller. It seems the Media is
>> not ready or available even though I have answered the caller using
>> session:answer().
>>
>> It also seems that session:ready() always returns false after
>> session:answer(). Very strange.
>>
>>
>>
>> Version: FreeSWITCH 1.5.12b(64bit) on Windows 8.1 Pro (installed from
>> freeswitch.msi) – default installation except for conf\vars.xml
>> (default_password changed)
>>
>>
>>
>> *conf\dialplan\default\00_ASKTestLua.xml:*
>>
>> <include>
>>
>> <!-- To test Lua script -->
>>
>> <extension name="ivr_demo">
>>
>> <condition field="destination_number" expression="^(9101)$">
>>
>> <!-- <action application="answer"/> -->
>>
>> <!-- <action application="sleep" data="1000"/>
>> -->
>>
>> <!-- <action application="playback"
>> data="ivr/ivr-welcome_to_freeswitch.wav"/> -->
>>
>> <action inline="true" application="lua"
>> data="ASKTestLua.lua $2"/>
>>
>> </condition>
>>
>> </extension>
>>
>> </include>
>>
>>
>>
>> *scripts\ASKTestLua.lua:*
>>
>> -- Test Lua application
>>
>>
>>
>> -- answer the call
>>
>> session:answer();
>>
>>
>>
>> session:sleep(1000);
>>
>>
>>
>> prompt = "ivr/ivr-welcome_to_freeswitch.wav";
>>
>> freeswitch.consoleLog("INFO", string.format("prompt: %s\n", prompt));
>>
>>
>>
>> session:execute("playback",prompt);
>>
>> --session:streamFile(prompt);
>>
>>
>>
>> freeswitch.consoleLog("INFO", "Prompt played\n")
>>
>>
>>
>> -- hangup
>>
>> session:hangup();
>>
>>
>>
>>
>>
>> Logs inside FS_CLI: 2014-12-08 12:44:15.002800 [DEBUG]
>> switch_core_session.c:2725 Application playback Requires media!
>> pre_answering channel sofia/internal/1000 at 192.168.15.74
>>
>> EXECUTE sofia/internal/1000 at 192.168.15.74
>> playback(ivr/ivr-welcome_to_freeswitch.wav)
>>
>>
>>
>> vs.
>>
>>
>>
>> conf\dialplan\default\00_ASKTestLua.xml:
>>
>> <include>
>>
>> <!-- To test Lua script -->
>>
>> <extension name="ivr_demo">
>>
>> <condition field="destination_number" expression="^(9101)$">
>>
>> <action application="answer"/>
>>
>> <action application="sleep" data="1000"/>
>>
>> <action application="playback" data="ivr/ivr-welcome_to_freeswitch.wav"/>
>>
>> <!-- <action inline="true" application="lua"
>> data="ASKTestLua.lua $2"/> -->
>>
>> </condition>
>>
>> </extension>
>>
>> </include>
>>
>>
>>
>> Which works!! However this is not using Lua.
>>
>>
>>
>> I have tried using “session:streamFile(prompt);” instead of
>> “session:execute("playback",prompt);” and this also does not work.
>>
>>
>>
>> I would appreciate any insight into why this is happening.
>>
>>
>>
>> Kind Regards,
>>
>>
>>
>> Andrew Keil
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
> with best regrds,
> Dmitriy Borisov
>
--
with best regrds,
Dmitriy Borisov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141208/bd11594e/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list