Revision: 16263
Author: [email protected]
Date: Sat Jan 8 00:47:01 2011
Log: More changes to docs
http://code.google.com/p/mobicents/source/detail?r=16263
Added:
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/images/SCCPClassDiagram.png
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/images/TCAPClassDiagram.png
Modified:
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-MAP.xml
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-SCCP.xml
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-TCAP.xml
=======================================
--- /dev/null
+++
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/images/SCCPClassDiagram.png
Sat Jan 8 00:47:01 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/images/TCAPClassDiagram.png
Sat Jan 8 00:47:01 2011
Binary file, no diff available.
=======================================
---
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-MAP.xml
Fri Jan 7 05:07:54 2011
+++
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-MAP.xml
Sat Jan 8 00:47:01 2011
@@ -63,26 +63,7 @@
<para>The reference to <classname>SccpProvider</classname> is received
from <classname>SccpStack</classname>.
To get handle to <classname>SccpStack</classname> do the JNDI look-up
passing the
- JNDI name configured in SS7 service as explained in <xref
linkend="configuring_SS7Service"/> </para>
-
-
- <programlisting
- language="Java"
- role="JAVA"><![CDATA[
- private static SccpProvider getSccpProvider() throws NamingException {
-
- // no arg is ok, if we run in JBoss
- InitialContext ctx = new InitialContext();
- try {
- String providerJndiName = "/mobicents/ss7/sccp";
- return ((SccpStack)
ctx.lookup(providerJndiName)).getSccpProvider();
-
- } finally {
- ctx.close();
- }
- }
- ]]>
- </programlisting>
+ JNDI name configured in SS7 service as explained in <xref
linkend="sccp_access_point"/> </para>
<para>The MAP User application should register the concrete
implementation of
<classname>MAPDialogListener</classname> and
<classname>MAPServiceListener</classname>
=======================================
---
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-SCCP.xml
Fri Jan 7 06:23:26 2011
+++
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-SCCP.xml
Sat Jan 8 00:47:01 2011
@@ -9,7 +9,11 @@
id="sccp">
<title>SCCP</title>
- <para></para>
+ <para>The Signaling Connection Control Part (SCCP) is defined in ITU-T
Recommendations Q.711-Q.716.
+ SCCP sits on top of Message Transfer Part 3 (MTP3) in the SS7 protocol
stack.
+ The SCCP provides additional network layer functions to provide transfer
of noncircuit-related (NCR) signaling information,
+ application management procedures and alternative and more flexible
methods of routing.
+ </para>
<section
id="sccp_routing">
<title>Routing Management</title>
@@ -261,112 +265,171 @@
</varlistentry>
</variablelist>
</section>
+ <section id="sccp_design">
+ <title>&THIS.PLATFORM; &THIS.APPLICATION; SCCP Usage</title>
+ <para>
+ The <classname>org.mobicents.protocols.ss7.sccp.SccpStack</classname>
is responsible for taking the
+ config file and turning it into
<classname>org.mobicents.protocols.ss7.sccp.Router</classname>.
+ All the sccp messages sent bu SCCP User Part are routed as per the rule
configured in Router
+ </para>
+ <para>
+ The SCCP User Part gets handle to <classname>SccpStack</classname> by
doing JNDI look-up as
+ explained in <xref linkend="sccp_access_point"/>
+ </para>
+
+ <para>
+ <classname>SccpStack</classname> exposes
<classname>org.mobicents.protocols.ss7.sccp.SccpProvider</classname>
+ that interacts directly with SccpStack. This interface defines the
methods that will be used by SCCP User Part to send
+
<classname>org.mobicents.protocols.ss7.sccp.message.SccpMessage</classname>
and register
+ <classname>org.mobicents.protocols.ss7.sccp.SccpListener</classname>'s
to listen for incoming SCCP messages.
+ </para>
+
+ <para>
+ SCCP User Part registers SccpListener for specific local
<classname>org.mobicents.protocols.ss7.sccp.parameter.SccpAddress</classname>.
+ For every incoming SccpMessage, if the called party address matches
with this local SccpAddress, the corresponding SccpListner is called.
+ </para>
+
+ <para>
+ SccpProvider also exposes
<classname>org.mobicents.protocols.ss7.sccp.message.MessageFactory</classname>
and
+
<classname>org.mobicents.protocols.ss7.sccp.parameter.ParameterFactory</classname>
to create new concrete SccpMessage viz.,
+
<classname>org.mobicents.protocols.ss7.sccp.message.UnitData</classname> or
+
<classname>org.mobicents.protocols.ss7.sccp.message.XUnitData</classname>
passing the corresponding parameters created by leveraging
+ ParameterFactory.
+ </para>
+
+ <para>
+ The UML class diagram looks like
+ </para>
+
+ <mediaobject
+ id="sccp_classdia">
+ <imageobject>
+ <imagedata
+ width="300px"
+ align="center"
+ fileref="images/SCCPClassDiagram.png"
+ format="PNG" />
+ </imageobject>
+ <caption>
+ <para>&THIS.PLATFORM; &THIS.APPLICATION; SCCP
Class Diagram
+ </para>
+ </caption>
+ </mediaobject>
+ </section>
<section
id="sccp_access_point">
<title>Access Point</title>
<para>
- <literal>SS7 Service</literal> provides user with access point to
<literal>SCCP</literal> protocol/stack.
- It can be used in following way:
+ <literal>SS7 Service</literal> provides user with access point to
<literal>SCCP</literal> protocol/stack.
</para>
+ <para>
+ To get handle to <classname>SccpStack</classname> do the JNDI look-up
passing the
+ JNDI name configured in SS7 service as explained in <xref
linkend="configuring_SS7Service"/>
+ </para>
<programlisting
- language="java"
- role="JAVA">
-import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
-import java.util.*;
-import javax.management.MBeanServerConnection;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mobicents.protocols.ss7.*;
-import org.mobicents.protocols.ss7.sccp.*;
-import org.mobicents.protocols.ss7.indicator.*;
-
-public class Test implements SccpListener
-{
-
- private SccpProvider sccpProvider;
- private SccpAddress localAddress;
-
- private MBeanServerConnection createMBeanServerConnection()
- throws NamingException
- {
- //no arg is ok, if we run in JBoss
- InitialContext ctx = new InitialContext();
-
-
- String adapterName = "jmx/invoker/RMIAdaptor";
-
- Object obj = ctx.lookup(adapterName);
- ctx.close();
-
- if (!(obj instanceof RMIAdaptor))
- {
- throw new ClassCastException
- ("Object not of type: RMIAdaptorImpl, but: " +
- (obj == null ? "not found" : obj.getClass().getName()));
- }
-
- return (MBeanServerConnection) obj;
- }
-
- public void start() throws Excetpion
- {
- //SS7Service is JMX bean, lets use it to get
- MBeanServerConnection con = createMBeanServerConnection();
- ObjectName on = new ObjectName("org.mobicents.ss7:service=SS7Service");
-
- String providerJndiName = con.invoke(on,"getJndiName",null,null);
- InitialContext ctx = new InitialContext();
-
- this.sccpProvider = (SccpProvider) ctx.lookup(providerJndiName);
- ctx.close();
-
- int translationType = 0;
- int subSystemNumber = 0;
- GlobalTitle gt =
GlobalTitle.getInstance(translationType,NumberingPlan.ISDN_MOBILE,NatureOfAddress.NATIONAL, "1234");
- localAddress = new SccpAddress(gt,0);
-
- sccProvider.registerSccpListener(localAddress,this);
- }
-
- public void stop()
- {
- this.sccpProvider.deregisterSccpListener(localAddress);
- }
-
- public void onMessage(SccpMessage message)
- {
- if (message.getType() == MessageType.UDT) {
- throw new IlleagalArgumentException("Dont like UDT");
- } else if (message.getType() == MessageType.XUDT) {
- XUnitData xudt = (XUnitData) message;
- localAddress =
((XUnitData)message).getCalledPartyAddress();
- remoteAddress =
((XUnitData)message).getCallingPartyAddress();
-
- //now decode content
- byte[] data = xudt.getData();
- //some data encoded in
- CallRequest cr = new CallRequest(data);
- byte[] answerData;
- if(cr.getCallee().equals(this.localAddress))
- {
- EstablihsCallAnswer eca = new EstablihsCallAnswer(cr);
- answerData = eca.encode();
- }else
- {
- TearDownCallAnswer tdca = new TearDownCallAnswer(cr);
- answerData = tdca.encode();
- }
-
-
- HopCounter hc =
this.provider.getParameterFactory().createHopCounter(5);
- XUnitData sccpAnswer =
this.provider.getMessageFactory().createXUnitData(hc,xudt.getProtocolClass(),message.getCallingPartyAddress(),this.localAddress);
- this.provider.send(sccpAnswer);
- }
-
- }
+ language="Java"
+ role="JAVA"><![CDATA[
+ private static SccpProvider getSccpProvider() throws
NamingException {
+
+ // no arg is ok, if we run in JBoss
+ InitialContext ctx = new InitialContext();
+ try {
+ String providerJndiName = "/mobicents/ss7/sccp";
+ return ((SccpStack)
ctx.lookup(providerJndiName)).getSccpProvider();
+
+ } finally {
+ ctx.close();
+ }
+ }
+ ]]>
+ </programlisting>
+ </section>
+ <section
+ id="sccp_complete_example">
+ <title>SCCP User Part Example</title>
+ <para>
+ Below is SCCP User Part example listening for incoming SCCP message and
sending back new message
+ </para>
+ <programlisting language="java" role="JAVA">
+public class Test implements SccpListener {
+
+ private SccpProvider sccpProvider;
+ private SccpAddress localAddress;
+
+ private static SccpProvider getSccpProvider() throws NamingException {
+
+ // no arg is ok, if we run in JBoss
+ InitialContext ctx = new InitialContext();
+ try {
+ String providerJndiName = "/mobicents/ss7/sccp";
+ return ((SccpStack)
ctx.lookup(providerJndiName)).getSccpProvider();
+ } finally {
+ ctx.close();
+ }
+ }
+
+ public void start() throws Excetpion {
+
+ this.sccpProvider = getSccpProvider();
+
+ int translationType = 0;
+ int subSystemNumber = 0;
+
+ GlobalTitle gt = GlobalTitle.getInstance(translationType,
+ NumberingPlan.ISDN_MOBILE,
NatureOfAddress.NATIONAL, "1234");
+
+ localAddress = new SccpAddress(gt, 0);
+
+ this.sccpProvider.registerSccpListener(localAddress, this);
+ }
+
+ public void stop() {
+ this.sccpProvider.deregisterSccpListener(localAddress);
+ }
+
+ public void onMessage(SccpMessage message) {
+
+ if (message.getType() == MessageType.UDT) {
+ throw new IlleagalArgumentException("Dont like UDT");
+ } else if (message.getType() == MessageType.XUDT) {
+ XUnitData xudt = (XUnitData) message;
+ localAddress = ((XUnitData) message).getCalledPartyAddress();
+ SccpAddress remoteAddress = ((XUnitData) message)
+ .getCallingPartyAddress();
+
+ // now decode content
+
+ byte[] data = xudt.getData();
+
+ // some data encoded in
+ CallRequest cr = new CallRequest(data);
+
+ byte[] answerData;
+
+ if (cr.getCallee().equals(this.localAddress)) {
+ EstablihsCallAnswer eca = new EstablihsCallAnswer(cr);
+ answerData = eca.encode();
+
+ } else {
+ TearDownCallAnswer tdca = new TearDownCallAnswer(cr);
+ answerData = tdca.encode();
+ }
+
+ HopCounter hc = this.sccpProvider.getParameterFactory()
+ .createHopCounter(5);
+
+ XUnitData sccpAnswer = this.sccpProvider
+ .getMessageFactory()
+ .createXUnitData(hc, xudt.getProtocolClass(),
+ message.getCallingPartyAddress(),
this.localAddress);
+
+ this.sccpProvider.send(sccpAnswer);
+
+ }
+
+ }
}
-</programlisting>
+ </programlisting>
</section>
</chapter>
=======================================
---
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-TCAP.xml
Tue Jan 4 21:12:25 2011
+++
/trunk/protocols/ss7/docs/sources/src/main/resources/en-US/Chapter-TCAP.xml
Sat Jan 8 00:47:01 2011
@@ -8,20 +8,119 @@
<chapter
id="tcap">
- <title>TCAP
- </title>
+ <title>TCAP</title>
<para>
- <literal>TCAP</literal>
- stack runs on top of
- <literal>SCCP</literal>
- . It requires
- <literal>SS7 Service</literal>
- deployed to access
- <literal>SCCP</literal>
- access point. Starting
- <literal>TCAP</literal>
- stack can be done as follows:
+ The Transaction Capabilities Application Part (TCAP) is defined in ITU-T
Recommendations Q.771-Q.775.
+ TCAP allows services at network nodes to communicate with each other
using an agreed-upon set of data elements.
+ Its primary purpose is to facilitate multiple concurrent dialogs between
the same sub-systems on the same machines,
+ using Transaction IDs to differentiate these, similar to the way TCP
ports facilitate multiplexing connections between
+ the same IP addresses on the Internet.
</para>
+ <section>
+ <title>&THIS.PLATFORM; &THIS.APPLICATION; TCAP Usage</title>
+ <para>
+ <classname>org.mobicents.protocols.ss7.tcap.api.TCAPStack</classname>
interface defines the methods required to represent TCAP
+ Protocol Stack. TCAPStack exposes
<classname>org.mobicents.protocols.ss7.tcap.api.TCAPProvider</classname>
that interacts directly
+ with TCAPStack. TCAPProvider defines methods that will be used by TCAP
User Part to create new
+
<classname>org.mobicents.protocols.ss7.tcap.api.tc.dialog.Dialog</classname>
to be sent across network.
+ TCAP User Part also registers
<classname>org.mobicents.protocols.ss7.tcap.api.TCListener</classname> to
listen TCAP messages.
+ </para>
+ <para>
+ TCAPProvider also exposes
<classname>org.mobicents.protocols.ss7.tcap.api.DialogPrimitiveFactory</classname>
to create dialog primitives
+ and
<classname>org.mobicents.protocols.ss7.tcap.api.ComponentPrimitiveFactory</classname>
to create components.
+ Components are a means of invoking an operation at a
remote node
+ </para>
+
+ <para>
+ The UML Class Diagram looks like
+ </para>
+
+
+ <mediaobject
+ id="tcap_classdia">
+ <imageobject>
+ <imagedata
+ width="300px"
+ align="center"
+ fileref="images/TCAPClassDiagram.png"
+ format="PNG" />
+ </imageobject>
+ <caption>
+ <para>&THIS.PLATFORM; &THIS.APPLICATION; TCAP
Class Diagram
+ </para>
+ </caption>
+ </mediaobject>
+
+ <para>
+ <classname>org.mobicents.protocols.ss7.tcap.TCAPStackImpl</classname>
is concrete implementation of <classname>TCAPStack</classname>.
+ The TCAP User Part creates instance of
<classname>TCAPStackImpl</classname> passing the reference of
<classname>SccpProvider</classname> and
+ new instance of <classname>SccpAddress</classname> representing address
to which bind listens. TODO : Bartek
+ </para>
+
+ <programlisting
+ language="Java"
+ role="JAVA"><![CDATA[
+ SccpProvider sccpProvider = getSccpProvider(); //JNDI lookup of SCCP
Stack and get Provider
+ SccpAddress localAddress createLocalAddress();
+
+ TCAPStack tcapStack = new TCAPStackImpl(sccpPprovider,
localAddress);
+
+ ]]>
+ </programlisting>
+ <para>The reference to <classname>SccpProvider</classname> is received
from <classname>SccpStack</classname>.
+ To get handle to <classname>SccpStack</classname> do the JNDI look-up
passing the
+ JNDI name configured in SS7 service as explained in <xref
linkend="sccp_access_point"/> </para>
+
+ <para>The TCAP User Part should register the concrete
implementation of
+ <classname>TCListener</classname> with
<classname>TCAPProvider</classname> to listen for incoming TCAP messages.
+ </para>
+
+ <programlisting
+ language="Java"
+ role="JAVA"><![CDATA[
+ public class Client implements TCListener{
+ .....
+ tcapProvider = tcapStack.getProvider();
+ tcapProvider.addTCListener(this);
+ ....
+ }
+ ]]>
+ </programlisting>
+
+ <para>The TCAP User Part leverages TCAPProvider to create new Dialog. The
component's between the nodes
+ are exchanged within this Dialog
+ </para>
+
+ <programlisting
+ language="Java"
+ role="JAVA"><![CDATA[
+ clientDialog = this.tcapProvider.getNewDialog(thisAddress,
remoteAddress);
+ ]]>
+ </programlisting>
+
+ <para>
+ The TCAP User Part leverages ComponentPrimitiveFactory to create new
components. These components are sent usig the dialog
+ </para>
+
+
+ <programlisting
+ language="Java"
+ role="JAVA"><![CDATA[
+ //create some INVOKE
+ Invoke invoke = cpFactory.createTCInvokeRequest();
+ invoke.setInvokeId(this.clientDialog.getNewInvokeId());
+ invoke.setOperationCode(cpFactory.createOperationCode(true,new
Long(12)));
+ //no parameter
+ this.clientDialog.sendComponent(invoke);
+ ]]>
+ </programlisting>
+
+ </section>
+
+
+ <section>
+ <title>&THIS.PLATFORM; &THIS.APPLICATION; TCAP User Part
Example</title>
+ <para>Below is TCAP User Part example</para>
<programlisting
language="Java"
role="JAVA"><![CDATA[
@@ -47,41 +146,19 @@
this.tcapProvider.addTCListener(this);
}
- private static SccpProvider getSccpProvider()
- throws NamingException
- {
- //no arg is ok, if we run in JBoss
- InitialContext ctx = new InitialContext();
-
- try{
-
- String adapterName = "jmx/invoker/RMIAdaptor";
-
- Object obj = ctx.lookup(adapterName);
-
-
- if (!(obj instanceof RMIAdaptor))
- {
- throw new ClassCastException
- ("Object not of type: RMIAdaptorImpl, but: " +
- (obj == null ? "not found" :
obj.getClass().getName()));
- }
- //SS7Service is JMX bean, lets use it to get
- MBeanServerConnection con =
createMBeanServerConnection();
- ObjectName on = new
ObjectName("org.mobicents.ss7:service=SS7Service");
-
- String providerJndiName =
con.invoke(on,"getJndiName",null,null);
- InitialContext ctx = new InitialContext();
- return (SccpProvider) ctx.lookup(providerJndiName);
- }finally
- {
- ctx.close();
- }
- }
-
-
- public void start() throws TCAPException, TCAPSendException
- {
+ private static SccpProvider getSccpProvider() throws NamingException {
+
+ // no arg is ok, if we run in JBoss
+ InitialContext ctx = new InitialContext();
+ try {
+ String providerJndiName = "/mobicents/ss7/sccp";
+ return ((SccpStack)
ctx.lookup(providerJndiName)).getSccpProvider();
+ } finally {
+ ctx.close();
+ }
+ }
+
+ public void start() throws TCAPException, TCAPSendException {
clientDialog = this.tcapProvider.getNewDialog(thisAddress,
remoteAddress);
ComponentPrimitiveFactory cpFactory =
this.tcapProvider.getComponentPrimitiveFactory();
@@ -166,4 +243,5 @@
]]>
</programlisting>
+ </section>
</chapter>