[OpenSIPS-Users] MediaProxy - db user and privileges

Dan Pascu dan at ag-projects.com
Fri Jul 18 14:43:44 CEST 2014


On 17 Jul 2014, at 18:27, Gary Patton <gpatton.public at outlook.com> wrote:

> Good morning everyone.  Back to learning OpenSIPS 1.11.1 + MediaProxy 2.6.1 integration.  As a student, I tend to read installation instructions before attempting the actual installation and I have questions.
> 
> The MediaProxy config.ini file has a database section.  The installation docs don't mention installing a database as a prerequisite before installing MediaProxy.

Because it’s not a prerequisite. Database accounting is optional. If you don’t define the dburi it will not do accounting for the media.

>  Also, the example dburi= references a MySQL server, so I assume I can specify the IP address of MySQL server running on my separate OpenSIPS box and use that instance of MySQL.

The most common use case is to specify the same database opensips is using for accounting and even use the same username/password as opensips uses (in case you don’t feel like creating a new user specifically for mediaproxy).
The only requirement is that the user has to have the CREATE and ALTER privileges on the database. 

> 
> Also, the example dburi= parameter specifies a user ("mediaproxy"), a "CHANGEME" placeholder for the user's password when the user acceses the db, and a MySQL db name ("mediaproxy”).

They are just example. If you use the same database as opensips, then the database is most likely opensips.

> 
> So, my questions:
> 
> (1) It appears that the MediaProxy config.ini file will create the table "media_session" in the "mediaproxy" database.  Because I don't see anything in the config.ini file that appears to create the "mediaproxy" MySQL db, I must first manually create the "mediaproxy" MySQL db on the OpenSIPS box, correct? 

No. It’s automatically created the first time mediaproxy is run (the dispatcher more precisely). If it can’t do it (because you provided a user without enough privileges) it will log that it could not do it and print the instructions you need to paste into a mysql client to create the table yourself.

> 
> (2) And also create the "mediaproxy" user with all privileges against the "mediaproxy" database?

or use the opensips database and the opensips user

> 
> (3) Or, will executing the DEB repository command "apt-get install mediaproxy_dispatcher mediaproxy_common" on the OpenSIPS server (the MediaProxy dispatcher) automatically create the required mediaproxy database/user/table?

No. Table is create the first time the dispatcher is run (actually every time the dispatcher runs will recreate it if it’s missing)

> 
> () Should I also grant the "opensips" user all privileges against the "mediaproxy" database?

it needs at cleat CREATE and ALTER

> =====
> 
> I looked over documentation on the ag-project.com site.  There on the 1st page of the installation guide was this:
> 
> "MediaProxy must run natively on the host operating system and not in a virtual environment."
> 
> Because I'm a student and don't have a spare server (or PC), I had planned on signing up for the free server from Amazon's AWS Free Usage Tier and installing MediaProxy on it.  I expected horrible performance, but I thought it would at least work so I could see how NAT transversal worked in OpenSIPS.

For testing you can run it on whatever you want. the recommendation is for production systems that need not be affected by the less precise timing of virtual machines.

> 
> So, as far as you know, MediaProxy *must* be installed on a physical server?

No, but if you want the best performance out of it it is recommended.

>  Especially since the config.ini file mentions something about the relay being being NAT but is mapped to a public IP address like in Amazon EC2.
> 
> Or can it be installed on a virtual machine but it will have really bad performance?  (I wonder if it's the same for VMware / Rackspace / Azure / . . ."  I can accept poor performance - especially with the free AWS server - as long as it still works!
> 
> Thanks to everyone for their patience and for helping me trying to understand how OpenSIPS and MediaProxy interact!
> 
> Regards,
> 
> Gary
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list