voiceip / oreka

OpenSource G711, G722, G729, Opus & Other Format VoIP SIP Recorder
GNU General Public License v3.0
154 stars 80 forks source link

Deploying to Amazon EC2/S3 #43

Closed hasanr68 closed 2 years ago

hasanr68 commented 3 years ago

Hello all,

Unsure where to ask. Want to deploy this with Opensips on an Amazon EC2 server, however, can't seem to find any instructions specific to the setup. Was thinking of saving the audio files on an S3 bucket and oreka to pull from S3 - does that work?

Thanks.

kingster commented 3 years ago

I am not sure if you are looking at the right project. orkaudio is an audio capture plugin that captures audio calls into audio files. orkaudio works with port mirroring/incoming traffic implementation for capturing of traffic. In most production systems DC infrastructure this is done using a spanning port.

So in case you want to store the audio files into an s3 bucket you can mount that s3 as NFS share and mount the same in the machine, and then configure orkaudio to copy the files after the transcoding is completed.

Does this help your use-case? Or are you looking for something else?

hasanr68 commented 3 years ago

Hi there - thanks a lot for taking the time to respond. I came across this project on the Opensips blog, and added the S3 bit. To clarify, we are using Opensips + Rtpproxy. Just want to confirm:

  1. Is it possible to use this project to work on a cloud based setup (AWS)? I was thinking one EC2 instance running opensips+rtpproxy+orkaudio. Another instance running orktrack+orkweb?
  2. We could use S3 to store backups only?

Thanks again.

kingster commented 3 years ago
  1. Is it possible to use this project to work on a cloud based setup (AWS)? I was thinking one EC2 instance running opensips+rtpproxy+orkaudio. Another instance running orktrack+orkweb?

Yes, your deployment topology would work.

Even if you want to move orkaudio to a separate instance AWS Provides VPC Traffic Monitoring which is similar to Spanning Port https://aws.amazon.com/blogs/aws/new-vpc-traffic-mirroring/ and based on the information on their blog this should also work, but this is something that I haven't used personally yet.

  1. We could use S3 to store backups only?

As I mentioned earlier as long as the s3 bucket is mounted as drive/folder/file-system, orkaudio would be able to store the audio files to s3.

hasanr68 commented 3 years ago

Alright - thanks a lot. Our current Opensips installation is on Debian 10. However, I get the following errors when trying to install orkaudio: Depends: liblog4cxx10-dev but it is not installable Depends: libxerces-c3.1 but it is not installable Any workaround please?

kingster commented 3 years ago

It seems that on Debian 10 these package name has changed, and this breaks the installation. Can you try with the docker based installation step from https://github.com/voiceip/oreka/wiki/Installation ?

Alternatively, you can compile the package by following the compilation instructions on Debian 10.

hasanr68 commented 3 years ago

Hi there.

Thanks a lot for the response. We actually went ahead and deployed to a Ubuntu 16.04 server. Installation worked out fine, although we need to see if the recording and retrieval works.

We followed the installation wiki (https://github.com/voiceip/oreka/wiki/Installation), one thing I would like to point out is that it may make sense to add creating a database called "Oreka" once the MySql server is setup.

Will share our findings of making the setup work in "Active" SIPREC mode on AWS also, is there doesn't seem to be a lot of help available online.

kingster commented 3 years ago

one thing I would like to point out is that it may make sense to add creating a database called "Oreka" once the MySql server is setup.

Thanks for pointing this out, have updated the wiki page to add this step.

Let me know how it works out, or incase you face any other issues.

hasanr68 commented 3 years ago

Thanks again. Since we ended up having to work with a fresh Ubuntu EC2 instance our config seems to be different from what we wished to have, so does the following work:

  1. Instance 1 - opensips + rtpproxy only,
  2. Instance 2 - orkaudio + orktrack + orkweb.

We keep getting: DBG:siprec:srec_b2b_notify: received b2b reply with code 408 Any thoughts?

kingster commented 3 years ago

Yes, this topology would also work.

Now there are two ways:

  1. Active recording using SIPREC: This I haven't tried this yet on orkaudio to work yet so can't comment on that part, but based on the blogs/other resources it should also work.
  2. Passive Recording using Mirroring: This would work guaranteed as long as you have the mirror traffic (refer to spanning port comment earlier) coming to orkaudio instance (This is how my production servers run, so this method is prod tested).
hasanr68 commented 3 years ago

Great. Will try the mirroring bit. Did you have to make any changes to rtpproxy startup etc? Thx again.

On Fri, 5 Mar 2021, 18:04 Kinshuk Bairagi, notifications@github.com wrote:

Yes, this topology would also work.

Now there are two ways:

  1. Active recording using SIPREC: This I haven't tried this yet on orkaudio to work yet so can't comment on that part, but based on the blogs/other resources it should also work.
  2. Passive Recording using Mirroring: This would work guaranteed as long as you have the mirror traffic (refer to spanning port comment earlier) coming to orkaudio instance (This is how my production servers run, so this method is prod tested).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/voiceip/oreka/issues/43#issuecomment-791406854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM7SJUM2P5IAZKNZJTVXC5LTCDJFXANCNFSM4YK2EAEQ .

hasanr68 commented 3 years ago

Hi again. We were able to implement the mirroring successfully. However, we don't seem to be getting any recordings. Someone did point out - since our users aren't on the same network (and we are proxying the traffic) we actually do not have visibility of the RTP traffic. Hence no recordings. Are your users on the same network? Did you have to make changes to RTPProxy?

Thanks again for all the help and guidance!

kingster commented 3 years ago

Hi

Assuming that your media traffic is being proxied by rtp proxy and your mirroring config includes rtp proxy, in that case all of your calls would get recorded as the media would get captured by this mirror. However if you have bypass media enabled in your setup such that the endpoints talks to each other directly and doesn't flow through your network, then there is no way to record those calls as media doesn't even reach your network, in such cases you would want to change your design to disable bypass and enable the rtp to flow through your network.

You can do a tcp dump on the mirror interface to see what traffic is passing through your network.

I hope this helps!

kingster commented 3 years ago

@hasanr68 We do now have support for directly Debian 10, so you should be able to co-run the application with your rtpproxy.

hasanr68 commented 3 years ago

Hi @kingster - thanks a lot. Trying to get this done. We are trying to use SIPREC and prolly have to use the liborksipua plugin. However, getting the following error: Failed to load the following plugin: /usr/lib/liborksipua.so

It doesn't seem to be in the /usr/lib folder either.

kingster commented 3 years ago

AFAIK liborksipua.so is part of oreka's commercial offerings and not part of the open-source codebase. In case you want to use it, you will need to purchase the same from them.

Though IMHO your use-case could be sufficiently handled by the standard plugin which can capture all the sip+rtp that is passing through the rtpproxy server.

kingster commented 2 years ago

Hi @hasanr68

orkaudio now natively supports the AWS Traffic Mirror via #101 , so you should be able to deploy the recorder on aws on a separate box.

Please have a look at the supported deployment strategies https://github.com/voiceip/oreka/wiki/Deployment