Cognitive Network (CN) focus on the end-to-end communications for the global optimization and policy enforcement. However, there is a lack of the global control channel or middleware for the cognitive optimization in CN environment. In this paper, we proposed an Active Service-oriented Cognitive IP Multimedia Subsystem framework called CogIMS, which consists of benefits from CN and IP Multimedia Subsystem (IMS). In this active framework, the cognitive optimization is modeled as an active service over IMS architecture. By adopting the proposed active service-oriented framework, the global optimization is simple to achieve under standardized architecture and the computation requirement is reduced from users to core networks. We also simulate wireless users who using active services to compare CogIMS with CN and IMS. The simulation results show that the proposed CogIMS can achieve the optimization of wireless resource allocation with different network situations.