As the core signaling protocol for multimedia services, such as voice over internet protocol, the session initiation protocol (SIP) is receiving much attention and its security is becoming increasingly important. It is critical to develop a roust user authentication protocol for SIP. The original authentication protocol is not strong enough to provide acceptable security level, and a number of authentication protocols have been proposed to strengthen the security. Recently, Zhang et al. proposed an efficient and flexible smart-card-based password authenticated key agreement protocol for SIP. They claimed that the protocol enjoys many unique properties and can withstand various attacks. However, we demonstrate that the scheme by Zhang et al. is insecure against the malicious insider impersonation attack. Specifically, a malicious user can impersonate other users registered with the same server. We also proposed an effective fix to remedy the flaw, which remedies the security flaw without sacrificing the efficiency. The lesson learned is that the authenticators must be closely coupled with the identity, and we should prevent the identity from being separated from the authenticators in the future design of two-factor authentication protocols. schemes into four classes, that is, password authenticated key agreement based, hash and symmetric encryption based, public key cryptography based and identity-based schemes. The public key cryptography based schemes can be further classified into Rivest Shamir Adleman and elliptic curve cryptography (ECC) based schemes. In this paper, we mainly review the protocols closely related to our work.In 2005, Yang et al. [6] proposed an authentication protocol based on Diffie-Hellman key exchange. But their protocol was later found to be vulnerable to the offline password guessing attack. Moreover, their scheme is not suitable for end user devices with limited computing capability because of the involvement of expensive modular exponentiations. In 2009, Wu et al. [7] proposed an authentication scheme for SIP based on ECC. Although they claimed that their scheme was provably secure, Yoon et al. [8] demonstrated that the protocol by Wu et al. is insecure against the offline password guessing attack. Yoon et al. also presented an improved authentication protocol for SIP based on ECC. However, the scheme by Yoon et al. is still vulnerable to the offline password guessing attack. Also in 2009, Tsai [9] presented a nonce-based authentication protocol, which only involves one-way hash function. However, Yoon et al. [10] showed that Tsai's protocol [9] suffers from the offline password guessing attack, the stolen verifier attack, and so on. In 2012, Xie [11] showed that the scheme of Yoon et al. [10] is vulnerable to the offline password guessing attack and stolen verifier attack. Xie also proposed a new security-enhanced authentication protocol for SIP using ECC. Arshad et al. [12] also pointed out that Tsai's scheme [9] is insecure against the offline password guessing attack and stolen ve...