Restcomm gmlc configuration issue no local SSN is present for primary Address - restcomm

I'm facing an issue while trying to configure restcomm gmlc on windows server 2008 R2. I Get the this message
The picture bellow are the settings for HLR and the Windows server
And bellow are the settings
GmlcManagement_gmlcproperties.xml
<?xml version="1.0" encoding="UTF-8" ?>
<gmlcgt value="237694000089"/>
<gmlcssn value="145"/>
<hlrssn value="6"/>
<mscssn value="6"/>
<maxmapv value="3"/>
Mtp3UserPart_m3ua1.xml
<?xml version="1.0" encoding="UTF-8" ?>
<heartbeattime value="10000"/>
<aspFactoryList>
<aspFactory name="timbr_asp1" assocName="timbr_ass1" started="false" maxseqnumber="256" aspid="2" heartbeat="false"/>
</aspFactoryList>
<asList>
<as name="timbr_as1" minAspActiveForLb="1" functionality="IPSP" exchangeType="SE" ipspType="CLIENT">
<routingContext size="1">
<rc value="102"/>
</routingContext>
<networkAppearance value="8"/>
<trafficMode mode="2"/>
<defTrafficMode mode="2"/>
<asps>
<asp name="timbr_asp1"/>
</asps>
</as>
</asList>
<route>
<key value="89:42:3"/>
<routeAs trafficModeType="2" as="timbr_as1"/>
</route>
SccpStack_sccpresource2.xml
<?xml version="1.0" encoding="UTF-8" ?>
<remoteSsns>
<id value="1"/>
<value remoteSpc="42" remoteSsn="6" remoteSsnFlag="0" markProhibitedWhenSpcResuming="false"/>
</remoteSsns>
<remoteSpcs>
<id value="1"/>
<value remoteSpc="42" remoteSpcFlag="0" mask="0"/>
</remoteSpcs>
<concernedSpcs/>
SccpStack_sccprouter2.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rule>
<id value="1"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="RemoteOriginated" mask="K" paddress="1" saddress="-1" networkId="0">
<patternSccpAddress pc="42" ssn="6">
<ai value="18"/>
<gt type="GT0100" tt="0" es="2" np="1" nai="4" digits="237694000089"/>
</patternSccpAddress>
</value>
<id value="2"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="LocalOriginated" mask="K" paddress="2" saddress="-1" networkId="0">
<patternSccpAddress pc="89" ssn="145">
<ai value="16"/>
<gt type="GT0100" tt="0" es="1" np="1" nai="4" digits="*"/>
</patternSccpAddress>
</value>
</rule>
<routingAddress>
<id value="1"/>
<sccpAddress pc="89" ssn="145">
<ai value="19"/>
<gt type="GT0100" tt="0" es="2" np="1" nai="4" digits="237694000089"/>
</sccpAddress>
<id value="2"/>
<sccpAddress pc="42" ssn="6">
<ai value="17"/>
<gt type="GT0100" tt="0" es="1" np="1" nai="4" digits="*"/>
</sccpAddress>
</routingAddress>
<longMessageRule/>
<sap>
<id value="1"/>
<value mtp3Id="1" opc="42" ni="2" networkId="1">
<mtp3DestinationMap>
<id value="1"/>
<value firstDpc="1" lastDpc="16384" firstSls="0" lastSls="255" slsMask="255"/>
</mtp3DestinationMap>
</value>
</sap>
SCTPManagement_sctp.xml
<?xml version="1.0" encoding="UTF-8" ?>
<connectdelay value="5000"/>
<servers/>
<associations>
<name value="timbr_ass1"/>
<association name="timbr_ass1" assoctype="CLIENT" hostAddress="172.22.118.131" hostPort="2609" peerAddress="192.168.212.185" peerPort="2609" serverName="" ipChannelType="0" extraHostAddresseSize="0"/>
</associations>
TcapStack_management.xml
<?xml version="1.0" encoding="UTF-8" ?>
<dialogidletimeout value="60000"/>
<invoketimeout value="30000"/>
<maxdialogs value="5000"/>
<dialogidrangestart value="1"/>
<dialogidrangeend value="2147483647"/>
<donotsendprotocolversion value="false"/>
<statisticsenabled value="false"/>

