session:recordFile(-) always creates empty wav file during outbound IVR call
Hi folks, With Lua script and/or originate command, I have tried recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty. However, session:recordFile(-) works well for inbound IVR call. I tried the session:recordFile(-) via Lua script in three ways: 1. run lua script "test_outcall_ivr.lua" at freeswitch command-line: luarun test_outcall_ivr.lua -- [test_outcall_ivr.lua] { local sessionx = freeswitch.Session("sofia/gateway/sip.tpad.com/1726011", session) -- Set the path separator pathsep = '/' -- Windows users do this instead: -- pathsep = '\' -- Answer the call -- sessionx:answer() --Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav" -- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n") --Play the prompt sessionx:streamFile(prompt) -- Record record file sessionx:streamFile("phrase:voicemail_record_message") -- Play a ""bong"" tone prior to recording sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)") -- record a message filename = sessionx:getVariable('sounds_dir') .. pathsep .. "123.wav" sessionx:recordFile(filename,300,100,10) -- play back the recorded msg sessionx:streamFile(filename) -- Hangup sessionx:hangup() } 2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface: originate user/1005 &transfer(8887 xml default) originate user/1005 &lua('test1.lua') originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua') -- [test1.lua] { -- Set the path separator pathsep = '/' -- Windows users do this instead: -- pathsep = '\' --Answer the call session:answer() --Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav" -- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n") --Play the prompt session:streamFile(prompt) -- Record record file session:streamFile("phrase:voicemail_record_message") -- Play a ""bong"" tone prior to recording session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)") -- record a message filename = session:getVariable('sounds_dir') .. pathsep .. "123.wav" session:recordFile(filename,300,100,10) -- play back the recorded msg session:streamFile(filename) -- Hangup session:hangup() } -- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$"> <action application="set" data="record_waste_resources=true"/> <action application="lua" data="test1.lua"/> </condition> </extension> } ====================================================== For all the above testing cases, session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file. So, what's wrong with [session:recordFile(-)] during an outbound IVR call? x.k.
try this dial string instead {ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011 On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I have tried recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for inbound IVR call.
I tried the session:recordFile(-) via Lua script in three ways:
1. run lua script "test_outcall_ivr.lua" at freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx = freeswitch.Session("sofia/gateway/sip.tpad.com/1726011", session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir') .. pathsep .. "123.wav" sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)")
-- record a message filename = session:getVariable('sounds_dir') .. pathsep .. "123.wav" session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$"> <action application="set" data="record_waste_resources=true"/> <action application="lua" data="test1.lua"/> </condition> </extension> }
======================================================
For all the above testing cases, session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)] during an outbound IVR call?
x.k.
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
Anthony, Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file . Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call. Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call. x.k. --- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I have tried recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for inbound IVR call.
I tried the session:recordFile(-) via Lua script in three ways:
1. run lua script "test_outcall_ivr.lua" at freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx = freeswitch.Session("sofia/gateway/sip.tpad.com/1726011", session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir') ..
pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)")
-- record a message filename = session:getVariable('sounds_dir') ..
pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$"> <action application="set" data="record_waste_resources=true"/> <action application="lua" data="test1.lua"/> </condition> </extension> }
======================================================
For all the above testing cases, session:recordFile(-)
always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)] during
an outbound IVR call?
x.k.
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
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
Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record? On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I have tried recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for inbound IVR call.
I tried the session:recordFile(-) via Lua script in three ways:
1. run lua script "test_outcall_ivr.lua" at freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx = freeswitch.Session("sofia/gateway/sip.tpad.com/1726011", session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir') ..
pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)")
-- record a message filename = session:getVariable('sounds_dir') ..
pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$"> <action application="set" data="record_waste_resources=true"/> <action application="lua" data="test1.lua"/> </condition> </extension> }
======================================================
For all the above testing cases, session:recordFile(-)
always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)] during
an outbound IVR call?
x.k.
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
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
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
Anthony, Thank you again for helping me!
Does the empty file contain silence that corresponds to the duration of the time it's recording?
No! It's always an empty wav file with its file size 68 bytes, even don't contain any silence samples; When I open the wav file with audio tool (e.g. wavesurfer.exe or windows media player), I don't see or hear it contains any single sample of audio data. Probably it contains only the wave header structure of ms wav file format because its size is always 68 bytes by checking its file properties on windows system. By the way, I tried two versions of FreeSwitch (1.0-head-2011-05-23 and 1.0-head-2011-08-31) on windows server 2003.
Are you producing the audio yourself into the recording and
Yes, I produced audio myself each time by talking to microphone via X-Lite. Again, there is never a problem in session:recordFile(-) during any inbound IVR call which may even run the same Lua script as the outbound IVR call.
can you verify with a pcap that there is actually any audio to record?
sorry, I have no idea on 'pcap' and don't know to how to make use of it for this debug. I basically think there is probably a BUG in session:recordFile(-) for outbound IVR call. Could you please do me a favour trying the following simple outbound IVR call on your site to see if session:recordFile(-) really has a BUG for outbound IVR call? originate /sofia/gateway/mygateway/xxxx &lua('test.lua') or originate user/1005 &lua('test.lua') where "test.lua" is defined as follows: { -- test.lua -- Set the path separator pathsep = '/' -- Windows users do this instead: -- pathsep = '\' --Answer the call session:answer() --Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav" -- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n") --Play the prompt session:streamFile(prompt) -- Record record file session:streamFile("phrase:voicemail_record_message") -- Play a ""bong"" tone prior to recording session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)") filename = session:getVariable('sounds_dir') .. pathsep .. "123.wav" session:recordFile(filename,300,100,10) session:streamFile(filename) goodbye = "voicemail" .. pathsep .. "vm-goodbye.wav" session:sleep(250) session:streamFile(goodbye) session:hangup() } --- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM
Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I
have tried
recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for
inbound IVR call.
I tried the session:recordFile(-) via Lua
script in three ways:
1. run lua script "test_outcall_ivr.lua" at
freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a
sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir')
.. pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file
session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = session:getVariable('sounds_dir')
.. pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$">
<action application="set" data="record_waste_resources=true"/>
<action application="lua" data="test1.lua"/> </condition> </extension> }
======================================================
For all the above testing cases,
session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)]
during an outbound IVR call?
x.k.
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
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
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
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
Hi Anthony, Actually FreeSwitch application "record" doesn't work either for outbound IVR call (see below), created an empty wav file with its size 68 bytes, the wav file doesn't contain any samples of audio data; <action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/> earlier I reported that "session:recordFile(-)" doesn't work inside Lua Script for any outbound IVR call. - My CLI commands to make an outbound IVR call: originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 or originate user/1005 8884 - xml diaplan for extension 8884: { <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/> <action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/> <action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/> <action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> } --- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I
have tried
recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for
inbound IVR call.
I tried the session:recordFile(-) via Lua
script in three ways:
1. run lua script "test_outcall_ivr.lua" at
freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a
sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir')
.. pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file
session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = session:getVariable('sounds_dir')
.. pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$">
<action application="set" data="record_waste_resources=true"/>
<action application="lua" data="test1.lua"/> </condition> </extension> }
======================================================
For all the above testing cases,
session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)]
during an outbound IVR call?
x.k.
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
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
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
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
Tony mentioned something that might be an issue for you. Try setting this on the channel: http://wiki.freeswitch.org/wiki/Channel_Variables#record_waste_resources Let us know if that makes a difference. -MC On Thu, Sep 1, 2011 at 2:48 AM, king2kin <xing2kin@yahoo.com> wrote:
Hi Anthony,
Actually FreeSwitch application "record" doesn't work either for outbound IVR call (see below), created an empty wav file with its size 68 bytes, the wav file doesn't contain any samples of audio data;
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
earlier I reported that "session:recordFile(-)" doesn't work inside Lua Script for any outbound IVR call.
- My CLI commands to make an outbound IVR call:
originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 or originate user/1005 8884
- xml diaplan for extension 8884: { <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/>
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
<action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/>
<action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> }
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I
have tried
recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for
inbound IVR call.
I tried the session:recordFile(-) via Lua
script in three ways:
1. run lua script "test_outcall_ivr.lua" at
freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a
sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir')
.. pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file
session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = session:getVariable('sounds_dir')
.. pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$">
<action application="set" data="record_waste_resources=true"/>
<action application="lua" data="test1.lua"/>
</condition> </extension> }
======================================================
For all the above testing cases,
session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)]
during an outbound IVR call?
x.k.
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
-- 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
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
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
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
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
I tried it again in the following three cases of outbound ivr calls according to you and anthony's advice, I get the same result (i.e. record empty wav file with its size 68 bytes), nothing seems to be improved. For inbound ivr call, application 'record' never has a problem! originate {record_waste_resources=true, ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 originate {record_waste_resources=true}sofia/gateway/mygateway/1726011 8884 originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 -- Here is the xml dialplan for extension 8884: <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/> <action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/> <action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/> <action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> --- On Thu, 9/1/11, Michael Collins <msc@freeswitch.org> wrote: From: Michael Collins <msc@freeswitch.org> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Thursday, September 1, 2011, 8:49 AM Tony mentioned something that might be an issue for you. Try setting this on the channel: http://wiki.freeswitch.org/wiki/Channel_Variables#record_waste_resources Let us know if that makes a difference. -MC On Thu, Sep 1, 2011 at 2:48 AM, king2kin <xing2kin@yahoo.com> wrote: Hi Anthony, Actually FreeSwitch application "record" doesn't work either for outbound IVR call (see below), created an empty wav file with its size 68 bytes, the wav file doesn't contain any samples of audio data; <action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/> earlier I reported that "session:recordFile(-)" doesn't work inside Lua Script for any outbound IVR call. - My CLI commands to make an outbound IVR call: originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 or originate user/1005 8884 - xml diaplan for extension 8884: { <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/> <action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/> <action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/> <action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> } --- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM
Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I
have tried
recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for
inbound IVR call.
I tried the session:recordFile(-) via Lua
script in three ways:
1. run lua script "test_outcall_ivr.lua" at
freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a
sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir')
.. pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file
session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = session:getVariable('sounds_dir')
.. pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$">
<action application="set" data="record_waste_resources=true"/>
<action application="lua" data="test1.lua"/> </condition> </extension> }
======================================================
For all the above testing cases,
session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)]
during an outbound IVR call?
x.k.
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
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
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
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
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 -----Inline Attachment Follows----- 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
now try this: {record_waste_resources=true,ignore_early_media=true}sofia/gateway/mygateway/1726011 My guess is that the other end of your call does not support asynchronous RTP and since we do not send media while recording its not either. On Thu, Sep 1, 2011 at 4:48 AM, king2kin <xing2kin@yahoo.com> wrote:
Hi Anthony,
Actually FreeSwitch application "record" doesn't work either for outbound IVR call (see below), created an empty wav file with its size 68 bytes, the wav file doesn't contain any samples of audio data;
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
earlier I reported that "session:recordFile(-)" doesn't work inside Lua Script for any outbound IVR call.
- My CLI commands to make an outbound IVR call:
originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 or originate user/1005 8884
- xml diaplan for extension 8884: { <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/>
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
<action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/>
<action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> }
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM, king2kin <xing2kin@yahoo.com> wrote:
Hi folks,
With Lua script and/or originate command, I
have tried
recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for
inbound IVR call.
I tried the session:recordFile(-) via Lua
script in three ways:
1. run lua script "test_outcall_ivr.lua" at
freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and filename of a
sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = sessionx:getVariable('sounds_dir')
.. pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface:
originate user/1005 &transfer(8887 xml default)
originate user/1005 &lua('test1.lua')
originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and filename of a sound file prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file
session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename = session:getVariable('sounds_dir')
.. pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension 8887]: { <extension name="Simple Lua Test"> <condition field="destination_number" expression="^(8887)$">
<action application="set" data="record_waste_resources=true"/>
<action application="lua" data="test1.lua"/>
</condition> </extension> }
======================================================
For all the above testing cases,
session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with [session:recordFile(-)]
during an outbound IVR call?
x.k.
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
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
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
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
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
I tried it again like you advise, but there is no difference. It's really a problem. By the way, my dev system is windows 2003 server, SIP client is X-Lite, and FS versions are GIT 1.0-head-2011-08-31 or GIT 1.0-head-2011-05-23. --- On Thu, 9/1/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Thursday, September 1, 2011, 8:51 AM now try this:
{record_waste_resources=true,ignore_early_media=true}sofia/gateway/mygateway/1726011
My guess is that the other end of your call does not support asynchronous RTP and since we do not send media while recording its not either.
On Thu, Sep 1, 2011 at 4:48 AM, king2kin <xing2kin@yahoo.com> wrote:
Hi Anthony,
Actually FreeSwitch application "record" doesn't work either for outbound IVR call (see below), created an empty wav file with its size 68 bytes, the wav file doesn't contain any samples of audio data;
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
earlier I reported that "session:recordFile(-)" doesn't work inside Lua Script for any outbound IVR call.
- My CLI commands to make an outbound IVR call:
originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 or originate user/1005 8884
- xml diaplan for extension 8884: { <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/>
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
<action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/>
<action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> }
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM,
king2kin <xing2kin@yahoo.com>
wrote:
Hi folks,
With Lua script and/or originate command, I have tried recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty.
However, session:recordFile(-) works well for inbound IVR call.
I tried the session:recordFile(-) via Lua script in three ways:
1. run lua script "test_outcall_ivr.lua" at freeswitch command-line:
luarun test_outcall_ivr.lua
-- [test_outcall_ivr.lua] { local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session)
-- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
-- Answer the call -- sessionx:answer()
--Create a string with path and
filename of a sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt sessionx:streamFile(prompt)
-- Record record file
sessionx:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to
recording
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename =
sessionx:getVariable('sounds_dir') .. pathsep .. "123.wav"
sessionx:recordFile(filename,300,100,10)
-- play back the recorded msg sessionx:streamFile(filename)
-- Hangup sessionx:hangup()
}
2. I also tried it differently by
submitting the following commands at the FreeSwitch command-line interface:
originate user/1005
&transfer(8887 xml default)
originate user/1005
&lua('test1.lua')
originate
sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua')
-- [test1.lua] { -- Set the path separator pathsep = '/'
-- Windows users do this instead: -- pathsep = '\'
--Answer the call session:answer()
--Create a string with path and
filename of a sound file
prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav"
-- Print a log message freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n")
--Play the prompt session:streamFile(prompt)
-- Record record file
session:streamFile("phrase:voicemail_record_message")
-- Play a ""bong"" tone prior to
recording
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)")
-- record a message filename =
session:getVariable('sounds_dir') .. pathsep .. "123.wav"
session:recordFile(filename,300,100,10)
-- play back the recorded msg session:streamFile(filename)
-- Hangup session:hangup() }
-- [xml dialplan for extension
8887]:
{ <extension name="Simple Lua Test">
<condition field="destination_number" expression="^(8887)$">
<action application="set" data="record_waste_resources=true"/>
<action application="lua" data="test1.lua"/>
</condition> </extension> }
======================================================
For all the above testing cases,
session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file.
So, what's wrong with
[session:recordFile(-)] during an outbound IVR call?
x.k.
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
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
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
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
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
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
Did you verify audio is going to the channel with a packet capture as I asked? Most likely you are not getting any media into the channel due to some issue so there is nothing to record. On Thu, Sep 1, 2011 at 12:45 PM, king2kin <xing2kin@yahoo.com> wrote:
I tried it again like you advise, but there is no difference. It's really a problem.
By the way, my dev system is windows 2003 server, SIP client is X-Lite, and FS versions are GIT 1.0-head-2011-08-31 or GIT 1.0-head-2011-05-23.
--- On Thu, 9/1/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Thursday, September 1, 2011, 8:51 AM now try this:
{record_waste_resources=true,ignore_early_media=true}sofia/gateway/mygateway/1726011
My guess is that the other end of your call does not support asynchronous RTP and since we do not send media while recording its not either.
On Thu, Sep 1, 2011 at 4:48 AM, king2kin <xing2kin@yahoo.com> wrote:
Hi Anthony,
Actually FreeSwitch application "record" doesn't work either for outbound IVR call (see below), created an empty wav file with its size 68 bytes, the wav file doesn't contain any samples of audio data;
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
earlier I reported that "session:recordFile(-)" doesn't work inside Lua Script for any outbound IVR call.
- My CLI commands to make an outbound IVR call:
originate {ignore_early_media=true}sofia/gateway/mygateway/1726011 8884 or originate user/1005 8884
- xml diaplan for extension 8884: { <extension name="Play and Record Sound File"> <condition field="destination_number" expression="^(8884)$"> <action application="answer"/> <action application="sleep" data="1000"/> <action application="playback" data="ivr/ivr-thank_you.wav"/>
<action application="record" data="C:/c4dev/freeswitch/Debug/sounds/test.wav 20 200"/>
<action application="sleep" data="1000"/> <action application="playback" data="voicemail/vm-goodbye.wav"/>
<action application="sleep" data="1000"/> <action application="hangup"/> </condition> </extension> }
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 7:46 PM Does the empty file contain silence that corresponds to the duration of the time it's recording? Are you producing the audio yourself into the recording and can you verify with a pcap that there is actually any audio to record?
On Wed, Aug 31, 2011 at 9:21 PM, king2kin <xing2kin@yahoo.com> wrote:
Anthony,
Thank you for help. I tried outbound IVR call in multiple ways again based on your advice, session:recordFile(-) still doesn't work normally, still created empty wav file .
Could anyone please give me a hand on FreeSwitch Record? It always fails to record audio file during any outbound IVR call (auto dialer) although it works well during any inbound ivr call.
Session:streamFile(-) works well to play back prompt files, dtmf keypress also works, ... during outbound ivr call.
x.k.
--- On Wed, 8/31/11, Anthony Minessale <anthony.minessale@gmail.com> wrote:
From: Anthony Minessale <anthony.minessale@gmail.com> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Wednesday, August 31, 2011, 12:17 PM try this dial string instead
{ignore_early_media=true}sofia/gateway/sip.tpad.com/1726011
On Wed, Aug 31, 2011 at 12:52 PM,
king2kin <xing2kin@yahoo.com>
wrote: > Hi folks, > > With Lua script and/or originate command, I have tried recording a message file during outbound IVR call over and over, session:recordFile(-) inside Lua script does create a wav file during each of my testings but the recorded audio file is always empty. > > However, session:recordFile(-) works well for inbound IVR call. > > I tried the session:recordFile(-) via Lua script in three ways: > > 1. run lua script "test_outcall_ivr.lua" at freeswitch command-line: > > luarun test_outcall_ivr.lua > > > -- [test_outcall_ivr.lua] > { > local sessionx =
freeswitch.Session("sofia/gateway/sip.tpad.com/1726011",
session) > > -- Set the path separator > pathsep = '/' > > -- Windows users do this instead: > -- pathsep = '\' > > -- Answer the call > -- sessionx:answer() > > --Create a string with path and filename of a sound file > prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav" > > -- Print a log message > freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n") > > --Play the prompt > sessionx:streamFile(prompt) > > -- Record record file >
sessionx:streamFile("phrase:voicemail_record_message")
> > -- Play a ""bong"" tone prior to recording >
sessionx:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)") > > -- record a message > filename = sessionx:getVariable('sounds_dir') .. pathsep .. "123.wav" > sessionx:recordFile(filename,300,100,10) > > -- play back the recorded msg > sessionx:streamFile(filename) > > -- Hangup > sessionx:hangup() > > } > > 2. I also tried it differently by submitting the following commands at the FreeSwitch command-line interface: > > originate user/1005 &transfer(8887 xml default) > > originate user/1005 &lua('test1.lua') > > originate sofia/gateway/sip.tpad.com/1726011 &lua('test1.lua') > > > -- [test1.lua] > { > -- Set the path separator > pathsep = '/' > > -- Windows users do this instead: > -- pathsep = '\' > > --Answer the call > session:answer() > > --Create a string with path and filename of a sound file > prompt = "ivr" .. pathsep .. "ivr-welcome_to_freeswitch.wav" > > -- Print a log message > freeswitch.consoleLog("INFO","Prompt file is '" .. prompt .. "'\n") > > --Play the prompt > session:streamFile(prompt) > > -- Record record file >
session:streamFile("phrase:voicemail_record_message")
> > -- Play a ""bong"" tone prior to recording >
session:streamFile("tone_stream://v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000,
0, 640)") > > -- record a message > filename = session:getVariable('sounds_dir') .. pathsep .. "123.wav" > session:recordFile(filename,300,100,10) > > -- play back the recorded msg > session:streamFile(filename) > > -- Hangup > session:hangup() > } > > -- [xml dialplan for extension 8887]: > { > <extension name="Simple Lua Test"> > <condition field="destination_number" expression="^(8887)$"> > <action application="set" data="record_waste_resources=true"/> > <action application="lua" data="test1.lua"/> > </condition> > </extension> > } > >
======================================================
> > For all the above testing cases, session:recordFile(-) always creates an empty wav file for each of outbound IVR calls, however, if I make an inbound IVR call to run Lua script "test1.lua", session:recordFile(-) always works perfect to generate a normal wav file. > > So, what's wrong with [session:recordFile(-)] during an outbound IVR call? > > x.k. > > > 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
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
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
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
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
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
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
On Thu, Sep 1, 2011 at 10:57 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Did you verify audio is going to the channel with a packet capture as I asked? Most likely you are not getting any media into the channel due to some issue so there is nothing to record.
FYI, if you're new to the whole packet capture thing then check this out: www.wireshark.org Wireshark for Windows is really easy to use once you get the hang of it. The trick will be learning how to filter out the stuff you don't want to capture. The easiest thing to do there is use an IP address filter and plug in the IP addr of the x-lite phone. Start the capture, make the test call, hangup, then end the capture. Wireshark has some nice analysis tools as well. If you have any questions on how to use it with VoIP captures then google around or come join us in #freeswitch on irc.freenode.net. Thanks, MC
Michael and Anthony, Thank you for your advice. I installed and run the pcap tool 'wireshark' on the win 2003 where FS is running to capture packets during outbound IVR call to SIP client X-Lite (external or internal user); according to pcap packet info, it seems that X-Lite sent audio packets to FS during recording. Now I don't know how to fix this FS recording problem. I post a bug report to http://jira.freeswitch.org/browse/FS-3536 where I also uploaded/attached my pcap result data file. Please go to take a look at the details of the pcap result to see what's problem on FS recording. Thanks again. x.k. --- On Thu, 9/1/11, Michael Collins <msc@freeswitch.org> wrote: From: Michael Collins <msc@freeswitch.org> Subject: Re: [Freeswitch-users] session:recordFile(-) always creates empty wav file during outbound IVR call To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Date: Thursday, September 1, 2011, 4:09 PM On Thu, Sep 1, 2011 at 10:57 AM, Anthony Minessale <anthony.minessale@gmail.com> wrote: Did you verify audio is going to the channel with a packet capture as I asked? Most likely you are not getting any media into the channel due to some issue so there is nothing to record. FYI, if you're new to the whole packet capture thing then check this out: www.wireshark.org Wireshark for Windows is really easy to use once you get the hang of it. The trick will be learning how to filter out the stuff you don't want to capture. The easiest thing to do there is use an IP address filter and plug in the IP addr of the x-lite phone. Start the capture, make the test call, hangup, then end the capture. Wireshark has some nice analysis tools as well. If you have any questions on how to use it with VoIP captures then google around or come join us in #freeswitch on irc.freenode.net. Thanks, MC -----Inline Attachment Follows----- 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 (3)
-
Anthony Minessale
-
king2kin
-
Michael Collins