| Members: 423 |
| Language: English |
|
Group categories:
|
| More group info » |
|
| Jan 6 |
|
| Dec 23 |
|
| Dec 15 |
|
| Dec 3 |
|
| Nov 30 |
|
| Nov 27 |
|
| Nov 24 |
|
| Nov 23 |
|
| Nov 18 |
|
| Nov 16 |
Mobicents Diameter Sh (Client)Introduction (Section converted to XML)
The Sh interface is the reference for interactions between the HSS (Home Subscriber Server) and the SIP AS (Application Server) and between the HSS and the OSA SCS (Service Capability Server) in IMS. It is described in TS29.328 and TS29.329. This will only refer to the interactions between AS and HSS and only for client-mode. Sh defines the following messages:
As can be seen from the Command Names, these are related to managing User Data in the HSS. UDR/UDA is used in order to request data from the User profile. Client (AS) sends the request indicating which data he wants (see below for possible kinds of data) and if it has permissions on the HSS, they will be received via UDA. PUR is meant to be used to update the profile of the user, and the success (or not) of the action is reported back in PUA. SNR offers the possibility to request for changes made in the user profile. If SNR is successful a SNA will be received stating that the operation was successful and when there are profile changes, a PNR will be sent by the HSS to the AS (this is the only time HSS initiates conversation) and the AS should acknowledge with a PNA. Resource Adaptor Type Section converted to XMLActivities:
Provider: Provider allows SBBs to create activities on demand and retrieve AVP and message factories. API definition can be found here. It alows to fetch connection information (peers connected). Message Factory Message factory creates events that can be fired into SLEE or sent through RA. API definition can be found here. Depending on case factory prefils some AVPs, to best of its knowledge about session. Example usage of API Section converted to XML
{ try { logger.info( "Push-Notification-Request activity["+aci.getActivity()+"] received.\n"+pnr ); // Let's be nice and say OK :) ShClientSubscriptionActivityImpl shActivity = (ShClientSubscriptionActivityImpl) aci.getActivity(); shActivity.sendPushNotificationAnswer( 2001, false ); } catch ( IOException e ) { logger.error( "Failure while creating/sending PNA.", e ); } }
{ try { ShClientActivity basicClientActivity=this.provider.createShClientActivity(); logger.info(" On TimerEvent: activity created"); localACI.attach(getSbbContext().getSbbLocalObject()); DiameterIdentity[] peers=provider.getConnectedPeers(); for(DiameterIdentity peer: peers) { logger.info(" On TimerEvent: Connected Peer: "+peer.toString()); } logger.info(" On TimerEvent: creating UDR"); UserDataRequest udr=((ShClientMessageFactory)basicClientActivity.getDiameterMessageFactory()).createUserDataRequest(); List<DiameterAvp> avps = new ArrayList<DiameterAvp>(); avps.add(avpFactory.getBaseFactory().createAvp(Avp.SESSION_ID, basicClientActivity.getSessionId().getBytes() )); DiameterAvp avpVendorId = avpFactory.getBaseFactory().createAvp( Avp.VENDOR_ID, MessageFactory._SH_VENDOR_ID ); DiameterAvp avpAcctApplicationId = avpFactory.getBaseFactory().createAvp( Avp.ACCT_APPLICATION_ID, MessageFactory._SH_APP_ID ); avps.add( avpFactory.getBaseFactory().createAvp( Avp.VENDOR_SPECIFIC_APPLICATION_ID, new DiameterAvp[]{avpVendorId, avpAcctApplicationId} ) ); avps.add(avpFactory.getBaseFactory().createAvp(Avp.ORIGIN_HOST, ("aaa://" + originIP + ":1812").getBytes() )); avps.add(avpFactory.getBaseFactory().createAvp(Avp.ORIGIN_REALM, "mobicents.org".getBytes() )); avps.add(avpFactory.getBaseFactory().createAvp(Avp.DESTINATION_HOST, ("aaa://" + destinationIP + ":3868").getBytes() )); avps.add(avpFactory.getBaseFactory().createAvp(Avp.DESTINATION_REALM, "mobicents.org".getBytes() )); UserIdentityAvp ui=avpFactory.createUserIdentity(); ui.setPublicIdentity("sip:subscriber@mobicents.org"); avps.add(ui); ui=avpFactory.createUserIdentity(); ui.setPublicIdentity("TEL:+64216543210"); avps.add(ui); udr.setExtensionAvps(avps.toArray(new DiameterAvp[avps.size()])); logger.info(" On TimerEvent: Sending message:\n"+udr); basicClientActivity.sendUserDataRequest(udr); logger.info(" On TimerEvent: Message send"); } catch (Exception e) { logger.error( "Failure trying to create/sen UDR.", e ); } } Above example makes use of setExtensionAvps() methods. However it is possible to use specific methods, like udr.setUserIdentity(); for instance. Resource AdaptorThe Sh-Client Resource Adaptor provides the Sh client application layer to SLEE.Build from sourceIn order to build from source you need to make sure you meet the following requirements:
After checking out the code from SVN repository, run the following command in the source root folder: mvn clean install That command should compile the source and copy the relevant jars into your JBoss deploy folder. From the binaryGrab the binary from SourceForge. Extract the files and deploy the DU jar (diameter-sh-client-ra-DU-<version>.jar) in your JBoss deploy folder. SLEE Deployer will catch it and perform the necessary steps automatically.If you wish to use JMX deployment, run the ant deploy command in the extracted zip folder. ExamplesThere is a simple example (well, actually is a test application, for a real example check the OpenIMS Integration Example) provided for Sh Client which just sends Sh commands for Seagull. In order to test it you need to setup Seagull in your machine, configure the Mux accordingly to the settings defined in seagull and start it.Depending on the version of Seagull you are getting, you might have or have not the necessary scenario files. You can copy them from here if you need it: 1) UDR-UDA:
<?xml version="1.0" encoding="ISO-8859-1" ?> <scenario>
<init> <receive channel="channel-1"> <command name="CER"> </command> <action> <store name="ven" entity="Vendor-Id"></store> </action> </receive>
<send channel="channel-1"> <command name="CEA"> <avp name="Result-Code" value="2001"></avp> <avp name="Origin-Host" value="sh-server"></avp> <avp name="Origin-Realm" value="seagull"></avp> <avp name="Host-IP-Address" value="0x00017F000001"></avp> <avp name="Vendor-Id" value="0"></avp> <avp name="Product-Name" value="HSS"></avp> <avp name="Firmware-Revision" value="1"></avp>
<avp name="Supported-Vendor-Id" value="10415"></avp> <avp name="Vendor-Specific-Application-Id"> <avp name="Vendor-Id" value="10415"></avp> <avp name="Auth-Application-Id" value="16777217"></avp> </avp> </command> </send> </init>
<traffic> <receive channel="channel-1"> <command name="UDR"> <!-- Only need to specify what needs to be parsed --> <avp name="Session-Id" value="dont_care"></avp> </command> <!-- Store action is at the end of the command --> <action> <store name="HbH" entity="HbH-id"></store> <store name="E2E" entity="EtE-id"></store> <store name="sid" entity="Session-Id"></store> </action> </receive>
<send channel="channel-1"> <!-- Restore action is before the command --> <action> <restore name="HbH" entity="HbH-id"></restore> <restore name="E2E" entity="EtE-id"></restore> <restore name="sid" entity="Session-Id"></restore> </action> <command name="UDA"> <avp name="Session-Id" value="will_be_erased"></avp> <avp name="Origin-Host" value="sh-server"></avp> <avp name="Origin-Realm" value="seagull"></avp> <avp name="Auth-Session-State" value="1"></avp> <avp name="Result-Code" value="2001"></avp> <avp name="User-Data" value="<Sh-Data> </Sh-Data>"></avp> </command> </send> </traffic> </scenario> 2) SNR-SNA
<?xml version="1.0" encoding="ISO-8859-1" ?> <scenario> <init> <receive channel="channel-1"> <command name="CER"> </command> <action> <store name="ven" entity="Vendor-Id"></store> </action> </receive>
<send channel="channel-1"> <command name="CEA"> <avp name="Result-Code" value="2001"></avp> <avp name="Origin-Host" value="sh-server"></avp> <avp name="Origin-Realm" value="seagull"></avp> <avp name="Host-IP-Address" value="0x00017F000001"></avp> <avp name="Vendor-Id" value="0"></avp> <avp name="Product-Name" value="HSS"></avp> <avp name="Firmware-Revision" value="1"></avp> </command> </send> </init>
<traffic> <receive channel="channel-1"> <command name="SNR"> <!-- Only need to specify what needs to be parsed --> <avp name="Session-Id" value="dont_care"></avp> </command>
<!-- Store action is at the end of the command --> <action> <store name="HbH" entity="HbH-id"></store> <store name="E2E" entity="EtE-id"></store> <store name="sid" entity="Session-Id"></store> <!-- <store name="sessionState" entity="Auth-Session-State"></store> --> </action> </receive>
<send channel="channel-1"> <!-- Restore action is before the command --> <action> <restore name="HbH" entity="HbH-id"></restore> <restore name="E2E" entity="EtE-id"></restore> <restore name="sid" entity="Session-Id"></restore> <!-- <restore name="sessionState" entity="Auth-Session-State"></restore> --> </action>
<command name="SNA"> <avp name="Session-Id" value="will_be_erased"></avp> <avp name="Origin-Host" value="sh-server"></avp> <avp name="Origin-Realm" value="seagull"></avp> <avp name="Result-Code" value="3004"></avp><!-- TOO_BUSY answer --> </command> </send> </traffic> </scenario> As can be seen, the scenarios require the CER/CEA messages to be exchanged in order to correctly establish the connection between peers. To use this, save the scenario in a file (eg: udr-uda.server.xml and snr-sna.server.xml) and pass it to seagull as the scenario file. Please feel free to change the scenarios for whatever fits your needs (eg, change the Result-Code AVP value). A sample command line to run it would be: seagull -conf ../config/conf.server.xml -dico ../config/base_sh.xml -scen ../scenario/udr-uda.server.xml -log ../logs/udr-uda.server.log -llevel ET Configuration Section converted to XMLAt
the moment it is not possible to make any configuration changes unless
you edit the code, as it was just a test application, enabling/disabling the following method calls:public void onTimerEvent(TimerEvent event, ActivityContextInterface aci) { doSimpleTestsSendUDR();
//doSimpleTestSendSNR(); } Expect future release to include a properties file where you can change that and some more options easily. Build from sourcePlease make sure you meet the exact same requirements stated above in the RA section.You can obtain the latest version of the source code from here. Tagged and released versions can be obtained in this location. After checking out the code from SVN repository, run the following command in the source root folder: mvn clean install That command should compile the source and copy the relevant jars into your JBoss deploy folder. From the binaryGrab the binary from SourceForge. Extract the files and deploy the DU jar (diameter-sh-client-example-DU-<version>.jar) in your JBoss deploy folder. SLEE Deployer will catch it and perform the necessary steps automatically.If you wish to use JMX deployment, run the ant deploy command in the extracted zip folder.
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2010 Google |