Configure an Event Handler

Use the following procedure to configure an event handler.

To configure an event handler

  1. Open the Media Server configuration file in a text editor.

  2. Use the OnStart, OnFinish, or OnError parameter to specify the name of a section in the configuration file that contains event handler settings for the corresponding event.

  3. Create a new section in the configuration file to contain the settings for your event handler. You must name the section using the name you specified with the OnStart, OnFinish, or OnError parameter.

  4. In the new section, set the following parameters.

    LibraryName

    (Required) The name of the library to use to handle the event.

    • To write event data to a text file, set this parameter to TextFileHandler, and then set the FilePath parameter to specify the path of the file.

    • To send event data to a URL, set this parameter to HttpHandler, and then use the HTTP event handler parameters to specify the URL, proxy server settings, credentials, and so on.

    For example:

    [NormalEvents]
    LibraryName=TextFileHandler
    FilePath=./events.txt
    [ErrorEvents]
    LibraryName=HTTPHandler
    URL=http://handlers:8080/lo-proxy/callback.htm?
  5. Save and close the configuration file. You must restart Media Server for your changes to take effect.

The following XML is an example of the ACI response sent to the event handler on the OnFinish event:

<action>
	<status>Finished</status>
	<queued_time>2009-Jun-08 17:57:29</queued_time>
	<time_in_queue>0</time_in_queue>
	<process_start_time>2012-Jun-08 17:57:29</process_start_time>
	<time_processing>86</time_processing>
	<token>MTkyLjE2OC45NS4yNDoxMTAwMDpJTkdFU1Q6LTEyOTc5NjgxODY=</token>
</action>

_HP_HTML5_bannerTitle.htm