Hello,
There is a new MediaProxy release available.
To upgrade go to http://mediaproxy.ag-projects.com or download the software directly from:
http://mediaproxy.ag-projects.com/mediaproxy-1.8.2.tar.gz
Changes from version 1.8.1 to 1.8.2 -----------------------------------
- Added support to setup sessions by either caller or called as the initial INVITE may not contain a SDP body (Jeff Williams jeffw@globaldial.com) - Added support to update the RTP stream sign-in addresses after re- INVITES (Jeff Williams jeffw@globaldial.com)
Changes from version 1.8.0 to 1.8.1 -----------------------------------
- Added User-Name attribute to the radius accounting Update request (freeradius needs it to be able to proxy the request)
This release includes new functionality. Your feedback is appreciated, if you wish to provide it please reply to the mailing lists.
Kind regards, Adrian Georgescu
Adrian Georgescu wrote:
This release includes new functionality. Your feedback is appreciated, if you wish to provide it please reply to the mailing lists.
Why is the MySQL accounting still commented out in the accounting.py module? How does one really make MySQL accounting work?
I have followed the INSTALL file exactly, including having the proper python mysql library, but the mysql code is commented out and is not documented in this file.
If I uncomment the mysql code in accounting.py and comment out the whole class RadiusAccounting(RadiusClient), I do get a connection to the mysql database but absolutely no attempt to insert a record ever occurs.
strace shows no attempt to call either the accounting.py or mysql.py when a call tears down.
proxy-2:/usr/local/mediaproxy-1.8.2# ./mediaproxy.py --no-fork Listening for commands on local socket `/var/run/mediaproxy.sock' Listening for remote commands is disabled Using IP address `[proxy-2]' for the RTP/RTCP proxy request d5a93a7e-41cf60d3@10.10.5.201 10.10.5.201:21870:audio [remote ip] proxy-2 remote [remote ip] remote Sipura/SPA942-4.1.10(e) info=from:spa941@proxy-2,to:12487249999@proxy-2,fromtag:8468d68222e2049fo0,totag: session d5a93a7e-41cf60d3@10.10.5.201: started. listening on [proxy-2]:60000 execution time: 3.15 ms lookup d5a93a7e-41cf60d3@10.10.5.201 [provider audio]:50878:audio [provider ip] proxy-2 remote proxy-2 unknown DC-SIP/1.2 info=from:spa941@proxy-2,to:12487249999@proxy-2,fromtag:8468d68222e2049fo0,totag:SDa22ff99-1a7f005a-0-1757497768 execution time: 0.44 ms session d5a93a7e-41cf60d3@10.10.5.201: called signed in from [provider ip]:50878 (RTP) (will return to [provider ip]:50878) session d5a93a7e-41cf60d3@10.10.5.201: caller signed in from [remote ip]:21870 (RTP) (will return to [remote ip]:21870) session d5a93a7e-41cf60d3@10.10.5.201: called signed in from [provider ip]:50879 (RTCP) (will return to [provider ip]:50879) delete d5a93a7e-41cf60d3@10.10.5.201 info= session d5a93a7e-41cf60d3@10.10.5.201: 697/703/1393 packets, 195160/196348/390040 bytes (caller/called/relayed) session d5a93a7e-41cf60d3@10.10.5.201: ended. execution time: 0.54 ms
I am not the only person to report this, so I don't want to hear that it is operator error or is documented somewhere, because it is not.
Jeremy McNamara
Jeremy,
Both mysql and radius accounting are enabled through configuration. You do not have to change any line of code to make the accounting working. I hope other people on the list can provide you with some help with configuration for your operating system, python and mysql client version.
Regards, Adrian
On Feb 24, 2007, at 4:55 PM, Jeremy McNamara wrote:
Adrian Georgescu wrote:
This release includes new functionality. Your feedback is appreciated, if you wish to provide it please reply to the mailing lists.
Why is the MySQL accounting still commented out in the accounting.py module? How does one really make MySQL accounting work?
I have followed the INSTALL file exactly, including having the proper python mysql library, but the mysql code is commented out and is not documented in this file.
If I uncomment the mysql code in accounting.py and comment out the whole class RadiusAccounting(RadiusClient), I do get a connection to the mysql database but absolutely no attempt to insert a record ever occurs.
strace shows no attempt to call either the accounting.py or mysql.py when a call tears down.
proxy-2:/usr/local/mediaproxy-1.8.2# ./mediaproxy.py --no-fork Listening for commands on local socket `/var/run/mediaproxy.sock' Listening for remote commands is disabled Using IP address `[proxy-2]' for the RTP/RTCP proxy request d5a93a7e-41cf60d3@10.10.5.201 10.10.5.201:21870:audio [remote ip] proxy-2 remote [remote ip] remote Sipura/SPA942-4.1.10 (e) info=from:spa941@proxy-2,to:12487249999@proxy-2,fromtag: 8468d68222e2049fo0,totag: session d5a93a7e-41cf60d3@10.10.5.201: started. listening on [proxy-2]:60000 execution time: 3.15 ms lookup d5a93a7e-41cf60d3@10.10.5.201 [provider audio]:50878:audio [provider ip] proxy-2 remote proxy-2 unknown DC-SIP/1.2 info=from:spa941@proxy-2,to:12487249999@proxy-2,fromtag: 8468d68222e2049fo0,totag:SDa22ff99-1a7f005a-0-1757497768 execution time: 0.44 ms session d5a93a7e-41cf60d3@10.10.5.201: called signed in from [provider ip]:50878 (RTP) (will return to [provider ip]:50878) session d5a93a7e-41cf60d3@10.10.5.201: caller signed in from [remote ip]:21870 (RTP) (will return to [remote ip]:21870) session d5a93a7e-41cf60d3@10.10.5.201: called signed in from [provider ip]:50879 (RTCP) (will return to [provider ip]:50879) delete d5a93a7e-41cf60d3@10.10.5.201 info= session d5a93a7e-41cf60d3@10.10.5.201: 697/703/1393 packets, 195160/196348/390040 bytes (caller/called/relayed) session d5a93a7e-41cf60d3@10.10.5.201: ended. execution time: 0.54 ms
I am not the only person to report this, so I don't want to hear that it is operator error or is documented somewhere, because it is not.
Jeremy McNamara
Adrian Georgescu wrote:
Jeremy,
Both mysql and radius accounting are enabled through configuration. You do not have to change any line of code to make the accounting working. I hope other people on the list can provide you with some help with configuration for your operating system, python and mysql client version.
Totally W R O N G!
Let me detail code directly from the v1.8.2 tarball:
## We use this to overwrite some of the settings above on a local basis if needed readSettings('Accounting', AccountingConfig) readSettings('Database', DatabaseConfig)
#try: # from mysql import * #except ImportError: # if AccountingConfig.accounting == 'database': # error("The MySQLdb module which is required to do accounting is missing") # raise #try: # from radius import * #except ImportError: # if AccountingConfig.accounting == 'radius': # error("The pyrad module which is required to do accounting is missing") # raise
ModulesPath = os.path.realpath((os.path.dirname(__file__) or '.')) ProgramName = os.path.splitext(os.path.basename(sys.argv[0] or 'python'))[0]
I am by no means a python expert but it seems # is a comment character.
Someone please enlighten me how commented code can be turned back on via configuration. I am dying to know - Seriously.
Jeremy McNamara
Dear Jeremy,
You are looking in the wrong place for clues why your setup isn't working and make wrong assumptions that confuse people on the mailing lists.
The mysql and radius accounting are enabled in modules/accounting.py at lines 17 and 18
from radius import * from mysql import *
Regards, Adrian
On Feb 24, 2007, at 5:31 PM, Jeremy McNamara wrote:
Adrian Georgescu wrote:
Jeremy, Both mysql and radius accounting are enabled through configuration. You do not have to change any line of code to make the accounting working. I hope other people on the list can provide you with some help with configuration for your operating system, python and mysql client version.
Totally W R O N G!
Let me detail code directly from the v1.8.2 tarball:
## We use this to overwrite some of the settings above on a local basis if needed readSettings('Accounting', AccountingConfig) readSettings('Database', DatabaseConfig)
#try: # from mysql import * #except ImportError: # if AccountingConfig.accounting == 'database': # error("The MySQLdb module which is required to do accounting is missing") # raise #try: # from radius import * #except ImportError: # if AccountingConfig.accounting == 'radius': # error("The pyrad module which is required to do accounting is missing") # raise
ModulesPath = os.path.realpath((os.path.dirname(__file__) or '.')) ProgramName = os.path.splitext(os.path.basename(sys.argv[0] or 'python'))[0]
I am by no means a python expert but it seems # is a comment character.
Someone please enlighten me how commented code can be turned back on via configuration. I am dying to know - Seriously.
Jeremy McNamara
Adrian Georgescu wrote:
Dear Jeremy,
You are looking in the wrong place for clues why your setup isn't working and make wrong assumptions that confuse people on the mailing lists.
If this is the case, why are you not forthcoming with details? Did you not write this code?
I have obviously done everything as the documentation states, including having the proper mysql python crap installed - I even tested it and it works as expected.
Here is my mediaproxy.ini:
[Dispatcher] start = yes group = staff socket = /var/run/proxydispatcher.sock defaultProxy = /var/run/mediaproxy.sock
[MediaProxy] start = yes socket = /var/run/mediaproxy.sock group = openser allow = None proxyIP = [the ip] portRange = 60000:65000 TOS = 0xb8 idleTimeout = 60 holdTimeout = 3600 forceClose = 0
[Accounting] accounting = database
[Database] user = valid_user password = valid_pass host = localhost database = openser table = radacct
The mysql and radius accounting are enabled in modules/accounting.py at lines 17 and 18
from radius import * from mysql import *
As a test, if I provide invalid user/password information in the [Database] section of mediaproxy.ini and start mediaproxy from the tarball, I get absolutely no complaints that it could not login to mysql - I get:
warning: accounting is enabled but the accounting module is missing. accounting is not available!
However, the very INSTANT I uncomment the code starting at line 45 in accounting.py and start mediaproxy with the invalid login/password, I get a complaint stating the login to MySQL failed.
fatal: cannot connect to the MySQL server: Access denied for user 'ser'@'localhost' (using password: YES) fatal: cannot continue. Exiting.
It is very obvious that the try block starting on line 45 in accounting.py is very much required, yet it is commented out.
How do you explain that?
Care to retract your obviously false statement?
Jeremy McNamara
Adrian Georgescu wrote:
Jeremy,
Both mysql and radius accounting are enabled through configuration. You do not have to change any line of code to make the accounting working. I hope other people on the list can provide you with some help with configuration for your operating system, python and mysql client version.
Wait a minute - You / Your company wrote mediaproxy.
Why are you directing questions to the community? This is your code. You know the answer and reason why vital code is commented out.
Something stinks very much bad here.
Jeremy McNamara
P.S. I also don't want to hear about paid support. I tried to pay for support but you ignored my private requests.
Hi Adrian, Jeremy
I have also found that I have to uncomment the lines in the file accounting.py since 1.8.0 for radius or mysql accounting to work correctly.
Mike
Adrian Georgescu wrote:
Jeremy,
Both mysql and radius accounting are enabled through configuration. You do not have to change any line of code to make the accounting working. I hope other people on the list can provide you with some help with configuration for your operating system, python and mysql client version.
Regards, Adrian
On Feb 24, 2007, at 4:55 PM, Jeremy McNamara wrote:
Adrian Georgescu wrote:
This release includes new functionality. Your feedback is appreciated, if you wish to provide it please reply to the mailing lists.
Why is the MySQL accounting still commented out in the accounting.py module? How does one really make MySQL accounting work?
I have followed the INSTALL file exactly, including having the proper python mysql library, but the mysql code is commented out and is not documented in this file.
If I uncomment the mysql code in accounting.py and comment out the whole class RadiusAccounting(RadiusClient), I do get a connection to the mysql database but absolutely no attempt to insert a record ever occurs.
strace shows no attempt to call either the accounting.py or mysql.py when a call tears down.
proxy-2:/usr/local/mediaproxy-1.8.2# ./mediaproxy.py --no-fork Listening for commands on local socket `/var/run/mediaproxy.sock' Listening for remote commands is disabled Using IP address `[proxy-2]' for the RTP/RTCP proxy request d5a93a7e-41cf60d3@10.10.5.201 10.10.5.201:21870:audio [remote ip] proxy-2 remote [remote ip] remote Sipura/SPA942-4.1.10(e) info=from:spa941@proxy-2,to:12487249999@proxy-2,fromtag:8468d68222e2049fo0,totag:
session d5a93a7e-41cf60d3@10.10.5.201: started. listening on [proxy-2]:60000 execution time: 3.15 ms lookup d5a93a7e-41cf60d3@10.10.5.201 [provider audio]:50878:audio [provider ip] proxy-2 remote proxy-2 unknown DC-SIP/1.2 info=from:spa941@proxy-2,to:12487249999@proxy-2,fromtag:8468d68222e2049fo0,totag:SDa22ff99-1a7f005a-0-1757497768
execution time: 0.44 ms session d5a93a7e-41cf60d3@10.10.5.201: called signed in from [provider ip]:50878 (RTP) (will return to [provider ip]:50878) session d5a93a7e-41cf60d3@10.10.5.201: caller signed in from [remote ip]:21870 (RTP) (will return to [remote ip]:21870) session d5a93a7e-41cf60d3@10.10.5.201: called signed in from [provider ip]:50879 (RTCP) (will return to [provider ip]:50879) delete d5a93a7e-41cf60d3@10.10.5.201 info= session d5a93a7e-41cf60d3@10.10.5.201: 697/703/1393 packets, 195160/196348/390040 bytes (caller/called/relayed) session d5a93a7e-41cf60d3@10.10.5.201: ended. execution time: 0.54 ms
I am not the only person to report this, so I don't want to hear that it is operator error or is documented somewhere, because it is not.
Jeremy McNamara
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Mike O'Connor wrote:
Hi Adrian, Jeremy
I have also found that I have to uncomment the lines in the file accounting.py since 1.8.0 for radius or mysql accounting to work correctly.
Do you have any suggestions for me as to why I never see any records in MySQL?
MediaProxy is connected to MySQL but when the call tares down nothing happens.
It is rather shady that Adrian Georgescu and AG Projects refuse to support their code - even after I offered to pay them.
I am obviously not missing anything in the configuration since I do get a persistent connection to the database.
Jeremy McNamara