login | register
Sun 07 of Sep, 2008 [21:24 UTC]

voip-info.org

Discuss [9] History

Asterisk record calls

Created by: oej,Last modification on Wed 15 of Mar, 2006 [21:49 UTC] by duxoft

Recording Calls With Asterisk

Automon for a single call

Asterisk 1.2 now comes with the new "automon" setting in features.conf that permits a user to turn on/off call recording during an active conversation.

Example by Mojo

If you have httpd with php on the * server, you can do what I did:

I set up the key combination *# in features.conf to monitor and created a few php files to interact with the results. Save the four php files at http://horanappraisals.com/asterisk/recordings/ into a folder on the * web server, eg: /var/www/html/recordings/ — rename them all to .php instead of .phps, and edit config.php to point to the asterisk monitor directory (usually /var/spool/asterisk/monitor). Now make a soft link so the recorded waves appear in the web tree:

 ln -s /var/spool/asterisk/monitor /var/www/html/recordings/monitor

Then direct a web browser to http://asterisk_server/recordings/ and it should be pretty self-explanatory. No recordings will appear in the list if you don't have the sox packages installed. And, of course, the w or W options must be specified in the Dial() cmd, as in Asterisk cmd Dial.

Listening on Zap channel calls

You can listen in (you hear them but they don't hear you) on conversations taking place on your Zap Channels, if you have any. See the ZapBarge command.

Monitor Calls with Astguiclient

When you know how to Monitor a call, you have to know what calls are going on in your PBX. This is much more complex than ZapBarge. For this solution I decided to write Astguiclient, a set of server and client programs that can run on a Linux or Win32 desktop.

The server side

A constantly run perl script telnets into the Manager interface of Asterisk and gets the "show channels" output every 333 milliseconds. It then queries a database to see which "phone extension/Zap channel pairs" are not in it already, and inserts them, as well as deleting channels that are no longer active. This way it can scale easily without affecting the Asterisk server at all.

A cron job perl script, running every 5 minutes, takes recorded sound files, merges them with soxmix and copies them to a universal storage location so they can be easily retrieved

The Client side

A perl/TK program pulls the current "live calls" information from the database every second using Net::MySQL and displays them in listboxes (so you can see which person is on which Zap channel). When the person whose phone you have selected is on a phone call, the recording button is enabled and you can start recording. Recording is accomplished by the program telnetting into the Asterisk Manager and sending the Monitor command for the specific channel, and stopping recording is done similarly with the StopMonitor command. You can also originate calls through this interface.

See also



Asterisk | Tips and Tricks


Comments

Comments Filter
222

333Web page not displaying

by vineet_rai, Monday 10 of December, 2007 [13:25:10 UTC]
Hi
I am facing problem when the number of rercording files exceeded 55555 , nothing displayed on the Recording web page. After removing the files from the recording folder web page start diplaying properly.
Is there any limitaion?

222

333Dictation

by zcw100, Thursday 22 of March, 2007 [03:29:23 UTC]
Asterisk can record dictation. See http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Dictate
222

333Channels out of sync on long recordings

by akomakom, Wednesday 28 of February, 2007 [16:06:50 UTC]
I record 1 hour long phone sessions using automon in asterisk-1.2.13, and as you listen to the mixed recording, my (internal) side gets ahead of the remote side of the conversation.. It's kind of funny to hear myself answering questions before they were asked, but it gets annoying. After 1 hour the offset is probably almost 10 seconds.
<br/><br/>
I haven't figured out how to control how and whether the in and out actually get mixed, so I am not sure if there is anything I can do about it.
<br/><br/>
Any ideas, anyone? Has anyone seen this behavior? Could this be a sox problem or would the two original wav files have to be different length for this to happen? How could that happen?
222

333Cannot download recordings

by bwilks, Monday 14 of August, 2006 [01:40:09 UTC]
Hi Mojo,

I love the php based recoding interface it is just what I have been looking for. I am only having one problem with it.
When you try to download, it opens the wav file in the browser and shows all the code on the page instaed of promting where to save it.

looks like this

RIFFd?WAVEfmt @?>data@? ࿀ ࿠?࿀࿀ @@ ࿠? ࿀ ࿀? ࿠? ࿀?`@ ࿠?࿠??@@ @ @ @ ࿀? @ ?࿠? @ @@ ࿠?࿠? @ @ ࿀ ࿀?࿀ ࿠? @@@ ࿠?? @ ࿀ @ ࿀࿠?@@@࿠? `?? ࿠?࿠?`@࿠?? ࿀??@`@ ࿀ @ @@@???? @@@??࿀? @@ ࿠??࿀࿀࿠?࿠? ࿀??@@@ ࿀??࿠?????@࿠? @ ࿠?࿠? @@ @ @ ࿠?࿀? ࿀?```࿠?@@࿀?????@` ࿠? ࿀? ࿀ @``@ ࿠? ??? @࿀??࿠? @ `` ???࿀@`??` @ ࿠?? ?࿀ ????࿀࿀
;
If you try to do a save target as it just saves the dl.htm Could you offer any advice?
;
Thanks
;
BW



222

333soxmix comes in sox package

by mrmoj, Wednesday 04 of January, 2006 [18:17:42 UTC]
at least on my distribution, when I install the sox package, a binary called soxmix gets installed as well. I was referring to the soxmix binary, not the sox package. This is the binary I use to manually mix files. I may be wrong in doing this, but it works great for me. This binary is _not_ identical to the sox binary, but as I'm not sure whether asterisk uses sox or soxmix, I will presume sox can do it as well and that's what you meant ;)
222

333finding if call recording is 'on' for an extension

by sg, Friday 16 of September, 2005 [18:36:27 UTC]
Is there a way to find out if call recording is turned on or not for a particular extension? Also, how long it has been recording, or the time when the call started?
Thanks in advance for your help.
222

333Re: Can asterisk recod dictations?

by dzlabing, Tuesday 24 of May, 2005 [13:19:47 UTC]
use Asterisk cmd Monitor for this purpose
222

333 Can asterisk recod dictations?

by mescueta, Sunday 30 of January, 2005 [23:47:45 UTC]
Can asterisk recod dictations? Just like most dictation software?

222

333soxmix?!

by , Wednesday 29 of September, 2004 [01:09:24 UTC]
Please refer to "sox" as sox, and not "soxmix", which is a misleading and confusing name. No one calls sox "soxmix", sox is the name of the application used to do mixing, and the webpage is called "sox" as well.

Calling something by an incorrect (or perhaps obsolete name) is not helping anyone....

Thanks