Sounds like what I wanted to do as well. but someone would have to implement the sip info stuff for it as well, as in start recording and stop recording a start recording shall reinvite to a freeswitch extension that does the recording while bridging the call through freeswitch, a stop recording should reinvite back to sipX.
Am 14.10.2010 um 13:52 schrieb Nikolay Kondratyev: > Hi all, > acording to my investigations in the tracker, call recording feature is > delayed for indefinite time. > Call recording function is highly anticipated. > Meanwhile FS gives a toolkit to record voice. > > So i tried to do something myself. > > My main idea is to route a call, that is to be recorded, through a separate > FS profile/dialplan. > The idea is based on > http://wiki.sipfoundry.org/display/xecsuserV4r2/Custom+FreeSWITCH+programming > > The main problem is: what is the creteria and how to route to that special FS > profile and then route the call back to the subscriber? > > At the moment i found a partial solution (or a draft for a partial solution), > i.e. how to record all _incoming_ calls for a specific subscriber. > > Here is a test configuration, that works (that is all calls to specific user > are recorded in a wav file) for me: > > My sip domain is sip.nstel.ru, sipx hosthame is beaver.sip.nstel.ru > Ok, i created separate sofia profile, listening on port 15085. > For the 3800 user (i used this extension for testing, ) i set call forwarding > with the following destination: [email protected]. > sipxconfig does not allow to specify port in call forward destination, so i > had to create dns srv records for _sip._udp.record.sip.nstel.ru, > pointing to the same host, but port 15085, where recording FS profile is > listening. > I route the call back to > [email protected];sipx-noroute=VoiceMail;sipx-userforward=false. Thus > avoiding routing loop. > Here is the FS dialplan for it: > > <extension name="record_call"> > <condition field="destination_number" expression="^(3\d{3})$"> > <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) 1980 Factory > Records, Inc."/> > <action application="set" data="RECORD_SOFTWARE=FreeSwitch"/> > <action application="set" data="RECORD_ARTIST=Ian Curtis"/> > <action application="set" data="RECORD_COMMENT=Love will tear us > apart"/> > <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d > %H:%M)}"/> > <action application="set" data="RECORD_STEREO=true"/> > <action application="record_session" > data="/var/sipxdata/mediaserver/data/recorder/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/> > <action application="set" data="ringback=${us-ring}"/> any reason you change the ringback tone just for this extension ? > <action application="answer"/> > <action application="sleep" data="300"/> > <action application="bridge" > data="sofia/recorder/[email protected];sipx-noroute=VoiceMail;sipx-userforward=false"/> > </condition> > </extension> > Please find attached xml trace of a recorded call. > > So... a kind of recording works and looks to be acceptable for at list > further testing. > > I see two shortcomings in my method: > > 1. When the call is forwarded, it is not diverted, it is forked. That is > sipxproxy sends invite to both 3800's phone and "recorder". > Then when "FS recorder" answers a call, sipxproxy cancels "frame 31 invite" > branch (see attached xml). This canceled branch is excessive. > So the question: Is there a way to get rid of invite in frame 31? In other > words, is it possible to divert a call instead of forking it? > > 2. Looking at frame 57, i see that spesial creadentials (~~id~media) are used > by "FS recorder" to pass through "407 proxy authentication required. > This user is configured in > /etc/sipxpbx/freeswitch/conf/sip_profiles/sipX_profile.xml file. It is > configured for a different profile, listening on another port. > I don't understand why this user is used by "recorder" profile. > I think that after some careful FS configuration this can be overcomed, > though i don't think, this is the first problem in the queue. Could you pastebin a copy of the profile ? > > Next step: storing voice recordings in plain wav files will not be very > convinient. It'll be difficult to find required file after a couple of > months.... > So next step could be: create separate postgres database, and store recording > there... i guess this should be possible via mod_perl. > And then create a php driven web page for accessing those records. why ? use a lua script to create a database table to keep an index of the files with all the required data and add an entry to the private sipxconfig part where you can see redordnigs and manage them. mod_perl is all but threadsafe and a massive animal while lua is micro small and fast. Also storing soundfiles in a database is not really a good idea ... > > Some questions to the community to summarize my efforts: > 1. How do you find the idea? Do you think it can suite for a production > system? > 2. Can you foresee any problems? > 3. Is it possible to divert a call instead of forking? reinvite > 4. I did not managed to solve "route outgoing call from a specific user > through a recorder" task. The problem is that, user should dial the same > number, as usually. Any ideas? SNOM Phones implement a start/stop recording key which sends that info via SIP INFO I think you can program poly's to do the same, not sure about other phones. > > Thanks and regards, > NIkolay. > > > > > > > > > > > > > > <3800rec-filtered.xml>_______________________________________________ > sipx-users mailing list > [email protected] > List Archive: http://list.sipfoundry.org/archive/sipx-users/ Michal Bielicki Geschäftsführer / CEO Seventh Signal Ltd. & Co. KG Meiereifeld 2A 14532 Kleinmachnow Büro Berlin: Weigandufer 45, Büro 115 12059 Berlin Amtsgericht Potsdam HRA 4866 P, Ust.-ID: DE266981999 Geschäftsführer: Michal Bielicki Persönlich Haftende Gesellschafterin: Seventh Signal Ltd, 69 Great Hampton St. Birmingham, B18 6EW, GB, Company Nr.: 06889439 WWW.: http://www.seventhsignal.de
_______________________________________________ sipx-users mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-users/
