Cannot load Authentication Plugin

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
toffifee
Posts: 6
Joined: Tue Mar 19, 2013 4:46 am

Cannot load Authentication Plugin

Post by toffifee »

1. Brekeke Product Name and Version: v3.1.7.0

2. Java version: 7

3. OS type and the version: Windows 8 x64

4. UA (phone), gateway or other hardware/software involved:

5. Your problem:

Hi,
I followed the Authentication Plug-in
Developer’s Guide, but stillt could not get it to work.

Some thinks aren't clear and I hope you can help me.

1. I added to the Windows Environment Variables a variable called "CLASSPATH" with the Value "C:\Plugins". Is this correct so far?

2. Then I copied the "AuthenticationPlugin.class" file to the Directory "C:\Plugins"

3. Afterwards I added the "net.usrdir.plugins" property to the sv.properties file like this: net.usrdir.plugins = myName.Country.AuthenticationPlugin

For this step, I would note that the Documentation speaks sometimes of the "net.usrdir.plugins" property and sometimes of the "net.userdir.plugins" property.

What is the difference? What is the correct one?

4. The sv.properties file I edited is located in "C:\Program Files\Brekeke\sip\webapps\sip\WEB-INF\work\sv\sv.properties" because I could not find the folder "proxy" as mentioned in the Documentation. Do you know why the folder doesn't exists in my <install directory>?

5. After restarting the Server I opened the logfile and found a line:

registrar: plugin=com.brekeke.sipadmin.plugins.RegisteredSqlDB : loaded

Must there be the name of my Plugin or how can I see if the Plugin loaded successfully?


Thank you for you help.


Kind Regards
Thomas
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

Hi Thomas,

> 1. I added to the Windows Environment Variables a variable called "CLASSPATH" with the Value "C:\Plugins". Is this correct so far?
> 2. Then I copied the "AuthenticationPlugin.class" file to the Directory "C:\Plugins"

Yes. It is correct.
As the document said, you also need to specify JDK's lib folder in the CLASSPATH.

If you don't know about CLASSPATH, I recommend that you copy your JAR file under the following folder.

<sip_server_install_dir>\webapps\sip\WEB-INF\lib


> 3. Afterwards I added the "net.usrdir.plugins" property to the sv.properties file like this: net.usrdir.plugins = myName.Country.AuthenticationPlugin

Is "myName.Country" the package name of your class?


> "net.usrdir.plugins" property and sometimes of the
> "net.userdir.plugins" property.
> What is the difference? What is the correct one?


The correct one is "net.usrdir.plugins".


> 4. The sv.properties file I edited is located in "C:\Program Files\Brekeke\sip\webapps\sip\WEB-INF\work\sv\sv.properties"

It is no problem.
Also you can set the variable "net.usrdir.plugins" in the [Configuration]->[Advanced] page.


> 5. After restarting the Server I opened the logfile and found a line:
>
> registrar: plugin=com.brekeke.sipadmin.plugins.RegisteredSqlDB : loaded


It is the Register Plug-in not Authentication Plug-in

For debugging the Authentication Plug-in, let you set the following in the [Configuration]->[Advanced] page.

net.userdir.loglevel.file=255
toffifee
Posts: 6
Joined: Tue Mar 19, 2013 4:46 am

Post by toffifee »

lakeview wrote: If you don't know about CLASSPATH, I recommend that you copy your JAR file under the following folder.

<sip_server_install_dir>\webapps\sip\WEB-INF\lib
Hi, thank you for the fast answer. Must it be a .jar file or can it also be the .class file?

If I copy it to this location I don't have to care about the JDK's lib right?
lakeview wrote: Is "myName.Country" the package name of your class?
Yes it is.


Many Thanks.

Thomas
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

> Must it be a .jar file or can it also be the .class file?

Yes. It you put your plugin under the lib folder, it must be JAR file.


> If I copy it to this location I don't have to care about the JDK's lib right?

Yes


Good luck.
toffifee
Posts: 6
Joined: Tue Mar 19, 2013 4:46 am

Post by toffifee »

It finally worked. Thank you very much :)
lakeview
Posts: 319
Joined: Thu Nov 15, 2007 11:54 am
Location: Florida

Post by lakeview »

I'm glad to know it :-)
Post Reply