ceived MGC : Media gateway controller LAM : Initial address message ACM : Address complete message ANM Answer REL RELease RLC : Release complete FIGURE 16.2 FSM model for interaction between SIP and PSTN. current_state INIT input SIP_Packet predicate x.message_type=CANCEL and v.attack = true action next_state ATTACK current_state INIT input SIP_Packet ATTACK predicate x.message_type=CANCEL and v.attack = false action initialize (v) state variable vector next_state Packet Received current_state Packet Received Packet input SIP_Packet received predicate (x.message_type=INVITE) and (x.time_stamp-v.time_stamp>lt) action v.attack = true next_state INIT FIGURE 16.3 EFSM model for CANCEL attack prevention method. such an attack, the caller fires a timer for retransmitting INVITE. If the time between a CANCEL and an INVITE message from the same caller is a short period, the callee would ignore the next CANCEL. Another modeling tool called CRESS diagram is similar to FSM and it also deals with states of a system. CRESS is a notation and a set of tools for graphical description and analysis of services [24]. In [24], it introduces CRESS and tools for specification and analysis of SIP services. C 2009 by Taylor & Francis Group, LLC SIP Handbook: Services, Technologies, and Security FSM, EFSM, and CRESS are state-based modeling tools. From examples above, these graphical tools are useful to help model SIP processing and inter- actions. However, they are limited for network analysis and simulation. 16.2.2 Unified Modeling Language UML, which has proven useful to improve the quality and productivity of software design and development, would be suitable for the SIP-based appli- cation. Consider the importance of SIP in the development of a next genera- tion telecommunications network, it's necessary to use a model-driven method through UML to save time, reduce cost, and improve efficiency for SIP-based application design and development Besides that, SIP itself is an excellent candidate for UML modeling. UML supports model-driv