[Freeswitch-users] Recording calls with a beep

Yuriy Nasida nasida at live.ru
Mon Oct 29 15:12:29 MSK 2012


I can be wrong but most likely it is possible via event_socket only. So you have to listen events on FS from some script and when the call is  bridged,  the script must playback the beep to both legs.

From: rstevens at robcoit.com
Date: Mon, 29 Oct 2012 00:03:51 -0400
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] Recording calls with a beep

Hi All,



I have been searching the wiki for a good way to insert a beep every 10 seconds into a call that is being recorded (I plan on recording all calls to Comcast from here on out).  This is my dialplan:

<extension name="CallCentric.18002662278" >
  <condition field="destination_number" expression="18002662278" >
      <action application="set" data="sip_h_X-accountcode=${accountcode}" />
      <action application="set" data="sip_h_X-Tag=" />
      <action application="set" data="call_direction=outbound" />
      <action application="set" data="hangup_after_bridge=true" />
      <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}" />
      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}" />
      <action application="set" data="inherit_codec=true" />
      <action application="set" data="RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}" />
      <action application="set" data="RECORD_COPYRIGHT=(c) 2012" />
      <action application="set" data="RECORD_ARTIST=FreeSwitch" />
      <action application="set" data="RECORD_COMMENT=FreeSwitch" />
      <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}" />
      <action application="set" data="RECORD_STEREO=true" />
      <action application="displace_session" data="tone_stream://%(100,15000,800);loops=-1" />
      <action application="record_session" data="$${base_dir}/recordings/archive/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav" />
      <action application="bridge" data="sofia/gateway/CallCentric/18002662278" />

  </condition>
</extension>

I would also like to playback a tone so they know I'm recording them (for legal reasons).  Per the wiki, the displace_session does indeed play back a tone every 15 seconds.  But I'm afraid it never bridges the call..  It's probably something stupid, but what am I doing wrong here?  I hear the intial beep after dialing the number but no early media with dead air on the line.  What is the best way to insert a tone every x seconds while both legs of the call are in progress and so that each party hears the tone?


Also, when testing this without tone_stream, the recording works (horaah) but the recording itself is really ssssssssllllooowwwwww.  I am still working on that one, its probably in the wiki, i'm looking now, but if anyone has a suggestion let me know.



Best regards,
Robert Stevens
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.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 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121029/043cbbf7/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list