Opensips + FreeRadius + CDRTool + Slackware

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Opensips + FreeRadius + CDRTool + Slackware

Gustavo B. Schenkel
Hi to all,
Merry Christmas,

guys, this is my first message, and i am in trouble,
i am using Slackware 12.2, Opensips 1.4.3, FreeRadius-Server 2.1.3, FreeRadius-Client 1.1.6,  CDRTool 6.7.0 and MySQL 5.0.27.
I compiled the opensips from source, and it is working with this additional modules:
"db_mysql jabber ldap presence presence_xml xmpp"
The freeradius i compiled from source too. I want use the OpenSIPS together with
FreeRadius(accounting), CDRTool(billing) and MySQL(authentication).

The problem:
I need compile the modules acc with radius support, but it is cause error in compilation.


Compiling acc.c
In file included from acc_extra.h:69,
                 from acc.c:54:
../../radius.h:38:30: error: radiusclient-ng.h: No such file or directory
acc.c: In function 'init_acc_rad':
acc.c:458: warning: implicit declaration of function 'rc_read_config'
acc.c:458: warning: assignment makes pointer from integer without a cast
acc.c:463: warning: implicit declaration of function 'rc_read_dictionary'
acc.c:463: warning: implicit declaration of function 'rc_conf_str'
acc.c:468: error: 'DICT_ATTR' undeclared (first use in this function)
acc.c:468: error: (Each undeclared identifier is reported only once
acc.c:468: error: for each function it appears in.)
acc.c:468: error: 'da' undeclared (first use in this function)
acc.c:468: error: 'DICT_VALUE' undeclared (first use in this function)
acc.c:468: error: 'dv' undeclared (first use in this function)
acc.c:468: warning: implicit declaration of function 'rc_dict_findattr'
acc.c:468: warning: implicit declaration of function 'rc_dict_findval'
acc.c: In function 'acc_rad_request':
acc.c:499: error: 'VALUE_PAIR' undeclared (first use in this function)
acc.c:504: error: lvalue required as left operand of assignment
acc.c:511: warning: implicit declaration of function 'rc_avpair_add'
acc.c:545: warning: implicit declaration of function 'rc_acct'
acc.c:545: error: 'OK_RC' undeclared (first use in this function)
acc.c:549: warning: implicit declaration of function 'rc_avpair_free'
make[1]: *** [acc.o] Error 1
make[1]: Leaving directory `/tmp/SBo/opensips-1.4.3-tls/modules/acc'
make: *** [modules] Error 2


i edit the radius.h, and soo the location of this file, but i don't have this file "radiusclient-ng.h" in my pc.
I go back to the freeRadius-Client source/binary, search for this file, and i don't find him.

I don't know if opensips are configured with the last release of freeRadius.
What i did, i edit again the radius.h and change the "radiusclient-ng.h" to "freeradius-client.h", and i altered too the default location of the conf. file to
"/etc/radiusclient/radiusclient.conf"


Compiling again show this messages.

Compiling acc.c
gcc -shared  -Wl,-O2 -Wl,-E    acc.o acc_extra.o acc_logic.o acc_mod.o diam_avp.o diam_message.o diam_tcp.o  -L/usr/lib -lradiusclient-ng -o acc.so
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld: cannot find -lradiusclient-ng
collect2: ld returned 1 exit status
make[1]: *** [acc.so] Error 1
make[1]: Leaving directory `/tmp/SBo/opensips-1.4.3-tls/modules/acc'
make: *** [modules] Error 2



I don't know what i do next.

Anyone show me a signal.


PS: Excuse me about my poor english.


-------------------------------------------------------------------
Schenkel, Gustavo Brondani
I.T. Professional
Espocomp - Engenharia de Computação Ltda.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips + FreeRadius + CDRTool + Slackware

Jeff Pyle
Re: [OpenSIPS-Users] Opensips + FreeRadius + CDRTool + Slackware Gustavo,

Merry Christmas!

The radiusclient-ng.h file comes from the radiusclient-ng package, not the radiusclient package.  OpenSIPS requires radiusclient-ng.  Freeradius-client is not used.  You can get radiusclient-ng at the following link:

  http://download.berlios.de/radiusclient-ng/radiusclient-ng-0.5.6.tar.gz


- Jeff



On 12/19/08 8:53 AM, "Gustavo B. Schenkel" <gustavo.schenkel@...> wrote:

Hi to all,
Merry Christmas,

guys, this is my first message, and i am in trouble,
i am using Slackware 12.2, Opensips 1.4.3, FreeRadius-Server 2.1.3, FreeRadius-Client 1.1.6,  CDRTool 6.7.0 and MySQL 5.0.27.
I compiled the opensips from source, and it is working with this additional modules:
"db_mysql jabber ldap presence presence_xml xmpp"
The freeradius i compiled from source too. I want use the OpenSIPS together with
FreeRadius(accounting), CDRTool(billing) and MySQL(authentication).

