use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method getSCSCFName.
public String getSCSCFName(String publicIdentity, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.S_CSCFNAME);
udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
// Set destination -- Realm is mandatory, host is optional
udr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
udr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendUserDataRequest(udr);
// Store request for future matching
storeRequestInACI(activity, udr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method getUserState.
public String getUserState(byte[] msisdn, int requestedDomain, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(null, msisdn);
UserDataRequest udr = diameterShClientMessageFactory.createUserDataRequest(publicIdentityAvp, DataReferenceType.USER_STATE);
udr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
udr.setRequestedDomain(RequestedDomainType.fromInt(requestedDomain));
// Set destination -- Realm is mandatory, host is optional
udr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
udr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendUserDataRequest(udr);
// Store request for future matching
storeRequestInACI(activity, udr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method getUserIdentityValues.
private String[] getUserIdentityValues(DiameterShMessage shMessage) {
UserIdentityAvp uIdAvp = null;
if (shMessage instanceof UserDataRequest) {
uIdAvp = ((UserDataRequest) shMessage).getUserIdentity();
} else if (shMessage instanceof ProfileUpdateRequest) {
uIdAvp = ((ProfileUpdateRequest) shMessage).getUserIdentity();
} else if (shMessage instanceof SubscribeNotificationsRequest) {
uIdAvp = ((SubscribeNotificationsRequest) shMessage).getUserIdentity();
} else if (shMessage instanceof PushNotificationRequest) {
uIdAvp = ((PushNotificationRequest) shMessage).getUserIdentity();
}
String publicIdentity = null;
String msisdn = null;
if (uIdAvp != null) {
publicIdentity = uIdAvp.getPublicIdentity();
msisdn = uIdAvp.getMsisdn();
if (publicIdentity == null && msisdn == null) {
tracer.warning("Unable to retrieve Public User/Service Identity OR MSISDN. At least one of them should be present.");
}
} else {
tracer.warning("User-Identity AVP missing in Diameter Sh Message.");
}
return new String[] { publicIdentity, msisdn };
}
use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method subscribeSCSCFName.
public String subscribeSCSCFName(String publicIdentity, int subscriptionRequestType, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
SubscribeNotificationsRequest snr = diameterShClientMessageFactory.createSubscribeNotificationsRequest(publicIdentityAvp, DataReferenceType.S_CSCFNAME, SubsReqType.fromInt(subscriptionRequestType));
snr.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
// Set destination -- Realm is mandatory, host is optional
snr.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
snr.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendSubscribeNotificationsRequest(snr);
// Store request for future matching
storeRequestInACI(activity, snr);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
use of net.java.slee.resource.diameter.sh.events.avp.UserIdentityAvp in project jain-slee.diameter by RestComm.
the class HSSClientChildSbb method updatePSIActivation.
public String updatePSIActivation(String publicIdentity, String data, String destinationRealm, String destinationHost) throws IOException {
UserIdentityAvp publicIdentityAvp = createUserIdentityAvp(publicIdentity, null);
ProfileUpdateRequest pur = diameterShClientMessageFactory.createProfileUpdateRequest(publicIdentityAvp, DataReferenceType.PSI_ACTIVATION, data.getBytes());
pur.setAuthSessionState(AuthSessionStateType.NO_STATE_MAINTAINED);
// Set destination -- Realm is mandatory, host is optional
pur.setDestinationRealm(new DiameterIdentity(destinationRealm));
if (destinationHost != null) {
pur.setDestinationHost(new DiameterIdentity(destinationHost));
}
ShClientActivity activity = getShClientActivity();
activity.sendProfileUpdateRequest(pur);
// Store request for future matching
storeRequestInACI(activity, pur);
// Return Session-Id, may be used as identifier
return activity.getSessionId();
}
Aggregations