Edition 1.0
1801 Varsity Drive
Raleigh, NC 27606-2072USAPhone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
PO Box 13588Research Triangle Park, NC 27709USA
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F1 to switch to the first virtual terminal. Press Ctrl+Alt+F7 to return to your X-Windows session.
Mono-spaced Bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose from the main menu bar. Next, choose from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
Mono-spaced Roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
Mono-spaced Roman but are presented and highlighted as follows:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
}
}
<x>" (where <x> is the latest minor version release number). On the next page, select your language and platform (both architecture—whether 32- or 64-bit—and operating system), read and agree to the Java Development Kit 5.0 License Agreement, and proceed to the download page.
jdk-1_5_0_16-linux-i586-rpm.bin), and the other is merely a self-extracting file (e.g. jdk-1_5_0_16-linux-i586.bin). If you are installing the JDK on Red Hat Enterprise Linux, Fedora, or another RPM-based Linux system, we suggest that you download the self-extracting file containing the RPM package, which will set up and use the SysV service scripts in addition to installing the JDK. We also suggest installing the self-extracting RPM file if you will be running JBCP in a production environment.
~]$ chmod +x "jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin" ~]$ ./"jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin"
-compat packages from the JPackage project. Remember to download the -compat package which corresponds correctly to the minor release number of the JDK you installed. The compat packages are available from ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/.
-compat package in addition to the JDK if you installed the self-extracting RPM file! The -compat package merely performs the same SysV service script set up that the RPM version of the JDK installer does.
JAVA_HOME environment variable, and ensuring that the system is using the proper JDK (or JRE) using the alternatives command. Setting JAVA_HOME usually overrides the values for java, javac and java_sdk_1.5.0 in alternatives, but we will set them all just to be safe and consistent.
JAVA_HOME Environment Variable on Generic LinuxJAVA_HOME environment variable exists and points to the location of your JDK installation.
JAVA_HOME Environment Variable on LinuxJAVA_HOME is set on your system by echoing it on the command line:
~]$ echo $JAVA_HOME
JAVA_HOME is not set already, then you must set its value to the location of the JDK installation on your system. You can do this by adding two lines to your personal ~/.bashrc configuration file. Open ~/.bashrc (or create it if it doesn't exist) and add a line similar to the following one anywhere inside the file:
export JAVA_HOME="/usr/lib/jvm/jdk1.5.0_<version>"
exported from ~/.bashrc files are local to that user).
java, javac and java_sdk_1.5.0 Using the alternatives command alternativesalternatives command, including Red Hat Enterprise Linux and Fedora, you can easily choose which JDK (or JRE) installation you wish to use, as well as which java and javac executables should be run when called.
/usr/sbin/alternatives with the --config java option to select between JDKs and JREs installed on your system:
root@localhost ~]$ /usr/sbin/alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java 2 /usr/lib/jvm/jre-1.6.0-sun/bin/java *+ 3 /usr/lib/jvm/jre-1.5.0-sun/bin/java Enter to keep the current selection[+], or type selection number:
java executable. In the alternatives information printout above, a plus (+) next to a number indicates the one currently being used. As per alternatives' instructions, pressing Enter will simply keep the current JVM, or you can enter the number corresponding to the JVM you would prefer to use.
javac command and the java_sdk_1.5.0 environment variable, as the root user:
~]$ /usr/sbin/alternatives --config javac
~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
JAVA_HOME Environment Variable on WindowsPATH, run the java -version command in the terminal from your home directory:
~]$ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b03) Java HotSpot(TM) Client VM (build 1.5.0_16-b03, mixed mode, sharing)
alternatives, and/or by setting JAVA_HOME.
yum remove <jdk_rpm_name> command.
Start menu for an uninstall command, or use Add/Remove Programs.
~]$ mkdir "jbcp-<version>"
~]$ mv "JBCP-1.2.0.GA-jboss-eap-4.3.zip" "jbcp-<version>"
~]$ cd "jbcp-<version>"
jar -xvf command to extract the contents of the zip file into the current directory, thus completing the install:
jbcp-<version>]$ jar -xvf "JBCP-1.2.0.GA-jboss-eap-4.3.zip"
unzip utility is present on your system or is installable, you can use it in lieu of Java's jar -xvf command:
jbcp-<version>]$ unzip "JBCP-1.2.0.GA-jboss-eap-4.3.zip"
unzip's -d<unzip_to_location> option to extract the zip file's contents to a location other than the current directory.
jbcp-<version>]$ rm "JBCP-1.2.0.GA-jboss-eap-4.3.zip"
My Downloads folder. First, using Windows Explorer, create a subfolder in My Downloads to extract the zip file's contents into. When you name this folder, it is good practice to include the version number; if you do so, remember to correctly match it with the version of the JBoss Communications Platform binary distribution you downloaded. In these instructions, we will refer to this folder as jbcp-<version>.
jar -xvf command to extract the binary distribution files from the zip archive. To use this method instead, first move the downloaded zip file from My Downloads to the folder that you just created to hold the JBoss Communications Platform files.
cd command:
C:\Users\Me>cd "My Downloads\jbcp-<version>"
jar -xvf command to extract the archive contents into the current folder.
C:\Users\Me\My Downloads\jbcp-<version>>jar -xvf "JBCP-1.2.0.GA-jboss-eap-4.3.zip"
jbcp-<version>) to another location. This step is not strictly necessary, but it is probably a good idea to move the folder from My Downloads to a user-defined location for storing runnable programs. Any location will suffice, however.
C:\Users\Me\My Downloads\jbcp-<version>>delete "JBCP-1.2.0.GA-jboss-eap-4.3.zip"
JBOSS_HOME environment variable to run any of the JBoss Communications Platform servers unless JBOSS_HOME is already set.
JBOSS_HOME was set previously or not is to perform a simple check which may save you time and frustration.
echo$JBOSS_HOME to see if it is currently defined in your environment:
~]$ echo $JBOSS_HOME
JBOSS_HOME is already set on your system, then you have three options:
unset it, which only takes effect for the current session and is therefore not advised;
JBOSS_HOME is defined, such as in your local ~/.bashrc startup script in Linux, or, possibly, system-wide in /etc/bashrc, and remove it or comment it out;
JBOSS_HOME.
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
JBOSS_HOME in your personal ~/.bashrc startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Linux, it is possible to set JBOSS_HOME as a system-wide environment variable, by defining it in /etc/bashrc, but this method is neither recommended nor detailed in these instructions.
~/.bashrc startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system:
export JBOSS_HOME="/home/<username>/<path>/<to>/<install_directory>"
.bashrc startup script.
source the .bashrc script to force your change to take effect, so that JBOSS_HOME becomes set for the current session[2].
~]$ source ~/.bashrc
JBOSS_HOME is set in the current session, and actually points to the correct location:
JBOSS_HOME has been set correctly to the topmost_directory of the JBCP installation. Note that if you are installing one of the standalone JBCP servers (with JBoss AS bundled!), then JBOSS_HOME would point to the topmost_directory of your server installation.
~]$ echo $JBOSS_HOME /home/silas/jboss-eap-4.3/jboss-as
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
<install_directory>/jboss-eap-4.3/jboss-as/bin/ directory (on Linux or Windows), or by double-clicking the run.bat executable batch file in that same directory (on Windows only). However, we suggest always starting the JAIN SLEE Server using the terminal or Command Prompt because you are then able to read—and act upon—any startup messages, and possibly debug any problems that might arise. In the Linux terminal or Command Prompt, you will be able to tell that the JAIN SLEE Server started successfully if the last line of output is similar to the following (ending with Started in 25s:527ms):
16:29:15,442 INFO [ManagementConsole] Mobicents Management Console initialized 16:29:15,551 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080 16:29:15,586 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009 16:29:15,622 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 25s:527ms
~]$ cd "jbcp-<version>"
jboss-eap-4.3/jboss-as/bin/run.sh start script is executable:
jbcp-<version>]$ chmod +x "jboss-eap-4.3/jboss-as/bin/run.sh"
run.sh Bourne shell script:
jbcp-<version>]$ "./jboss-eap-4.3/jboss-as/bin/run.sh"
run.jar executable Java archive in the jboss-eap-4.3/jboss-as/bin/ directory:
jbcp-<version>]$ java -jar "jboss-eap-4.3/jboss-as/bin/run.jar"
<install_directory>\jboss-eap-4.3\jboss-as\bin\subfolder.
run.bat executable batch file.
<install_directory>\jboss-eap-4.3\jboss-as\bin\ folder in Windows Explorer, or you can open the Command Prompt via the Start menu and navigate to the correct folder:
C:\Users\Me\My Downloads> cd "jbcp-<version>"
run.bat batch file:
C:\Users\Me\My Downloads\jbcp-<version>>jboss-eap-4.3\jboss-as\bin\run.bat
run.jar executable Java archive:
C:\Users\Me\My Downloads\jbcp-<version>>java -jar jboss-eap-4.3\jboss-as\bin\run.jar
16:44:29,745 INFO [Server] Shutdown complete Shutdown complete Halting VM
shutdown.sh or shutdown.jarshutdown.sh Bourne shell script in the <install_directory>/jboss-eap-4.3/jboss-as/bin/ directory. To do so, first change your working directory to the JAIN SLEE Server's topmost directory (the one to which you extracted the downloaded zip file's contents):
~]$ cd "jbcp-<version>"
jboss-eap-4.3/jboss-as/bin//shutdown.sh start script is executable:
jbcp-<version>]$ chmod +x "jboss-eap-4.3/jboss-as/bin/shutdown.sh"
shutdown.sh executable Bourne shell script, and remember to add the -S option (which is the short option for --shutdown) as a command line argument:
jbcp-<version>]$ "./jboss-eap-4.3/jboss-as/bin/shutdown.sh" -S
shutdown.jar executable Java archive to do so (and remembering, again, to add the -S command line argument):
jbcp-<version>]$ java -jar "jboss-eap-4.3/jboss-as/bin/shutdown.jar" -S
shutdown.bat or the shutdown.jar executable file in the <install_directory>\jboss-eap-4.3\jboss-as\bin\ subfolder of the JBoss Communications Platform binary distribution. Make sure to add the -S option (which is the short option for --shutdown) as a command line argument.
C:\Users\Me\My Downloads\jbcp-<version>>jboss-eap-4.3\jboss-as\bin\shutdown.bat -S
shutdown.jar Java archive by running the java -jar command, and remembering to add the -S option as a command line argument:
C:\Users\Me\My Downloads\jbcp-<version>>java -jar jboss-eap-4.3\jboss-as\bin\shutdown.jar -S
[1] At this point in time, it is possible to run most JBCP servers, such as the JAIN SLEE Server, using a Java 6 JRE or JDK. Be aware, however, that presently the XML Document Management Server does not run on Java 6. We suggest checking the Mobicents web site, forums or discussion pages if you need to inquire about the status of running the XML Document Management Server with Java 6.
[2]
Note that any other terminals which were opened prior to your having altered .bashrc will need to source~/.bashrc as well should they require access to JBOSS_HOME.
| Revision History | |||
|---|---|---|---|
| Revision 2.0 | Fri Mar 06 2009 | ||
| |||
| Revision 1.0 | Wed Mar 04 2009 | ||
| |||
Edition 1.0
1801 Varsity Drive
Raleigh, NC 27606-2072USAPhone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
PO Box 13588Research Triangle Park, NC 27709USA
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F1 to switch to the first virtual terminal. Press Ctrl+Alt+F7 to return to your X-Windows session.
Mono-spaced Bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose from the main menu bar. Next, choose from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
Mono-spaced Roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
Mono-spaced Roman but are presented and highlighted as follows:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
}
}

ant tasks, or by copying deployable unit files from the resources/resource_adapter subdirectory of a JBCP installation into JBoss's deploy directory. This section illustrates deploying resource adapters using the Mobicents Management Console.

<topmost_directory>/resources/resource_adapter/ subdirectory, where resource_adapter corresponds to the resource adapter you want to install. For example, if you wanted to install the HTTP Servlet resource adapter:

-ra-DU in their file names. Simply select that file in the file chooser and click . Finally, you must click the button to install the deployable unit file, and therefore the corresponding resource adapter.

http://localhost:8080/management-console/. If you are working with a remote machine, replace localhost with the name of the remote machine's host, and 8080 with the correct port.
Main Menu, on the left.
Current View, on the right.
Log Console, on the bottom.

Main Menu items. The Log Console displays important and relevant notifications when operations are executed, such as error and status messages.
SLEE at the top of the Main Menu, displays a status message indicating whether the Management Console is currently running or not, and provides controls to start, stop, and shut down the JAIN SLEE Server.
Deployable UnitsDeployable Units from the Main Menu, and shows a list of all deployable units that can be deployed with the JAIN SLEE Server.

Deployable Units view
ComponentsComponents view, which displays a list of component types, such as services, SBBs, resource adapters, etc., and their current count. Clicking on a component type will cause the management console to show a list of components for that type. From there, you can click on the different components to see their details.

Components view
ServicesServices view shows the list of available services, their state, whether ACTIVE or INACTIVE, and all currently possible actions for that resource adapter, such as activate, deactivate or remove.

Services view
Services view also allows you to control the usage parameters of services.
Resource AdaptersResources from the Main Menu will put the currently-deployed resource adapters in view. There, you can see their name, type, vendor and version. Clicking on one of the resource adapters will provide further information such as the name of the deployable unit, its state, whether ACTIVE or INACTIVE, and the currently possible actions for specific services, such as activating, deactivating, or removing them.

Resources view
Activity ContextsActivities from the Main Menu, and shows the current activity contexts. The TTL field shows how much time the activity can remain idle before being marked for garbage collection.