I see quite a few issues in the raised question, albeit I think your problem is in jboss-beans.xml file (will get there later), it's important to clarify them as they could potentially be cause of problems.
1) SSN should be 145 as for specifications, and you got it right in Restcomm GMLC's configuration files, but in the image it appears as 147 (which is not appropriate, as that is the SSN for gsmSCF, not for GMLC). Are you sure the MNO has 145 and it's only a typo in the image?
2) MSC SSN is 8, not 6 as you put it in mscssn value at GmlcManagement_gmlcproperties.xml. Modify that to 8 please.
3) Are you sure about the routingContext and networkAppearance values or did you just copied them from the simulator profile?
Having that in mind, your main problem most likely reside at the following two configuration files:
1) Check $GMLC_HOME/jboss-5.1.0.GA/server/default/deploy/restcomm-gmlc-server/META-INF/jboss-beans.xml TCAP Service section... it should look like this:
<!-- ==================================================================== -->
<!-- TCAP Service -->
<!-- ==================================================================== -->
<bean name="GMLC_TcapStack" class="org.mobicents.protocols.ss7.tcap.TCAPStackImpl">
<constructor>
<parameter>TcapStack</parameter>
<parameter>
<inject bean="GMLC_SccpStack" property="sccpProvider" />
</parameter>
<parameter>145</parameter>
</constructor>
<property name="persistDir">${jboss.server.data.dir}</property>
<!--
<property name="dialogIdleTimeout">60000</property>
<property name="invokeTimeout">30000</property>
<property name="maxDialogs">25000</property >
-->
</bean>
First, are you sure 145 is there? Then and again, as pointed out in 1), are you sure the MNO and your configuration are concordant?
2) Your routing rule configuration at SccpStack_sccprouter2.xml might lead you to problems, set pc and ssn values to 0 in patternSccpAddress, like this:
<rule>
<id value="1"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="RemoteOriginated" mask="K" paddress="1" saddress="-1" networkId="0">
<patternSccpAddress pc="0" ssn="0">
<ai value="18"/>
<gt type="GT0100" tt="0" es="2" np="1" nai="4" digits="237694000089"/>
</patternSccpAddress>
</value>
<id value="2"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="LocalOriginated" mask="K" paddress="2" saddress="-1" networkId="0">
<patternSccpAddress pc="0" ssn="0">
<ai value="16"/>
<gt type="GT0100" tt="0" es="1" np="1" nai="4" digits="*"/>
</patternSccpAddress>
</value>
</rule>
Please keep us posted, good luck and best regards,
Fernando Mendioroz

Related

Implementation of Qserver and Qmux

I'm learning about jpos. I got jpos programmer's guide with me and I have gone through that.
It helped me a lot in developing my switch.
I have some questions.
Whether I created my switch Correctly?
What are best practices for these situation:
I have a switch get diffrent messages (two types of channel/packager) from one switch and response back to it (qserver and qmux or only qmux or ...)
I have a switch get diffrent messages from diffrent banks and should reply them or forward messages to another (do I need qserver or just a qmux or need to have more configs on txmanager side)
now Im going to implement first situation In my switch flow is in this way:
Q2 will deploy by xml files:
Server.xml
RequestListener Class
TransactionMangare.xml
Here, in QMUX, what I don't understand is:
Q2 will deploy by xml files
(then I have QMUX.xml,Channeladaptor.xml and Listener Class [I want to know in what order it should come])
TransactionMangare.xml
messages with diffrent channel would come to me through a single port. is it possible?
as Qmux would use key (Bit41 and mti) which needs to specify channel before giving to the right one (otherwise would get 41 wrong or it would not parse it at all)
here are my deploy files:
logger.xml
<?xml version="1.0" encoding="UTF-8"?>
<logger name="Q2Logger" class="org.jpos.q2.qbean.LoggerAdaptor">
<log-listener class="org.jpos.util.SimpleLogListener" />
</logger>
server.xml
<?xml version="1.0" encoding="UTF-8"?>
<server class="org.jpos.q2.iso.QServer" logger="Q2Logger" name="TransactionServer">
<attr name="port" type="java.lang.Integer">88800</attr>
<attr name="maxSessions" type="java.lang.Integer">20</attr>
<attr name="minSessions" type="java.lang.Integer">10</attr>
<!-- packager is customised (I also need another packager for another type of messages) -->
<channel class="org.jpos.iso.channel.ASCIIChannel" name="ASCIIChannel" logger="Q2Logger" packager="com.example.transaction.packager.ISO93APackager" header="ISO51300000">
<property name="timeout" value="70000" /> <!-- 7 minutes -->
<property name="keep-alive" value="true" />
</channel>
<!-- can have realm="incoming-request-listener" -> to automatically put into space ???? -->
<request-listener class="com.example.transaction.listener.ServerRequestListener" logger="Q2Logger" name="isoListener">
<property name="space" value="transient:default" />
<property name="queue" value="CerditCardTXNQueue" />
<property name="spaceTimeout" value="60000" />
</request-listener>
</server>
txnmgr.xml
<?xml version="1.0" encoding="UTF-8"?>
<txnmgr name="CreditCardTransactionManager" logger="Q2Logger" class="org.jpos.transaction.TransactionManager">
<property name="space" value="transient:default" />
<property name="queue" value="TXNQueue" />
<property name="sessions" value="5" />
<property name="debug" value="true" />
<participant class="com.example.transaction.participants.PrepareParticipant" logger="Q2Logger" />
<participant class="com.example.transaction.participants.ValidationParticipant" logger="Q2Logger" />
<participant class="com.example.transaction.participants.ProcessParticipant" logger="Q2Logger" />
<participant class="com.example.transaction.participants.SendResponseParticipant" logger="Q2Logger"/>
</txnmgr>
Thanks,