The problem:
I need compile the modules acc with radius support, but it is cause error in compilation.


Compiling acc.c
In file included from acc_extra.h:69,
                 from acc.c:54:
../../radius.h:38:30: error: radiusclient-ng.h: No such file or directory
acc.c: In function 'init_acc_rad':
acc.c:458: warning: implicit declaration of function 'rc_read_config'
acc.c:458: warning: assignment makes pointer from integer without a cast
acc.c:463: warning: implicit declaration of function 'rc_read_dictionary'
acc.c:463: warning: implicit declaration of function 'rc_conf_str'
acc.c:468: error: 'DICT_ATTR' undeclared (first use in this function)
acc.c:468: error: (Each undeclared identifier is reported only once
acc.c:468: error: for each function it appears in.)
acc.c:468: error: 'da' undeclared (first use in this function)
acc.c:468: error: 'DICT_VALUE' undeclared (first use in this function)
acc.c:468: error: 'dv' undeclared (first use in this function)
acc.c:468: warning: implicit declaration of function 'rc_dict_findattr'
acc.c:468: warning: implicit declaration of function 'rc_dict_findval'
acc.c: In function 'acc_rad_request':
acc.c:499: error: 'VALUE_PAIR' undeclared (first use in this function)
acc.c:504: error: lvalue required as left operand of assignment
acc.c:511: warning: implicit declaration of function 'rc_avpair_add'
acc.c:545: warning: implicit declaration of function 'rc_acct'
acc.c:545: error: 'OK_RC' undeclared (first use in this function)
acc.c:549: warning: implicit declaration of function 'rc_avpair_free'
make[1]: *** [acc.o] Error 1
make[1]: Leaving directory `/tmp/SBo/opensips-1.4.3-tls/modules/acc'
make: *** [modules] Error 2


i edit the radius.h, and soo the location of this file, but i don't have this file "radiusclient-ng.h" in my pc.
I go back to the freeRadius-Client source/binary, search for this file, and i don't find him.

I don't know if opensips are configured with the last release of freeRadius.
What i did, i edit again the radius.h and change the "radiusclient-ng.h" to "freeradius-client.h", and i altered too the default location of the conf. file to
"/etc/radiusclient/radiusclient.conf"


Compiling again show this messages.

Compiling acc.c
gcc -shared  -Wl,-O2 -Wl,-E    acc.o acc_extra.o acc_logic.o acc_mod.o diam_avp.o diam_message.o diam_tcp.o  -L/usr/lib -lradiusclient-ng -o acc.so
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld: cannot find -lradiusclient-ng
collect2: ld returned 1 exit status
make[1]: *** [acc.so] Error 1
make[1]: Leaving directory `/tmp/SBo/opensips-1.4.3-tls/modules/acc'
make: *** [modules] Error 2



I don't know what i do next.

Anyone show me a signal.


PS: Excuse me about my poor english.


-------------------------------------------------------------------
Schenkel, Gustavo Brondani
I.T. Professional
Espocomp - Engenharia de Computação Ltda.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips + FreeRadius + CDRTool + Slackware

Gustavo B. Schenkel
Jeff, i am having other trouble,

i install the freeradius, opensips, cdrtool, radiusclient-ng,

but i cant open the cdrtool from web http://localhost/CDRTool
it is showing this message:

