- if (registerSessionId) {
- try {
- std::string sid = anna::diameter::helpers::base::functions::getSessionId(db);
- TestManager::instantiate().registerSessionId(sid, this);
- }
- catch (anna::RuntimeException &ex) {
- //ex.trace();
- // if we don't have session-id ... don't worry
- }
+ if (registerKeys) {
+ TestManager &testManager = TestManager::instantiate();
+ testManager.registerSessionId(anna::diameter::helpers::base::functions::getSessionId(db), this);
+
+
+ std::string subscriberId = anna::diameter::helpers::dcca::functions::getSubscriptionIdData(db, anna::diameter::helpers::dcca::AVPVALUES__Subscription_Id_Type::END_USER_E164);
+ if (subscriberId == "") // try with IMSI
+ subscriberId = anna::diameter::helpers::dcca::functions::getSubscriptionIdData(db, anna::diameter::helpers::dcca::AVPVALUES__Subscription_Id_Type::END_USER_IMSI);
+
+ if (subscriberId != "")
+ testManager.registerSubscriberId(subscriberId, this);