WSO2 ESB iterate mediator joining

i'm facing some problems with this process.. let me explain:
i want to call two services and join the responses in this order:
i have the first service's response:
<locations xmlns="http://ssocial.com/traceit/services/location">
<location>
<latitude>-33.45209980</latitude>
<longitude>-70.66241990</longitude>
<altitude>0.0</altitude>
<creation>2016-09-04T14:59:48.000-03:00</creation>
<updated>2016-09-04T14:59:48.000-03:00</updated>
<deviceId>25</deviceId>
</location>
<location>
<latitude>-33.45149521</latitude>
<longitude>-70.66146224</longitude>
<altitude>817.0</altitude>
<creation>2016-09-04T13:18:43.000-03:00</creation>
<updated>2016-09-04T13:18:43.000-03:00</updated>
<deviceId>25</deviceId>
</location>
</locations>
then i have the secon service's response :
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
And then, the final response that i would like to have is :
<locations xmlns="http://ssocial.com/traceit/services/location">
<location>
<latitude>-33.45209980</latitude>
<longitude>-70.66241990</longitude>
<altitude>0.0</altitude>
<creation>2016-09-04T14:59:48.000-03:00</creation>
<updated>2016-09-04T14:59:48.000-03:00</updated>
<deviceId>25</deviceId>
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
</device>
</location>
<location>
<latitude>-33.45149521</latitude>
<longitude>-70.66146224</longitude>
<altitude>817.0</altitude>
<creation>2016-09-04T13:18:43.000-03:00</creation>
<updated>2016-09-04T13:18:43.000-03:00</updated>
<deviceId>25</deviceId>
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
</device>
</location>
</locations>
i'm really having lot of troubles trying to join both responses like that, and this is my sequence in wso2:
<sequence name="getDeviceInfoByLocationProcess" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<property expression="count(//ns1:locations/ns1:location)" name="LOCATIONS_COUNT" scope="default" type="STRING" xmlns:ns1="http://ssocial.com/traceit/services/location"/>
<iterate description="" expression="//ns1:locations/ns1:location/ns1:deviceId" id="LOCATIONS_ITERATOR" xmlns:ns1="http://ssocial.com/traceit/services/location">
<target>
<sequence>
<property description="device_id" expression="//ns1:deviceId" name="device_id" scope="default" type="STRING"/>
<sequence key="getDeviceInfoProcess"/>
</sequence>
</target>
</iterate>
<log level="custom">
<property expression="//ns1:locations" name="LOCATIONS" xmlns:ns1="http://ssocial.com/traceit/services/location"/>
<property expression="//ns2:device" name="DEVICE_INFO" xmlns:ns2="http://ssocial.com/traceit/services/device"/>
</log>
<property name="ECNCLOSING_ELEMENT" scope="default">
<wrapper xmlns=""/>
</property>
<aggregate id="AGG_01">
<completeCondition>
<messageCount max="-1" min="{get-property('LOCATIONS_COUNT')}"/>
</completeCondition>
<onComplete expression="//ns2:device" xmlns:ns2="http://ssocial.com/traceit/services/device">
<log level="full">
<property expression="$ctx:LOCATIONS_COUNT" name="COUNTER"/>
<property expression="$ctx:ECNCLOSING_ELEMENT" name="ENCLOSING"/>
</log>
<call/>
</onComplete>
</aggregate>
and actually with this sequence, i'm just getting this:
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
In advance , thank you very much for the help
I can't see the content of "getDeviceInfoProcess" sequence, but I guess your are using call mediator. So, as a result of those requests (multiple requests because of iterate mediator), you receive some responses and that what you have to deal with in the rest of the initial mediation : aggregate offers you a way to wait for all the responses, but the initial message is lost : you should save it in a property (type OM) and use something like payloadMediator inside aggregate/onComplete to compose the final message.

