Hello Dan and hello everybody! OpenSER & Freeradius & CDRTool are perfectly working together now!
I just don't understand one thing. Tickets are made but don't decrease the prepaid acounts...
For example, when 101@sd-7501.dedibox.fr is calling, here is the Rating information, but is prepaid account don't goes down...
Any idea?
Signalling information Session: 1973928040@192.168.95.118 Start time: 2007-08-20 11:17:32 Europe/Paris Stop time: 2007-08-20 11:19:51 Europe/Paris Method: INVITE from : From: Dialed URI: Canonical URI: 0033677832974@sd-7501.dedibox.fr Next hop URI: Destination: France - Portable (336) Billing Party: sip:101@sd-7501.dedibox.fr Rating information App: audio Destination: 336 (France - Portable) Customer: domain=sd-7501.dedibox.fr Connect fee: 0.2346 -- Span: 1 Duration: 139 s StartTime: 2007-08-20 11:17:32 (Europe/Paris) ProfileId: 1 for weekday RateId: 10 for 0-24h Rate: 0.5634 / 60 s Price: 1.3052
But, when I do a DebitBalance From=sip:101@sd-7501.dedibox.fr To=sip:0033677832974@sd-7501.dedibox.fr Duration=59 it works!
Aug 20 11:55:41 sd-7501 CDRTool[20158]: ConnectFee=0.0546 Span=1 Duration=59 DestId=336 subscriber=101@sd-7501.dedibox.fr Profile=101 Period=weekday Rate=1011 Interval=8-19 Cost=0.0245/60 Price=0.0241 Aug 20 11:55:41 sd-7501 CDRTool[20158]: CallId= BillingParty=101@sd-7501.dedibox.fr DestId=336 Duration=59 Price=0.0787 Balance=10039.8165
Marc LEURENT a écrit :
Hello Dan and hello everybody! OpenSER & Freeradius & CDRTool are perfectly working together now!
I just don't understand one thing. Tickets are made but don't decrease the prepaid acounts...
For example, when 101@sd-7501.dedibox.fr is calling, here is the Rating information, but is prepaid account don't goes down...
Any idea?
Signalling information Session: 1973928040@192.168.95.118 Start time: 2007-08-20 11:17:32 Europe/Paris Stop time: 2007-08-20 11:19:51 Europe/Paris Method: INVITE from : From: Dialed URI: Canonical URI: 0033677832974@sd-7501.dedibox.fr Next hop URI: Destination: France - Portable (336) Billing Party: sip:101@sd-7501.dedibox.fr Rating information App: audio Destination: 336 (France - Portable) Customer: domain=sd-7501.dedibox.fr Connect fee: 0.2346 -- Span: 1 Duration: 139 s StartTime: 2007-08-20 11:17:32 (Europe/Paris) ProfileId: 1 for weekday RateId: 10 for 0-24h Rate: 0.5634 / 60 s Price: 1.3052
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
Oups , I simply forgot the src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c patch
Marc LEURENT a écrit :
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Ok, now it's a true question! When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
root@sd-7501:[~mleurent/../freeradius-1.1.3]# ls src/modules/rlm_python Makefile config.log configure* prepaid.py radiusd.py rlm_python.c rlm_python.lo Makefile.in config.status* configure.in prepaid.sql radiusd_test.py rlm_python.la rlm_python.o
Marc LEURENT a écrit :
Oups , I simply forgot the src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c patch
Marc LEURENT a écrit :
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit :
Hi there Marc,
are you using any application which locks, unlocks the prepaid accounts, and instructs CDRTool to update the user's balance? Are you aware that CDRTool uses separate applications for prepaid and postpaid accounts?
DanB
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote:
No... Is it possible to do it with openser or is it compulsory to use asterisk? What do you use?
Thanks
Dan-Cristian Bogos a écrit : > Hi there Marc, > > are you using any application which locks, unlocks the prepaid > accounts, and instructs CDRTool to update the user's balance? Are you > aware that CDRTool uses separate applications for prepaid and postpaid > accounts? > > DanB
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit :
Marc,
I would suggest as first step reading about how prepaid works in CDRTool. (see PREPAID.txt in doc folder).
I personally use freeradius-cdrtool connector (sourceforge.net/projects/frad-cdrtool), which I have written in python and which needs rlm_python compiled into freeradius server.
Have a look on all the info and let me know if u need any additional.
Cheers, DanB
On 8/20/07, Marc LEURENT lftsy@free.fr wrote: > No... > Is it possible to do it with openser or is it compulsory to use asterisk? > What do you use? > > Thanks > > > Dan-Cristian Bogos a écrit : >> Hi there Marc, >> >> are you using any application which locks, unlocks the prepaid >> accounts, and instructs CDRTool to update the user's balance? Are you >> aware that CDRTool uses separate applications for prepaid and postpaid >> accounts? >> >> DanB
I have compiled the experimental modules, now the python module is working but I have an error with yours... I have changed the rlm_digest.c and fixed the sql module to work with procedure
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) python_init done Module: Loaded python python: mod_instantiate = "freeradius-cdrtool" python: func_instantiate = "instantiate" python: mod_authorize = "freeradius-cdrtool" python: func_authorize = "authorize" python: mod_authenticate = "(null)" python: func_authenticate = "(null)" python: mod_preacct = "(null)" python: func_preacct = "(null)" python: mod_accounting = "freeradius-cdrtool" python: func_accounting = "accounting" python: mod_checksimul = "(null)" python: func_checksimul = "(null)" python: mod_detach = "freeradius-cdrtool" python: func_detach = "detach" exceptions.ImportError: /usr/lib/python2.4/lib-dynload/_socket.so: undefined symbol: _Py_TrueStruct Failed to import python module "freeradius-cdrtool" radiusd.conf[544]: python: Module instantiation failed. radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have followed your advice, Freeradius is recompiled with rlm_python, byt know, rlm_sql seems to encountered troubles like :
rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received
Any idea of how to repair this? Thanks
I have added this in my debian/rules file:
modulelist=krb5 ldap sql_mysql sql_iodbc python ... ... ./configure \ $(confflags) \ --prefix=/usr \ ... \ --with-static-modules=python
Here is my freeradius debug:
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 modcall[accounting]: module "detail" returns ok for request 5 modcall[accounting]: module "unix" returns noop for request 5 radius_xlat: '/var/log/freeradius/radutmp' radius_xlat: '' modcall[accounting]: module "radutmp" returns ok for request 5 radius_xlat: '' radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', '0', '0', '0', '0', '', '', '200', 'Sip-Session', '', '', '0', '0', '200', 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: MYSQL check_error: 1312 received rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context radius_xlat: '' rlm_sql (sql): Released sql socket id: 2 modcall[accounting]: module "sql" returns ok for request 5
Dan-Cristian Bogos a écrit : > Marc, > > I would suggest as first step reading about how prepaid works in > CDRTool. (see PREPAID.txt in doc folder). > > I personally use freeradius-cdrtool connector > (sourceforge.net/projects/frad-cdrtool), which I have written in > python and which needs rlm_python compiled into freeradius server. > > Have a look on all the info and let me know if u need any additional. > > Cheers, > DanB > > On 8/20/07, Marc LEURENT lftsy@free.fr wrote: >> No... >> Is it possible to do it with openser or is it compulsory to use asterisk? >> What do you use? >> >> Thanks >> >> >> Dan-Cristian Bogos a écrit : >>> Hi there Marc, >>> >>> are you using any application which locks, unlocks the prepaid >>> accounts, and instructs CDRTool to update the user's balance? Are you >>> aware that CDRTool uses separate applications for prepaid and postpaid >>> accounts? >>> >>> DanB
Marc,
This is still an error from python, not my module. I think it has something to do with linking inside between C and python. What were the steps in your freeradius installation?
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have compiled the experimental modules, now the python module is working but I have an error with yours... I have changed the rlm_digest.c and fixed the sql module to work with procedure
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) python_init done Module: Loaded python python: mod_instantiate = "freeradius-cdrtool" python: func_instantiate = "instantiate" python: mod_authorize = "freeradius-cdrtool" python: func_authorize = "authorize" python: mod_authenticate = "(null)" python: func_authenticate = "(null)" python: mod_preacct = "(null)" python: func_preacct = "(null)" python: mod_accounting = "freeradius-cdrtool" python: func_accounting = "accounting" python: mod_checksimul = "(null)" python: func_checksimul = "(null)" python: mod_detach = "freeradius-cdrtool" python: func_detach = "detach" exceptions.ImportError: /usr/lib/python2.4/lib-dynload/_socket.so: undefined symbol: _Py_TrueStruct Failed to import python module "freeradius-cdrtool" radiusd.conf[544]: python: Module instantiation failed. radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
Hi Marc,
it looks like you are getting some problems related to stored procedure in your mysql database. Did u install also the radius patch recommended by AG-Projects in order to work properly with stored procedures? On the sql side I cannot help you too much since I am using still the normal sql queries without stored procedures.
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote: > I have followed your advice, Freeradius is recompiled with rlm_python, > byt know, rlm_sql seems to encountered troubles > like : > > rlm_sql (sql): Reserving sql socket id: 2 > rlm_sql_mysql: MYSQL check_error: 1312 received > > Any idea of how to repair this? > Thanks > > > I have added this in my debian/rules file: > > modulelist=krb5 ldap sql_mysql sql_iodbc python > ... > ... > ./configure \ > $(confflags) \ > --prefix=/usr \ > ... \ > --with-static-modules=python > > > > Here is my freeradius debug: > > rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 > modcall[accounting]: module "detail" returns ok for request 5 > modcall[accounting]: module "unix" returns noop for request 5 > radius_xlat: '/var/log/freeradius/radutmp' > radius_xlat: '' > modcall[accounting]: module "radutmp" returns ok for request 5 > radius_xlat: '' > radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', > '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', > 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', > '0', '0', '0', '0', '', '', '200', > 'Sip-Session', '', '', '0', '0', '200', > 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', > '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' > rlm_sql (sql): Reserving sql socket id: 2 > rlm_sql_mysql: MYSQL check_error: 1312 received > rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context > radius_xlat: '' > rlm_sql (sql): Released sql socket id: 2 > modcall[accounting]: module "sql" returns ok for request 5 > > > > > > Dan-Cristian Bogos a écrit : >> Marc, >> >> I would suggest as first step reading about how prepaid works in >> CDRTool. (see PREPAID.txt in doc folder). >> >> I personally use freeradius-cdrtool connector >> (sourceforge.net/projects/frad-cdrtool), which I have written in >> python and which needs rlm_python compiled into freeradius server. >> >> Have a look on all the info and let me know if u need any additional. >> >> Cheers, >> DanB >> >> On 8/20/07, Marc LEURENT lftsy@free.fr wrote: >>> No... >>> Is it possible to do it with openser or is it compulsory to use asterisk? >>> What do you use? >>> >>> Thanks >>> >>> >>> Dan-Cristian Bogos a écrit : >>>> Hi there Marc, >>>> >>>> are you using any application which locks, unlocks the prepaid >>>> accounts, and instructs CDRTool to update the user's balance? Are you >>>> aware that CDRTool uses separate applications for prepaid and postpaid >>>> accounts? >>>> >>>> DanB
Sorry for the error! I have compiles freeradius doing:
* I have installed freeradius from debian source: apt-get source freeradius * I have added --with-experimetal-modules: in the debian/rules file => so the python module is compiled * I have changed rlm_digest.c with the one you gave me * I have changed the src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c file to grant sql procedure * I have build my package with dpkg-buildpackage -rfakeroot -uc -us * I have modified the sql.conf and radiusd.conf file for CDRTool and the dictionary file
memcache is loaded and listening, python-memcache and your module are installed
That's all
Dan-Cristian Bogos a écrit :
Marc,
This is still an error from python, not my module. I think it has something to do with linking inside between C and python. What were the steps in your freeradius installation?
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have compiled the experimental modules, now the python module is working but I have an error with yours... I have changed the rlm_digest.c and fixed the sql module to work with procedure
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) python_init done Module: Loaded python python: mod_instantiate = "freeradius-cdrtool" python: func_instantiate = "instantiate" python: mod_authorize = "freeradius-cdrtool" python: func_authorize = "authorize" python: mod_authenticate = "(null)" python: func_authenticate = "(null)" python: mod_preacct = "(null)" python: func_preacct = "(null)" python: mod_accounting = "freeradius-cdrtool" python: func_accounting = "accounting" python: mod_checksimul = "(null)" python: func_checksimul = "(null)" python: mod_detach = "freeradius-cdrtool" python: func_detach = "detach" exceptions.ImportError: /usr/lib/python2.4/lib-dynload/_socket.so: undefined symbol: _Py_TrueStruct Failed to import python module "freeradius-cdrtool" radiusd.conf[544]: python: Module instantiation failed. radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit : > Hi Marc, > > it looks like you are getting some problems related to stored > procedure in your mysql database. Did u install also the radius patch > recommended by AG-Projects in order to work properly with stored > procedures? On the sql side I cannot help you too much since I am > using still the normal sql queries without stored procedures. > > DanB > > On 8/22/07, Marc LEURENT lftsy@free.fr wrote: >> I have followed your advice, Freeradius is recompiled with rlm_python, >> byt know, rlm_sql seems to encountered troubles >> like : >> >> rlm_sql (sql): Reserving sql socket id: 2 >> rlm_sql_mysql: MYSQL check_error: 1312 received >> >> Any idea of how to repair this? >> Thanks >> >> >> I have added this in my debian/rules file: >> >> modulelist=krb5 ldap sql_mysql sql_iodbc python >> ... >> ... >> ./configure \ >> $(confflags) \ >> --prefix=/usr \ >> ... \ >> --with-static-modules=python >> >> >> >> Here is my freeradius debug: >> >> rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 >> modcall[accounting]: module "detail" returns ok for request 5 >> modcall[accounting]: module "unix" returns noop for request 5 >> radius_xlat: '/var/log/freeradius/radutmp' >> radius_xlat: '' >> modcall[accounting]: module "radutmp" returns ok for request 5 >> radius_xlat: '' >> radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', >> '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', >> 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', >> '0', '0', '0', '0', '', '', '200', >> 'Sip-Session', '', '', '0', '0', '200', >> 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', >> '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' >> rlm_sql (sql): Reserving sql socket id: 2 >> rlm_sql_mysql: MYSQL check_error: 1312 received >> rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context >> radius_xlat: '' >> rlm_sql (sql): Released sql socket id: 2 >> modcall[accounting]: module "sql" returns ok for request 5 >> >> >> >> >> >> Dan-Cristian Bogos a écrit : >>> Marc, >>> >>> I would suggest as first step reading about how prepaid works in >>> CDRTool. (see PREPAID.txt in doc folder). >>> >>> I personally use freeradius-cdrtool connector >>> (sourceforge.net/projects/frad-cdrtool), which I have written in >>> python and which needs rlm_python compiled into freeradius server. >>> >>> Have a look on all the info and let me know if u need any additional. >>> >>> Cheers, >>> DanB >>> >>> On 8/20/07, Marc LEURENT lftsy@free.fr wrote: >>>> No... >>>> Is it possible to do it with openser or is it compulsory to use asterisk? >>>> What do you use? >>>> >>>> Thanks >>>> >>>> >>>> Dan-Cristian Bogos a écrit : >>>>> Hi there Marc, >>>>> >>>>> are you using any application which locks, unlocks the prepaid >>>>> accounts, and instructs CDRTool to update the user's balance? Are you >>>>> aware that CDRTool uses separate applications for prepaid and postpaid >>>>> accounts? >>>>> >>>>> DanB
Ok,
it looks like something is messed-up.
If it is to build a fresh install of freeradius, I would rather recommend the following way:
1. Grab the sources directly from freeradius website. 2. Clean your old installed libraries (from old freeradius install). 3. Type in your root folder: "./configure --with-static-modules=python" 4. Type: "./src/modules/rlm_python/configure" 5. Type: "make" and "make install in root folder.
Let me know if that works. DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
Sorry for the error! I have compiles freeradius doing:
- I have installed freeradius from debian source: apt-get source freeradius
- I have added --with-experimetal-modules: in the debian/rules file => so the python module is compiled
- I have changed rlm_digest.c with the one you gave me
- I have changed the src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c file to grant sql procedure
- I have build my package with dpkg-buildpackage -rfakeroot -uc -us
- I have modified the sql.conf and radiusd.conf file for CDRTool and the dictionary file
memcache is loaded and listening, python-memcache and your module are installed
That's all
Dan-Cristian Bogos a écrit :
Marc,
This is still an error from python, not my module. I think it has something to do with linking inside between C and python. What were the steps in your freeradius installation?
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have compiled the experimental modules, now the python module is working but I have an error with yours... I have changed the rlm_digest.c and fixed the sql module to work with procedure
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) python_init done Module: Loaded python python: mod_instantiate = "freeradius-cdrtool" python: func_instantiate = "instantiate" python: mod_authorize = "freeradius-cdrtool" python: func_authorize = "authorize" python: mod_authenticate = "(null)" python: func_authenticate = "(null)" python: mod_preacct = "(null)" python: func_preacct = "(null)" python: mod_accounting = "freeradius-cdrtool" python: func_accounting = "accounting" python: mod_checksimul = "(null)" python: func_checksimul = "(null)" python: mod_detach = "freeradius-cdrtool" python: func_detach = "detach" exceptions.ImportError: /usr/lib/python2.4/lib-dynload/_socket.so: undefined symbol: _Py_TrueStruct Failed to import python module "freeradius-cdrtool" radiusd.conf[544]: python: Module instantiation failed. radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote: > I have corrected it: mea culpa > > But now I have a real trouble: > When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python > > > Did you have thos problem? > Do you know how to correct it? > > Thanks > > rlm_sql (sql): Connected new DB handle, #4 > Module: Instantiated sql (sql) > radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory > radiusd.conf[1884] Unknown module "python". > radiusd.conf[1792] Failed to parse authorize section. > zsh: exit 1 freeradius -X > > > Dan-Cristian Bogos a écrit : >> Hi Marc, >> >> it looks like you are getting some problems related to stored >> procedure in your mysql database. Did u install also the radius patch >> recommended by AG-Projects in order to work properly with stored >> procedures? On the sql side I cannot help you too much since I am >> using still the normal sql queries without stored procedures. >> >> DanB >> >> On 8/22/07, Marc LEURENT lftsy@free.fr wrote: >>> I have followed your advice, Freeradius is recompiled with rlm_python, >>> byt know, rlm_sql seems to encountered troubles >>> like : >>> >>> rlm_sql (sql): Reserving sql socket id: 2 >>> rlm_sql_mysql: MYSQL check_error: 1312 received >>> >>> Any idea of how to repair this? >>> Thanks >>> >>> >>> I have added this in my debian/rules file: >>> >>> modulelist=krb5 ldap sql_mysql sql_iodbc python >>> ... >>> ... >>> ./configure \ >>> $(confflags) \ >>> --prefix=/usr \ >>> ... \ >>> --with-static-modules=python >>> >>> >>> >>> Here is my freeradius debug: >>> >>> rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 >>> modcall[accounting]: module "detail" returns ok for request 5 >>> modcall[accounting]: module "unix" returns noop for request 5 >>> radius_xlat: '/var/log/freeradius/radutmp' >>> radius_xlat: '' >>> modcall[accounting]: module "radutmp" returns ok for request 5 >>> radius_xlat: '' >>> radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', >>> '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', >>> 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', >>> '0', '0', '0', '0', '', '', '200', >>> 'Sip-Session', '', '', '0', '0', '200', >>> 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', >>> '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' >>> rlm_sql (sql): Reserving sql socket id: 2 >>> rlm_sql_mysql: MYSQL check_error: 1312 received >>> rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context >>> radius_xlat: '' >>> rlm_sql (sql): Released sql socket id: 2 >>> modcall[accounting]: module "sql" returns ok for request 5 >>> >>> >>> >>> >>> >>> Dan-Cristian Bogos a écrit : >>>> Marc, >>>> >>>> I would suggest as first step reading about how prepaid works in >>>> CDRTool. (see PREPAID.txt in doc folder). >>>> >>>> I personally use freeradius-cdrtool connector >>>> (sourceforge.net/projects/frad-cdrtool), which I have written in >>>> python and which needs rlm_python compiled into freeradius server. >>>> >>>> Have a look on all the info and let me know if u need any additional. >>>> >>>> Cheers, >>>> DanB >>>> >>>> On 8/20/07, Marc LEURENT lftsy@free.fr wrote: >>>>> No... >>>>> Is it possible to do it with openser or is it compulsory to use asterisk? >>>>> What do you use? >>>>> >>>>> Thanks >>>>> >>>>> >>>>> Dan-Cristian Bogos a écrit : >>>>>> Hi there Marc, >>>>>> >>>>>> are you using any application which locks, unlocks the prepaid >>>>>> accounts, and instructs CDRTool to update the user's balance? Are you >>>>>> aware that CDRTool uses separate applications for prepaid and postpaid >>>>>> accounts? >>>>>> >>>>>> DanB
I have downloaded the version 1.1.6 and 1.1.7 I have just done a ./configure --with-static-modules=python and make
but the make failed: -pie -o radiusd acct.lo auth.lo client.lo conffile.lo exec.lo files.lo log.lo mainconfig.lo modules.lo modcall.lo nas.lo proxy.lo radiusd.lo radius_snmp.lo request_list.lo session.lo smux.lo threads.lo util.lo valuepair.lo version.lo timestr.lo xlat.lo \ -dlpreopen ../modules/rlm_python/rlm_python.la -lnsl -lresolv -lpthread ../lib/libradius.la \ -lltdl libtool: link: cannot find the library `../modules/rlm_python/rlm_python.la' or unhandled argument `../modules/rlm_python/rlm_python.la' make[4]: *** [radiusd] Error 1
and when I add a ./src/modules/rlm_python/configure, it's worse: Sniff!!!!
=== configuring in src/modules/rlm_checkval (/home/mleurent/freeradius/official/freeradius-1.1.7/src/modules/rlm_checkval) configure: running /bin/sh ./configure '--prefix=/usr/local' '--with-static-modules=python' '--enable-ltdl-install=no' --cache-file=/dev/null --srcdir=. configure: creating ./config.status config.status: creating Makefile ./configure --with-static-modules=python 48.01s user 34.85s system 98% cpu 1:24.00 total root@sd-7501:[/home/../freeradius-1.1.7]# ./src/modules/rlm_python/configure checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for python2.3... no checking for python2.2... no checking for python2.1... no checking for python1.5... no checking for python... python checking for Python.h... yes checking for Py_Initialize in -lpython2.4... yes configure: creating ./config.status config.status: creating Makefile
root@sd-7501:[/home/../freeradius-1.1.7]# make Makefile:11: ../rules.mak: No such file or directory make: *** No rule to make target `../rules.mak'. Stop. zsh: exit 2 make
Dan-Cristian Bogos a écrit :
Ok,
it looks like something is messed-up.
If it is to build a fresh install of freeradius, I would rather recommend the following way:
- Grab the sources directly from freeradius website.
- Clean your old installed libraries (from old freeradius install).
- Type in your root folder: "./configure --with-static-modules=python"
- Type: "./src/modules/rlm_python/configure"
- Type: "make" and "make install in root folder.
Let me know if that works. DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
Sorry for the error! I have compiles freeradius doing:
- I have installed freeradius from debian source: apt-get source freeradius
- I have added --with-experimetal-modules: in the debian/rules file => so the python module is compiled
- I have changed rlm_digest.c with the one you gave me
- I have changed the src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c file to grant sql procedure
- I have build my package with dpkg-buildpackage -rfakeroot -uc -us
- I have modified the sql.conf and radiusd.conf file for CDRTool and the dictionary file
memcache is loaded and listening, python-memcache and your module are installed
That's all
Dan-Cristian Bogos a écrit :
Marc,
This is still an error from python, not my module. I think it has something to do with linking inside between C and python. What were the steps in your freeradius installation?
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have compiled the experimental modules, now the python module is working but I have an error with yours... I have changed the rlm_digest.c and fixed the sql module to work with procedure
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) python_init done Module: Loaded python python: mod_instantiate = "freeradius-cdrtool" python: func_instantiate = "instantiate" python: mod_authorize = "freeradius-cdrtool" python: func_authorize = "authorize" python: mod_authenticate = "(null)" python: func_authenticate = "(null)" python: mod_preacct = "(null)" python: func_preacct = "(null)" python: mod_accounting = "freeradius-cdrtool" python: func_accounting = "accounting" python: mod_checksimul = "(null)" python: func_checksimul = "(null)" python: mod_detach = "freeradius-cdrtool" python: func_detach = "detach" exceptions.ImportError: /usr/lib/python2.4/lib-dynload/_socket.so: undefined symbol: _Py_TrueStruct Failed to import python module "freeradius-cdrtool" radiusd.conf[544]: python: Module instantiation failed. radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit : > Marc, > > I don't have this problem. > I have compiled freeradius with rlm_python from sources. > > For problems with freeradius, I think the best would be to grab some > support directly from their mailing list, since they are pretty > helpful. Don't forget about patching also rlm_digest in order to > sanitize the params coming from OpenSER in the authorization phase and > not the authentication one. They promised for future releases to > include this patch inside the distribution. > > Cheers, > DanB > > > On 8/22/07, Marc LEURENT lftsy@free.fr wrote: >> I have corrected it: mea culpa >> >> But now I have a real trouble: >> When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python >> >> >> Did you have thos problem? >> Do you know how to correct it? >> >> Thanks >> >> rlm_sql (sql): Connected new DB handle, #4 >> Module: Instantiated sql (sql) >> radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory >> radiusd.conf[1884] Unknown module "python". >> radiusd.conf[1792] Failed to parse authorize section. >> zsh: exit 1 freeradius -X >> >> >> Dan-Cristian Bogos a écrit : >>> Hi Marc, >>> >>> it looks like you are getting some problems related to stored >>> procedure in your mysql database. Did u install also the radius patch >>> recommended by AG-Projects in order to work properly with stored >>> procedures? On the sql side I cannot help you too much since I am >>> using still the normal sql queries without stored procedures. >>> >>> DanB >>> >>> On 8/22/07, Marc LEURENT lftsy@free.fr wrote: >>>> I have followed your advice, Freeradius is recompiled with rlm_python, >>>> byt know, rlm_sql seems to encountered troubles >>>> like : >>>> >>>> rlm_sql (sql): Reserving sql socket id: 2 >>>> rlm_sql_mysql: MYSQL check_error: 1312 received >>>> >>>> Any idea of how to repair this? >>>> Thanks >>>> >>>> >>>> I have added this in my debian/rules file: >>>> >>>> modulelist=krb5 ldap sql_mysql sql_iodbc python >>>> ... >>>> ... >>>> ./configure \ >>>> $(confflags) \ >>>> --prefix=/usr \ >>>> ... \ >>>> --with-static-modules=python >>>> >>>> >>>> >>>> Here is my freeradius debug: >>>> >>>> rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 >>>> modcall[accounting]: module "detail" returns ok for request 5 >>>> modcall[accounting]: module "unix" returns noop for request 5 >>>> radius_xlat: '/var/log/freeradius/radutmp' >>>> radius_xlat: '' >>>> modcall[accounting]: module "radutmp" returns ok for request 5 >>>> radius_xlat: '' >>>> radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', >>>> '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', >>>> 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', >>>> '0', '0', '0', '0', '', '', '200', >>>> 'Sip-Session', '', '', '0', '0', '200', >>>> 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', >>>> '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' >>>> rlm_sql (sql): Reserving sql socket id: 2 >>>> rlm_sql_mysql: MYSQL check_error: 1312 received >>>> rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context >>>> radius_xlat: '' >>>> rlm_sql (sql): Released sql socket id: 2 >>>> modcall[accounting]: module "sql" returns ok for request 5 >>>> >>>> >>>> >>>> >>>> >>>> Dan-Cristian Bogos a écrit : >>>>> Marc, >>>>> >>>>> I would suggest as first step reading about how prepaid works in >>>>> CDRTool. (see PREPAID.txt in doc folder). >>>>> >>>>> I personally use freeradius-cdrtool connector >>>>> (sourceforge.net/projects/frad-cdrtool), which I have written in >>>>> python and which needs rlm_python compiled into freeradius server. >>>>> >>>>> Have a look on all the info and let me know if u need any additional. >>>>> >>>>> Cheers, >>>>> DanB >>>>> >>>>> On 8/20/07, Marc LEURENT lftsy@free.fr wrote: >>>>>> No... >>>>>> Is it possible to do it with openser or is it compulsory to use asterisk? >>>>>> What do you use? >>>>>> >>>>>> Thanks >>>>>> >>>>>> >>>>>> Dan-Cristian Bogos a écrit : >>>>>>> Hi there Marc, >>>>>>> >>>>>>> are you using any application which locks, unlocks the prepaid >>>>>>> accounts, and instructs CDRTool to update the user's balance? Are you >>>>>>> aware that CDRTool uses separate applications for prepaid and postpaid >>>>>>> accounts? >>>>>>> >>>>>>> DanB
Do you have this error? When I try to load your module in mython, I have this error because of the dash..
root@sd-7501:[/home/../freeradius-cdrtool-1.0]# python Python 2.4.4 (#2, Apr 5 2007, 20:11:18) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import freeradius-cdrtool
File "<stdin>", line 1 import freeradius-cdrtool ^ SyntaxError: invalid syntax
import setup
usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: --help [cmd1 cmd2 ...] or: --help-commands or: cmd --help
error: no commands supplied zsh: exit 1 python
Dan-Cristian Bogos a écrit :
Marc,
This is still an error from python, not my module. I think it has something to do with linking inside between C and python. What were the steps in your freeradius installation?
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have compiled the experimental modules, now the python module is working but I have an error with yours... I have changed the rlm_digest.c and fixed the sql module to work with procedure
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) python_init done Module: Loaded python python: mod_instantiate = "freeradius-cdrtool" python: func_instantiate = "instantiate" python: mod_authorize = "freeradius-cdrtool" python: func_authorize = "authorize" python: mod_authenticate = "(null)" python: func_authenticate = "(null)" python: mod_preacct = "(null)" python: func_preacct = "(null)" python: mod_accounting = "freeradius-cdrtool" python: func_accounting = "accounting" python: mod_checksimul = "(null)" python: func_checksimul = "(null)" python: mod_detach = "freeradius-cdrtool" python: func_detach = "detach" exceptions.ImportError: /usr/lib/python2.4/lib-dynload/_socket.so: undefined symbol: _Py_TrueStruct Failed to import python module "freeradius-cdrtool" radiusd.conf[544]: python: Module instantiation failed. radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit :
You can get it from here: http://frad-cdrtool.sourceforge.net/rlm_digest.c
DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I haven't found this patch on http://sourceforge.net/projects/frad-cdrtool... Where did you found it? Thanks
Dan-Cristian Bogos a écrit :
Marc,
I don't have this problem. I have compiled freeradius with rlm_python from sources.
For problems with freeradius, I think the best would be to grab some support directly from their mailing list, since they are pretty helpful. Don't forget about patching also rlm_digest in order to sanitize the params coming from OpenSER in the authorization phase and not the authentication one. They promised for future releases to include this patch inside the distribution.
Cheers, DanB
On 8/22/07, Marc LEURENT lftsy@free.fr wrote:
I have corrected it: mea culpa
But now I have a real trouble: When I start freeradius, it said that it can't find rlm_python.so, but this is normal because we added --with-static-modules=python
Did you have thos problem? Do you know how to correct it?
Thanks
rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) radiusd.conf[544] Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory radiusd.conf[1884] Unknown module "python". radiusd.conf[1792] Failed to parse authorize section. zsh: exit 1 freeradius -X
Dan-Cristian Bogos a écrit : > Hi Marc, > > it looks like you are getting some problems related to stored > procedure in your mysql database. Did u install also the radius patch > recommended by AG-Projects in order to work properly with stored > procedures? On the sql side I cannot help you too much since I am > using still the normal sql queries without stored procedures. > > DanB > > On 8/22/07, Marc LEURENT lftsy@free.fr wrote: >> I have followed your advice, Freeradius is recompiled with rlm_python, >> byt know, rlm_sql seems to encountered troubles >> like : >> >> rlm_sql (sql): Reserving sql socket id: 2 >> rlm_sql_mysql: MYSQL check_error: 1312 received >> >> Any idea of how to repair this? >> Thanks >> >> >> I have added this in my debian/rules file: >> >> modulelist=krb5 ldap sql_mysql sql_iodbc python >> ... >> ... >> ./configure \ >> $(confflags) \ >> --prefix=/usr \ >> ... \ >> --with-static-modules=python >> >> >> >> Here is my freeradius debug: >> >> rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to /var/log/freeradius/radacct/127.0.0.1/detail-20070822 >> modcall[accounting]: module "detail" returns ok for request 5 >> modcall[accounting]: module "unix" returns noop for request 5 >> radius_xlat: '/var/log/freeradius/radutmp' >> radius_xlat: '' >> modcall[accounting]: module "radutmp" returns ok for request 5 >> radius_xlat: '' >> radius_xlat: ' CALL insert_radacct_record( 'radius', '52f74a-c0a80101-0-4@192.168.95.79', >> '36afb36cd5c82c34', 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', >> 'sip:101@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '88.191.45.91', '5060', '2007-08-22 13:59:25', >> '0', '0', '0', '0', '', '', '200', >> 'Sip-Session', '', '', '0', '0', '200', >> 'INVITE', '', 'c0a80101-5766ea7', 'c0a80101-4e8244', '', '', >> '', 'sip:0033677832974@sd-7501.dedibox.fr:5060=3Buser=3Dphone', '', '' )' >> rlm_sql (sql): Reserving sql socket id: 2 >> rlm_sql_mysql: MYSQL check_error: 1312 received >> rlm_sql (sql): Couldn't insert SQL accounting START record - PROCEDURE radius.insert_radacct_record can't return a result set in the given context >> radius_xlat: '' >> rlm_sql (sql): Released sql socket id: 2 >> modcall[accounting]: module "sql" returns ok for request 5 >> >> >> >> >> >> Dan-Cristian Bogos a écrit : >>> Marc, >>> >>> I would suggest as first step reading about how prepaid works in >>> CDRTool. (see PREPAID.txt in doc folder). >>> >>> I personally use freeradius-cdrtool connector >>> (sourceforge.net/projects/frad-cdrtool), which I have written in >>> python and which needs rlm_python compiled into freeradius server. >>> >>> Have a look on all the info and let me know if u need any additional. >>> >>> Cheers, >>> DanB >>> >>> On 8/20/07, Marc LEURENT lftsy@free.fr wrote: >>>> No... >>>> Is it possible to do it with openser or is it compulsory to use asterisk? >>>> What do you use? >>>> >>>> Thanks >>>> >>>> >>>> Dan-Cristian Bogos a écrit : >>>>> Hi there Marc, >>>>> >>>>> are you using any application which locks, unlocks the prepaid >>>>> accounts, and instructs CDRTool to update the user's balance? Are you >>>>> aware that CDRTool uses separate applications for prepaid and postpaid >>>>> accounts? >>>>> >>>>> DanB