Activities view
| Revision History | |||
|---|---|---|---|
| Revision 2.0 | Fri Mar 06 2009 | ||
| |||
| Revision 1.0 | Tue Jan 20 2009 | ||
| |||
Edition 1.0
1801 Varsity Drive
Raleigh, NC 27606-2072USAPhone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
PO Box 13588Research Triangle Park, NC 27709USA
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F1 to switch to the first virtual terminal. Press Ctrl+Alt+F7 to return to your X-Windows session.
Mono-spaced Bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose from the main menu bar. Next, choose from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
Mono-spaced Roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
Mono-spaced Roman but are presented and highlighted as follows:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
}
}




server/default/deploy directory contains both HTTP and SIP Servlet applications (WAR and SAR2 files).
server/default/deploy/jboss-web.deployer unit has been modified to provide extended classes to the standard JBoss container classes, in order to allow SIP applications to be loaded and the SIP stack to be started.
server/default/deploy/jboss-web.deployer/context.xml file has been modified to provide the extended manager to be able to manage SIP sessions and SIP application sessions in addition to HTTP sessions.
server/default/deploy/jboss-web.deployer/META-INF/jboss-service.xml file and the server/default/deploy/jboss-web.deployer/META-INF/webserver-xmbean.xml file have been modified so that it is now possible for JBoss containers to correctly deploy SIP servlets and converged applications.
dars directory containing all of the Default Application Router (DAR) properties files for using the various SIP Servlets applications (which come bundled with the release) has been added to the server/default/conf directory.
server/default/deploy/jboss-web.deployer/ directory.
<x>" (where <x> is the latest minor version release number). On the next page, select your language and platform (both architecture—whether 32- or 64-bit—and operating system), read and agree to the Java Development Kit 5.0 License Agreement, and proceed to the download page.
jdk-1_5_0_16-linux-i586-rpm.bin), and the other is merely a self-extracting file (e.g. jdk-1_5_0_16-linux-i586.bin). If you are installing the JDK on Red Hat Enterprise Linux, Fedora, or another RPM-based Linux system, we suggest that you download the self-extracting file containing the RPM package, which will set up and use the SysV service scripts in addition to installing the JDK. We also suggest installing the self-extracting RPM file if you will be running JBCP in a production environment.
~]$ chmod +x "jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin" ~]$ ./"jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin"
-compat packages from the JPackage project. Remember to download the -compat package which corresponds correctly to the minor release number of the JDK you installed. The compat packages are available from ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/.
-compat package in addition to the JDK if you installed the self-extracting RPM file! The -compat package merely performs the same SysV service script set up that the RPM version of the JDK installer does.
JAVA_HOME environment variable, and ensuring that the system is using the proper JDK (or JRE) using the alternatives command. Setting JAVA_HOME usually overrides the values for java, javac and java_sdk_1.5.0 in alternatives, but we will set them all just to be safe and consistent.
JAVA_HOME Environment Variable on Generic LinuxJAVA_HOME environment variable exists and points to the location of your JDK installation.
JAVA_HOME Environment Variable on LinuxJAVA_HOME is set on your system by echoing it on the command line:
~]$ echo $JAVA_HOME
JAVA_HOME is not set already, then you must set its value to the location of the JDK installation on your system. You can do this by adding two lines to your personal ~/.bashrc configuration file. Open ~/.bashrc (or create it if it doesn't exist) and add a line similar to the following one anywhere inside the file:
export JAVA_HOME="/usr/lib/jvm/jdk1.5.0_<version>"
exported from ~/.bashrc files are local to that user).
java, javac and java_sdk_1.5.0 Using the alternatives command alternativesalternatives command, including Red Hat Enterprise Linux and Fedora, you can easily choose which JDK (or JRE) installation you wish to use, as well as which java and javac executables should be run when called.
/usr/sbin/alternatives with the --config java option to select between JDKs and JREs installed on your system:
root@localhost ~]$ /usr/sbin/alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java 2 /usr/lib/jvm/jre-1.6.0-sun/bin/java *+ 3 /usr/lib/jvm/jre-1.5.0-sun/bin/java Enter to keep the current selection[+], or type selection number:
java executable. In the alternatives information printout above, a plus (+) next to a number indicates the one currently being used. As per alternatives' instructions, pressing Enter will simply keep the current JVM, or you can enter the number corresponding to the JVM you would prefer to use.
javac command and the java_sdk_1.5.0 environment variable, as the root user:
~]$ /usr/sbin/alternatives --config javac
~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
JAVA_HOME Environment Variable on WindowsPATH, run the java -version command in the terminal from your home directory:
~]$ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b03) Java HotSpot(TM) Client VM (build 1.5.0_16-b03, mixed mode, sharing)
alternatives, and/or by setting JAVA_HOME.
yum remove <jdk_rpm_name> command.
Start menu for an uninstall command, or use Add/Remove Programs.
~]$ mkdir "mss-jboss-<version>"
~]$ mv "mss-0.7.2-jboss-4.2.3.GA-0901261304.zip" "mss-jboss-<version>"
~]$ cd "mss-jboss-<version>"
jar -xvf command to extract the contents of the zip file into the current directory, thus completing the install:
mss-jboss-<version>]$ jar -xvf "mss-0.7.2-jboss-4.2.3.GA-0901261304.zip"
unzip utility is present on your system or is installable, you can use it in lieu of Java's jar -xvf command:
mss-jboss-<version>]$ unzip "mss-0.7.2-jboss-4.2.3.GA-0901261304.zip"
unzip's -d<unzip_to_location> option to extract the zip file's contents to a location other than the current directory.
mss-jboss-<version>]$ rm "mss-0.7.2-jboss-4.2.3.GA-0901261304.zip"
My Downloads folder. First, using Windows Explorer, create a subfolder in My Downloads to extract the zip file's contents into. When you name this folder, it is good practice to include the version number; if you do so, remember to correctly match it with the version of the MSS for JBoss binary distribution you downloaded. In these instructions, we will refer to this folder as mss-jboss-<version>.
jar -xvf command to extract the binary distribution files from the zip archive. To use this method instead, first move the downloaded zip file from My Downloads to the folder that you just created to hold the SIP Servlets Server files.
cd command:
C:\Users\Me>cd "My Downloads\mss-jboss-<version>"
jar -xvf command to extract the archive contents into the current folder.
C:\Users\Me\My Downloads\mss-jboss-<version>>jar -xvf "mss-0.7.2-jboss-4.2.3.GA-0901261304.zip"
mss-jboss-<version>) to another location. This step is not strictly necessary, but it is probably a good idea to move the installation folder from My Downloads to a user-defined location for storing runnable programs. Any location will suffice, however.
C:\Users\Me\My Downloads\mss-jboss-<version>>delete "mss-0.7.2-jboss-4.2.3.GA-0901261304.zip"
JBOSS_HOME environment variable and then, optionally, customizing your MSS for JBoss server by adding SIP Connectors, configuring the application router, and configuring logging.
JBOSS_HOME in the instructions in the following section, see Section 2.3, “Configuring” to learn what and how to configure MSS for JBoss.
JBOSS_HOME, you can simply run your MSS for JBoss server now and return to this section to configure it later.
JBOSS_HOME environment variable to run any of the JBoss Communications Platform servers unless JBOSS_HOME is already set.
JBOSS_HOME was set previously or not is to perform a simple check which may save you time and frustration.
echo$JBOSS_HOME to see if it is currently defined in your environment:
~]$ echo $JBOSS_HOME
JBOSS_HOME is already set on your system, then you have three options:
unset it, which only takes effect for the current session and is therefore not advised;
JBOSS_HOME is defined, such as in your local ~/.bashrc startup script in Linux, or, possibly, system-wide in /etc/bashrc, and remove it or comment it out;
JBOSS_HOME.
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
JBOSS_HOME in your personal ~/.bashrc startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Linux, it is possible to set JBOSS_HOME as a system-wide environment variable, by defining it in /etc/bashrc, but this method is neither recommended nor detailed in these instructions.
~/.bashrc startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system:
export JBOSS_HOME="/home/<username>/<path>/<to>/<install_directory>"
.bashrc startup script.
source the .bashrc script to force your change to take effect, so that JBOSS_HOME becomes set for the current session[5].
~]$ source ~/.bashrc
JBOSS_HOME is set in the current session, and actually points to the correct location:
JBOSS_HOME has been set correctly to the topmost_directory of the JBCP installation. Note that if you are installing one of the standalone JBCP servers (with JBoss AS bundled!), then JBOSS_HOME would point to the topmost_directory of your server installation.
~]$ echo $JBOSS_HOME /home/silas/jboss-eap-4.3/jboss-as
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
bin directory (on Linux or Windows), or by double-clicking the run.bat executable batch file in that same directory (on Windows only). However, we suggest always starting the JBoss Application Server using the terminal or Command Prompt because you are then able to read—and act upon—any startup messages, and possibly debug any problems that may arise. In the Linux terminal or Command Prompt, you will be able to tell that the server started successfully if the last line of output is similar to the following (ending with “Started in 23s:648ms”):
17:48:01,247 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 20s:861ms
downloads]$ cd "mss-jboss-<version>"
bin/run.sh start script is executable:
mss-jboss-<version>]$ chmod +x bin/run.sh
run.sh Bourne shell script:
mss-jboss-<version>]$ ./bin/run.sh
run.jar executable Java archive in the bin directory:
mss-jboss-<version>]$ java -jar bin/run.jar
bin subfolder.
run.bat executable batch file.
<topmost_directory>\bin folder in Windows Explorer, or you can open the Command Prompt via the Start menu and navigate to the correct folder:
C:\Users\Me\My Downloads> cd "mss-jboss-<version>"
run.bat batch file:
C:\Users\Me\My Downloads\mss-jboss-<version>>bin\run.bat
run.jar executable Java archive:
C:\Users\Me\My Downloads\mss-jboss-<version>>java -jar bin\run.jar
[Server] Shutdown complete Shutdown complete Halting VM
shutdown.sh or shutdown.jarshutdown.sh Bourne shell script in the <topmost_directory>/bin directory. To do so, first change your working directory to the binary distribution's topmost directory (the one to which you extracted the downloaded zip file's contents):
downloads]$ cd "mss-jboss-<version>"
mss-jboss-<version>]$ chmod +x bin/shutdown.sh
shutdown.sh executable Bourne shell script, and remember to add the -S option (which is the short option for --shutdown) as a command line argument:
mss-jboss-<version>]$ ./bin/shutdown.sh -S
shutdown.jar executable Java archive to do so (and remembering, again, to add the -S command line argument):
mss-jboss-<version>]$ java -jar bin/shutdown.jar -S
shutdown.bat or the shutdown.jar executable file in the bin subfolder of the MSS for JBoss binary distribution. Make sure to add the -S option (which is the short option for --shutdown) as a command line argument.
C:\Users\Me\My Downloads\mss-jboss-<version>>bin\shutdown.bat -S
shutdown.jar Java archive by running the java -jar command, and remembering to add the -S option as a command line argument:
C:\Users\Me\My Downloads\mss-jboss-<version>>java -jar bin\shutdown.jar -S
server.xml configuration file has been modified to provide extended classes to the standard Tomcat container classes, in order to allow SIP applications to be loaded and the SIP stack started.
dars directory containing the default applications' router properties files for using the SIP Servlet Click-to-Call application (which comes bundled with the release) has been added to the conf directory.
lib directory have been added to enable SIP Servlet functionality.
<x>" (where <x> is the latest minor version release number). On the next page, select your language and platform (both architecture—whether 32- or 64-bit—and operating system), read and agree to the Java Development Kit 5.0 License Agreement, and proceed to the download page.
jdk-1_5_0_16-linux-i586-rpm.bin), and the other is merely a self-extracting file (e.g. jdk-1_5_0_16-linux-i586.bin). If you are installing the JDK on Red Hat Enterprise Linux, Fedora, or another RPM-based Linux system, we suggest that you download the self-extracting file containing the RPM package, which will set up and use the SysV service scripts in addition to installing the JDK. We also suggest installing the self-extracting RPM file if you will be running JBCP in a production environment.
~]$ chmod +x "jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin" ~]$ ./"jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin"
-compat packages from the JPackage project. Remember to download the -compat package which corresponds correctly to the minor release number of the JDK you installed. The compat packages are available from ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/.
-compat package in addition to the JDK if you installed the self-extracting RPM file! The -compat package merely performs the same SysV service script set up that the RPM version of the JDK installer does.
JAVA_HOME environment variable, and ensuring that the system is using the proper JDK (or JRE) using the alternatives command. Setting JAVA_HOME usually overrides the values for java, javac and java_sdk_1.5.0 in alternatives, but we will set them all just to be safe and consistent.
JAVA_HOME Environment Variable on Generic LinuxJAVA_HOME environment variable exists and points to the location of your JDK installation.
JAVA_HOME Environment Variable on LinuxJAVA_HOME is set on your system by echoing it on the command line:
~]$ echo $JAVA_HOME
JAVA_HOME is not set already, then you must set its value to the location of the JDK installation on your system. You can do this by adding two lines to your personal ~/.bashrc configuration file. Open ~/.bashrc (or create it if it doesn't exist) and add a line similar to the following one anywhere inside the file:
export JAVA_HOME="/usr/lib/jvm/jdk1.5.0_<version>"
exported from ~/.bashrc files are local to that user).
java, javac and java_sdk_1.5.0 Using the alternatives command alternativesalternatives command, including Red Hat Enterprise Linux and Fedora, you can easily choose which JDK (or JRE) installation you wish to use, as well as which java and javac executables should be run when called.
/usr/sbin/alternatives with the --config java option to select between JDKs and JREs installed on your system:
root@localhost ~]$ /usr/sbin/alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java 2 /usr/lib/jvm/jre-1.6.0-sun/bin/java *+ 3 /usr/lib/jvm/jre-1.5.0-sun/bin/java Enter to keep the current selection[+], or type selection number:
java executable. In the alternatives information printout above, a plus (+) next to a number indicates the one currently being used. As per alternatives' instructions, pressing Enter will simply keep the current JVM, or you can enter the number corresponding to the JVM you would prefer to use.
javac command and the java_sdk_1.5.0 environment variable, as the root user:
~]$ /usr/sbin/alternatives --config javac
~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
JAVA_HOME Environment Variable on WindowsPATH, run the java -version command in the terminal from your home directory:
~]$ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b03) Java HotSpot(TM) Client VM (build 1.5.0_16-b03, mixed mode, sharing)
alternatives, and/or by setting JAVA_HOME.
yum remove <jdk_rpm_name> command.
Start menu for an uninstall command, or use Add/Remove Programs.
~]$ cd downloads
downloads, create a subdirectory to hold the unzipped MSS for Tomcat files. It is good practice to include the version number in this directory name; if you do so, remember to correctly match it with the version of the MSS for Tomcat binary distribution you downloaded.
~]$ mkdir "mss-tomcat-<version>"
~]$ mv "mss-0.7.2-apache-tomcat-6.0.14-0901261255.zip" "mss-tomcat-<version>"
~]$ cd "mss-tomcat-<version>"
jar -xvf command to extract the contents of the zip file into the current directory, thus completing the install:
mss-tomcat-<version>]$ jar -xvf "mss-0.7.2-apache-tomcat-6.0.14-0901261255.zip"
unzip utility is present on your system or is installable, you can use it in lieu of Java's jar -xvf command:
mss-tomcat-<version>]$ unzip "mss-0.7.2-apache-tomcat-6.0.14-0901261255.zip"
unzip's -d<unzip_to_location> option to extract the zip file's contents to a location other than the current directory.
mss-tomcat-<version>]$ rm "mss-0.7.2-apache-tomcat-6.0.14-0901261255.zip"
My Downloads folder. First, using Windows Explorer, create a subfolder in My Downloads to extract the zip file's contents into. When you name this folder, it is good practice to include the version number; if you do so, remember to correctly match it with the version of the MSS for Tomcat binary distribution you downloaded. In these instructions, we will refer to this folder as mss-tomcat-<version>.
jar -xvf command to extract the binary distribution files from the zip archive. To use this method instead, first move the downloaded zip file from My Downloads to the folder that you just created to hold the SIP Servlets Server files.
cd command.
jar -xvf command to extract the archive contents into the current folder.
C:\Users\Me\My Downloads\mss-tomcat-<version>>jar -xvf "mss-0.7.2-apache-tomcat-6.0.14-0901261255.zip"
mss-tomcat-<version>) to another location. This step is not strictly necessary, but it is probably a good idea to move the installation folder from My Downloads to a user-defined location for storing runnable programs. Any location will suffice, however.
C:\Users\Me\My Downloads\mss-tomcat-<version>>delete "mss-0.7.2-apache-tomcat-6.0.14-0901261255.zip"
CATALINA_HOME environment variable. Setting it (or re-setting it) will always work. Whether or not you need to set CATALINA_HOME depends on the following factors:
CATALINA_HOME is not set on your system, then you do not need to set it, but doing so will do no harm.
CATALINA_HOME is (already) set on your system, then you need to make sure it points to the location of the new Mobicents server.
CATALINA_HOME.
CATALINA_HOME on both Linux and Windows.
CATALINA_HOME Environment Variable on LinuxCATALINA_HOME environment variable must point to the location of your Tomcat installation. Any Mobicents server which runs on top of the Tomcat servlet container has a topmost directory, i.e. the directory in which you unzipped the zip file to install the server, and underneath that directory, a bin directory. CATALINA_HOME must be set to the topmost directory of your Mobicents server installation.
~/.bashrc file has the advantage that it will always be set (for you, as a user) each time you log in or reboot the system. To do so, open ~/.bashrc in a text editor (or create the file if it doesn't already exist) and insert the following line anywhere in the file, taking care to substitute <mobicents_server> for the topmost directory of the Mobicents server you installed:
export CATALINA_HOME="/home/<username>/<path>/<to>/<mobicents_server>"
.bashrc.
source your .bashrc file to make your change take effect (so that CATALINA_HOME is set) for the current session:
~]$ source ~/.bashrc
CATALINA_HOME has been set correctly (that it leads to the right directory), and has taken effect in the current session.
CATALINA_HOME:
~]$ echo $CATALINA_HOME
CATALINA_HOME:
~]$ cd $CATALINA_HOME && pwd
CATALINA_HOME Environment Variable on WindowsCATALINA_HOME environment variable must point to the location of your Tomcat installation. Any Mobicents server which runs on top of the Tomcat servlet container has a topmost directory, i.e. the directory in which you unzipped the zip file to install the server, and underneath that directory, a bin directory. CATALINA_HOME must be set to the topmost directory of your Mobicents server installation.
CATALINA_HOME environment variable as the administrator, and if you planning to run Tomcat as a normal user, then set CATALINA_HOME as a user environment variable.
CATALINA_HOME environment variable and then, optionally, customizing your MSS for Tomcat container by adding SIP Connectors, configuring the application router, and configuring logging. See Section 2.3, “Configuring” to learn what and how to configure MSS for Tomcat.
bin directory (on Linux or Windows), or by double-clicking the run.bat executable batch file in that same directory (on Windows only). However, we suggest always starting Tomcat using the terminal or Command Prompt because you are then able to read—and act upon—any startup messages, and possibly debug any problems that may arise. In the Linux terminal or Command Prompt, you will be able to tell that the container started successfully if the last line of output is similar to the following:
Using CATALINA_BASE: /home/silas/temp/apps/mobicents/sip_servlets_server/mss-tomcat-0.7.2 Using CATALINA_HOME: /home/silas/temp/apps/mobicents/sip_servlets_server/mss-tomcat-0.7.2 Using CATALINA_TMPDIR: /home/silas/temp/apps/mobicents/sip_servlets_server/mss-tomcat-0.7.2/temp Using JRE_HOME: /etc/java-config-2/current-system-vm
~]$ cd "mss-tomcat-<version>"
bin/startup.sh start script is executable:
mss-tomcat-<version>]$ chmod +x bin/startup.sh
startup.sh Bourne shell script:
mss-tomcat-<version>]$ ./bin/startup.sh
bin subfolder.
startup.bat executable batch file.
<topmost_directory>\bin folder in Windows Explorer, or you can open the Command Prompt via the Start menu and navigate to the correct folder:
C:\Users\Me\My Downloads> cd "mss-tomcat-<version>"
startup.bat batch file:
C:\Users\Me\My Downloads\mss-tomcat-<version>>bin\startup.bat
Using CATALINA_BASE: /home/silas/temp/apps/mobicents/sip_servlets_server/mss-tomcat-0.7.2 Using CATALINA_HOME: /home/silas/temp/apps/mobicents/sip_servlets_server/mss-tomcat-0.7.2 Using CATALINA_TMPDIR: /home/silas/temp/apps/mobicents/sip_servlets_server/mss-tomcat-0.7.2/temp Using JRE_HOME: /etc/java-config-2/current-system-vm
shutdown.shshutdown.sh Bourne shell script in the <topmost_directory>/bin directory. To do so, first change your working directory to the binary distribution's topmost directory (the one to which you extracted the downloaded zip file's contents):
downloads]$ cd "mss-tomcat-<version>"
mss-tomcat-<version>]$ chmod +x bin/shutdown.sh
shutdown.sh executable Bourne shell script
mss-tomcat-<version>]$ ./bin/shutdown.sh
shutdown.bat executable batch script in the bin subfolder of the SIP Servlets-customized Tomcat binary distribution:
C:\Users\Me\My Downloads\mss-tomcat-<version>>bin\shutdown.bat
Connector element under the Service element in the container's server.xml configuration file.
127.0.0.1, on port 5080, using the UDP transport protocol, you should insert the following XML element:
ipAddress attribute is not set to 127.0.0.1. This attribute defaults to “false”. Refer to the documentation on STUN support for more information regarding STUN support.
useStun attribute is set to “true”. Refer to the documentation on STUN support for more information regarding STUN support.
stunServerAddress attribute. You should rarely need to change this attribute; also, it is only needed if the useStun attribute is set to “true”. Refer to the documentation on STUN support for more information regarding STUN support.
lib directory.
Service element in the container's server.xml configuration file:
1 <Service name="Sip-Servlets" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" 5 darConfigurationFileLocation="file:///home/silas/workspaces/mobicents-sip-servlets/sip-servlets-examples/reinvite-demo/reinvite-dar.properties">
org.mobicents.servlet.sip.core.SipApplicationDispatcher implementation to use. The routing algorithm and application selection process is performed in that class.
log4j.xml configuration file, which is usually located in the container's lib directory.
Connector element of the container's server.xml configuration file.
[3] Keep in mind that not all capabilities enjoyed by MSS for JBoss are available for MSS for Tomcat.
[4] At this point in time, it is possible to run most JBCP servers, such as the JAIN SLEE Server, using a Java 6 JRE or JDK. Be aware, however, that presently the XML Document Management Server does not run on Java 6. We suggest checking the Mobicents web site, forums or discussion pages if you need to inquire about the status of running the XML Document Management Server with Java 6.
[5]
Note that any other terminals which were opened prior to your having altered .bashrc will need to source~/.bashrc as well should they require access to JBOSS_HOME.
[6] At this point in time, it is possible to run most JBCP servers, such as the JAIN SLEE Server, using a Java 6 JRE or JDK. Be aware, however, that presently the XML Document Management Server does not run on Java 6. We suggest checking the Mobicents web site, forums or discussion pages if you need to inquire about the status of running the XML Document Management Server with Java 6.
sip:receiver@sip-servlets.com. The INVITE is received by the servlet container, which then starts the Location Service.
sip:receiver@127.0.0.1:5090 and sip:receiver@127.0.0.1:6090.
200 OK status code; the second proxy is then cancelled.
200 OK is forwarded to Alice, and call setup is completed as usual.
sip:receiver@127.0.0.1:5090
sip:receiver@127.0.0.1:6090
location-service-1.1.war WAR file and the locationservice-dar.properties DAR file that you downloaded should be placed into different directories in your SIP Servlet Server installation hierarchy. Which directory depends on whether you are using the Location Service with MSS for JBoss or with MSS for Tomcat:
location-service-1.1.war into the JBOSS_HOME/server/default/deploy/ directory, and locationservice-dar.properties into the JBOSS_HOME/server/default/conf/dars/ directory.
location-service-1.1.war into the CATALINA_HOME/webapps/ directory, and locationservice-dar.properties into the CATALINA_HOME/conf/dars/ directory.
darConfigurationFileLocation attribute of the Service element must be set to the value conf/dars/locationservice-dar.properties. The instructions are given below by SIP Servlets Server type:
JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/locationservice-dar.properties:
<Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/locationservice-dar.properties">
darConfigurationFileLocation attribute: your new one.
CATALINA_HOME/conf/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/locationservice-dar.properties:
<Service name="Sip-Servlets" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/locationservice-dar.properties">
darConfigurationFileLocation attribute: your new one.
server.xml file), then you should go ahead and run SIP Servlets Server.
sip:receiver@sip-servlets.com at IP address 127.0.0.1 on port 5090. The second phone can be set up in any way you like. Note that the SIP phones do not have to be registered.
sip:receiver@sip-servlets.com. If the Location Service has been set up correctly and is running, the first phone—as the receiver or callee—should now be ringing.
darConfigurationFileLocation attribute of the Service element, which you set in the server.xml configuration file in Configuring.
sip:receiver@sip-servlets.com. The INVITE is received by the servlet container, which sends a request to debit Alice's account to the Charging Server. The servlet container then invokes the location service.
sip:receiver@127.0.0.1:5090 and sip:receiver@127.0.0.1:6090.
200 (OK), and so the container cancels the other.
200 (OK) is forwarded upstream to Alice and the call setup is carried out as usual.
server.xml configuration file, and then running JBoss AS. Detailed instructions follow.
diameter-event-charging-1.0.war, from http://repository.jboss.org/maven2/org/mobicents/servlet/sip/example/diameter-event-charging/1.0/.
, from http://www.mobicents.org/diametereventcharging-dar.properties.
diameter-event-charging-1.0.war WAR archive into the jboss_home/server/<profile>/deploy directory, where <deploy> is your Configuration Profile, whether “default” or “all” (the latter if you are using MSS for JBoss's clustering capabilities).
diametereventcharging-dar.properties DAR file in your $JBOSS_HOME/server/<profile>/conf/dars directory.
charging_sdk), and then unzip the downloaded zip file (you can use Java's jar -xvf command for this:
~]$ cd charging_sdk charging_sdk]$ jar -xvf ChargingSDK-1_0_D31E.zip
unzip command to do the dirty work:
charging_sdk]$ unzip ChargingSDK-1_0_D31E.zip
server.xml configuration file in your server's $JBOSS_HOME/server/<profile>/deploy/jboss-web.deployer/ directory, and edit the value of the darConfigurationFileLocation attribute of the Service element so that it is “conf/dars/mobicents-dar.properties”. For example:
1 ... <Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" 5 sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" sipApplicationRouterClassName="org.mobicents.servlet.sip.router.DefaultApplicationRouter" darConfigurationFileLocation="conf/dars/mobicents-dar.properties"> ... 10
darConfigurationFileLocation Attribute of the Service TagChargingSDK-1_0_D31E or a similarly-named directory), and run it with the java -jar PPSDiamEmul.jar command:
~]$ java -jar PPSDiamEmul.jar
Configure the Ericsson SDK Charging Emulator