error when running red5 application on windows

I made very sample application for red5
I set WEB-INF(red5-web.properties, red5-web.xml, web.xml)
when I runnig the red.bat I view in the debug this error code :
[INFO] [Launcher:/test] org.springframework.beans.factory.xml.XmlBeanDefi
nitionReader - Loading XML bean definitions from ServletContext resource [/WEB-I
NF/red5-web.xml]
Exception in thread "Launcher:/test" org.springframework.beans.factory.xm
l.XmlBeanDefinitionStoreException: Line 25 in XML document from ServletContext r
esource [/WEB-INF/red5-web.xml] is invalid; nested exception is org.xml.sax.SAXP
arseException; lineNumber: 25; columnNumber: 68; cvc-id.2: There are multiple oc
currences of ID value 'web.handler'
and my client can't connect to server :(
from your description its impossible to say exactly what you've done.
You might better start to use for example the existing demo application that ship with every release.
Sebastian
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd">
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/red5-web.properties" />
</bean>
<bean id="web.context" class="org.red5.server.Context"
autowire="byType" />
<bean id="web.scope" class="org.red5.server.WebScope"
init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context" />
<property name="handler" ref="web.handler" />
<property name="contextPath" value="${webapp.contextPath}" />
<property name="virtualHosts" value="${webapp.virtualHosts}" />
</bean>
<bean id="web.handler" class="com.myapp.Application" />
</beans>
change the web.handler bean in your red5-web.xml file
<bean id="web.handler" class="com.myapp.Application"
singleton="true" autowire="byName" />
Check the other bean names also. The error you posted says same ID used for two or more beans.

How to Validate xml using xsd schema and SAX?

