Ads

Wednesday, May 8, 2013

Open remote file using Notepad++

Follow the simple steps to configure remote server and open file directly to your Notepad++

Step 1
Open Notepad++ and follow steps mentioned in below image.


 Step 2
 Below screen will appear




Saturday, October 9, 2010

How to write CDR + OpenCloud Rhino + JAIN-SLEE

My first post on OpenCloud's plateform, well quit a while have started exploring OpenCloud's Rhino.
So this is how it goes....

Follow defined steps.

1) RA Type binding in sbb-jar.xml


<resource-adaptor-type-binding>
<resource-adaptor-type-ref>
<resource-adaptor-type-name>CDR Generation</resource-adaptor-type-name>
<resource-adaptor-type-vendor>OpenCloud</resource-adaptor-type-vendor>
<resource-adaptor-type-version>2.1</resource-adaptor-type-version>
</resource-adaptor-type-ref>

<resource-adaptor-entity-binding>
<resource-adaptor-object-name>slee/resources/cdr/provider</resource-adaptor-object-name>
<resource-adaptor-entity-link>slee/resources/cdr</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>

Monday, October 4, 2010

Track the releases of Mobicents

Long time! Since my last blog


Tired of compiling mails to know about the current releases, or if there is any other best way for which i am not aware of :( .
Hope this would help to locate .....

JAIN SLEE

Mobicents JAIN SLEE 2.2.1.FINAL Released!


Mobicents JAIN SLEE 2.2.0.FINAL Released!


Mobicents JAIN SLEE 2.1.2.FINAL Released!

Mobicents Media Server(MMS)
2.1.0.BETA1


2.0.0.GA

Diameter

Mobicents Diameter v1.3.1.FINAL Released!
Mobicents
Sip Servlets (MSS)


Sip Servlets 1.4.0.FINAL


Sip Servlets 1.3.2

ss7 Protocols Suite
Protocols Suite 1.0.0.B5


Protocols Suite 1.0.0.B2

SIP Presence
1.0.0.BETA6
stay tuned.....

Thursday, January 7, 2010

SS7 ( Sangoma A102 +Wanpipe +Zaptel + Mobicents )

Thanks to Amit Bhayani , Oleg Kulikov and Bartosz Baranowski for your guidance

if you are looking for Sangoma A102 + Dhadi + Astrisk then give it a try


This is how i was able to configure my sangoma A102 card on Ubuntu 8.10, was trying it on Ubuntu 9.10 but its karnel version is still not supported by Sangoma drivers :( , so had to move back on 8.10

lets start

Insert your card in PCI/PCI-E slot.
follow steps

cd /usr/src
mkdir zaptel
cd zaptel

Download Zaptel source
svn checkout http://svn.digium.com/svn/zaptel/branches/1.4/

before you start building zaptel you should have these dependencies sorted

sudo apt-get install build-essential
sudo apt-get install linux-headers-`uname -r` (replace 'uname -r' with your karnel version, 'uname -r' will give you your karnel version)
sudo apt-get install libnewt-dev
sudo apt-get install bison

now we are ready for zaptel installation.

Sunday, October 25, 2009

Running JBoss as SERVICE on LINUX

While working on remote servers and running JBoss AS on it, sometimes gives hard bite to manage.
What if you encounter mentioned problems after starting JBoss AS:-

Connection lost to remote server?
Power failure at your end?
Connection failure at your end?
And what if you don't want to stop JBoss AS at remote server but you have to turn off your local system from where you have given command like ./run.sh -b xxx.yyy.zzz.aaa ?

JBoss instance would be running on remote server until you force fully kill it after getting back your connectivity.

Solution for this is Create JBoss SERVICE to run and stop :)

Now how to do that

Tuesday, September 29, 2009

Devlopement testing using JPA + JUnit

After hours of fight i am able to run Unit tests using JPA

So this is how it goes.

I am using in memory DB
c3p0 is a ComboPooledDataSource more details here
and of course HSQLDB

persistence.xml


<persistence xmlns="http://java.sun.com/xml/ns/persistence"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

version="1.0">

<persistence-unit name="TestDB" transaction-type="RESOURCE_LOCAL">

<provider>org.hibernate.ejb.HibernatePersistence</provider>



<properties>

<property name="hibernate.hbm2ddl.auto" value="create"/>



<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>

<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>

<property name="hibernate.connection.url" value="jdbc:hsqldb:mem:testdb"/>

<property name="hibernate.connection.username" value="sa"/>

<property name="hibernate.connection.password" value=""/>



<property name="hibernate.c3p0.min_size" value="5"/>

<property name="hibernate.c3p0.max_size" value="20"/>

<property name="hibernate.c3p0.timeout" value="300"/>

<property name="hibernate.c3p0.max_statements" value="50"/>

<property name="hibernate.c3p0.idle_test_period" value="3000"/>



</properties>

</persistence-unit>

</persistence>



Test class

Tuesday, August 18, 2009

Creating Custom Events [JAIN-SLEE]

In a tough ride of JAIN-SLEE it is hard to remember everything on tips, to overcome such Stoppers creating this blog so that can refer it further :)

