Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Accounting plug in doesn't work
Author Message
icx_zbigniew
Brekeke Newbie


Joined: 20 Oct 2011
Posts: 2

PostPosted: Thu Oct 20, 2011 7:04 am    Post subject: Accounting plug in doesn't work Reply with quote

1. Brekeke Product Name and version: Brekeke SIP Server 2.4.8.6/286.3

2. Java version: JSE 1.6.0_07

3. OS type and the version: MS Windows Server 2003 SP2

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

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html : Pattern 1

6. Your problem:

I followed the instructions for creating an accounting plugin and installed the plugin jar and all dependent jars in the location as specified. I also added the plugin as a session variable in my dial plan, again as documented but it does not work and I can not find out why. Could you please help?

1. Plug-in code

//Logging.jave file - I removed most of the codes and I left just something to see if it works. The file was compiled, jar & put into "C:\Program Files\Brekeke\proxy\webapps\proxy\WEB-INF\lib\Logging.jar"

package Logging;

import com.brekeke.net.sip.sv.session.*;
import com.brekeke.net.sip.sv.session.plugins.*;
import java.io.*;


public class Logging extends AccountingBase {


public int eventSessionStart( EventStat evstat, String[] argprm ) {

int ris =0;

try {
File f = new File("d:\\prova.txt");
FileOutputStream fos=new FileOutputStream(f);
PrintStream ps=new PrintStream(fos);
ps.println("test");
fos.close();

}
catch ( Exception ex ) {
}

return ris;

}

}


2. Dial Plan

MATCHING
$request=^INVITE

DEPLOY
$session=Logging
$continue=true



Thanks in advance
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 245

PostPosted: Thu Oct 20, 2011 8:42 pm    Post subject: Reply with quote

Did you set the following variable in the [Config] -> [Advanced] page?
net.sip.session.plugins.pkg = Logging

Also, did you restart Brekeke SIP Server?
Back to top
View user's profile
icx_zbigniew
Brekeke Newbie


Joined: 20 Oct 2011
Posts: 2

PostPosted: Fri Oct 21, 2011 12:56 am    Post subject: Reply with quote

No, but after I did that it worked!

Thanks a lot Laurie!
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 245

PostPosted: Wed Oct 26, 2011 10:23 am    Post subject: Reply with quote

It seems you didn't read the API document until the end :)
Anyway Im glad to know you solved the problem.
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