Development |
Development.EventNotification HistoryShow minor edits - Show changes to markup May 26, 2011, at 01:15 PM
by
- Changed line 58 from:
Events unsubscriptionto:
Event unsubscriptionChanged line 62 from:
Events notificationto:
Event notificationChanged line 68 from:
Events implementedto:
Implemented eventsMay 26, 2011, at 01:14 PM
by
- Changed lines 30-31 from:
This function receives the event name, and optionally two AVPs. 'attrs' should contain a list of attributes name. 'vals' should contain the attributes values. Note that 'attrs' and 'vals' cardinality should be the same. An example of usage is: to:
This function receives the event name, and optionally two AVPs. 'attrs' should contain a list of attributes name. 'vals' should contain the attributes values. Note that 'attrs' and 'vals' cardinality must be the same. An example of usage is: Changed line 51 from:
0
to:
1800
Changed lines 54-66 from:
Event Notification Interface will be implemented in OpenSIPS core and will provide the following functionalities:
When loaded, each module will need to publish a list of exported events. They will also take care of raising each event in the appropriate moment (see Use cases section). We will also need to implement (or update the existing ones) different modules for transport (and data encoding) protocol. Use casesto:
This command subscribes the external application for the event E_DUMMY. It also informs OpenSIPS Event Interface that it wants to be notified when events occur using UDP transfer protocol on localhost, port 8081, and the subscription will expire after 1800 seconds. For more information about socket description and transport modules you can consult OpenSIPS documentation. Events unsubscriptionChanged lines 60-63 from:
TODOto:
You can unsubscribe for an event by simply send an MI command with the expiration field 0. Note that the socket must be the same with the initial subscription, otherwise it won't be matched. Events notificationChanged lines 64-67 from:
Define:
to:
When an event is fired, OpenSIPS event notification will try to notify all the subscribers. For that it will search for the desired transport protocol, pack the data and send it to the destination specified in subscription. This version contains only 'event_datagram' transport module that supports UNIX and UDP sockets. Events implemented
TODO
May 25, 2011, at 06:45 PM
by
- Added line 14:
Added lines 17-54:
2011/05/25 - Initial implementation This version implements the following functions: Events handlingYou can push different events from script, modules and even core. There are two types of events:
raise_event(event_name[, attrs] [, vals]) This function receives the event name, and optionally two AVPs. 'attrs' should contain a list of attributes name. 'vals' should contain the attributes values. Note that 'attrs' and 'vals' cardinality should be the same. An example of usage is: $avp(s:attr) = "number";
$avp(s:val) = 0;
$avp(s:attr) = "string";
$avp(s:val) = "dummy value";
raise_event("E_DUMMY", $avp(s:attr), $avp(s:val)); Events subscriptionIn order to subscribe for an event you should send to OpenSIPS MI command the command event_subscribe with three parameters:
An example of FIFO subscribe command is: :event_subscribe:/tmp/subscribe_reply_fifo
E_DUMMY
udp:127.0.0.1:8081
0
March 08, 2011, at 10:37 AM
by
- Changed lines 8-9 from:
External applications can interact with OpenSIPS through the MI mechanism. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred or not. As you figured out, this is not an optimal solution since the external application will spend a lot of time and load detecting if the event was raised or not, instead of executing the desired action. to:
External applications can interact with OpenSIPS through the MI commands. This is a pull based mechanism, meaning when you need an information you have to interrogate the proxy. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred or not. As you figured out, this is not an optimal solution since the external application will spend a lot of time and load detecting if the event was raised or not, instead of executing the desired action. That's why we needed a push based mechanism, so that OpenSIPS can notify an external application each time an event is raised. Changed lines 23-26 from:
When loaded, each module will publish a list of events. There will be different modules for each transport (and data encoding) protocol. to:
When loaded, each module will need to publish a list of exported events. They will also take care of raising each event in the appropriate moment (see Use cases section). We will also need to implement (or update the existing ones) different modules for transport (and data encoding) protocol. Added line 33:
March 07, 2011, at 07:17 PM
by
- Changed line 16 from:
Event Notification Interface will provide the following functionalities: to:
Event Notification Interface will be implemented in OpenSIPS core and will provide the following functionalities: Added lines 23-26:
When loaded, each module will publish a list of events. There will be different modules for each transport (and data encoding) protocol. Changed lines 30-36 from:
to:
TODODefine:
March 07, 2011, at 06:53 PM
by
- Changed lines 4-5 from:
A new feature will be added to OpenSIPS that will provide an event notification mechanism. This new module will supply an interface for external applications to be notified when certain events occur. to:
OpenSIPS will be improved with an event notification mechanism. This new feature will provide an interface for external applications to be notified when certain events occur. Changed lines 8-9 from:
External applications can interact with OpenSIPS through MI mechanism. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred. As you figured out, this is not an optimal solution since the external application will spend a lot of time and load in detecting if the event occurred instead of executing the desired action. to:
External applications can interact with OpenSIPS through the MI mechanism. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred or not. As you figured out, this is not an optimal solution since the external application will spend a lot of time and load detecting if the event was raised or not, instead of executing the desired action. Changed lines 12-13 from:
Each OpenSIPS module will export a number of events. Event Notification module will manage them, and will also provide an interface for the external applications to register for certain events. When an event raises, the module will notify all the applications that registered for that event. Once an external application receives a notification, it can execute the desired action. to:
Each OpenSIPS module will export a number of events, managed by the event notification mechanism. External applications will be able to subscribe for these events through the event interface. When an event is raised by a module, OpenSIPS searches for all applications subscribed for it, and sends them a notification message. Once an external application receives a notification, it can execute the desired action. Changed line 16 from:
Event Notification module will provide the following functionalities: to:
Event Notification Interface will provide the following functionalities: Changed lines 18-19 from:
to:
Changed line 21 from:
to:
March 07, 2011, at 02:40 PM
by
- Added line 15:
Changed line 23 from:
Examplesto:
Use casesMarch 07, 2011, at 02:40 PM
by
- Changed lines 8-9 from:
External applications can interact with OpenSIPS through MI mechanism. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred. to:
External applications can interact with OpenSIPS through MI mechanism. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred. As you figured out, this is not an optimal solution since the external application will spend a lot of time and load in detecting if the event occurred instead of executing the desired action. Changed lines 12-13 from:
Event Notification Interface module will provide the following features:
to:
Each OpenSIPS module will export a number of events. Event Notification module will manage them, and will also provide an interface for the external applications to register for certain events. When an event raises, the module will notify all the applications that registered for that event. Once an external application receives a notification, it can execute the desired action. ImplementationEvent Notification module will provide the following functionalities:
Changed lines 18-19 from:
to:
March 07, 2011, at 02:31 PM
by
- Added lines 1-21:
Development -> Sand Box -> Event Notification InterfaceA new feature will be added to OpenSIPS that will provide an event notification mechanism. This new module will supply an interface for external applications to be notified when certain events occur. ProblemExternal applications can interact with OpenSIPS through MI mechanism. If an application needs to take some actions based on a certain event, it needs to periodically query OpenSIPS and decide if that event occurred. SolutionEvent Notification Interface module will provide the following features:
Examples
|