Documentation

Documentation.Interface-Events-1-9 History

Hide minor edits - Show changes to markup

August 05, 2013, at 03:22 PM by 109.99.235.212 -
Changed line 4 from:

Page for other versions: devel 1.9 1.8 old versions: 1.7

to:

(:allVersions Interface-Events 1.9 :)

May 29, 2013, at 11:54 AM by razvancrainea -
Added lines 50-55:

Events Subscription

You can subscribe for an event either at startup (using the subscribe_event() command in the script) or during runtime, using the event_subscribe MI command.

May 29, 2013, at 11:41 AM by razvancrainea -
Changed lines 34-35 from:
  • Custom events - triggered from script using the raise_event() command.
to:
  • Custom events - triggered from script using the raise_event() command.
Changed lines 55-56 from:

In order to configure a RabbbitMQ server to be notified when a custom event is triggered, first you have to subscribe it to the event, using the subscribe_event() command:

to:

In order to configure a RabbbitMQ server to be notified when a custom event is triggered, first you have to subscribe it to the event, using the subscribe_event() command:

Changed line 63 from:

Then, in order to trigger the event from the script, call the raise_event() command when needed:

to:

Then, in order to trigger the event from the script, call the raise_event() command when needed:

May 29, 2013, at 10:28 AM by 109.99.235.212 -
Changed line 4 from:

Page for other versions: devel 1.9 1.8 old versions: 1.7 1.6? 1.5? 1.4?

to:

Page for other versions: devel 1.9 1.8 old versions: 1.7

May 29, 2013, at 10:26 AM by 109.99.235.212 -
Changed line 32 from:
  • Core events - internal events that trigger changes of OpenSIPS core/global behavior. A full list of exported core events can be found here.
to:
  • Core events - internal events that trigger changes of OpenSIPS core/global behavior. A full list of exported core events can be found here.
Changed lines 34-35 from:
  • Custom events - triggered from script using the raise_event() command.
to:
  • Custom events - triggered from script using the raise_event() command.
Changed lines 55-56 from:

In order to configure a RabbbitMQ server to be notified when a custom event is triggered, first you have to subscribe it to the event, using the subscribe_event() command:

to:

In order to configure a RabbbitMQ server to be notified when a custom event is triggered, first you have to subscribe it to the event, using the subscribe_event() command:

Changed line 63 from:

Then, in order to trigger the event from the script, call the raise_event() command when needed:

to:

Then, in order to trigger the event from the script, call the raise_event() command when needed:

May 29, 2013, at 10:24 AM by 109.99.235.212 -
Changed lines 1-2 from:
Documentation -> Manuals -> Manual 1.9 -> Interface -> Events Interface
to:
Documentation -> Manuals -> Manual 1.9 -> Events Interface

(:title Events Interface - ver 1.9 :)

Added lines 4-12:

Page for other versions: devel 1.9 1.8 old versions: 1.7 1.6? 1.5? 1.4?


Events Interface v1.9
PrevNext

May 28, 2013, at 07:28 PM by razvancrainea -
Changed line 49 from:
        subscribe_event("E_PIKE_BLOCKED", "rabbitmq:127.0.0.1/pike");
to:
        subscribe_event("E_SCRIPT_CUSTOM_EVENT", "rabbitmq:127.0.0.1/opensips");
Changed line 57 from:
   raise_event("E_SCRIPT_EVENT");     # raises an event without any parameters
to:
   raise_event("E_SCRIPT_CUSTOM_EVENT");     # raises an event without any parameters
May 28, 2013, at 07:27 PM by razvancrainea -
Added lines 39-40:

An external application can subscribe to any of the exported module and can be notified using any of the loaded transport modules/protocols.

Added lines 44-59:

In order to configure a RabbbitMQ server to be notified when a custom event is triggered, first you have to subscribe it to the event, using the subscribe_event() command:

    startup_route {
        subscribe_event("E_PIKE_BLOCKED", "rabbitmq:127.0.0.1/pike");
    }

Then, in order to trigger the event from the script, call the raise_event() command when needed:

   ....
   raise_event("E_SCRIPT_EVENT");     # raises an event without any parameters
   ...
May 28, 2013, at 05:55 PM by razvancrainea -
Changed lines 4-5 from:

The Events Interface is an OpenSIPS interface that provides different ways to notify external applications about certain events that occur inside OpenSIPS.

to:

The Events Interface is an OpenSIPS interface that provides different ways to notify external applications about certain events triggered inside OpenSIPS.

Added lines 7-41:

In order to notify an external application about OpenSIPS internal events, the Event Interface provides the following functions:

  1. manages exported events
  2. manages subscriptions from different applications
  3. exports generic functions to raise an event (regardless the transport protocol used)
  4. communicates with different transport protocols to send the events

More detailed information about OpenSIPS Event Interface can be found in the Event Interface Tutorial.


Events

There are several types of events that can be exported by OpenSIPS:

  • Core events - internal events that trigger changes of OpenSIPS core/global behavior. A full list of exported core events can be found here.
  • Modules events - events triggered by each module, when loaded. Each module can export zero, one or more events. Details can be found in the documentation page of each module.
  • Custom events - triggered from script using the raise_event() command.

Transport Protocols

External applications can be notified about the events triggered using various transport protocols. While the interface itself is provided by OpenSIPS core, each transport protocol is implemented by a separate OpenSIPS module. Multiple transport modules can be loaded simultaneously in order to provide different ways of notifications.

Available transport protocols are :

  • event_datagram - sends Datagrams over UDP or UNIX sockets
  • event_rabbitmq - sends an AMQP message to a RabbitMQ server
  • event_xmlrpc - issues a RPC command on a RPC server
  • event_route - runs an OpenSIPS event_route in script

Examples

May 28, 2013, at 05:12 PM by razvancrainea -
Changed line 4 from:

The Events Interface (or MI) is an OpenSIPS interface that .........

to:

The Events Interface is an OpenSIPS interface that provides different ways to notify external applications about certain events that occur inside OpenSIPS.

May 28, 2013, at 12:22 PM by 109.99.235.212 -
Added lines 1-6:
Documentation -> Manuals -> Manual 1.9 -> Interface -> Events Interface

The Events Interface (or MI) is an OpenSIPS interface that .........

Overview


Page last modified on August 05, 2013, at 03:22 PM