Step1 -----------------------

Create a public class which implements Serializable //Serializable for your convenient

Step2 -----------------------
That class should contain following methods

a public constructor with the parameters you want to pass when you fire an event

a public boolean equals method to check your current object is equals with passed argument

a private long Id would be generated at random when ever constructor is called

a public int hashcode method to return hash code value

getter methods of constructor's parameters

Example

import java.io.Serializable;
import java.util.Random;

import org.apache.log4j.Logger;

public class XyzEvent implements Serializable {

private long id;

private boolean successfull;

private static final Logger logger = Logger.getLogger(XyzEvent.class);

public MFToneDetected(boolean successfull) {
id = new Random().nextLong() ^ System.currentTimeMillis();
this.successfull= successfull;
}

public boolean equals(Object o) {
if (o == this)
return true;
if (o == null)
return false;
return (o instanceof XyzEvent) && ((XyzEvent) o).id == id;
}

public int hashCode() {
return (int) id;
}

public long getId() {
return id;
}

public boolean isSuccessfull(){
return successfull;
}

}

Step3 ------------------------

Now create Its event-jar.xml

which would look like this

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE event-jar PUBLIC "-//Sun Microsystems, Inc.//DTD JAIN SLEE Event 1.0//EN"

"http://java.sun.com/dtd/slee-event-jar_1_0.dtd">

<event-jar>

<event-definition>

<description>Custome Event</description>

<event-type-name>XyzEvent</event-type-name>

<event-type-vendor>org.sachin</event-type-vendor>

<event-type-version>1.0</event-type-version>

<event-class-name>XyzEvent</event-class-name>

</event-definition>

</event-jar>

Description could be any thing which describes cause of this event

Where the combination of event-type-name, event-type-vendor, and event-type-version makes it unique, in other words it would be identified by these defined three fields

And class name would be the name of class for which we are creating this event



Thats all we are Done with creation of Custom event ;)

Step4 ------------------------

Now comes step how to fire it from Sbbs

1st add mentioned code in SBB from which you want to fire this event suppose FireCustomEventSampleSbb

add event in FireCustomEventSampleSbb's sbb-jar.xml

<event event-direction="Fire">
<event-name>XyzEvent</event-name>
<event-type-ref>
<event-type-name>XyzEvent</event-type-name>

<event-type-vendor>org.sachin</event-type-vendor>

<event-type-version>1.0</event-type-version>
</event-type-ref>
</event>

event-direction should be Fire here

2nd add mentioned code to fire event in FireCustomEventSampleSbb

define abstract declaration of event

public abstract void fireXyzEvent(XyzEvent event,
ActivityContextInterface aci, javax.slee.Address address);

add this code from where you want to fire it

XyzEvent xyzEvent = new XyzEvent(true); //pass the values mentioned in XyzEvent class's cunstructor
fireXyzEvent(xyzEvent, this.getCustomEventACI(), null); //reffer SLEE API for parameter details

Step5 ------------------------

Sbb which is Listening to this custome event suppose ListenCustomEventSampleSbb

add event in ListenCustomEventSampleSbb's sbb-jar.xml

<event event-direction="Receive" initial-event="False">
<event-name>XyzEvent</event-name>
<event-type-ref>
<event-type-name>XyzEvent</event-type-name>

<event-type-vendor>org.sachin</event-type-vendor>

<event-type-version>1.0</event-type-version>
</event-type-ref>
</event>

add event listener ListenCustomEventSampleSbb

public void onXyzEvent(XyzEvent event,
ActivityContextInterface aci) {
}