Peer Id to: aaa://127.0.0.1:21812
Realm to: mobicents.org
Host IP to: 127.0.0.1
sip:receiver@sip-servlets on IP address 127.0.0.1 on port 5090. The other phone can be set up any way you like.

sip:receiver@sip-servlets.com. Upon doing so, the other phone should ring or signal that it is being contacted .
INVITE request, checks to see whether the sender's address is a blocked contact. If so, it returns a FORBIDDEN reply; otherwise, call setup proceeds as normal.
sip:blocked-sender@sip-servlets.com
sip:blocked-sender@127.0.0.1
call-blocking-1.1.war WAR file and the call-blocking-servlet-dar.properties DAR file that you downloaded should be placed into different directories in your SIP Servlet Server installation hierachy. Which directory depends on whether you are using the Call-Blocking Service with MSS for JBoss or with MSS for Tomcat:
call-blocking-1.1.war into the JBOSS_HOME/server/default/deploy/ directory, and call-blocking-servlet-dar.properties into the JBOSS_HOME/server/default/conf/dars/ directory.
call-blocking-servlet-dar.properties into the CATALINA_HOME/webapps/ directory, and call-blocking-servlet-dar.properties into the CATALINA_HOME/conf/dars/ directory.
darConfigurationFileLocation attribute of the Service element must be set to the value conf/dars/call-blocking-servlet-dar.properties. The instructions for doing so are given below by SIP Servlets Server type:
JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/call-blocking-servlet-dar.properties:
<Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/call-blocking-servlet-dar.properties">
darConfigurationFileLocation attribute: your new one.
CATALINA_HOME/conf/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/call-blocking-servlet-dar.properties:
<Service name="Sip-Servlets" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/call-blocking-servlet-dar.properties">
darConfigurationFileLocation attribute: your new one.
server.xml file), then you should go ahead and run SIP Servlets Server.
blocked-sender. The From Header should list one of the following addresses: sip:blocked-sender@sip-servlets.com or sip:blocked-sender@127.0.0.1. The SIP softphone does not need to be registered.
FORBIDDEN response.
darConfigurationFileLocation attribute of the Service element, which you set in the server.xml configuration file in Configuring.
INVITE request, checks to see whether the sender's address is among those in a list of addresses which need to be forwarded. If so, then the Call-Forwarding Service acts as a Back-to-Back User Agent (B2BUA), and creates a new call leg to the destination. When the response is received from the new call leg, it sends it an acknowledgement (ACK) and then responds to the original caller. If, on the other hand, the server does not receive an ACK, then it tears down the new call leg with a BYE. Once the BYE is received, then it answers OK directly and forwards the BYE to the new call leg.
sip:receiver@sip-servlets.com
sip:receiver@127.0.0.1
call-forwarding-1.1.war WAR file and the call-forwarding-servlet-dar.properties DAR file that you downloaded should be placed into different directories in your SIP Servlet Server installation hierachy. Which directory depends on whether you are using the Call-Forwarding Service with MSS for JBoss or with MSS for Tomcat:
call-forwarding-1.1.war into the JBOSS_HOME/server/default/deploy/ directory, and call-forwarding-servlet-dar.properties into the JBOSS_HOME/server/default/conf/dars/ directory.
call-forwarding-1.1.war into the CATALINA_HOME/webapps/ directory, and call-forwarding-servlet-dar.properties into the CATALINA_HOME/conf/dars/ directory.
darConfigurationFileLocation attribute of the Service element must be set to the value conf/dars/call-forwarding-b2bua-servlet-dar.properties. The instructions for doing so are given below by SIP Servlets Server type:
JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/call-forwarding-b2bua-servlet-dar.properties:
<Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/call-forwarding-b2bua-servlet-dar.properties">
darConfigurationFileLocation attribute: your new one.
CATALINA_HOME/conf/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/call-forwarding-b2bua-servlet-dar.properties:
<Service name="Sip-Servlets" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/call-forwarding-b2bua-servlet-dar.properties">
darConfigurationFileLocation attribute: your new one.
server.xml file), then you should go ahead and run SIP Servlets Server.
forward-receiver
127.0.0.1
5090
sip:receiver@sip-servlets.com. The first phone, “forward-receiver”, should now be ringing.
darConfigurationFileLocation attribute of the Service element, which you set in the server.xml configuration file in Configuring.
call-blocking-1.1.war, call-forwarding-1.1.war and call-controller-servlet-dar.properties archive files that you downloaded should be placed into different directories in your SIP Servlet Server installation hierachy. Which directory depends on whether you are using the Call-Controller Service with MSS for JBoss or with MSS for Tomcat:
call-blocking-1.1.war and call-forwarding-1.1.war into the JBOSS_HOME/server/default/deploy/ directory, and call-controller-servlet-dar.properties into the JBOSS_HOME/server/default/conf/dars/ directory.
call-blocking-1.1.war and call-forwarding-1.1.war into the CATALINA_HOME/webapps/ directory, and call-controller-servlet-dar.properties into the CATALINA_HOME/conf/dars/ directory.
darConfigurationFileLocation attribute of the Service element must be set to the value conf/dars/call-controller-servlet-dar.properties. Instructions for doing so are given below by SIP Servlets Server type:
JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/call-controller-servlet-dar.properties :
<Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/call-controller-servlet-dar.properties ">
darConfigurationFileLocation attribute: your new one.
CATALINA_HOME/conf/server.xml configuration file and find the Service element. Add an attribute to it called darConfigurationFileLocation, and set it to conf/dars/call-controller-servlet-dar.properties :
<Service name="Sip-Servlets" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/call-controller-servlet-dar.properties ">
darConfigurationFileLocation attribute: your new one.
server.xml file), then you should go ahead and run SIP Servlets Server.
forward-receiver
127.0.0.1
5090
blocked-sender
blocked-sender, make a call to sip:receiver@sip-servlets.com. You should receive a FORBIDDEN response.
forward-receiver
127.0.0.1
5090
forward-sender
forward-sender, make a call to sip:receiver@sip-servlets.com. The first phone, forward-receiver, should now be ringing.
darConfigurationFileLocation attribute of the Service element, which you set in the server.xml configuration file in Configuring.
server.xml configuration file; from the dispatcher MBean; or from the Embedded Jopr integrated management platform.
None concurrency control mode, two messages belonging to the same SipSession can be processed simultaneously, so you must take measures to ensure that access to a shared resource such as the session attribute is synchronized in a thread-safe manner.
SipSession are guaranteed never to be processed simultaneously. Messages from the same SipSession are processed sequentially in their order-of-arrival. However, two (or more) messages from different SipSessions in the same SipApplicationSession may be processed simultaneously, in which case you should take measures to ensure shared resource synchronization. You should also pay special attention to Back-to-Back User Agent (B2BUA) cases in which each leg of the B2BUA consists of a different SipSession in the same SipApplicationSession.
SipSession or from the same SipApplicationSession will ever be processed simultaneously: they are instead processed sequentially in their order-of-arrival. This mode is the most thread-safe. However, you must still be careful if you are accessing shared resources in an unmanaged way, such as by accessing a SipSession attribute from an unmanaged thread, or from an Enterprise JavaBean. If you do so, be aware that such access will not be synchronized.
1500. If the SIP message queue becomes full, the container immediately begins rejecting any new SIP requests with a 503 (Service Unavailable) response until the queue is once again diminished. Note that in this situation, only new SIP requests are rejected; SIP responses which arrive in the milieu of a full queue are appropriately stored and are processed eventually.
server.xml configuration file, from the dispatcher MBean, or from the Embedded Jopr integrated management platform. Instructions for each method are given below.