"CDRTool_Session", "auth" => "CDRTool_Auth", "perm" => "CDRTool_Perm") ); $loginname=$auth->auth["uname"]; $title="Legal notice"; $db = new DB_CDRTool(); $query=sprintf("select * from settings where billing_party = '%s' and var_module= 'login' and var_name = 'I_agree_with_license'",$loginname); if ($db->query($query)) { if ($db->num_rows()) { $refreshURL='callsearch.phtml'; $refreshTime=0; } } if (is_readable("/etc/cdrtool/local/header.phtml")) { include_once("/etc/cdrtool/local/header.phtml"); } else { include_once("header.phtml"); } $layout = new pageLayoutLocal(); $layout->showHeader(); $layout->showLegalNotice(); $layout->showFooter(); page_close(); } else { $Setup = new SETUP (); $Setup->showIntro(); } class SETUP { function showIntro() { print "

CDRTool setup

CDRTool has not been setup on this machine yet.

You must first setup php, apache and to create the cdrtool database. Detailed installation instructions are available in doc/INSTALL.txt

Once the database is available, create the cdrtool configuration file by copying the sample configuration file:

cp setup/global.inc.simple.sample /etc/cdrtool/global.inc

Then edit the configuration file global.inc to reflect your platform setup. This is the content of the current sample configuration file: "; print "

";
$fp=fopen("setup/global.inc.simple.sample",r);
while ($buffer = fgets($fp,1024)) {
if (!preg_match("/(<\?)|(\?>)/",$buffer)) {
print "$buffer";
}
}
print "
"; } } print " "; ?>


i altered and put the global.inc in /etc/cdrtool/
The /etc/init.d/cdrtool file, inside are a command to debian distribution (start-stop-daemon)

start-stop-daemon --start --background --quiet --pidfile /var/run/ratingEngine.pid \
                --exec $DAEMON -- $DAEMON_OPTS


and in slackware this don't exist, i am executing this to run this file
php -f $DAEMON --DAEMON_OPTS
but i think this aren't working.

Other thing, i apply the patch for the freeradius (account type 15)
but the log are showing:

Tue Dec 23 15:22:26 2008 : Error: rlm_radutmp: NAS openSIPS port 5060 unknown packet type 15)


i am configuring the server based in the book Building Telephony System with OpenSER.

How you are going?!


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Opensips + FreeRadius + CDRTool + Slackware

Jeff Pyle
Re: [OpenSIPS-Users] Opensips + FreeRadius + CDRTool + Slackware Gustavo,

I followed the directions (in concept) to configure a CDRTool VirtualHost for Apache.  Within that VirtualHost I added the following two lines:
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php .phtml

In my case, CentOS’s Apache config by default doesn’t understand what a .phtml file is.  You have to tell it with AddType.

If you don’t configure a VirtualHost you’ll want to add those to your /etc/httpd/conf/httpd.conf file in one of the main sections.

I’m not using rating at the moment, so I’m not running the ratingEngine.php file.  That’s what the init.d cdrtool starts.  Debian’s init.d files appear to be rather different those of Redhat-based distros.  If you want to run it manually, run /var/www/CDRTool/scripts/ratingEngine.php.  That should do it.

It appears the patch to Freeradius didn’t take.  That’s the only explaination I can think of for the unknown type 15 messages.  I’m not sure what to tell you here — I did it once, and it worked, so I didn’t have to do much troubleshooting.

In general I’d recommend that one follow the information contained in the INSTALL.txt file for CDRTool.  The AG Projects folks seem to update it rather often.  I’ve noticed two large changes just since I’ve been playing with this over the last few weeks.


- Jeff




On 12/23/08 2:31 PM, "Gustavo B. Schenkel" <gustavo.schenkel@...> wrote:

Jeff, i am having other trouble,

i install the freeradius, opensips, cdrtool, radiusclient-ng,

but i cant open the cdrtool from web http://localhost/CDRTool
it is showing this message:

"CDRTool_Session", "auth" => "CDRTool_Auth", "perm" => "CDRTool_Perm") ); $loginname=$auth->auth["uname"];  $title="Legal notice";  $db = new DB_CDRTool(); $query=sprintf("select * from settings where billing_party = '%s' and var_module= 'login' and var_name = 'I_agree_with_license'",$loginname); if ($db->query($query)) { if ($db->num_rows()) { $refreshURL='callsearch.phtml'; $refreshTime=0; } } if (is_readable("/etc/cdrtool/local/header.phtml")) { include_once("/etc/cdrtool/local/header.phtml"); } else { include_once("header.phtml"); }  $layout = new pageLayoutLocal(); $layout->showHeader(); $layout->showLegalNotice(); $layout->showFooter(); page_close(); } else { $Setup = new SETUP (); $Setup->showIntro(); } class SETUP { function showIntro() { print "     
CDRTool setup
CDRTool has not been setup on this machine yet.
You must first setup php, apache and to create the cdrtool database. Detailed installation instructions are available in doc/INSTALL.txt <http://10.1.1.30/CDRTool/doc/INSTALL.txt>  

 Once the database is available, create the cdrtool configuration file by copying the sample configuration file:

 cp setup/global.inc.simple.sample /etc/cdrtool/global.inc

 Then edit the configuration file global.inc to reflect your platform setup. This is the content of the current sample configuration file: ";  print "
";
        $fp=fopen("setup/global.inc.simple.sample",r);
        while ($buffer = fgets($fp,1024)) {
            if (!preg_match("/(<\?)|(\?>)/",$buffer)) {

                print "$buffer";
            }
        }
        print "
"; } } print " "; ?>


i altered and put the global.inc in /etc/cdrtool/
The /etc/init.d/cdrtool file, inside are a command to debian distribution (start-stop-daemon)

start-stop-daemon --start --background --quiet --pidfile /var/run/ratingEngine.pid \
                --exec $DAEMON -- $DAEMON_OPTS


and in slackware this don't exist, i am executing this to run this file
php -f $DAEMON --DAEMON_OPTS
but i think this aren't working.

Other thing, i apply the patch for the freeradius (account type 15)
but the log are showing:

Tue Dec 23 15:22:26 2008 : Error: rlm_radutmp: NAS openSIPS port 5060 unknown packet type 15)


i am configuring the server based in the book Building Telephony System with OpenSER.

How you are going?!



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users