Documentation |
Documentation.Interface-Events-1-10 HistoryHide minor edits - Show changes to markup August 05, 2013, at 04:22 PM
by
- Changed line 1 from:
Documentation -> Manuals -> Manual 1.10 -> Events Interfaceto:
Documentation -> Manuals -> Manual 1.10 -> Events InterfaceAugust 05, 2013, at 02:59 PM
by
- Changed line 2 from:
(:title Events Interface - 1.10 :) to:
(:title Events Interface - ver 1.10 :) Changed line 8 from:
to:
August 05, 2013, at 02:49 PM
by
- Changed lines 24-26 from:
More detailed information about OpenSIPS Event Interface can be found in the Event Interface Tutorial?. to:
More detailed information about OpenSIPS Event Interface can be found in the Event Interface Tutorial. Changed line 33 from:
to:
Changed line 61 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: August 05, 2013, at 02:47 PM
by
- Added lines 1-75:
Documentation -> Manuals -> Manual 1.10 -> Events Interface(:title Events Interface - 1.10 :) (:allVersions Interface-Events 1.10 :)
The Events Interface is an OpenSIPS interface that provides different ways to notify external applications about certain events triggered inside OpenSIPS. OverviewIn order to notify an external application about OpenSIPS internal events, the Event Interface provides the following functions:
More detailed information about OpenSIPS Event Interface can be found in the Event Interface Tutorial?. EventsThere are several types of events that can be exported by OpenSIPS:
Transport ProtocolsExternal 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 :
An external application can subscribe to any of the exported module and can be notified using any of the loaded transport modules/protocols. Events SubscriptionYou 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. ExamplesIn 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_SCRIPT_CUSTOM_EVENT", "rabbitmq:127.0.0.1/opensips"); } Then, in order to trigger the event from the script, call the raise_event() command when needed: .... raise_event("E_SCRIPT_CUSTOM_EVENT"); # raises an event without any parameters ... |