I will describe my problem with xml.
first i defined my xsd schema with namespaces and it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/schema"
xmlns:tns="http://www.example.org/schema" elementFormDefault="qualified">
<element name="Clients" type="tns:ClientsType"></element>
<complexType name="ContactType">
<sequence>
<element name="Type" type="string"></element>
</sequence>
<attribute name="ID" type="long" />
</complexType>
<complexType name="Contact">
<sequence>
<element name="ContactType" type="tns:ContactType"></element>
<element name="Value" type="string"></element>
</sequence>
<attribute name="ID" type="long" />
</complexType>
<complexType name="ContactsType">
<sequence>
<element name="Contact" type="tns:Contact" maxOccurs="unbounded"></element>
</sequence>
</complexType>
<complexType name="ClientType">
<sequence>
<element name="FirstName" type="string"></element>
<element name="SecondName" type="string"></element>
<element name="Contacts" type="tns:ContactsType"></element>
</sequence>
<attribute name="ID" type="long" />
</complexType>
<complexType name="ClientsType">
<sequence>
<element name="Client" type="tns:ClientType" maxOccurs="unbounded"></element>
</sequence>
</complexType>
so it generated obvious xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<tns:Clients xmlns:tns="http://www.example.org/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org/schema schema.xsd ">
<tns:Client ID="0">
<tns:FirstName>tns:FirstName</tns:FirstName>
<tns:SecondName>tns:SecondName</tns:SecondName>
<tns:Contacts>
<tns:Contact ID="0">
<tns:ContactType ID="0">
<tns:Type>tns:Type</tns:Type>
</tns:ContactType>
<tns:Value>tns:Value</tns:Value>
</tns:Contact>
</tns:Contacts>
</tns:Client>
and my function creating specific xml with data:
#Override
public void printToFile() throws IOException, XMLStreamException {
FileWriter fd = new FileWriter(outPath);
Random rand = new Random();
int end = rand.nextInt(1000);
try{
XMLOutputFactory xof = XMLOutputFactory.newInstance();
XMLStreamWriter xtw = null;
xtw = xof.createXMLStreamWriter(fd);
xtw.writeStartDocument();
//xtw.setPrefix("tns", "http://www.example.org/schema");
xtw.writeStartElement("Clients");
xtw.writeNamespace("tns", "http://www.example.org/schema");
xtw.writeStartElement("tns","Client", "http://www.example.org/schema");
//xtw.writeStartElement("Client");
xtw.writeAttribute("ID", "1");
xtw.writeStartElement("FirstName");
xtw.writeCharacters("NameFirst");
xtw.writeEndElement();
xtw.writeStartElement("SecondName");
xtw.writeCharacters("NameSecond");
xtw.writeEndElement();
xtw.writeStartElement("Contacts");
for(int i=1;i<2;i++){
xtw.writeStartElement("Contact");
xtw.writeAttribute("ID",Integer.toString(i));
xtw.writeStartElement("ContactType");
xtw.writeAttribute("ID", Integer.toString(i));
xtw.writeStartElement("Type");
xtw.writeCharacters("mojTyp");
xtw.writeEndElement();
xtw.writeEndElement();
xtw.writeStartElement("Value");
xtw.writeCharacters("value");
xtw.writeEndElement();
xtw.writeEndElement();
}
xtw.writeEndElement();
//xtw.writeEndElement();
xtw.writeEndDocument();
}catch(XMLStreamException xmlE)
{
}
finally
{
fd.close();
}
}
and I generate simple Junit test usinx Sax to validate my xml created by my function:
#Test
public void testPrintToFileGoodXml() throws IOException,
XMLStreamException, FactoryConfigurationError, SAXException {
mService.printToFile();
XMLStreamReader reader = XMLInputFactory.newInstance()
.createXMLStreamReader(new FileInputStream(myPath));
SchemaFactory factory = SchemaFactory
.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = factory.newSchema(new File(mySchemaPath));
Validator validator = schema.newValidator();
validator.validate(new StAXSource(reader));
assertTrue(true);
}
But the test is fail so I think there is problem with my printToFile function connected with namespaces and the other properties defined in the xsd schema, and I don't know how to solve it. I read many sites and the documentation of defining xsd and I still don't know how to solve my problem. Please help.
The schema says the root element should be Clients
However your XML Snippet has an opening element tns:Clients, but no coresponsing closing element. Check your writeEndElement calls tally up.
<?xml version="1.0" encoding="UTF-8"?>
<tns:Clients xmlns:tns="http://www.example.org/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org/schema Contacts.xsd ">
<tns:Client ID="0">
<tns:FirstName>tns:FirstName</tns:FirstName>
<tns:SecondName>tns:SecondName</tns:SecondName>
<tns:Contacts>
<tns:Contact ID="0">
<tns:ContactType ID="0">
<tns:Type>tns:Type</tns:Type>
</tns:ContactType>
<tns:Value>tns:Value</tns:Value>
</tns:Contact>
</tns:Contacts>
</tns:Client>
</tns:Clients> <--------- Missing

Is it possible to invoke a antscript in postdst and presrc call in MQFTE?

Is it possible to invoke a antscript in postdst and presrc call in MQFTE??
Here's an example:
<request version="4.00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>$hostName</hostName>
<userID>$userID</userID>
</originator>
<sourceAgent QMgr="$sourceQM" agent="$sourceAgent"/>
<destinationAgent QMgr="$destQM" agent="$destAgent"/>
<transferSet priority="5">
<metaDataSet>
<metaData key="some_key">Some value</metaData>
</metaDataSet>
<postSourceCall>
<command name="example.xml" retryCount="0" retryWait="0" successRC="0" type="antscript">
<property name="ant.FILEPATH" value="$filepath"/>
<property name="antSrcAgent" value="$sourceAgent"/>
</command>
</postSourceCall>
<item checksumMethod="MD5" mode="binary">
<source disposition="delete" recursive="false">
<file>$filepath</file>
</source>
<destination exist="error" type="directory">
<file>$destFile</file>
</destination>
</item>
</transferSet>
<job>
<name>Example FTE job</name>
</job>
</managedTransfer>
</request>
The properties passed to the ant script are arbitrary names. You could pass any properties in that way. I used postSourceCall but you can change that to postDest, preSource, etc.