{
  "states": [
    "Initial",
    "SendingRequest",
    "Completed",
    "Cancelled",
    "Idle",
    "MatchingTransactionFound",
    "NoMatchingTransaction",
    "FinalResponseSent",
    "NotFinalResponseSent",
    "Processing",
    "CommitBindings",
    "Failed",
    "AwaitingTargetRefresh",
    "ProcessingRequest",
    "AwaitingOffer",
    "AwaitingAck",
    "Terminating",
    "ReceivingBye",
    "ByeMatched",
    "ByeNotMatched",
    "Terminated",
    "Trying",
    "Established",
    "Closing",
    "ClientTransaction",
    "ServerTransaction",
    "Authenticated"
  ],
  "initial_state": "Initial",
  "final_states": [
    "FinalResponseSent",
    "NotFinalResponseSent",
    "Failed",
    "Terminated",
    "Closing"
  ],
  "transitions": [
    {
      "from": "Initial",
      "event": "send INVITE",
      "action": "reply 100",
      "to": "SendingRequest"
    },
    {
      "from": "SendingRequest",
      "event": "receive 200",
      "action": "reply ACK",
      "to": "Completed"
    },
    {
      "from": "SendingRequest",
      "event": "receive 4xx",
      "action": "reply NACK",
      "to": "Initial"
    },
    {
      "from": "SendingRequest",
      "event": "receive CANCEL",
      "action": "send BYE",
      "to": "Cancelled"
    },
    {
      "from": "Cancelled",
      "event": "receive 200",
      "action": "reply ACK",
      "to": "Initial"
    },
    {
      "from": "Idle",
      "event": "receive CANCEL",
      "action": "log request",
      "to": "MatchingTransactionFound"
    },
    {
      "from": "Idle",
      "event": "receive CANCEL",
      "action": "log request",
      "to": "NoMatchingTransaction"
    },
    {
      "from": "MatchingTransactionFound",
      "event": "cond final_response_sent",
      "action": "reply 200",
      "to": "FinalResponseSent"
    },
    {
      "from": "MatchingTransactionFound",
      "event": "cond not_final_response_sent",
      "action": "reply 487",
      "to": "NotFinalResponseSent"
    },
    {
      "from": "NoMatchingTransaction",
      "event": "reply 481",
      "action": "reply 481",
      "to": "Idle"
    },
    {
      "from": "FinalResponseSent",
      "event": "reply 200",
      "action": "reply 200",
      "to": "Idle"
    },
    {
      "from": "NotFinalResponseSent",
      "event": "reply 487",
      "action": "reply 487",
      "to": "Idle"
    },
    {
      "from": "Initial",
      "event": "receive REGISTER",
      "action": "set processing",
      "to": "Processing"
    },
    {
      "from": "Processing",
      "event": "cond binding_update_success",
      "action": "set commit_bindings",
      "to": "CommitBindings"
    },
    {
      "from": "Processing",
      "event": "cond binding_update_failure",
      "action": "reply 500",
      "to": "Failed"
    },
    {
      "from": "CommitBindings",
      "event": "cond commit_success",
      "action": "reply 200",
      "to": "Initial"
    },
    {
      "from": "CommitBindings",
      "event": "cond commit_failure",
      "action": "reply 500",
      "to": "Failed"
    },
    {
      "from": "Failed",
      "event": "timeout 5s",
      "action": "reset",
      "to": "Initial"
    },
    {
      "from": "Idle",
      "event": "receive target refresh request",
      "action": "set remote target URI",
      "to": "AwaitingTargetRefresh"
    },
    {
      "from": "AwaitingTargetRefresh",
      "event": "receive target refresh request",
      "action": "set remote target URI",
      "to": "AwaitingTargetRefresh"
    },
    {
      "from": "Idle",
      "event": "receive request",
      "action": "process request",
      "to": "ProcessingRequest"
    },
    {
      "from": "ProcessingRequest",
      "event": "receive request",
      "action": "reject with 500",
      "to": "ProcessingRequest"
    },
    {
      "from": "ProcessingRequest",
      "event": "receive request",
      "action": "set remote sequence number",
      "to": "ProcessingRequest"
    },
    {
      "from": "Initial",
      "event": "receive INVITE",
      "action": "reply 100",
      "to": "AwaitingOffer"
    },
    {
      "from": "AwaitingOffer",
      "event": "receive INVITE",
      "action": "reply 200",
      "to": "AwaitingAck"
    },
    {
      "from": "AwaitingAck",
      "event": "receive ACK",
      "action": "set session_confirmed",
      "to": "AwaitingAck"
    },
    {
      "from": "AwaitingAck",
      "event": "timeout 64*T1",
      "action": "send BYE",
      "to": "Initial"
    },
    {
      "from": "Idle",
      "event": "receive re-INVITE",
      "action": "reply 180",
      "to": "AwaitingAck"
    },
    {
      "from": "AwaitingAck",
      "event": "receive ACK",
      "action": "reply 2xx",
      "to": "Idle"
    },
    {
      "from": "AwaitingAck",
      "event": "timeout",
      "action": "send BYE",
      "to": "Terminating"
    },
    {
      "from": "Idle",
      "event": "receive re-INVITE",
      "action": "reply 488",
      "to": "Idle"
    },
    {
      "from": "Idle",
      "event": "receive Bye",
      "action": "check dialog",
      "to": "ReceivingBye"
    },
    {
      "from": "ReceivingBye",
      "event": "dialog matches",
      "action": "reply 2xx",
      "to": "ByeMatched"
    },
    {
      "from": "ReceivingBye",
      "event": "dialog does not match",
      "action": "reply 481",
      "to": "ByeNotMatched"
    },
    {
      "from": "ByeMatched",
      "event": "pending requests exist",
      "action": "reply 487",
      "to": "Terminated"
    },
    {
      "from": "ByeMatched",
      "event": "no pending requests",
      "action": "terminate session",
      "to": "Terminated"
    },
    {
      "from": "ByeNotMatched",
      "event": "session terminated",
      "action": "terminate session",
      "to": "Terminated"
    },
    {
      "from": "Trying",
      "event": "receive request",
      "action": "reply response",
      "to": "Completed"
    },
    {
      "from": "Completed",
      "event": "transport error",
      "action": "inform TU",
      "to": "Terminated"
    },
    {
      "from": "Completed",
      "event": "timeout TimerJ",
      "action": "transition",
      "to": "Terminated"
    },
    {
      "from": "Idle",
      "event": "receive INVITE",
      "action": "reply 180 Ringing",
      "to": "Idle"
    },
    {
      "from": "Idle",
      "event": "receive INVITE",
      "action": "reply 200 OK",
      "to": "Established"
    },
    {
      "from": "Established",
      "event": "receive BYE",
      "action": "reply 200 OK",
      "to": "Closing"
    },
    {
      "from": "Closing",
      "event": "receive BYE",
      "action": "reply 200 OK",
      "to": "Idle"
    },
    {
      "from": "ClientTransaction",
      "event": "receive 2xx",
      "action": "reply ACK",
      "to": "WaitingForReply"
    },
    {
      "from": "ServerTransaction",
      "event": "receive INVITE",
      "action": "reply 100 Trying",
      "to": "Authenticated"
    },
    {
      "from": "Authenticated",
      "event": "receive INVITE",
      "action": "reply 200 OK",
      "to": "ServerTransaction"
    }
  ]
}