[Freeswitch-users] recording into perl script

Nikolay Kondratyev kond at nstel.ru
Wed Oct 20 07:01:22 PDT 2010


Hi all,
Currently i can record a call via 
<action application="record_session" data="$${base_dir}/recordings/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>
But in this way i can only record to a file.
I have some experience with perl and mysql.
I'd like to record a call into database (mysql or postgre). 
I hope it's possible via mod_perl... is it? 
If yes, how can i pass voice into perl script?
 
I guess that i can just do the following
<action application="record_session" data="$${base_dir}/recordings/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>
<action application="perl" data="recorder.pl $${base_dir}/recordings/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav" />
So that my perl script recorder.pl will get recorded file name as it's first argument.
But when my script starts, will the recording allready be finished?
 
In this way (if it will work at all) i will first record a call in a file, and then put this file into database.
Is there a way to write directly into database? 
Something like <action application="record_session" data=" |recorder.pl" /> ?


Thanks in advance,
Nikolay.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101020/0f1d50c6/attachment.html 


More information about the FreeSWITCH-users mailing list