# Request service domain preference This sample application demonstrates how to request current service domain preference. 1. Get phone factory and serving system manager instances auto &phoneFactory = telux::tel::PhoneFactory::getInstance(); auto servingSystemMgr = phoneFactory.getServingSystemManager(DEFAULT_SLOT_ID); Copy to clipboard 2. Wait for the serving subsystem initialization bool subSystemStatus = servingSystemMgr->isSubsystemReady(); Copy to clipboard 2.1 If serving subsystem is not ready, wait for it to be ready if(!subSystemsStatus) { std::cout << "Serving subsystem is not ready" << std::endl; std::cout << "wait unconditionally for it to be ready " << std::endl; std::future f = servingSystemMgr->onSubsystemReady(); subSystemsStatus = f.get(); } Copy to clipboard 3. Exit the application, if serving subsystem can not be initialized if(subSystemsStatus) { std::cout << " *** Serving subsystem ready *** " << std::endl; } else { std::cout << " *** ERROR - Unable to initialize serving subsystem" << std::endl; return 1; } Copy to clipboard 6. Implement response callback to receive response for request service domain preference class ServiceDomainResponseCallback { public: void serviceDomainResponse(telux::tel::ServiceDomainPreference preference, telux::common::ErrorCode errorCode) { if(errorCode == telux::common::ErrorCode::SUCCESS) { std::cout << "Service domain preference: " << static_cast(preference) << std::endl; } else { std::cout << "\n setServiceDomainPreference failed, ErrorCode: " << static_cast(errorCode) << std::endl; } } }; Copy to clipboard 7. Send request service domain preference request along with required function object if(servingSystemMgr) { servingSystemMgr->requestServiceDomainPreference( ServiceDomainResponseCallback::serviceDomainResponse); std::cout << static_cast(status) <