To overcome the shortcomings of current SIP safety scheme, such as the incapability to detect the wiretap and the vulnerability of the classical key system in case of quantum computation attack, this paper proposed a novel user authentication and key agreement scheme that combined quantum safe communication methods and SIP protocol. The SIP server prepared the three particle W states and distributed two of them to the SIP users. The random inserted particles were measured first to detect the wiretap; then the rest of the W states were operated and measured to authenticate the user. After that, every particle of the W states was measured randomly and the two SIP users got the initial conversation key according to the results of the effective measurements. The performance analysis shows our scheme is capable of resisting the impersonation attack and wiretap attack, thus can increase the safety of SIP protocol effectually.