Wednesday Jan 06, 2010

Sun Diameter 1.0 now available on sunsolve

Sun Diameter Adapter is now available on SunSolve as a patch [No : 142949-01 ], this needs to be used with Sun GlassFish Communications Server 2.0 Patch01. Again you can find Sun Diameter documentation and release notes here

Friday Dec 18, 2009

Diameter documentation

Diameter documentation and release notes can be found here

Thursday Oct 29, 2009

Diameter Administration on SailFIn 2.0

Yamini has blogged about diameter configuration elements and Admin Cli commands here.

Installing diameter on Sailfin 2.0

Diameter will be soon available as a pay for Addon module on Sailfin 2.0. Naman has written how to install and configure diameter on sailfin 2.0 here.

Wednesday Oct 28, 2009

Subscribing to user state using Sun Diameter Sh API.

Here is a code snippet that shows how to subscribe to a user state using Sun Diameter Sh API . The Notifications from the Home subscriber server(HSS) can be received by a Message Driver Bean(MDB). The code snippet of the MDB is also shown below.

The below Admin console snaps of Sailfin 2.0 show Home Subscriber server (pone) configured with Connector Pool(openims_pool) and Connector resource (openims)

PeerConfiguration
Connector Pool and Resource configuration

Here are simple steps :
1.Using Sailfin 2.0 Admin console(Sailfin 2.0 also supports cli commands)
a)Create a Diameter application
b)Create a Diameter Peer ---- Diameter Peer screen also allows you to configure connector pool and resource.
2.Write a SIP Servlet with code snippet shown above
3.Write a MDB as shown above
4.Deploy the sar and jar and you should be done.

Friday Oct 16, 2009

Reading AVP value not directly exposed by Response API's in Sun Diameter stack


Here is a code snippet that shows how to read AVP’s that any of the response API’s does not directly expose.
In this case we see how to read Experimental Result Code AVP value.


Tuesday Apr 14, 2009

Support for Diameter Sh API in sailfin

Sailfin project will soon support Diameter protocol and will have API's to enable applications to use Sh,Ro,Rf functionality. As we progress towards providing Diameter support in Sailfin, we have released Sh API's to solicit your valuable feedback. In course of time we will publish API's for Ro and Rf applications too.

Javadocs for Sh API is published here. I will keep writing here on Sh API', to start with let us quickly look at a simple sample on how to use Sh API in a SIP Servlet.








public class RegisterServlet extends SipServlet {
     protected void doInvite(SipServletRequest req) throws ServletException, IOException {

      
       ProfileData data = readUserState(req.getSubscriberURI().toString());
       SipServletResponse resp = req.createResponse(180);
       req.setExpires(2000000);
       resp.send();
     }

     private ProfileData readUserState(String user) {
      try {
        InitialContext context = new InitialContext();
        //configuration of HSS server is configured using Sailfin Admin UI.
        UserProfileServer connectionFactory = (UserProfileServer) context.lookup("eis/SH");
        UserProfileConnection connection = connectionFactory.createConnection();
        // Configure Key specifying information to read.
        ReadProfileKey rpk = new ReadProfileKey();
        rpk.addDataReference(DataReference.IMS_USER_STATE);
        eg:"sip:bob-AT-open-ims-DOT-test"
        UserIdentity uID = new UserIdentity(user, UserIdentityType.PUBLIC_USER_ID);
        rpk.setUserIdentity(uID);
        //validate if the constructed key is correct and all information needed is provided.
        rpk.validate();
        //perform a read operation from HSS server in synchronous mode.
        UserProfileReadResponse urr = connection.read(rpk, false);
        ProfileData data = urr.getProfileData();
        //read the information as bytes,XMLStream or JAXBObject
        System.out.println("User Profile data is" + new String(data.toBytes()));
        return data;
      } catch (KeyValidationException ex) {
       Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);
      } catch (ConnectException ex) {
       Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);
      } catch (NamingException ex) {
       Logger.getLogger(RegisterServlet.class.getName()).log(Level.SEVERE, null, ex);
      }
      return null;
}
}

We encourage users to look at Javadocs and provide us feedback. Please write to us at dev-AT-sailfin.dev.java.net

About

venu

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today