[Freeswitch-users] Call recording

Giovanni Maruzzelli gmaruzz at gmail.com
Thu Jun 15 09:19:09 UTC 2017


On 15 June 2017 at 09:49, Sven Uszpelkat <USZPELSV at comunycarse.com> wrote:

> Hello,
>
>
>
> We are using FreeSWITCH as a third-party recording application, i.e. we
> are receiving SIP calls with the complete audio of conversations taking
> place on another switch and we are saving this audio to a file. To achieve
> this we are using a simple script similar to this:
>
>
>
> session:answer()
>
> while(session:ready() == true) do
>
>    test = session:recordFile("/usr/local/freeswitch/recordings/test.wav",
> 18000, 0, 300)
>
>    session:setAutoHangup(false)
>
>    session:hangup()
>
> end
>
>
>
> This script will be invoked by the following dialplan:
>
>
>
> <extension name="Recording">
>
>       <condition field="destination_number" expression=".*">
>
>             <action application="lua" data="record.lua"/>
>
>       </condition>
>
> </extension>
>
>
>
> Basically it seems to work quite well, but sometimes there are missing
> audio at the end of the recorded file.  Usually it’s only a few seconds,
> but sometimes it seems to be more. (It’s like the recording sometimes goes
> behind the real call and when the hangup event is received the remaining
> audio is discarded.)
>
>
>
> What could be the reason for this behavior? Is there something wrong with
> the script or is there a better way to achieve our goal?
>

One first question come to my mind: why do you use a script here? A simple
extension can do exactly the same, if you just want to record the session...

https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+record_session

Anyway, if you want to use the script, why you first

session:setAutoHangup(false)

and after that you


session:hangup()


?

Also, you made the silence_threshold equal 0 (zero).
Have you has the same problems using a silence_threshold of, let's say, 30
(thirty), like in documentation? (
https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:recordFile
)

Hope this helps,

-giovanni



>
>
> Many thanks in advance.
>
>
>
> Best regards,
>
>
>
> Sven Uszpelkat
> Departamento I+D
> Comunycarse Network Consultants, S.L.
>
>
>
>
>
> [image: Descripción: Descripción:
> http://www.comunycarse.com/email_images/facebook_16.jpg]
> <http://www.facebook.com/pages/Comunycarse/227218309114> [image:
> Descripción: Descripción:
> http://www.comunycarse.com/email_images/linkedin_16.jpg]
> <http://www.linkedin.com/company/comunycarse-s.l.> [image: Descripción:
> Descripción: http://www.comunycarse.com/email_images/twitter_16.jpg]
> <https://twitter.com/#%21/comunycarse> [image: Descripción: Descripción:
> http://www.comunycarse.com/email_images/wordpress_16.jpg]
> <http://www.blog.comunycarse.com/>
>
> Joaquín Turina, 2
> 28224 Pozuelo de Alarcón MADRID
> Tlf. +34 917 498 700 <+34%20917%2049%2087%2000>
> Fax +34 917 498 720 <+34%20917%2049%2087%2020>
>
> Sabino Arana, 18
> 08028 BARCELONA
> Tlf. +34 934 098 480 <+34%20934%2009%2084%2080>
> Fax +34 934 098 490 <+34%20934%2009%2084%2090>
>
> http://www.comunycarse.com
>
>
> AVISO LEGAL
> La presente comunicación y sus anexos tiene como destinatario la persona a
> la que va dirigida, por lo que si usted lo recibe por error debe
> notificarlo al remitente y eliminarlo de su sistema, no pudiendo
> utilizarlo, total o parcialmente, para ningún fin. Su contenido puede tener
> información confidencial o protegida legalmente y únicamente expresa la
> opinión del remitente. El uso del correo electrónico vía internet no
> permite asegurar ni la confidencialidad de los mensajes ni su correcta
> recepción. En el caso de que el destinatario no consintiera la utilización
> del correo electrónico deberá ponerlo en nuestro conocimiento
> inmediatamente.
>
> DISCLAIMER
> This message and its attachments are intended exclusively for the named
> addressee. If you receive this message by mistake, please delete it
> immediately from your system and notify the sender. You may not use this
> message or any part of it for any purpose. The message may contain
> information that is confidential or protected by law, and any opinions
> expressed are those of the individual sender. Internet email guarantees
> neither the confidentiality nor the proper receipt of the message sent. If
> the addressee of this message does not consent to the use of internet
> e-mail, please inform us immediately.
>
>
>
> _________________________________________________________________________
> 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
>



-- 

Sincerely,

Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170615/c38154d1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1630 bytes
Desc: not available
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170615/c38154d1/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 1402 bytes
Desc: not available
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170615/c38154d1/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 1694 bytes
Desc: not available
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170615/c38154d1/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 1628 bytes
Desc: not available
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170615/c38154d1/attachment-0007.jpg>


More information about the FreeSWITCH-users mailing list