event_datagram Module

Razvan Crainea

OpenSIPS Solutions

Edited by

Razvan Crainea

Table of Contents

1. Admin Guide
1.1. Overview
1.2. DATAGRAM events syntax
1.3. DATAGRAM socket syntax
1.4. Dependencies
1.4.1. OpenSIPS Modules
1.4.2. External Libraries or Applications
1.5. Exported Parameters
1.6. Exported Functions
1.7. Example
2. Frequently Asked Questions

List of Examples

1.1. E_PIKE_BLOCKED event
1.2. UNIX socket
1.3. UDP socket

Chapter 1. Admin Guide

1.1. Overview

This is a module which provides a UNIX/UDP SOCKET transport layer implementation for the Event Interface.

1.2. DATAGRAM events syntax

The raised events will follow the following grammar:

  • event = event_name (argument '\n')*

  • event_name = non-quoted_string'\n'

  • argument = ((arg_name '::')? arg_value)? | (arg_value)

  • arg_name = not-quoted_string

  • arg_value = not-quoted_string | '"' string '"'

  • not-quoted_string = string - {',",\n,\r}

The event name can contain any non-quoted string character, but it is recommended to follow the syntax: E_MODULE_NAME_EXTRA_NAME

1.3. DATAGRAM socket syntax

There are two types of sockets used by this module, based on the sockets type. An UNIX socket should follow this syntax:

['unix:'] unix_socket_path

An UDP socket should follow this syntax:

'udp:' address ':' port

1.4. Dependencies

1.4.1. OpenSIPS Modules

The following modules must be loaded before this module:

  • No dependencies on other OpenSIPS modules.

1.4.2. External Libraries or Applications

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • none

1.5. Exported Parameters

No parameter exported by this module.

1.6. Exported Functions

No function exported to be used from configuration file.

1.7. Example

This is an example of an event raised by the pike module when it decides an ip should be blocked:

Example 1.1. E_PIKE_BLOCKED event


Example 1.2. UNIX socket


Example 1.3. UDP socket


Chapter 2. Frequently Asked Questions


Both UNIX and UDP type of socket can be used to notify the events?

Yes, you can use the both types.


What is the maximum lenght of a datagram event?

The maximum length of a datagram event is 65457 bytes.


Where can I find more about OpenSIPS?

Take a look at http://www.opensips.org/.


Where can I post a question about this module?

First at all check if your question was already answered on one of our mailing lists:

E-mails regarding any stable OpenSIPS release should be sent to and e-mails regarding development versions should be sent to .

If you want to keep the mail private, send it to .


How can I report a bug?

Please follow the guidelines provided at: https://github.com/OpenSIPS/opensips/issues.