{
  "states": [
    "Init",
    "Ready",
    "Playing",
    "Paused",
    "Terminated"
  ],
  "initial_state": "Init",
  "final_states": [
    "Terminated"
  ],
  "transitions": [
    {
      "from": "Init",
      "event": "receive SETUP",
      "action": "reply 200",
      "to": "Ready"
    },
    {
      "from": "Init",
      "event": "receive SETUP (Needs Redirect)",
      "action": "reply 3rr",
      "to": "Init"
    },
    {
      "from": "Init",
      "event": "send REDIRECT (No Session header)",
      "action": "terminate sessions",
      "to": "Init"
    },
    {
      "from": "Ready",
      "event": "receive PLAY",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Ready",
      "event": "receive TEARDOWN",
      "action": "reply 200",
      "to": "Terminated"
    },
    {
      "from": "Ready",
      "event": "timeout",
      "action": "send TEARDOWN",
      "to": "Terminated"
    },
    {
      "from": "Ready",
      "event": "receive SETUP (New URI)",
      "action": "reply 200",
      "to": "Ready"
    },
    {
      "from": "Ready",
      "event": "receive SETUP (URI Setup prior)",
      "action": "reply 200",
      "to": "Ready"
    },
    {
      "from": "Ready",
      "event": "receive TEARDOWN (Prs URI)",
      "action": "reply 200",
      "to": "Init"
    },
    {
      "from": "Ready",
      "event": "receive TEARDOWN (md URI, NRM=1)",
      "action": "reply 200",
      "to": "Init"
    },
    {
      "from": "Ready",
      "event": "receive TEARDOWN (md URI, NRM>1)",
      "action": "reply 200",
      "to": "Ready"
    },
    {
      "from": "Ready",
      "event": "receive PAUSE (Prs URI)",
      "action": "reply 200",
      "to": "Ready"
    },
    {
      "from": "Ready",
      "event": "send REDIRECT (Terminate-Reason)",
      "action": "set RedP",
      "to": "Ready"
    },
    {
      "from": "Ready",
      "event": "send REDIRECT (No Terminate-Reason)",
      "action": "terminate session",
      "to": "Init"
    },
    {
      "from": "Ready",
      "event": "timeout",
      "action": "timeout",
      "to": "Init"
    },
    {
      "from": "Ready",
      "event": "cond RedP_reached",
      "action": "send TEARDOWN",
      "to": "Init"
    },
    {
      "from": "Playing",
      "event": "receive PAUSE",
      "action": "reply 200",
      "to": "Paused"
    },
    {
      "from": "Playing",
      "event": "receive TEARDOWN",
      "action": "reply 200",
      "to": "Terminated"
    },
    {
      "from": "Playing",
      "event": "timeout",
      "action": "send TEARDOWN",
      "to": "Terminated"
    },
    {
      "from": "Playing",
      "event": "receive PAUSE (Prs URI)",
      "action": "reply 200",
      "to": "Ready"
    },
    {
      "from": "Playing",
      "event": "cond end_of_media",
      "action": "set RP=end",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "cond end_of_range",
      "action": "set RP=end_of_range",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive PLAY",
      "action": "replace previous request",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive PLAY (Prs URI, no range)",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive PLAY (Prs URI, Range)",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive PLAY (md URI, NRM=1, Range)",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive PLAY (md URI, NRM=1)",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "send PLAY_NOTIFY",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive SETUP (New URI)",
      "action": "reply 455",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive SETUP (md URI)",
      "action": "reply 455",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive SETUP (md URI, IFI)",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "receive TEARDOWN (Prs URI)",
      "action": "reply 200",
      "to": "Init"
    },
    {
      "from": "Playing",
      "event": "receive TEARDOWN (md URI, NRM=1)",
      "action": "reply 200",
      "to": "Init"
    },
    {
      "from": "Playing",
      "event": "receive TEARDOWN (md URI)",
      "action": "reply 455",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "send REDIRECT (Terminate-Reason time)",
      "action": "set RedP",
      "to": "Playing"
    },
    {
      "from": "Playing",
      "event": "send REDIRECT",
      "action": "terminate session",
      "to": "Init"
    },
    {
      "from": "Playing",
      "event": "cond RedP_reached",
      "action": "send TEARDOWN",
      "to": "Init"
    },
    {
      "from": "Playing",
      "event": "timeout",
      "action": "stop media",
      "to": "Init"
    },
    {
      "from": "Paused",
      "event": "receive PLAY",
      "action": "reply 200",
      "to": "Playing"
    },
    {
      "from": "Paused",
      "event": "receive TEARDOWN",
      "action": "reply 200",
      "to": "Terminated"
    },
    {
      "from": "Paused",
      "event": "timeout",
      "action": "send TEARDOWN",
      "to": "Terminated"
    }
  ]
}