       'execute-app-arg':  app_arg
     @sendmsg_uuid uuid, 'execute', options, cb
 
+  # Hangup a call
+
   hangup_uuid: (uuid,hangup_cause,cb) ->
     hangup_cause ?= 'NORMAL_UNSPECIFIED'
     options =


  return headers

class eslParser
  constructor: (@socket) ->
    @body_left = 0
    @buffer = ""

  capture_body: (data) ->
    if data.length < @body_left
      @buffer    += data
      @body_left -= data.length
      return

    # Consume the body
    body = @buffer + data.substring(0,@body_left)
    extra = data.substring(@body_left)
    @body_left = 0

    @process @headers, body
    @headers = {}

    # Re-parse whatever data was left after the body was
    # fully consumed.
    @capture_headers extra

  # Capture headers, meaning up to the first blank line.
  capture_headers: (data) ->
    header_end = data.indexOf("\n\n")

    # Wait until we reach the end of the header.
    if header_end < 0
      @buffer += data
      return
