   unicast_uuid: (uuid,args,cb) ->
     @sendmsg_uuid uuid, 'unicast', args, cb
 
-  # nomedia_uuid:
+  # nomedia_uuid: TODO
+
+  #### Server-mode commands
+  # The target UUID is our (own) call UUID.
 
   # Execute an application for the current UUID (in server/outbound mode)
 

    # Figure out whether a body is expected
    if @headers["Content-Length"]
      @body_left = @headers["Content-Length"]
      # Re-parse
      @capture_body extra

    else
      # Process the content
      @process @headers
      @headers = {}

      # Re-parse
      @capture_headers extra

  on_data: (data) ->

    # Capture the body as needed

    else
      return @capture_headers data

  # For completeness provide an on_end() method.
  # TODO: it probably should make sure the buffer is empty?
  on_end: () ->

#### ESL request
class eslRequest
  constructor: (@headers,@body) ->

#### ESL response and associated API
class eslResponse
  constructor: (@socket) ->

  # A generic way of sending commands back to FreeSwitch.
  #
  #      send (string,hash,function(req,res))
  #
  # is normally not used directly.

  send: (command,args,cb) ->
      # Make sure we are the only one receiving command replies
      @socket.removeAllListeners('esl_command_reply')
      @socket.removeAllListeners('esl_api_response')
      # Register the callback for the proper event types.
      if cb?
        @socket.on 'esl_command_reply', (req,res) ->
          cb(req,res)
        @socket.on 'esl_api_response', (req,res) ->
          cb(req,res)

      # Send the command out.
      @socket.write "#{command}\n"
      if args?
        for key, value of args
