Forums Read-only archive

How to find out if my plugin is being used?

10 posts · Brekeke SIP Server Forum

rituraj_tiwari Original post
1. Brekeke Product Name and version:Brekeke SIP Server, 2.2.6.2/276

2. Java version: 1.5.0_06

3. OS type and the version: Windows 2003, v5.2

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

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html : 2

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.

My questions are:
What Brekeke log file would I see to ensure my plugin is being activated and used?

My plugin code uses log4j to generate diagnostic logs that I am hoping to use to debug the behavior of my plugin. If I don't touch the Brekeke logging configuration, where would my plugin code's log entries end up?

Thanks.
lakeview
can you find any log files under ..../webapps/proxy/WEB-INF/work/logs ?
rituraj_tiwari
Hi Lakeview,
Thanks for responding. Yes, I see a full set of logs under sv/logs/year/date.

I see session.* and sv.* lo;g files. I have turned up the logging level to 255, so sv logs have a lot of detail in them.
lakeview
Hi rituraj,

If you raised the logging level to 255, you can find the "plugin" field in the log which indicates the used plugin name.

In your case, it should be your plugin's name..
let you check it.
rituraj_tiwari
Hi Lekeview,
The plugin field does not report my plugin. It shows the rule I added (CDR), but does not report my class.

session.4: sipex.3: start: from=<sip:650766xxxx@192.168.220.25:5060> to=<sip:650288xxxx@64.140.xxx.xxx:5060>

session.4: information:
starttime = 04/18/11 01:56:34.051
spiral-hop = 1
plugin = com.brekeke.net.sip.sv.session.plugins.InviteSession
request = INVITE sip:channel4@74.220.xxx.xxx:5060 SIP/2.0
rulename = CDR & 603766XXXX_Raj
org:From: = sip:650766xxxx@192.168.220.25:5060
new:From: = null
org:To: = sip:603766xxxx@74.220.xxx.xxx
new:To: = sip:650288xxxx@64.140.xxx.xxx:5060
src:addr/port = 74.220.xxx.xxx:5060 (UDP global-addr if)
src:interface = 10.10.xxx.xxx:5060 (UDP local-addr)
dst:addr/port = 64.140.xxx.xxx:5060 (UDP global-addr)
dst:interface = 74.220.xxx.xxx:5060 (UDP global-addr)
mode:B2BUA = off
mode:RTPrelay = on
mode:Auth = auto
mode:NAT = auto

session.4: phase=0: Initializing
lakeview
>> plugin = com.brekeke.net.sip.sv.session.plugins.InviteSession

Right.. It is the default plugin for INVITE.

I suppose there are three possibilities of the cause.

- You didn't create the plugin based on valid API.

- You didn't install the plugin into the valid folder.

- You didn't define the DialPlan rule to point your plugin correctly.


Most of cases.. it will be a DialPlan issue.
Check the DialPlan again..
rituraj_tiwari
I see my plugin's dial plan rule begin activated in the logs:

Code:

rulename = CDR & 603766XXXX_Raj 
The dial plan has the following:

Code:

Matching Patterns: $request=^INVITE
Deploy Patterns: $session=com.surgent.cdr.SurgentCdrGenerator, $continue=true
I followed the accounting plugin guid where I created a class for my plugin:

Code:

public class SurgentCdrGenerator extends AccountingBase
{
    ...
}
Then, created a jar file with my plugin code called cdr-plugin.jar. I placed this jar file and jar dependencies under WEB-INF/lib folder of the SIP proxy.

Any ideas on why my plugin is not being reported?
lakeview
Hi

>> $session=com.surgent.cdr.SurgentCdrGenerator,

You don't need , (Comma) in the end of the $session definition.
rickywillson
I follows your instructions as you said but it's not properly installed due to some bugs. So, please suggest any good bug tracker.
Harold
what kind of bugs do you have?
have you raised the logging-level?