1. How To Create a Plug-In
For building your class, include:
<sip_server_install_dir>\webapps\proxy\WEB-INF\lib\ondosip.jar
in the classpath.
Please contain a method using the syntax below into your plug-in class.
Syntax:
static public String methodname( String[] arg, com.brekeke.net.sip.SIPpacket sippacket, Properties pr ) throws Exception
or
static public boolean methodname( String[] arg, com.brekeke.net.sip.SIPpacket sippacket, Properties pr ) throws Exception
Methodname:
The methodname should be small letters.
Parameters:
arg – parameters specified at the Dial Plan
sippacket – SIP packet
pr – properties
Returns:
String or boolean
If null is returned, the rule will not be matched.
The method will be called from the Matching Patterns by specifying “$classname.methodname“.
How to obtain a SIP header value:
String value = sippacket.getValue( "header_name" ) ;
e.g:
String valueFrom = sippacket.getValue( "From" ) ;
How to obtain a property value:
String value = pr.getProperty( "key" )
e.g:
String valueServerName = pr.getProperty( "sv.name" )