SIP Servlets Management Console in your browser (by going to http://localhost:8080/sip-servlets-management), making your changes, and then ing them. Note that configuring the settings in the SIP Servlets Management Console does not persist across reboots. To make your settings changes permanent, you should edit your server's server.xml configuration file; instructions for doing so follow.
server.xmlserver.xml configuration file, which has the benefit of making your chosen settings changes permanent. Instructions follow, grouped by the SIP Servlets Server you are running:
$JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml configuration file in a text editor.
Service element and add a concurrencyControlMode and/or a sipMessageQueueSize attribute to it.
sipMessageQueueSize attribute is 1500. That is the default value which is used even if the attribute is not present in server.xml. You will need to play around with this setting for the optimal value, which depends on the hardware running your SIP Servlets Server.
concurrencyControlMode attribute include: None, SipSession or SipApplicationSession. SipSession is the value of this attribute when it is not present—and overridden—in server.xml.
<Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" darConfigurationFileLocation="conf/dars/mobicents-dar.properties" concurrencyControlMode="SipApplicationSession" SipApplicationSession="1600">
$CATALINA_HOME/conf/server.xml configuration file in your text editor.
Service element and add a concurrencyControlMode and/or a sipMessageQueueSize attribute to it.
sipMessageQueueSize attribute is 1500. That is the default value which is used even if the attribute is not present in server.xml. You will need to play around with this setting for the optimal value, which depends on the hardware running your SIP Servlets Server.
concurrencyControlMode attribute include: None, SipSession or SipApplicationSession. SipSession is the value of this attribute if when it is not present and overridden in server.xml.
1 <Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" 5 darConfigurationFileLocation="conf/dars/mobicents-dar.properties" concurrencyControlMode="SipApplicationSession" SipApplicationSession="1600">
dispatcher MBean from MSS for JBoss's JMX console. All changes performed at run time are effective immediately, but are not persisted across reboots (which, if you want to happen, would require editing your server's server.xml configuration file as well, or instead).
dispatcher MBean from MSS for JBoss's JMX console, values allowed for the concurrency control mode are None, SipSession or SipApplicationSession.

INVITE, MESSAGE and so on, to the same SIP URI—the IP address and port number of the SIP load balancer on the WAN—and the load balancer then parses, alters, and forwards those messages to an available and healthy node in the cluster. If the message was sent as a part of an existing SIP session, it will be forwarded to the cluster node which processed that User Agent's original transaction request. The SIP Servlets Server which receives the message then acts upon it and sends its response back to the SIP load balancer which, again, parses, alters and forwards the message back to the original User Agent. Needless to say, this entire proxying and provisioning process is carried out unbeknownst to the User Agent, which need only concern itself with the SIP service or application it is using.
</distributed> capabilities, across the entire cluster.
Failover section goes into more detail about this aspect of the load balancer; see: Section 4.4, “MSS for JBoss: Failover Support”.
Via header of requests so that responses return to the SIP Balancer before they are sent to the originating endpoint. The load balancer also adds itself to the path of subsequent requests by adding Record-Route headers. It can thus handle mid-call failover by forwarding subsequent requests to a different node in the cluster if the node that had originally handled an initial request failed somehow fails or becomes unavailable. The SIP load balancer will immediately fail over if it stops receiving heartbeats from a node, or receives an “unhealthy” status alert. As mentioned, supplying both of these to the SIP load balancer is the responsibility of the nodes themselves.
SipStandardService class, which extends the Tomcat StandardService class, which implements the Tomcat Service interface. In Tomcat's architecture, a service is an intermediate component which lives inside a server and ties one or more Connectors to exactly one Engine. When the service is started, the new SipStandardBalancerNodeService looks up its configuration and gets the address of the SIP load balancer and sends a heartbeat and health status to it, so as to identify itself as an available node of the cluster.
MBean interfaces; information on their configuration is provided in the following sections.

lb.properties file; descriptions of the important lines are provided beneath.
1 host=127.0.0.1 internalPort=5065 externalPort=5060 #JSIP stack configuration 5 javax.sip.STACK_NAME = SipBalancerForwarder javax.sip.AUTOMATIC_DIALOG_SUPPORT = off // You need 16 for logging traces. 32 for debug + traces. // Your code will limp at 32 but it is best for debugging. gov.nist.javax.sip.TRACE_LEVEL = 32 10 gov.nist.javax.sip.DEBUG_LOG = logs/sipbalancerforwarderdebug.txt gov.nist.javax.sip.SERVER_LOG = logs/sipbalancerforwarder.xml gov.nist.javax.sip.THREAD_POOL_SIZE = 64 gov.nist.javax.sip.REENTRANT_LISTENER = true
SipStack and SipStackImpl classes for further information on them.
server.xml configuration files for all of your Servlet container nodes according to the following scheme. Pay special attention to the location of the server.xml configuration file. On MSS for Tomcat server installations, this file will be located in <topmost_directory>/conf, and for MSS for JBoss installations with JBoss clustering support for session replication and other capabilities, you want to edit the server.xml file for the “all” Configuration Profile. This file is therefore located in the server/all/deploy/jboss-web.deployer directory. If, on the other hand, you will not be utilizing JBoss's clustering capabilities on your MSS for JBoss instance, then you will probably be using the “default” Configuration Profile. In that case, you would want to edit the server.xml file in server/default/deploy/jboss-web.deployer.
className attribute of the Service element should have the value org.mobicents.servlet.sip.startup.failover.SipStandardBalancerNodeService instead of org.mobicents.servlet.sip.startup.SipStandardService.
balancers” to the Service element which has as its values the IP address (or addresses) of the SIP load balancer(s) to which it should send heartbeats.
lb.properties in this example). In the Linux terminal, or using the Windows Command Prompt, you can start the SIP Load Balance by issuing a command similar to this one:
java -jar sip-balancer-1.0-20080829.103906-21-jar-with-dependencies.jar lb-configuration.properties
silas@localhost ~ $ java -jar sip-balancer-1.0-20080829.103906-21-jar-with-dependencies.jar lb-configuration.properties Oct 21, 2008 1:10:58 AM org.mobicents.tools.sip.balancer.SIPBalancerForwarder start INFO: Sip Balancer started on address 127.0.0.1, external port : 5060, port : 5065 Oct 21, 2008 1:10:59 AM org.mobicents.tools.sip.balancer.NodeRegisterImpl startServer INFO: Node registry starting... Oct 21, 2008 1:10:59 AM org.mobicents.tools.sip.balancer.NodeRegisterImpl startServer INFO: Node expiration task created Oct 21, 2008 1:10:59 AM org.mobicents.tools.sip.balancer.NodeRegisterImpl startServer INFO: Node registry started
server.xml configuration file [7], nearly-unchanged, to configure the client nodes. Because you will have more than one client node, you should assign different ports for each of them to listen on for HTTP and/or SIP connections. Here is the relevant portion of the server.xml configuration file where you should change the value for each new node you add to the cluster:
1 <!-- Define a SIP Connector --> 2 <Connector port="5080" 3
^COct 21, 2008 1:11:57 AM org.mobicents.tools.sip.balancer.SipBalancerShutdownHook run INFO: Stopping the sip forwarder
<distributable/> in the web.xml descriptor.
run.sh (or run.bat) with the -c all option, which activates the clustering capabilities for that node. The server will then consult the configuration files under the <topmost_directory>/server/all/ directory, and not in the the <topmost_directory>/server/default/ subdirectories. Therefore, it is important to modify the correct files.
web.xml configuration file, which lives in the <topmost_directory>/server/all/deploy/jboss-web.deployer/conf/ directory, and add the empty element <distributable/> as a child of the document root element, web-app:
1 <?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <!-- ======================== Introduction ============================== --> <!-- This document defines default values for *all* web applications --> <!-- loaded into this instance of Tomcat. As each application is --> 10 <!-- deployed, this file is processed, followed by the --> <!-- "/WEB-INF/web.xml" deployment descriptor from your own --> <!-- applications. --> <!-- --> <!-- WARNING: Do not configure application-specific resources here! --> 15 <!-- They should go in the "/WEB-INF/web.xml" file in your application. --> <!-- =========== Common Context Params ================================== --> <!-- JBossInjectionProvider provides resource injection for managed beans. --> <!-- See JSF 1.2 spec section 5.4 for details. --> <distributable/> 20 <context-param> <param-name>com.sun.faces.injectionProvider</param-name> <param-value>org.jboss.web.jsf.integration.injection.JBossInjectionProvider</param-value> </context-param>
run.sh or run.bat.
mss-jboss-<version>]$ ./bin/run.sh -c all
C:\Users\Me\My Downloads\mss-jboss-<version>>bin\run.bat -c all
JBOSS_HOME environment variable.
JBOSS_HOME environment variable in the prepare-jboss-server-for-clustering-failover-network.sh shell script so that it points to the topmost directory of your MSS for JBoss installation (the one of which bin/ is a subdirectory).
grep command to find all of the files containing the “192.168.1.21” string of characters:
clustering]$ grep "192.168.1.21" *
clustering]$ gedit $(grep "192.168.1.21" *) &
[7]
In the JBoss SIP Servlets Server binary distribution, this file is located inside the <topmost_directory>/server/all/deploy/jboss-web.deployer/ directory, and in the Tomcat binary distribution, it is located in the <topmost_directory>/conf/ directory.
| Revision History | |||
|---|---|---|---|
| Revision 2.0 | Fri Mar 06 2009 | ||
| |||
Edition 1.0
1801 Varsity Drive
Raleigh, NC 27606-2072USAPhone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
PO Box 13588Research Triangle Park, NC 27709USA
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F1 to switch to the first virtual terminal. Press Ctrl+Alt+F7 to return to your X-Windows session.
Mono-spaced Bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose from the main menu bar. Next, choose from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
Mono-spaced Roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
Mono-spaced Roman but are presented and highlighted as follows:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
}
}





