Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Cannot load Authentication Plugin
Author Message
toffifee
Brekeke Junior Member


Joined: 19 Mar 2013
Posts: 6

PostPosted: Tue Mar 19, 2013 5:05 am    Post subject: Cannot load Authentication Plugin Reply with quote

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
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Tue Mar 19, 2013 9:06 am    Post subject: Reply with quote

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
Back to top
View user's profile
toffifee
Brekeke Junior Member


Joined: 19 Mar 2013
Posts: 6

PostPosted: Tue Mar 19, 2013 9:15 am    Post subject: Reply with quote

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
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Tue Mar 19, 2013 4:49 pm    Post subject: Reply with quote

> 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.
Back to top
View user's profile
toffifee
Brekeke Junior Member


Joined: 19 Mar 2013
Posts: 6

PostPosted: Wed Mar 20, 2013 1:00 am    Post subject: Reply with quote

It finally worked. Thank you very much Smile
Back to top
View user's profile
lakeview
Brekeke Master Guru


Joined: 15 Nov 2007
Posts: 319
Location: Florida

PostPosted: Wed Mar 20, 2013 9:05 am    Post subject: Reply with quote

I'm glad to know it Smile
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1