 |
Mobicents Diameter Resource Adaptor - Test Impl
Source code repository
Diameter RA CVS
diametrRA.properties
This file contains stack configuration options.
| Option Name | Values | Description |
| dk.i1.diameter.node.Capability.AuthAppX | Assigned by IANA | Tells stack that application can receive request/answers ment to specific application, here for Authentication portion of it. RA reads pairs of dk.i1.diameter.node.Capability.AuthAppX and dk.i1.diameter.node.Capability.AccAppX where "X" is index, starting at "1". If one of ( Acc or Auth ) is not present it is ignored. Indexing cant be broken - it has to be constant ( 1,2,3 not 1,2,4 - in last case 4 will be ignored ) |
| dk.i1.diameter.node.Capability.AccAppX | Assigned by IANA | Tells stack that application can receive request/answers ment to specific application, here for Accounting portion of it. RA reads pairs of dk.i1.diameter.node.Capability.AuthAppX and dk.i1.diameter.node.Capability.AccAppX where "X" is index, starting at "1". If one of ( Acc or Auth ) is not present it is ignored. Indexing cant be broken - it has to be constant ( 1,2,3 not 1,2,4 - in last case 4 will be ignored ) |
| dk.i1.diameter.node.Capability.SupportedVendorX | Assigned by IANA | In combination with dk.i1.diameter.node.Capability.SupportedVendorAuthAppX and dk.i1.diameter.node.Capability.SupportedVendorAccAppX tells stack that this node can handle accounting, authentiaction or both portion of application specific to soem vendor. RA reads vendor id and after that it reads dk.i1.diameter.node.Capability.SupportedVendorAuthAppX and dk.i1.diameter.node.Capability.SupportedVendorAccAppX . One of those can be ommited. As with other, "X" is index number and it has the same restrictions as dk.i1.diameter.node.Capability.AuthAppX index. |
| dk.i1.diameter.node.Capability.SupportedVendorAuthAppX | Assigned by IANA | Value assigned by IANA to authentication portion of application. |
| dk.i1.diameter.node.Capability.SupportedVendorAccAppX | Assigned by IANA | Value assigned by IANA to accounting portion of application. |
| dk.i1.diameter.node.Capability.HostId | FQDN | Simply domain name of this node/machine |
| dk.i1.diameter.node.Capability.Realm | Domain name | According to RFC3588 it is local domain name or realm for which this node acts |
| dk.i1.diameter.node.Capability.VendorID | Integer | Number assigned to us as application vendor |
| dk.i1.diameter.node.Capability.ListenPort | port | Port on which this node will listen |
| dk.i1.diameter.node.Capability.ProductName | Name of our product | Simply name of our applciation? Gives clue what this node performs |
| dk.i1.diameter.node.Capability.FirmWareRevision | Version | Something like versioning |
| dk.i1.diameter.node.Capability.PeerConnectionX | Another node FQDN | Indexed as other properties. Two styles of values: ==dk.i1.diameter.node.Capability.PeerConnection1=eclipso.mobicents.org== ==dk.i1.diameter.node.Capability.PeerConnection2=another.one.com:80388== |
Example diameterRA.proeprties
This file configures stack of RA to connect to one host on standard port 3868. Also it tells it that RA can handle basic and accounting portion of diameter and SH interface requests/answers.
# DIAMETER COMMON
dk.i1.diameter.node.Capability.AuthApp1=0
dk.i1.diameter.node.Capability.AccApp1=0
# DIAMETER ACCOUNTING
dk.i1.diameter.node.Capability.AuthApp2=4
dk.i1.diameter.node.Capability.AccApp2=4
dk.i1.diameter.node.Capability.SupportedVendor1=10415
dk.i1.diameter.node.Capability.SupportedVendorAuthApp1=16777217
dk.i1.diameter.node.Capability.SupportedVendorAccApp1=16777217
#dk.i1.diameter.node.Capability.SupportedVendor2=1
#dk.i1.diameter.node.Capability.SupportedVendorAuthApp2=3
#dk.i1.diameter.node.Capability.SupportedVendorAccApp2=3
# ACCORDING TO DIME HostId should be equal to Realm ...
dk.i1.diameter.node.Capability.HostId=shadow.mobicents.org
dk.i1.diameter.node.Capability.Realm=mobicents.org
dk.i1.diameter.node.Capability.VendorID=1234567890
dk.i1.diameter.node.Capability.ListenPort=3868
dk.i1.diameter.node.Capability.ProductName=Mobicents SLEE DiameterNode
dk.i1.diameter.node.Capability.FirmWareRevision=10
# It can be host:port == secondenode.nist.gov:3800
# or just secondenode.nist.gov - port will be set to 3868
dk.i1.diameter.node.Capability.PeerConnection1=eclipso.mobicents.org
Simple sbb code for tests, actualy this code has been run against two mobicents instances with DiameterRA?:
public class ....
private DiameterResourceAdaptorSbbInterface dsbb=null;
....
public void onSomething()
{
Peer peer=null;
try {
peer=new Peer("eclipso.mobicents.org");
} catch (EmptyHostNameException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ConnectionKey key=dsbb.findConnection(peer); //WE NEED THIS TO CREATE ACTIVITY, SO IT KNOWS FEW THINGS
.....
ShInterfaceActivity shac;
//LETS PASS WHERE THIS AO SHOULD BY DEFAULT ADDRESS REQUESTS, AND SOME OTHER STUFF LIKE CONNECTION THROUGH IT SHOULD SEND MESSAGES
ActivityContextInterface aci1=dsbb.makeShActivity("eclipso.mobicents.org","mobicents.org","", ProtocolConstants.DI_AUTH_SESSION_STATE_NO_STALE_MAINTAINED,key);
shac=(ShInterfaceActivity)aci1.getActivity();
aci1.attach(getSbbContext().getSbbLocalObject());
//LETS ADD SH VENDOR, AND APPLICATION KIND
AVP_Unsigned32 vendorId=new AVP_Unsigned32(ProtocolConstants.DI_VENDOR_ID,ShProtocolConstants.DIAMETER_3GPP_VENDOR_ID);
AVP_Unsigned32 auth=new AVP_Unsigned32(ProtocolConstants.DI_AUTH_APPLICATION_ID,ShProtocolConstants.DIAMETER_APPLICATION_SH);
//AVP_Unsigned32 acc=new AVP_Unsigned32(ProtocolConstants.DI_ACCT_APPLICATION_ID,ShProtocolConstants.DIAMETER_APPLICATION_SH); // ONLY ONE TYPE CAN BE PRESENT IN CURRENT STACK IMPL
//IN PUR THIS SHOULD BE PRESENT SO OTHER NODE KNOWS FOR WHICH USER WE MAKE PUR
AVP_Grouped vendor=new AVP_Grouped(ProtocolConstants.DI_VENDOR_SPECIFIC_APPLICATION_ID,vendorId,auth);
AVP_UTF8String publicIdentity=new AVP_UTF8String(ShProtocolConstants.DI_PUBLIC_IDENTITY,ShProtocolConstants.DIAMETER_3GPP_VENDOR_ID,"sip:ulalal@hula.kula");
AVP_Grouped userIdentity=new AVP_Grouped(ShProtocolConstants.DI_USER_IDENTITY,ShProtocolConstants.DIAMETER_3GPP_VENDOR_ID,publicIdentity);
ArrayList<AVP> arr=new ArrayList<AVP>();
// TWO FIRST NULLs ARE FOR HostId AND realm WHICH HAVE BEEN PASSED UPON CREATION OF AO, IF THEY ARE THE SAME, LET THEM BE SET TO DEFAULTS
Message req=shac.makeShProfileUpdateRequest(null,null,userIdentity,vendor,"NEW DATA VALUE",arr.iterator());
//LETS SEND IT
try {
shac.sendRequest(req);
} catch (StaleConnectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotARequestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Whole service can be found here Diameter issue
Diameter RA is available in CVS.
-- Main.baranowb - 29 Jul 2006
|