LocalConnectionOptions parameter of the CreateConnection command.) For each of these parameters, the call agent can either specify a value, a range of values, or no value at all. This allow various implementations to implement various levels of control, from very tight control where the call agent specifies minute details of the connection-handling, to very loose control, where the call agent only specifies broad guidelines, such as the maximum bandwidth, and lets the gateway select the detailed values itself.
subscribe() method.
apply() method.
1 is currently being played, and a signal stopping event occurs, the 1 would play to completion. If a request to play DTMF digit 2 arrives before DTMF digit 1 finishes playing, DTMF digit 2 would become pending.
<x>" (where <x> is the latest minor version release number). On the next page, select your language and platform (both architecture—whether 32- or 64-bit—and operating system), read and agree to the Java Development Kit 5.0 License Agreement, and proceed to the download page.
jdk-1_5_0_16-linux-i586-rpm.bin), and the other is merely a self-extracting file (e.g. jdk-1_5_0_16-linux-i586.bin). If you are installing the JDK on Red Hat Enterprise Linux, Fedora, or another RPM-based Linux system, we suggest that you download the self-extracting file containing the RPM package, which will set up and use the SysV service scripts in addition to installing the JDK. We also suggest installing the self-extracting RPM file if you will be running JBCP in a production environment.
~]$ chmod +x "jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin" ~]$ ./"jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin"
-compat packages from the JPackage project. Remember to download the -compat package which corresponds correctly to the minor release number of the JDK you installed. The compat packages are available from ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/.
-compat package in addition to the JDK if you installed the self-extracting RPM file! The -compat package merely performs the same SysV service script set up that the RPM version of the JDK installer does.
JAVA_HOME environment variable, and ensuring that the system is using the proper JDK (or JRE) using the alternatives command. Setting JAVA_HOME usually overrides the values for java, javac and java_sdk_1.5.0 in alternatives, but we will set them all just to be safe and consistent.
JAVA_HOME Environment Variable on Generic LinuxJAVA_HOME environment variable exists and points to the location of your JDK installation.
JAVA_HOME Environment Variable on LinuxJAVA_HOME is set on your system by echoing it on the command line:
~]$ echo $JAVA_HOME
JAVA_HOME is not set already, then you must set its value to the location of the JDK installation on your system. You can do this by adding two lines to your personal ~/.bashrc configuration file. Open ~/.bashrc (or create it if it doesn't exist) and add a line similar to the following one anywhere inside the file:
export JAVA_HOME="/usr/lib/jvm/jdk1.5.0_<version>"
exported from ~/.bashrc files are local to that user).
java, javac and java_sdk_1.5.0 Using the alternatives command alternativesalternatives command, including Red Hat Enterprise Linux and Fedora, you can easily choose which JDK (or JRE) installation you wish to use, as well as which java and javac executables should be run when called.
/usr/sbin/alternatives with the --config java option to select between JDKs and JREs installed on your system:
root@localhost ~]$ /usr/sbin/alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java 2 /usr/lib/jvm/jre-1.6.0-sun/bin/java *+ 3 /usr/lib/jvm/jre-1.5.0-sun/bin/java Enter to keep the current selection[+], or type selection number:
java executable. In the alternatives information printout above, a plus (+) next to a number indicates the one currently being used. As per alternatives' instructions, pressing Enter will simply keep the current JVM, or you can enter the number corresponding to the JVM you would prefer to use.
javac command and the java_sdk_1.5.0 environment variable, as the root user:
~]$ /usr/sbin/alternatives --config javac
~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
JAVA_HOME Environment Variable on WindowsPATH, run the java -version command in the terminal from your home directory:
~]$ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b03) Java HotSpot(TM) Client VM (build 1.5.0_16-b03, mixed mode, sharing)
alternatives, and/or by setting JAVA_HOME.
yum remove <jdk_rpm_name> command.
Start menu for an uninstall command, or use Add/Remove Programs.
Download link on the right to start the download from Sourceforge.net.
~]$ mkdir “ms-<version>”
~]$ mv “mobicents-media-server-all-1.0.0.GA.zip”
“ms-<version>”
~]$ cd “ms-<version>”
jar -xvf command to extract the contents of the zip file into the current directory, thus completing the install:
ms-<version>]$ jar -xvf “mobicents-media-server-all-1.0.0.GA.zip”
unzip utility is present on your system or is installable, you can use it in lieu of Java's jar -xvf command:
ms-<version>]$ unzip “mobicents-media-server-all-1.0.0.GA.zip”
unzip's -d<unzip_to_location> option to extract the zip file's contents to a location other than the current directory.
ms-<version>]$ rm “mobicents-media-server-all-1.0.0.GA.zip”
My Downloads folder. First, using Windows Explorer, create a subfolder in My Downloads to extract the zip file's contents into.
jar -xvf command to extract the binary distribution files from the zip archive. To use this method instead, first move the downloaded zip file from My Downloads to the folder that you just created to hold the Media Server files.
cd command:
C:\Users\Me>cd “My Downloads\ms-<version>”
jar -xvf command to extract the archive contents into the current folder.
C:\Users\Me\My Downloads\ms-<version>>jar -xvf “mobicents-media-server-all-1.0.0.GA.zip”
ms-<version>) to another location. This step is not strictly necessary, but it is probably a good idea to move the Media Server folder from My Downloads to a user-defined location for storing runnable programs. Any location will suffice, however.
C:\Users\Me\My Downloads\ms-<version>>delete “mobicents-media-server-all-1.0.0.GA.zip”
JBOSS_HOME environment variable to run any of the JBoss Communications Platform servers unless JBOSS_HOME is already set.
JBOSS_HOME was set previously or not is to perform a simple check which may save you time and frustration.
echo$JBOSS_HOME to see if it is currently defined in your environment:
~]$ echo $JBOSS_HOME
JBOSS_HOME is already set on your system, then you have three options:
unset it, which only takes effect for the current session and is therefore not advised;
JBOSS_HOME is defined, such as in your local ~/.bashrc startup script in Linux, or, possibly, system-wide in /etc/bashrc, and remove it or comment it out;
JBOSS_HOME.
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
JBOSS_HOME in your personal ~/.bashrc startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Linux, it is possible to set JBOSS_HOME as a system-wide environment variable, by defining it in /etc/bashrc, but this method is neither recommended nor detailed in these instructions.
~/.bashrc startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system:
export JBOSS_HOME="/home/<username>/<path>/<to>/<install_directory>"
.bashrc startup script.
source the .bashrc script to force your change to take effect, so that JBOSS_HOME becomes set for the current session[9].
~]$ source ~/.bashrc
JBOSS_HOME is set in the current session, and actually points to the correct location:
JBOSS_HOME has been set correctly to the topmost_directory of the JBCP installation. Note that if you are installing one of the standalone JBCP servers (with JBoss AS bundled!), then JBOSS_HOME would point to the topmost_directory of your server installation.
~]$ echo $JBOSS_HOME /home/silas/jboss-eap-4.3/jboss-as
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
<topmost_directory>/jboss-4.2.3.GA/bin directory (on Linux or Windows), or by double-clicking the run.bat executable batch file in that same directory (on Windows only). However, we suggest always starting the Media Server using the terminal or Command Prompt because you are then able to read—and act upon—any startup messages, and possibly debug any problems that might arise. In the Linux terminal or Command Prompt, you will be able to tell that the Media Server started successfully if the last line of output is similar to the following (ending with “Started in 23s:648ms”):
11:23:07,656 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 23s:648ms
~]$ cd “ms-<version>”
jboss-4.2.3.GA/bin/run.sh start script is executable:
ms-<version>]$ chmod +x “jboss-4.2.3.GA/bin/run.sh”
run.sh Bourne shell script:
ms-<version>]$ “./jboss-4.2.3.GA/bin/run.sh”
run.jar executable Java archive in the jboss-4.2.3.GA/bin/ directory:
ms-<version>]$ java -jar “jboss-4.2.3.GA/bin/run.jar”
jboss-4.2.3.GA\bin\ subfolder.
run.bat executable batch file.
jboss-4.2.3.GA\bin\ folder in Windows Explorer, or you can open the Command Prompt via the Start menu and navigate to the correct folder:
C:\Users\Me\My Downloads>cd “ms-<version>”
run.bat batch file:
C:\Users\Me\My Downloads\ms-<version>>jboss-4.2.3.GA\bin\run.bat
run.jar executable Java archive:
C:\Users\Me\My Downloads\ms-<version>>java -jar jboss-4.2.3.GA\bin\run.jar
[Server] Shutdown complete Shutdown complete Halting VM
shutdown.sh or shutdown.jarshutdown.sh Bourne shell script in the jboss-4.2.3.GA/bin/ directory. To do so, first change your working directory to the Media Server's topmost directory (the one to which you extracted the downloaded zip file's contents):
~]$ cd “ms-<version>”
ms-<version>]$ chmod +x “jboss-4.2.3.GA/bin/shutdown.sh”
shutdown.sh executable Bourne shell script, and remember to add the -S option (which is the short option for “--shutdown”) as a command line argument:
ms-<version>]$ “./jboss-4.2.3.GA/bin/shutdown.sh” -S
shutdown.jar executable Java archive to do so (and remembering, again, to add the -S command line argument):
ms-<version>]$ java -jar “jboss-4.2.3.GA/bin/shutdown.jar” -S
shutdown.bat or the shutdown.jar executable file in the jboss-4.2.3.GA\bin subfolder of the Media Server binary distribution. Make sure to add the -S option (which is the short option for --shutdown) as a command line argument.
C:\Users\Me\My Downloads\ms-<version>>jboss-4.2.3.GA\bin\shutdown.bat -S
shutdown.jar Java archive by running the java -jar command, and remembering to add the -S option as a command line argument:
C:\Users\Me\My Downloads\ms-<version>>java -jar jboss-4.2.3.GA\bin\shutdown.jar -S
[8] At this point in time, it is possible to run most JBCP servers, such as the JAIN SLEE Server, using a Java 6 JRE or JDK. Be aware, however, that presently the XML Document Management Server does not run on Java 6. We suggest checking the Mobicents web site, forums or discussion pages if you need to inquire about the status of running the XML Document Management Server with Java 6.
[9]
Note that any other terminals which were opened prior to your having altered .bashrc will need to source~/.bashrc as well should they require access to JBOSS_HOME.
RTPManager is responsible for managing the actual RTP Socket. The reference of RTPManager is passed to each endpoint (the endpoint does the look-up via JNDI) and endpoints leverage the RTPManagerRTPManger to create Connections and decide on supported codecs.
RTPManger.
RTPManager is able to receive the following RTP media types:
| Media Type | PayLoad Number |
|---|---|
| Audio: G711 (A-law) 8bit, 8kHz | 8 |
| Audio: G711 (U-law) 8bit, 8kHz | 0 |
| telephone-event | 101 |
| Audio: GSM 8bit, 8kHz | 3 |
| Audio: G729 8bit, 8kHz | 18 |
| Audio: Speex 8bit, 8kHz | 97 |
<mbean
code="org.mobicents.media.server.impl.jmx.rtp.RTPManager"
name="media.mobicents:service=RTPManager,QID=1">
<attribute
name="JndiName">java:media/mobicents/protocol/RTP</attribute>
<attribute
name="BindAddress">${jboss.bind.address}</attribute>
<attribute
name="Jitter">60</attribute>
<attribute
name="PacketizationPeriod">20</attribute>
<attribute
name="PortRange">1024-65535</attribute>
<attribute
name="AudioFormats">0 = ULAW, 8000, 8, 1; 3 = GSM, 8000, 8, 1; 8 = ALAW, 8000,
8, 1; 97 = SPEEX, 8000, 8, 1; 101 = telephone-event/8000</attribute>
</mbean>
<mbean code="org.mobicents.media.server.impl.jmx.enp.ann.AnnEndpointManagement" name="media.mobicents:endpoint=announcement"> <attribute name="JndiName">media/trunk/Announcement</attribute> <attribute name="RtpFactoryName">java:media/mobicents/protocol/RTP</attribute> </mbean>
Channels value. It is not subject to change during runtime.
org.mobicents.media.server.spi.events.Announcement
<mbean
code="org.mobicents.media.server.impl.jmx.enp.ivr.IVRTrunkManagement"
name="media.mobicents:endpoint=ivr">
<depends>media.mobicents:service=RTPManager,QID=1</depends>
<attribute
name="JndiName">media/trunk/IVR</attribute>
<attribute
name="RtpFactoryName">java:media/mobicents/protocol/RTP</attribute>
<attribute
name="MediaType">audio.x_wav</attribute>
<!-- DtmfMode can be either RFC2833 or INBAND or AUTO -->
<attribute
name="DtmfMode">AUTO</attribute>
<attribute
name="RecordDir">${jboss.server.data.dir}</attribute>
<attribute
name="Channels">24</attribute>
</mbean>
channels value. It is not subject to change during runtime.
RFC2833, INBAND or AUTO.
org.mobicents.media.server.spi.events.Announcement
org.mobicents.media.server.spi.events.Basic
org.mobicents.media.server.spi.events.AU
<mbean code="org.mobicents.media.server.impl.jmx.enp.prl.PRTrunkManagement" name="media.mobicents:endpoint=packet-relay"> <depends>media.mobicents:service=RTPManager,QID=1</depends> <attribute name="JndiName">media/trunk/PacketRelay</attribute> <attribute name="RtpFactoryName">java:media/mobicents/protocol/RTP</attribute> <attribute name="Channels">10</attribute> </mbean>
RTPManager.
channels value. It is not subject to change during runtime.
org.mobicents.media.server.spi.events.Basic
<mbean code="org.mobicents.media.server.impl.jmx.enp.cnf.ConfTrunkManagement" name="media.mobicents:endpoint=conf"> <depends>media.mobicents:service=RTPManager,QID=1</depends> <attribute name="JndiName">media/trunk/Conference</attribute> <attribute name="RtpFactoryName"> java:media/mobicents/protocol/RTP </attribute> <attribute name="Channels">10</attribute> </mbean>
RTPManager.
Channels value. It is not subject to change during runtime.
org.mobicents.media.server.spi.events.Basic
jboss-service.xml configuration file. Here is an example of an RTPManager MBean with static NAT configuration:
<mbean
code="org.mobicents.media.server.impl.jmx.rtp.RTPManager"
name="media.mobicents:service=RTPManager,QID=1">
<attribute
name="JndiName">java:media/mobicents/protocol/RTP</attribute>
<attribute
name="BindAddress">${jboss.bind.address}</attribute>
<attribute
name="Jitter">60</attribute>
<attribute
name="PacketizationPeriod">20</attribute>
<attribute
name="PortRange">1024-65535</attribute>
<attribute
name="AudioFormats">
8 = ALAW, 8000, 8, 1;
0 = ULAW, 8000, 8, 1;
101 = telephone-event
</attribute>
<attribute
name="UseStun">true</attribute>
<attribute
name="StunServerAddress">stun.ekiga.net</attribute>
<attribute
name="StunServerPort">3478</attribute>
<attribute
name="UsePortMapping">false</attribute>
</mbean>
jboss-service.xml configuration file example, this attribute is set to stun.ekiga.net.
jboss-service.xml configuration file example, 3478 is the port of the Ekiga server.
MsProviderMsSessionMsEndpointMsConnectionMsSession object and a user agent.
MsLinkMsConnection object is to describe the relationship between an MsSession object and a user agent. An MsConnection object exists if the user agent is part of the media session. MsConnection objects are immutable in terms of their MsSession and user agent references. In other words, the MsSession and user agent object references do not change throughout the lifetime of the MsConnection object instance. The same MsConnection object may not be used in another MsSession.

