forked from RestComm/jain-slee.ss7
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for issue RestComm#15 - SCCP relay implementation in CAP RA and e…
…xemplary service
- Loading branch information
Marek Pisarski
committed
Jan 12, 2017
1 parent
3f25106
commit 6ed28f1
Showing
16 changed files
with
843 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>restcomm-slee-example-cap-relay</artifactId> | ||
<groupId>org.mobicents.examples</groupId> | ||
<version>7.0.53</version> | ||
</parent> | ||
|
||
<artifactId>restcomm-slee-example-cap-relay-DU</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<artifactId>restcomm-slee-example-cap-relay-sbb</artifactId> | ||
<groupId>org.mobicents.examples</groupId> | ||
<version>${pom.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.mobicents.tools</groupId> | ||
<artifactId>maven-du-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
<goal>generate-descriptor</goal> | ||
<goal>generate-ant-management-script</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>deploy-DU</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<tasks> | ||
<copy overwrite="true" file="target/${project.build.finalName}.jar" todir="${jboss.home}/server/${node}/deploy" /> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>undeploy-DU</id> | ||
<phase>clean</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<tasks> | ||
<delete file="${jboss.home}/server/${node}/deploy/${project.build.finalName}.jar" /> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
17 changes: 17 additions & 0 deletions
17
examples/cap-relay/du/src/main/resources/services/service.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE service-xml PUBLIC "-//Sun Microsystems, Inc.//DTD JAIN SLEE Service 1.1//EN" | ||
"http://java.sun.com/dtd/slee-service-xml_1_1.dtd"> | ||
|
||
<service-xml> | ||
<service> | ||
<service-name>CAP RELAY</service-name> | ||
<service-vendor>org.mobicents</service-vendor> | ||
<service-version>1.0</service-version> | ||
<root-sbb> | ||
<sbb-name>CAP RELAY</sbb-name> | ||
<sbb-vendor>org.mobicents</sbb-vendor> | ||
<sbb-version>1.0</sbb-version> | ||
</root-sbb> | ||
<default-priority>0</default-priority> | ||
</service> | ||
</service-xml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<packaging>pom</packaging> | ||
|
||
<parent> | ||
<groupId>org.mobicents.servers.jainslee.ss7</groupId> | ||
<artifactId>restcomm-slee-ss7</artifactId> | ||
<version>7.0.53</version> | ||
<relativePath>../..</relativePath> | ||
</parent> | ||
|
||
<artifactId>restcomm-slee-example-cap-relay</artifactId> | ||
<groupId>org.mobicents.examples</groupId> | ||
|
||
<modules> | ||
<module>sbb</module> | ||
<module>du</module> | ||
</modules> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-eclipse-plugin</artifactId> | ||
<groupId>org.mobicents.tools</groupId> | ||
<inherited>false</inherited> | ||
<executions /> | ||
<configuration> | ||
<excludePoms /> | ||
<classpathExcludes> | ||
<exclude>xml-apis:xml-apis</exclude> | ||
<exclude>jtidy:jtidy</exclude> | ||
</classpathExcludes> | ||
<resolveTransitiveDependencies>true</resolveTransitiveDependencies> | ||
<eclipseProjectName>slee-example-cap-relay</eclipseProjectName> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<modules> | ||
<module>release</module> | ||
</modules> | ||
</profile> | ||
<profile> | ||
<id>maven-release</id> | ||
<modules> | ||
<module>release</module> | ||
</modules> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project name="Release_build" default="deploy-all"> | ||
|
||
<property name="home" value="${ant.file.Release_build}/../" /> | ||
|
||
<property name="jboss.home" value="${home}/@JBOSS.PATH@/" /> | ||
<property name="jboss.config" value="@JBOSS.CONFIG@" /> | ||
<property name="jnpHost" value="127.0.0.1" /> | ||
<property name="jnpPort" value="1099" /> | ||
|
||
<target name="deploy-all-jmx"> | ||
<ant antfile="${home}../../resources/sip11/build.xml" target="deploy-jmx" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
<property name="jnpHost" value="${jnpHost}" /> | ||
<property name="jnpPort" value="${jnpPort}" /> | ||
</ant> | ||
<ant antfile="${home}../../examples/cap-uas/du-management.xml" target="deploy-jmx" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
<property name="jnpHost" value="${jnpHost}" /> | ||
<property name="jnpPort" value="${jnpPort}" /> | ||
</ant> | ||
</target> | ||
|
||
<target name="undeploy-all-jmx"> | ||
<ant antfile="${home}../../examples/cap-uas/du-management.xml" target="undeploy-jmx" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
<property name="jnpHost" value="${jnpHost}" /> | ||
<property name="jnpPort" value="${jnpPort}" /> | ||
</ant> | ||
<ant antfile="${home}../../resources/sip11/build.xml" target="undeploy-jmx" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
<property name="jnpHost" value="${jnpHost}" /> | ||
<property name="jnpPort" value="${jnpPort}" /> | ||
</ant> | ||
</target> | ||
|
||
<target name="deploy-all"> | ||
<ant antfile="${home}../../resources/sip11/build.xml" target="deploy" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
</ant> | ||
<ant antfile="${home}../../examples/cap-uas/du-management.xml" target="deploy" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
</ant> | ||
</target> | ||
|
||
<target name="undeploy-all"> | ||
<ant antfile="${home}../../examples/cap-uas/du-management.xml" target="undeploy" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
</ant> | ||
<ant antfile="${home}../../resources/sip11/build.xml" target="undeploy" inheritAll="false"> | ||
<property name="jboss.home" value="${jboss.home}" /> | ||
<property name="node" value="${jboss.config}" /> | ||
</ant> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<packaging>pom</packaging> | ||
|
||
<parent> | ||
<artifactId>restcomm-slee-example-cap-uas</artifactId> | ||
<groupId>org.mobicents.examples</groupId> | ||
<version>7.0.53</version> | ||
</parent> | ||
|
||
<artifactId>restcomm-slee-example-cap-uas-release</artifactId> | ||
|
||
<profiles> | ||
<profile> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<inherited>false</inherited> | ||
<executions> | ||
<execution> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<tasks> | ||
<copy overwrite="true" todir="${release.dir}/examples/cap-uas"> | ||
<fileset dir="${basedir}/../du/target"> | ||
<include name="**.jar" /> | ||
<include name="*.xml" /> | ||
<include name="*.properties" /> | ||
</fileset> | ||
</copy> | ||
<copy overwrite="true" file="${basedir}/../du/target/build.xml" tofile="${release.dir}/examples/cap-uas/du-management.xml" /> | ||
<copy overwrite="true" file="${basedir}/../README.TXT" todir="${release.dir}/examples/cap-uas" /> | ||
<copy overwrite="true" file="${basedir}/build.xml" todir="${release.dir}/examples/cap-uas"> | ||
<filterset> | ||
<filter token="JBOSS.PATH" value="${jboss.path}" /> | ||
<filter token="JBOSS.CONFIG" value="${node}" /> | ||
</filterset> | ||
</copy> | ||
</tasks> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>restcomm-slee-example-cap-relay</artifactId> | ||
<groupId>org.mobicents.examples</groupId> | ||
<version>7.0.53</version> | ||
</parent> | ||
|
||
<artifactId>restcomm-slee-example-cap-relay-sbb</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.mobicents.resources</groupId> | ||
<artifactId>restcomm-slee-ra-cap-ratype</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mobicents.resources</groupId> | ||
<artifactId>restcomm-slee-ra-cap-ra</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mobicents.servers.jainslee.api</groupId> | ||
<artifactId>jain-slee-11-ext</artifactId> | ||
<!--<version>1.0.0.BETA1</version>--> | ||
<version>${restcomm.jain.slee.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
74 changes: 74 additions & 0 deletions
74
examples/cap-relay/sbb/src/main/java/org/mobicents/slee/example/cap/CallLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* TeleStax, Open Source Cloud Communications Copyright 2012. | ||
* and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
|
||
package org.mobicents.slee.example.cap; | ||
|
||
import org.apache.log4j.Logger; | ||
import org.apache.log4j.MDC; | ||
import org.mobicents.protocols.ss7.cap.api.CAPDialog; | ||
import org.mobicents.protocols.ss7.cap.api.CAPMessage; | ||
import org.mobicents.protocols.ss7.cap.api.service.circuitSwitchedCall.CAPDialogCircuitSwitchedCall; | ||
import org.mobicents.protocols.ss7.cap.api.service.circuitSwitchedCall.InitialDPRequest; | ||
import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">ProIDS sp. z o.o.</a> | ||
*/ | ||
public class CallLog { | ||
|
||
private static Logger callLogger = Logger.getLogger("CALL_LOG"); | ||
|
||
|
||
public static void logCallStart() { | ||
callLogger.info("--- CALL START --- "); | ||
} | ||
|
||
public static void logCallEnd() { | ||
callLogger.info("--- CALL END --- "); | ||
} | ||
|
||
public static void logOutgoing(String message) { | ||
callLogger.info("<-- " + message); | ||
} | ||
|
||
public static void logIncomming(String message) { | ||
callLogger.info("--> " + message); | ||
} | ||
|
||
public static void logIDP(CAPDialogCircuitSwitchedCall capDialog, int serviceKey) { | ||
callLogger.info(" cap.serviceKey=" + serviceKey); | ||
callLogger.info(" sccp.localAddress=" + capDialog.getLocalAddress()); | ||
callLogger.info(" sccp.remoteAddress=" + capDialog.getRemoteAddress()); | ||
} | ||
|
||
public static void logInternal(String message) { | ||
callLogger.info(" o " + message); | ||
} | ||
|
||
public static void setMDC(CAPDialog capDialog) { | ||
MDC.put("CallID", capDialog.getLocalDialogId()); | ||
} | ||
|
||
public static void clearMDC() { | ||
MDC.remove("CallID"); | ||
} | ||
} |
Oops, something went wrong.