EVENT_VIRTUAL module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”The event_virtual module provides the possibility to have multiple external applications, using different transport protocols, subscribed to the OpenSIPS Event Interface as a single virtual subscriber, for a specific event. When an event is triggered, the event_virtual module notifies the specified transport modules using one of the following policies:
- PARALLEL - all subscribers (applications) are notified at once
- FAILOVER - for every event raised, try to notify the subscribers, in the order in which they are given, until the first successful notification. A failed subscriber is skipped for further notifications until the failover timeout passes. For some transport modules (event_jsonrpc, event_xmlrpc, event_rabbitmq), in order to properly detect a failure when raising an event, you have to configure synchronous operation through the sync_mode module parameter of the respective module.
- ROUND-ROBIN - for every event raised, notify the subscribers alternatively, in the order in which they are given (for each raised event notify a different subscriber)
Only one expire value can be used (for the whole virtual subscription), and not one for each individual subscriber.
Virtual socket syntax
Section titled “Virtual socket syntax”virtual:policy subscriber_1 [[subscriber_2] …]
Meanings:
-
virtual: - informs the Event Interface that the events sent to this subscriber should be handled by the event_virtual module
-
policy - subscriber notification policy, can have one of the following values: ‘PARALLEL’, ‘FAILOVER’, ‘ROUND-ROBIN’ (with the behaviour described above)
*!! Important: Policies must always be specified asuppercase strings!* -
subscriber_1 - use the socket syntax for this specific subscriber (eg. “rabbitmq:guest:guest@127.0.0.1:5672/pike”)
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module: The OpenSIPS event modules which implement the transport protocols used by the subscribers.
External Libraries or Applications
Section titled “External Libraries or Applications”The following libraries or applications must be installed before running OpenSIPS with this module loaded:
- none
Exported Parameters
Section titled “Exported Parameters”failover_timeout (integer)
Section titled “failover_timeout (integer)”The minimum duration in seconds that a failed subscriber is skipped for further notifications. This parameter only affects the FAILOVER policy.
Default value is “30”.
NOTE: This parameter is only available since OpenSIPS 3.0.1
...modparam("event_virtual", "failover_timeout", 5)...Exported Functions
Section titled “Exported Functions”No exported functions to be used in the configuration file.
Example
Section titled “Example”The sockets of the subscribers may be separated by any number of spaces or tabs:
virtual:PARALLEL rabbitmq:guest:guest@127.0.0.1:5672/pike flatstore:/var/log/opensips_proxy.logContributors
Section titled “Contributors”By Commit Statistics
Section titled “By Commit Statistics”Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
| # | Name | DevScore | Commits | Lines++ | Lines— |
|---|---|---|---|---|---|
| 1. | Vlad Patrascu (@rvlad-patrascu) | 19 | 9 | 903 | 77 |
| 2. | Razvan Crainea (@razvancrainea) | 7 | 5 | 6 | 4 |
| 3. | Stefan Darius (@dariusstefan) | 7 | 4 | 139 | 21 |
| 4. | Liviu Chircu (@liviuchircu) | 6 | 4 | 35 | 37 |
| 5. | Bogdan-Andrei Iancu (@bogdan-iancu) | 3 | 1 | 17 | 16 |
| 6. | Peter Lemenkov (@lemenkov) | 3 | 1 | 1 | 1 |
(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)
(2) including any documentation-related commits, excluding merge commits
(3) ignoring whitespace edits, renamed files and auto-generated files
By Commit Activity
Section titled “By Commit Activity”| # | Name | Commit Activity |
|---|---|---|
| 1. | Stefan Darius (@dariusstefan) | Jun 2026 - Jul 2026 |
| 2. | Razvan Crainea (@razvancrainea) | Aug 2015 - Jun 2026 |
| 3. | Vlad Patrascu (@rvlad-patrascu) | Jul 2015 - Oct 2019 |
| 4. | Bogdan-Andrei Iancu (@bogdan-iancu) | Apr 2019 - Apr 2019 |
| 5. | Peter Lemenkov (@lemenkov) | Jun 2018 - Jun 2018 |
| 6. | Liviu Chircu (@liviuchircu) | May 2016 - Jun 2018 |
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Vlad Patrascu (@rvlad-patrascu), Peter Lemenkov (@lemenkov), Liviu Chircu (@liviuchircu).
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0