MsProvider can be used to create the MsSession object and to create the instance of MsEventFactory.
MsSession is a transient association of zero or more connections for the purposes of engaging in a real-time communication exchange. The session and its associated connection objects describe the control and media flows taking place in a communication network. Applications create instances of an MsSession object with the MsProvider.createSession() method, which returns an MsSession object that has zero connections and is in the IDLE state. The MsProvider object instance does not change throughout the lifetime of the MsSession object. The MsProvider object associated with an MsSession object is obtained via the getProvider() method.
MsConnection objects with the MsSession.createNetworkConnection(String endpointName) method. At this stage MsConnection is in the IDLE state. The Application calls MsConnection.modify(String localDesc, String remoteDesc) passing the local SDP and remote SDP. MsConnection at this time will find out the corresponding EndPoint, using JNDI, and using the endPointName passed to it. It will then call createConnection(int mode) to create an instance of Connection. This Connection creates an instance of RtpSocketAdaptorImpl, which opens up the socket for RTP data transfer. However, the transfer of data does not yet begin, and the state of MsConnection is HALF_OPEN. At this stage, Connection can only accept RTP packets as it has no knowledge of a peer to which to send RTP packets. If remoteDesc is not null, at this stage it will be applied to Connection, and now the state of MsConnection is OPEN as it knows peer SDP, and can receive as well as send RTP packets. Once MsConnection.release() is called, all of the resources of MsConnection are released and it transforms to the CLOSED state. MsConnection is unusable in the CLOSED state and gets garbage-collected.
MsLink objects with the MsSession.createLink(MsLinkMode mode) method. At this stage, MsLink is in the IDLE state. The application calls the MsLink.join(String endpointName1, String endpointName2), passing the endpoint names of the two local endpoints to be joined. At this point, the MsLink object will find out the corresponding EndPoints, using JNDI, and by using the endPointName passed to it. It will then call createConnection(int mode) to create an instance of the Connection object. The connections are local connections and hence no network resources are acquired (Sockets). As soon as Connections are created for both EndPoints, setOtherParty(Connection other) is called on each Connection passing the other Connection, which starts the data transfer between the two Connections. At this stage, MsLink changes to the CONNECTED state. As soon as the application calls MsLink.release(), release() is called on the connection of respective endpoints. As soon as both of the connections are released, MsLink changes to DISCONNECTED and becomes unusable. Soon after this, MsLink gets garbage-collected.
MsEventFactory by calling MsProvider.getEventFactory() and create an instance of MsRequestedEvent to request for the notification of events or to create an instance of MsRequestedEvent to apply signals at endpoints. The application needs to pass the corresponding MsEventIdentifier as a parameter to MsEventFactory.createRequestedEvent(MsEventIdentifier eventID) or MsEventFactory.createRequestedSignal(MsEventIdentifier eventID). The examples below will clarify this
Listener objects corresponding to the events it is interested in obtaining.
ListenersMsSessionListenerMsSession object should implement MsSessionListener.
MsConnectionListenerMsConnection should implement MsConnectionListener.
MsLinkListenerMsResourceListenerMsSignalDetector or MsSignalGenerator should implement MsResourceListener.
MsSessionMsSessionListener is listening for MsSessionEvent, which carries the MsSessionEventID representing an MsSession state change. The following table shows the different types of MsSessionEventID, when these events are fired, and the corresponding methods of MsSessionListener that will be called.
MsSessionEventID
| Description |
MsSessionListener Method Called
|
|---|---|---|
SESSION_CREATED
|
Fired when MsProvider.createSession() is called and a new MsSession is created
|
public void sessionCreated(
|
SESSION_ACTIVE
|
When the MsConnection or MsLink is created on MsSession for the first time, it transitions to ACTIVE state and SESSION_ACTIVE is fired. Afterwards, this the state remains ACTIVE even if the application creates more MsConnections or MsLinks.
|
public void sessionActive(
|
SESSION_INVALID
|
When all the MsConnection or MsLink objects are disassociated from MsSession, it transitions to INVALID state and SESSION_INVALID is fired
|
public void sessionInvalid(
|
MsConnectionMsConnectionListener listens for an MsConnectionEvent, which carries the MsConnectionEventID that represents an MsConnection state change. The following table shows the different types of MsConnectionEventID, when these events would be fired, and the corresponding methods of MsConnectionListener that will be called.
MsConnectionEventID
| Description |
MsConnectionListener Method Called
|
|---|---|---|
CONNECTION_CREATED
|
Fired as soon as the creation of MsConnection is successful. MsConnection is not holding any resources yet.
|
public void connectionCreated(
|
CONNECTION_HALF_OPEN
|
Fired as soon as the modification of MsConnection is successful. At this stage the RTP socket is open in the Media Server to receive a stream, but has no idea about remote SDP. The application may call MsConnection.modify(localDesc, null), passing null for remote SDP if the remote SDP is not known yet, and then later call modify again with the actual SDP once its known
| |
CONNECTION_MODIFIED
|
As soon as MsConnection is successfully modified, by calling MsConnection.modify(String localDesc, String remoteDesc), CONNECTION_MODIFIED is fired. When modify() is called, MsConnection checks to see whether there is an endpoint associated it and, if so, then this means it is a modification request.
|
public void connectionHalfOpen(MsConnectionEvent event);
|
CONNECTION_OPEN
|
Fired as soon as the modification of MsConnection is successful and the SDP passed by the Call Agent is successfully applied to an RTP Connection. At this stage, there is a flow of RTP packets from the User Agent to the Media Server and vice versa. Its possible that the application may call MsConnection.modify(localDesc, remoteDesc), passing the remoteDesc(remote SDP)
|
public void connectionOpen(MsConnectionEvent event);
|
CONNECTION_DISCONNECTED
|
As soon as MsConnection is successfully released, MsConnection.release()CONNECTION_DISCONNECTED is fired.
|
public void connectionDisconnected(MsConnectionEvent event);
|
CONNECTION_FAILED
|
Fired as soon as the creation of MsConnection fails for reasons specified in MsConnectionEventCause. Immediately after CONNECTION_FAILED, CONNECTION_DISCONNECTED will be fired, giving the lister a chance to perform clean up.
|
public void connectionFailed(MsConnectionEvent event);
|
MsLinkMsLinkListener listens for an MsLinkEvent which carries the MsLinkEventID that represents an MsLink state change. The following table shows the different types of MsLinkEventID, when these events are fired, and the corresponding methods of MsLinkListener that are called.
MsLinkEventID
| Description |
MsLinkListener method called
|
|---|---|---|
LINK_CREATED
|
As soon as a new MsLink is created by calling MsSession.createLink(MsLinkMode mode), LINK_CREATED is fired.
|
public void linkCreated(MsLinkEvent evt)
|
LINK_CONNECTED
|
Fired as soon as the join(String a, String b) operation of MsLink is successful.
|
public void linkConnected(MsLinkEvent evt);
|
LINK_DISCONNECTED
|
Fired as soon as the release() operation of MsLink is successful.
|
public void linkDisconnected(MsLinkEvent evt);
|
LINK_FAILED
|
Fired as soon as the join(String a, String b) operation of MsLink fails.
|
public void linkFailed(MsLinkEvent evt)
|
MsSessionState Finite State MachineMsSession is specified in terms of Finite State Machines (FSMs) represented by MsSessionState, shown below:
IDLEACTIVEINVALID
MsConnection Finite State MachineMsConnection state is represented by the MsConnectionState enum:
IDLEMsConnection has only been created and has no resources attached to it.
HALF_OPENMsConnection has created the RTP socket, but doesn't yet have any information about Remote SDP to send the RTP Packets. MsConnection is still usable in HALF_OPEN state if it is only receiving the RTP Packets but doesn't have to send any.
OPENMsConnection now has information about remote SDP and can send RTP Packates to the remote IP (for example, to a remote user agent).
FAILEDMsConnection failed, and that the MsConnection object isn't reusable anymore.
CLOSEDMsConnection has released all its resources and closed the RTP sockets. It is not usable any more.
MsLink Finite State MachineMsLink state is represented by the MsLinkState enum:
IDLEMsLink has been created and has no endpoints associated with it.
CONNECTEDFAILEDMsLink failed and is not usable anymore.
DISCONNECTEDMsLink has closed the connections of both endpoints and is not usable anymore.
/**
* This is just a psuedocode to show how to use the MSC Api. This example uses
* the Announcement Endpoint to play an announcement
*
* user agent <----> RTP Connection <--- Announcement Endpoint
*
* @author amit bhayani
*
*/
public class AnnouncementExample implements MsSessionListener, MsConnectionListener {
private MsProvider msProvider;
private MsSession msSession;
public void startMedia(String remoteDesc) {
// Creating the provider
MsProvider provider = new MsProviderImpl();
// Registering the Listeners
provider.addSessionListener(this);
provider.addConnectionListener(this);
// Creating the Session
msSession = provider.createSession();
// Creating the connection passing the Endpoint Name. Here we are
// creating Announcement Endpoint which will be connected to User Agent
// (remoteDesc is SDP of remote end)
MsConnection msCOnnection = msSession.createNetworkConnection("media/trunk/Announcement/$");
// Get the Remote SDP here and pass it to connection. If creation of
// connection is successful connectionCreated method will be called
msCOnnection.modify("$", remoteDesc);
}
public void sessionActive(MsSessionEvent evt) {
// TODO Auto-generated method stub
}
public void sessionCreated(MsSessionEvent evt) {
// TODO Auto-generated method stub
}
public void sessionInvalid(MsSessionEvent evt) {
// TODO Auto-generated method stub
}
public void connectionCreated(MsConnectionEvent event) {
MsConnection connection = event.getConnection();
MsEndpoint endpoint = connection.getEndpoint();
// This is the actualname, could be something like
// 'media/trunk/Announcement/enp-1'
String endpointName = endpoint.getLocalName();
// URL to play audio file.
String url= "http://something/mobicents.wav";
MsEventFactory eventFactory = msProvider.getEventFactory();
MsPlayRequestedSignal play = null;
play = (MsPlayRequestedSignal) eventFactory.createRequestedSignal(MsAnnouncement.PLAY);
play.setURL(url);
// Let us request for Announcement Complete event or Failure in case
// if it happens
MsRequestedEvent onCompleted = null;
MsRequestedEvent onFailed = null;
onCompleted = eventFactory.createRequestedEvent(MsAnnouncement.COMPLETED);
onCompleted.setEventAction(MsEventAction.NOTIFY);
onFailed = eventFactory.createRequestedEvent(MsAnnouncement.FAILED);
onFailed.setEventAction(MsEventAction.NOTIFY);
MsRequestedSignal[] requestedSignals = new MsRequestedSignal[] { play };
MsRequestedEvent[] requestedEvents = new MsRequestedEvent[] { onCompleted, onFailed };
endpoint.execute(requestedSignals, requestedEvents, connection);
}
public void connectionDisconnected(MsConnectionEvent event) {
// TODO Auto-generated method stub
}
public void connectionFailed(MsConnectionEvent event) {
// TODO Auto-generated method stub
}
public void connectionHalfOpen(MsConnectionEvent event) {
// TODO Auto-generated method stub
}
public void connectionOpen(MsConnectionEvent event) {
// TODO Auto-generated method stub
}
}
Example 1.1. Example Code
Example 2
Example that shows how to listen for DTMF. For simplicity removed all imports and other code
public class IVRExample implements MsSessionListener, MsConnectionListener, MsNotificationListener {
...
public void startMedia(String remoteDesc) {
// Creating the provider
MsProvider provider = new MsProviderImpl();
// Registering the Listeners
provider.addSessionListener(this);
provider.addConnectionListener(this);
provider.addNotificationListener(this);
// Creating the Session
msSession = provider.createSession();
// Creating the connection passing the Endpoint Name. Here we are
// creating Announcement Endpoint which will be connected to User Agent
// (remoteDesc is SDP of remote end)
MsConnection msConnection = msSession.createNetworkConnection("media/trunk/IVR/$");
// Get the Remote SDP here and pass it to connection. If creation of
// connection is successful connectionCreated method will be called
msConnection.modify("$", remoteDesc);
}
..
..
.....
public void connectionCreated(MsConnectionEvent event) {
MsConnection connection = event.getConnection();
MsEndpoint endpoint = connection.getEndpoint();
// This is the actualname, could be something like
// 'media/trunk/Announcement/enp-1'
String endpointName = endpoint.getLocalName();
MsEventFactory factory = msProvider.getEventFactory();
MsDtmfRequestedEvent dtmf = (MsDtmfRequestedEvent) factory.createRequestedEvent(DTMF.TONE);
MsRequestedSignal[] signals = new MsRequestedSignal[] {};
MsRequestedEvent[] events = new MsRequestedEvent[] { dtmf };
endpoint.execute(signals, events, connection);
}
..
.......
public void update(MsNotifyEvent evt) {
MsEventIdentifier identifier = evt.getEventID();
if (identifier.equals(DTMF.TONE)) {
MsDtmfNotifyEvent event = (MsDtmfNotifyEvent) evt;
String seq = event.getSequence();
if (seq.equals("0")) {
} else if (seq.equals("1")) {
} else if (seq.equals("2")) {
} else if (seq.equals("3")) {
} else if (seq.equals("4")) {
} else if (seq.equals("5")) {
} else if (seq.equals("6")) {
} else if (seq.equals("7")) {
} else if (seq.equals("8")) {
} else if (seq.equals("9")) {
}
}
}
}
Example 3
Example that shows how DTMF signal can be applied to Endpoint
MsEventFactory eventFactory = msProvider.getEventFactory();
MsRequestedSignal dtmf = eventFactory.createRequestedSignal(DTMF.TONE);
dtmf.setTone("1");
MsRequestedSignal[] signals = new MsRequestedSignal[] { dtmf };
MsRequestedEvent[] events = new MsRequestedEvent[];
msEndpoint.execute(signals, events, connection);
Example 4
Example that shows how to begin recording and listen for FAILED event
String RECORDER = "file://home/user/recordedfile.wav";
MsEventFactory eventFactory = msProvider.getEventFactory();
MsRecordRequestedSignal record = (MsRecordRequestedSignal) eventFactory.createRequestedSignal(MsAudio.RECORD);
record.setFile(RECORDER);
MsRequestedEvent onFailed = eventFactory.createRequestedEvent(MsAudio.FAILED);
onFailed.setEventAction(MsEventAction.NOTIFY);
MsRequestedSignal[] requestedSignals = new MsRequestedSignal[] { record };
MsRequestedEvent[] requestedEvents = new MsRequestedEvent[] { onFailed };
endpoint.execute(requestedSignals, requestedEvents, connection);
Note that passing empty MsRequestedSignal[] and MsRequestedEvent[] will nullify all previous MsRequestedSignal and MsRequestedEvent
org.mobicents.media.server.spi.events.Basic
| Event ID | Description | Type | Duration |
|---|---|---|---|
org.mobicents.media.server.spi.events.Basic.DTMF
| DTMF Event | BR |
org.mobicents.media.server.spi.event.Announcement
| Event ID | Description | Type | Duration |
|---|---|---|---|
org.mobicents.media.server.spi.event.Announcement.PLAY
| play an announcement | TO | variable |
org.mobicents.media.server.spi.event.Announcement.COMPLETED
| |||
org.mobicents.media.server.spi.event.Announcement.FAILED
|
COMPLETED) event will be detected once an announcement has finished playing. If the announcement cannot be played in its entirety, an “operation failure” (FAILED) event can be returned. The failure can also be explained with a commentary.
org.mobicents.media.server.spi.events.AU
| Event ID | Description | Type | Duration |
|---|---|---|---|
org.mobicents.media.server.spi.event.AU.PLAY_RECORD
| play a prompt (optional) and then record some speech | TO | variable |
org.mobicents.media.server.spi.event.AU.PROMPT_AND_COLLECT
| |||
org.mobicents.media.server.spi.event.Announcement.FAILED
|
PLAY_RECORD is to play a prompt and record the user's speech. If the user does not speak, the user may be re-prompted and given another chance to record. By default, PLAY_RECORD does not play an initial prompt, makes only one attempt to record, and therefore functions as a simple record operation
server/default/deploy/mobicents.sar and server/default/deploy/mediaserver.sar in your Mobicents Server
/examples/mms-demo and call 'ant deploy-all'. This will deploy the SIP RA, MSC RA, the mms-demo example and also mms-demo-audio.war. The war file contains the audio *.wav files that are used by mms-demo example.
JBOSS_HOME is set and the server is running.
servers/jain-slee/resources/sip to deploy SIP RA
servers/media/controllers/msc to deploy media RA
servers/media/examples/mms-demo to deploy example
MsLink link = session.createLink(MsLink.MODE_FULL_DUPLEX); .... ... link.join(userEndpoint, ANNOUNCEMENT_ENDPOINT);
AnnouncementSbb creates the instance of MsPlayRequestedSignal and sets the path of audio url. AnnouncementSbb also creates an instance of MsRequestedEvent for MsAnnouncement.COMPLETED and MsAnnouncement.FAILED such that the Media resource adapter fires respective events and the SBB has a handler for the org.mobicents.media.events.announcement.COMPLETED event to handle Announcement Complete.
MsEventFactory eventFactory = msProvider.getEventFactory();
MsPlayRequestedSignal play = null;
play = (MsPlayRequestedSignal) eventFactory.createRequestedSignal(MsAnnouncement.PLAY);
play.setURL(url);
MsRequestedEvent onCompleted = null;
MsRequestedEvent onFailed = null;
onCompleted = eventFactory.createRequestedEvent(MsAnnouncement.COMPLETED);
onCompleted.setEventAction(MsEventAction.NOTIFY);
onFailed = eventFactory.createRequestedEvent(MsAnnouncement.FAILED);
onFailed.setEventAction(MsEventAction.NOTIFY);
MsRequestedSignal[] requestedSignals = new MsRequestedSignal[]{play};
MsRequestedEvent[] requestedEvents = new MsRequestedEvent[]{onCompleted, onFailed};
link.getEndpoints()[1].execute(requestedSignals, requestedEvents, link);

LoopDemoSbb creates child LoopbackSbb and calls startConversation() on it, passing the PREndpoint name as argument. LoopbackSbb uses MsLink to associate the other connection of PREndpointImpl to LoopEndpointImpl. LoopEndpointImpl simply forwards the voice packet received from caller back to caller.
MsLink link = session.createLink(MsLink.MODE_FULL_DUPLEX); ....... ... link.join(endpointName, LOOP_ENDPOINT);


.... MsLink link = session.createLink(MsLink.MODE_FULL_DUPLEX); .... ... link.join(userEndpoint, ANNOUNCEMENT_ENDPOINT);

MsLink link = (MsLink) evt.getSource();
MsEndpoint ivr = link.getEndpoints()[1];
MsEventFactory factory = msProvider.getEventFactory();
MsDtmfRequestedEvent dtmf = (MsDtmfRequestedEvent) factory.createRequestedEvent(DTMF.TONE);
MsRequestedSignal[] signals = new MsRequestedSignal[]{};
MsRequestedEvent[] events = new MsRequestedEvent[]{dtmf};
ivr.execute(signals, events, link);

.... MsLink link = session.createLink(MsLink.MODE_FULL_DUPLEX); .... ... link.join(userEndpoint, ANNOUNCEMENT_ENDPOINT);

MsLink link = session.createLink(MsLink.MODE_FULL_DUPLEX); link.join(endpointName, CNF_ENDPOINT);


CallSbb creates a Connection using PREndpointImpl. PREndpointImpl has two Connections, one connection to the calling User Agent by calling msConnection.modify("$", sdp). Once the connection is established, CallSbb creates child RecorderDemoSbb and calls startDemo() on it, passing the PREndpoint name as an argument. RecorderDemoSbb creates child AnnouncementSbb which uses the AnnEndpointImpl to make an announcement. The other Connection of PREndpointImpl is connected to Connection from AnnEndpointImpl using the MsLink.
<attribute name="MaxConnections">5</attribute>
<mbean
code="org.mobicents.media.server.impl.jmx.enp.cnf.ConfTrunkManagement"
name="media.mobicents:endpoint=conf">
<depends>media.mobicents:service=RTPManager,QID=1</depends>
<attribute
name="JndiName">media/trunk/Conference5</attribute>
<attribute
name="RtpFactoryName">java:media/mobicents/protocol/RTP</attribute>
<attribute
name="Channels">1</attribute>
<attribute
name="DtmfMode">RFC2833</attribute>
<!--MaxConnections represents the maximum number of participants who can join a conference.
Use judiciously: this blocks resources at MMS startup-->
<attribute
name="MaxConnections">5</attribute>
</mbean>
<mbean
code="org.mobicents.media.server.impl.jmx.enp.cnf.ConfTrunkManagement"
name="media.mobicents:endpoint=conf">
<depends>media.mobicents:service=RTPManager,QID=1</depends>
<attribute
name="JndiName">media/trunk/Conference7</attribute>
<attribute
name="RtpFactoryName">java:media/mobicents/protocol/RTP</attribute>
<attribute
name="Channels">1</attribute>
<attribute
name="DtmfMode">RFC2833</attribute>
<!--MaxConnections represents the maximum number of participants who can join a conference.
Use judiciously: this blocks resources at MMS startup-->
<attribute
name="MaxConnections">7</attribute>
</mbean>
<mbean
code="org.mobicents.media.server.impl.jmx.enp.cnf.ConfTrunkManagement"
name="media.mobicents:endpoint=conf">
<depends>media.mobicents:service=RTPManager,QID=1</depends>
<attribute
name="JndiName">media/trunk/Conference10</attribute>
<attribute
name="RtpFactoryName">java:media/mobicents/protocol/RTP</attribute>
<attribute
name="Channels">1</attribute>
<attribute
name="DtmfMode">RFC2833</attribute>
<!--MaxConnections represents the maximum number of participants who can join a conference.
Use judiciously: this blocks resources at MMS startup-->
<attribute
name="MaxConnections">10</attribute>
</mbean>
| Revision History | |||
|---|---|---|---|
| Revision 2.0 | Fri Mar 06 2009 | ||
| |||
| Revision 1.0 | Tue Jan 20 2009 | ||
| |||
Edition 1.0
1801 Varsity Drive
Raleigh, NC 27606-2072USAPhone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
PO Box 13588Research Triangle Park, NC 27709USA
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F1 to switch to the first virtual terminal. Press Ctrl+Alt+F7 to return to your X-Windows session.
Mono-spaced Bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose from the main menu bar. Next, choose from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
When the Apache HTTP Server accepts requests, it dispatches child processes or threads to handle them. This group of child processes or threads is known as a server-pool. Under Apache HTTP Server 2.0, the responsibility for creating and maintaining these server-pools has been abstracted to a group of modules called Multi-Processing Modules (MPMs). Unlike other modules, only one module from the MPM group can be loaded by the Apache HTTP Server.
Mono-spaced Roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
Mono-spaced Roman but are presented and highlighted as follows:
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
public class ExClient
{
public static void main(String args[])
throws Exception
{
InitialContext iniCtx = new InitialContext();
Object ref = iniCtx.lookup("EchoBean");
EchoHome home = (EchoHome) ref;
Echo echo = home.create();
System.out.println("Created Echo");
System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
}
}
.src in its file name).
JBOSS_HOME environment variable must be set to the correct location.
<x>" (where <x> is the latest minor version release number). On the next page, select your language and platform (both architecture—whether 32- or 64-bit—and operating system), read and agree to the Java Development Kit 5.0 License Agreement, and proceed to the download page.
jdk-1_5_0_16-linux-i586-rpm.bin), and the other is merely a self-extracting file (e.g. jdk-1_5_0_16-linux-i586.bin). If you are installing the JDK on Red Hat Enterprise Linux, Fedora, or another RPM-based Linux system, we suggest that you download the self-extracting file containing the RPM package, which will set up and use the SysV service scripts in addition to installing the JDK. We also suggest installing the self-extracting RPM file if you will be running JBCP in a production environment.
~]$ chmod +x "jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin" ~]$ ./"jdk-1_5_0_<minor_version>-linux-<architecture>-rpm.bin"
-compat packages from the JPackage project. Remember to download the -compat package which corresponds correctly to the minor release number of the JDK you installed. The compat packages are available from ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/.
-compat package in addition to the JDK if you installed the self-extracting RPM file! The -compat package merely performs the same SysV service script set up that the RPM version of the JDK installer does.
JAVA_HOME environment variable, and ensuring that the system is using the proper JDK (or JRE) using the alternatives command. Setting JAVA_HOME usually overrides the values for java, javac and java_sdk_1.5.0 in alternatives, but we will set them all just to be safe and consistent.
JAVA_HOME Environment Variable on Generic LinuxJAVA_HOME environment variable exists and points to the location of your JDK installation.
JAVA_HOME Environment Variable on LinuxJAVA_HOME is set on your system by echoing it on the command line:
~]$ echo $JAVA_HOME
JAVA_HOME is not set already, then you must set its value to the location of the JDK installation on your system. You can do this by adding two lines to your personal ~/.bashrc configuration file. Open ~/.bashrc (or create it if it doesn't exist) and add a line similar to the following one anywhere inside the file:
export JAVA_HOME="/usr/lib/jvm/jdk1.5.0_<version>"
exported from ~/.bashrc files are local to that user).
java, javac and java_sdk_1.5.0 Using the alternatives command alternativesalternatives command, including Red Hat Enterprise Linux and Fedora, you can easily choose which JDK (or JRE) installation you wish to use, as well as which java and javac executables should be run when called.
/usr/sbin/alternatives with the --config java option to select between JDKs and JREs installed on your system:
root@localhost ~]$ /usr/sbin/alternatives --config java There are 3 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java 2 /usr/lib/jvm/jre-1.6.0-sun/bin/java *+ 3 /usr/lib/jvm/jre-1.5.0-sun/bin/java Enter to keep the current selection[+], or type selection number:
java executable. In the alternatives information printout above, a plus (+) next to a number indicates the one currently being used. As per alternatives' instructions, pressing Enter will simply keep the current JVM, or you can enter the number corresponding to the JVM you would prefer to use.
javac command and the java_sdk_1.5.0 environment variable, as the root user:
~]$ /usr/sbin/alternatives --config javac
~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
JAVA_HOME Environment Variable on WindowsPATH, run the java -version command in the terminal from your home directory:
~]$ java -version java version "1.5.0_16" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b03) Java HotSpot(TM) Client VM (build 1.5.0_16-b03, mixed mode, sharing)
alternatives, and/or by setting JAVA_HOME.
yum remove <jdk_rpm_name> command.
Start menu for an uninstall command, or use Add/Remove Programs.
Downloads page at http://sourceforge.net/project/showfiles.php?group_id=102670. Click on the Mobicents SIP Presence Service link to view all available distributions and downloads. The latest releases are nearer the top.
~]$ mkdir "sps-<version>"
~]$ mkdir "xdms-<version>"
~]$ mv "mobicents-sip-presence-integrated-1.0.0.BETA4-CP1.zip" "sps-<version>"
~]$ mv "mobicents-sip-presence-xdms-1.0.0.BETA4-CP1.zip" "xdms-<version>"
~]$ cd "sps-<version>"
~]$ cd "xdms-<version>"
jar -xvf command to extract the contents of the zip file into the current directory, thus completing the install:
sps-<version>]$ jar -xvf "mobicents-sip-presence-integrated-1.0.0.BETA4-CP1.zip"
xdms-<version>]$ jar -xvf "mobicents-sip-presence-xdms-1.0.0.BETA4-CP1.zip"
sps-<version>]$ rm "mobicents-sip-presence-integrated-1.0.0.BETA4-CP1.zip"
xdms-<version>]$ rm "mobicents-sip-presence-xdms-1.0.0.BETA4-CP1.zip"
My Downloads folder. First, using Windows Explorer, create a subfolder in My Downloads to extract the zip file's contents into. When you name this folder, it is good practice to include the version number; if you do so, remember to correctly match it with the version of the SIP Presence Service or XDM Server binary distribution you downloaded. In these instructions, we will refer to this folder as sps-<version> or xdms-<version>.
jar -xvf command to extract the binary distribution files from the zip archive. To use this method instead, first move the downloaded zip file from My Downloads to the folder that you just created to hold the server's files.
cd command:
C:\Users\Me>cd "My Downloads\sps-<version>"
C:\Users\Me>cd "My Downloads\xdms-<version>"
jar -xvf command to extract the archive contents into the current folder.
C:\Users\Me\My Downloads\sps-<version>>jar -xvf "mobicents-sip-presence-integrated-1.0.0.BETA4-CP1.zip"
C:\Users\Me\My Downloads\xdms-<version>>jar -xvf "mobicents-sip-presence-xdms-1.0.0.BETA4-CP1.zip"
sps-<version> or xdms-<version>) to another location. This step is not strictly necessary, but it is probably a good idea to move the server's folder from My Downloads to a user-defined location for storing runnable programs. Any location will suffice, however.
C:\Users\Me\My Downloads\sps-<version>>delete "mobicents-sip-presence-integrated-1.0.0.BETA4-CP1.zip"
C:\Users\Me\My Downloads\xdms-<version>>delete "mobicents-sip-presence-xdms-1.0.0.BETA4-CP1.zip"
<install_directory>/bin/ directory (on Linux or Windows), or by double-clicking the run.bat executable batch file in that same directory (on Windows only). However, we suggest always starting the server using the terminal or Command Prompt because you are then able to read—and act upon—any startup messages, and possibly debug any problems that might arise. In the Linux terminal or Command Prompt, you will be able to tell that the server started successfully if the last line of output is similar to the following (ending with “Started in 23s:648ms”):
11:23:07,656 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 23s:648ms
~]$ cd "sps-<version>"
~]$ cd "xdms-<version>"
bin/run.sh start script is executable:
sps-<version>]$ chmod +x "bin/run.sh"
xdms-<version>]$ chmod +x "bin/run.sh"
run.sh Bourne shell script:
sps-<version>]$ "./bin/run.sh"
xdms-<version>]$ "./bin/run.sh"
run.jar executable Java archive in the bin/ directory:
sps-<version>]$ java -jar "bin/run.jar"
xdms-<version>]$ java -jar "bin/run.jar"
bin\ subfolder.
run.bat executable batch file.
<install_directory>\bin\ folder in Windows Explorer, or you can open the Command Prompt via the Start menu and navigate to the correct folder:
C:\Users\Me\My Downloads> cd "sps-<version>"
C:\Users\Me\My Downloads> cd "xdms-<version>"
run.bat batch file:
C:\Users\Me\My Downloads\sps-<version>>bin\run.bat
C:\Users\Me\My Downloads\xdms-<version>>bin\run.bat
run.jar executable Java archive:
C:\Users\Me\My Downloads\sps-<version>>java -jar "bin\run.jar"
C:\Users\Me\My Downloads\xdms-<version>>java -jar "bin\run.jar"
[Server] Shutdown complete Shutdown complete Halting VM
shutdown.sh or shutdown.jarshutdown.sh Bourne shell script in the <install_directory>/bin/ directory. To do so, first change your working directory to the SIP Presence Service's (or XDM Server's) install directory:
~]$ cd "sps-<version>"
~]$ cd "xdms-<version>"
shutdown.sh start script is executable:
sps-<version>]$ chmod +x "bin/shutdown.sh"
xdms-<version>]$ chmod +x "bin/shutdown.sh"
shutdown.sh executable Bourne shell script, and remember to add the -S option (which is the short option for --shutdown) as a command line argument:
sps-<version>]$ "./bin/shutdown.sh" -S
xdms-<version>]$ "./bin/shutdown.sh" -S
shutdown.jar executable Java archive to do so (and remembering, again, to add the -S command line argument):
sps-<version>]$ java -jar "bin/shutdown.jar" -S
xdms-<version>]$ java -jar "bin/shutdown.jar" -S
shutdown.bat or the shutdown.jar executable file in the bin/ subfolder of the SIP Presence Service/XDM Server binary distribution. Make sure to add the -S option (which is the short option for --shutdown) as a command line argument.
C:\Users\Me\My Downloads\sps-<version>>bin\shutdown.bat -S
C:\Users\Me\My Downloads\xdms-<version>>bin\shutdown.bat -S
shutdown.jar Java archive by running the java -jar command, and remembering to add the -S option as a command line argument:
C:\Users\Me\My Downloads\sps-<version>>java -jar "bin\shutdown.jar" -S
C:\Users\Me\My Downloads\sps-<version>>java -jar "bin\shutdown.jar" -S
JBOSS_HOME environment variable to run any of the JBoss Communications Platform servers unless JBOSS_HOME is already set.
JBOSS_HOME was set previously or not is to perform a simple check which may save you time and frustration.
echo$JBOSS_HOME to see if it is currently defined in your environment:
~]$ echo $JBOSS_HOME
JBOSS_HOME is already set on your system, then you have three options:
unset it, which only takes effect for the current session and is therefore not advised;
JBOSS_HOME is defined, such as in your local ~/.bashrc startup script in Linux, or, possibly, system-wide in /etc/bashrc, and remove it or comment it out;
JBOSS_HOME.
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
JBOSS_HOME in your personal ~/.bashrc startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Linux, it is possible to set JBOSS_HOME as a system-wide environment variable, by defining it in /etc/bashrc, but this method is neither recommended nor detailed in these instructions.
~/.bashrc startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system:
export JBOSS_HOME="/home/<username>/<path>/<to>/<install_directory>"
.bashrc startup script.
source the .bashrc script to force your change to take effect, so that JBOSS_HOME becomes set for the current session[11].
~]$ source ~/.bashrc
JBOSS_HOME is set in the current session, and actually points to the correct location:
JBOSS_HOME has been set correctly to the topmost_directory of the JBCP installation. Note that if you are installing one of the standalone JBCP servers (with JBoss AS bundled!), then JBOSS_HOME would point to the topmost_directory of your server installation.
~]$ echo $JBOSS_HOME /home/silas/jboss-eap-4.3/jboss-as
JBOSS_HOME environment variable must point to the directory which contains all of the files for the JBoss Communications Platform that you installed. As another hint, this topmost directory contains a bin subdirectory.
[10] At this point in time, it is possible to run most JBCP servers, such as the JAIN SLEE Server, using a Java 6 JRE or JDK. Be aware, however, that presently the XML Document Management Server does not run on Java 6. We suggest checking the Mobicents web site, forums or discussion pages if you need to inquire about the status of running the XML Document Management Server with Java 6.
[11]
Note that any other terminals which were opened prior to your having altered .bashrc will need to source~/.bashrc as well should they require access to JBOSS_HOME.


