Featured image of post Call recording Asterisk

Call recording Asterisk

I was experimenting with Asterisk IP/PBX, which I have explained how to deploy recently. It was a bit tough after few years of not touching it, but eventually I did it. One of the major feature you need to have, running heavy loaded call-center, is call recording. And fortunately there is embedded feature in this soft switch called MixMonitor. Well, there are few limitations, but using Linux and 3d party we can easily get rid of them (i.e. I want mp3 format for all my recordings instead of GSM or others).

In case of private cloud Asterisk deployment you probably never meet storage free space issue as you can allocate your bottomless NAS or old Server with dozen pair of JBOD, but in my certain case we have tiny VPS instance (EC2 T2-Micro) with Debian 8.x on board and the overall available space on it 20 GB general purpose disk. Well this is fine if you don’t have other data on it, but it shares with CRM and other staff. And this 20 Gig can be extended, but as this is SSD, we don’t really need this. Instead we can go ahead and involve AWS S3 object storage into that schema and use S3 or even further Glacier for call recordings archival (if we’ll have such retention).

So the overall idea is to have the following combination of three: VPS, AWS, users!

Schema

  • «deb_astrsk» is my Debian box on top of virtual machine in my VPS. It has asterisk 13 and s3fs for mounting S3 buckets enabled.
  • «aws_s3» is AWS with few created buckets and IAM policies configured for s3fs integration.
  • «u1» and «u2» are two sample users (really basic level of computer science knowledge, what requires super super simple and very very straightforward those recording files management: listen, copy, delete).

Well the first two steps are not that hard, but the last is going to be cumbersome.. without 3d party.

Create S3 bucket

We go AWS console and create our bucket.

Create new AWS S3 bucket

Mount AWS S3 bucket to your Linux

This part is going to be skipped due to recently written article here. Just need to member the path (i.e. /mnt/asterisk/), so this is the folder we are going to store our call files.

Mount AWS S3 bucket to your Windows

One of the really easiest way to do so is to use Cloudberry Drive. It is east to install and configure, it just works and it allows me to change my mount type between removable drive or network share (the second one is great to have as I can make it available across my corporate network for everyone whom it may concern).

When you did mount your AWS S3 bucket to Linux you used Access and Secret key pair. We need this info again for the Drive to mount to one of our Windows letter. I am going to skip configuration as it super simple. Here are few picture I’d like to highlight here:

Map Cloudberrylab Drive Cloudberry drive API calls counter Mapped S3 drive as windows disk

Also it is cool to know, that Cloudberry drive supports over 50 public storages, thus the missing thing here is to figure out how to work S3 compatible or other storage from Linux.

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy