
24.3 Performing the Customisation
The following steps should be carried out in order to provide the additional function.
1. Backup the existing SIP Registrar source example which is located in the
$RHINO_HOME/examples/sip/src/com/
opencloud/slee/services/sip/registrar
.
2. Install the SIP Registrar (if it is not already installed). From the
examples/sip
directory under the Rhino SLEE directory,
run the following command:
ant deployregistrar
3. To see what the Registrar SBB is doing when it processes requests, set the trace level of the Registrar SBB to "Finest".
This can be done using the Command Console command in the client/bin directory under the
$RHINO_HOME
directory:
rhino-console setTraceLevel sbb "RegistrarSbb 1.5, Open Cloud" Finest
Alternatively, the property
sbb.tracelevel
can be set to
Finest
in the build.properties file. This sets the trace level for
all the example SBBs when they are next deployed.
4. Test the registrar and view the trace output to see the SIP messages and debug logging from the Registrar SBB. How to
perform this action is described in Chapter 22.
5. Undeploy the existing Registrar using the following command.
ant undeployregistrar
6. Modify the Registrar SBB so that it rejects requests from domains that it does not know about.
First, add an env-entry to the Registrar SBBs deployment descriptor. Env-entries (environment entries) are used for
specifying static configuration information for the SBB. The env-entry will specify the domain that the Registrar SBB
will accept requests from.
The Registrar SBBs deployment descriptor file is
$RHINO_HOME/examples/sip/src/com/opencloud/slee/services/
sip/registrar/META-INF/sbb-jar.xml
. Edit this file and add the following element at line 64 under the other env-
entry elements:
<env-entry>
<env-entry-name>myDomain</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>opencloud.com</env-entry-value>
</env-entry>
The
opencloud.com
domain is just an example. Any other domain could be used.
Now, edit the source code of the Registrar SBB so that it checks the domain name in the request.
Insert the code below (commented as NEW CODE) at line 54, in the method "onRegisterEvent" in file
$RHINO_HOME/
examples/sip/src/com/opencloud/slee/services/sip/registrar/RegistrarSbb.java
:
Open Cloud Rhino 1.4.3 Administration Manual v1.1 170
Comentarios a estos manuales