PresencePublicationControlSbb, which is the implementation of the abstract SIP event PublicationControlSbb. It handles publications on the presence event package.
PresencePublicationControlSbb provides the following capabilities:
PUBLISH requests when the request URI matches the PIDF document “entity” attribute.
PublicationControlSbb.
SbbLocalObject interface that can be used, in JAIN SLEE child relations, to obtain the composed presence information for a specific resource.
PresenceSubscriptionControlSbb, which is the implementation of the abstract SIP Event SubscriptionControlSbb. It handles subscriptions on the “presence” event package.
PresencePublicationService to retrieve the composed PIDF document for the subscription's notifier.
SbbLocalObject interface that can be used, in JAIN SLEE child relations, to make the presence event known to the subscribers of a specific resource.
PresenceClientSBB is the interface to a JAIN SLEE SBB intended to be used as a client for the Mobicents SIP Presence Server (and other servers compliant with same standards), in JAIN SLEE child relations.
InternalPresenceClientSBB that is used with applications running in the Mobicents SIP Presence Server JAIN SLEE container, and the ExternalPresenceClientSBB, used with applications running in a different JAIN SLEE container than the Mobicents SIP Presence Server.
RA Type defines two activities objects, DocumentActivity and AppUsageActivity, both of which are used to fire events that signal that a document, element or attribute was updated.
RA Type also defines a Service Building Block (SBB) RA interface to manage the users and documents stored in the XDM Server, and create activities, where events will be fired. The resource adapter will only fire events on activities that exist; that is, the RA won't create activities implicitly if a document is updated.
RA Type also provides a base abstract implementation of the resource adapter, making it very simple to change the underlying resource used to store information, which is by default the internal JDBC datasource of the JBoss Application Server.
AppUsage is an object that includes the logic to validate XCAP documents that result from XCAP requests and are expensive to create; this resource adapter thus provides caching of AppUsages, using a pool model.
User Profile Enabler SBB to retrieve information regarding the user needed for authentication/authorization of the XCAP request, and the Request Processor SBB, which handles the XCAP request.
Request Processor SBB implements the request processor functional element, providing a synchronous SBB interface to process XCAP requests. It uses the AppUsage Cache resource adapter to borrow AppUsage objects, and the Data Source resource adapter to retrieve or set documents stored in the server's data source.
InternalXDMClientSBB is intended to be used on applications running in the Mobicents XDM Server JAIN SLEE container, and
ExternalXDMClientSBB, which is intended to be used on applications in a different JAIN SLEE container than the Mobicents XDM Server.
| Revision History | |||
|---|---|---|---|
| Revision 2.0 | Fri Mar 06 2009 | ||
| |||
| Revision 1.0 | Tue Jan 20 2009 | ||
| |||