PRESENCE_CALLINFO module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”This module provides OpenSIPS support for shared call appearances (SCA) as defined by BroadWorks SIP Access Side Extensions Interface specifications. The SCA mechanism is a fundamental building block for a variety of enhanced telephony services. Features like attendant console, line extensions, and key system emulation cannot be delivered without some mechanism for sharing call appearances across access devices. Although SIP (RFC 3261) by itself offers no inherent semantics for supporting SCA features, when coupled with an appropriate instantiation of the “SIP Specific Event Notification” framework (RFC 3265), these services can be deployed quite easily in a distributed network.
A shared line is an address of record managed by central controlling element, such as an application server. The application server allows multiple endpoints to register locations against the address of record. The application server is responsible for policing who can register and who cannot register against the shared line.
The module enables the handling of “call-info” and “line-seize” events inside the presence module. It is used with the general event handling module: presence and it constructs and adds “Call-Info” headers to notification events.
Usage modes
Section titled “Usage modes”The module can be used in two ways (depending on who is doing the publishing of the “call-info” data:
- external publishing - the “call-info” data is received from a third party via SIP PUBLISH requests. In this mode, the modules simply distributes the SCA info, it is not producing any of it - a third-party application must publish “call-info” events to the presence server.
- internal publishing - the “call-info” data is internally generated by the module, based on the information received from the dialog module - what calls are using what line/index, what is the state of the call, etc. There is no SIP PUBLISH in this case and there is no need for a third-party - the module is self-sufficient and stand alone as functionality.
The used mode can be controlled via the module parameter “disable_dialog_support_for_sca” - see below in the parameter’s section.
External publishing
Section titled “External publishing”The module does not currently implement any authorization rules. It assumes that publish requests are only issued by a third-party application and subscribe requests only by subscriber to call-info and line-seize events. Authorization can thus be easily done by OpenSIPS configuration file before calling handle_publish() and handle_subscribe() functions.
To get better understanding on how the module works please take a look at the follwing figure:
caller proxy & callee watcher publisheralice@example presence bob@example watcher@example server | | | | | | |<-----SUBSCRIBE bob----| | | |------200 OK---------->| | | |------NOTIFY---------->| | | |<-----200 OK-----------| | | | | | | |--INV bob--->| | | | | |--INV bob->| | | | |<-100------| | | | |<-----PUBLISH(alerting)---------------| | |------200 OK------------------------->| | |------NOTIFY---------->| | | |<-----200 OK-----------| | | | | | | | |<-180 ring-| | | |<--180 ring--| | | | | | | | | | | | | | | |<-200 OK---| | | |<--200 OK----| | | | | |<-----PUBLISH(active)-----------------| | |------200 OK------------------------->| | |------NOTIFY---------->| | | |<-----200 OK-----------| | | | | | |- The watcher subscribes the “Event: dialog” of Bob.
- Alice calls Bob.
- The publisher is publishing the “alerting” state for Bob.
- PUBLISH is received and handled by presence module. Presence module updates the “presentity”. Presence module checks for active watchers of the presentity. The active watcher is notified via a NOTIFY SIP request.
- Bob answers the call.
- The publisher is publishing the “active” state for Bob.
- PUBLISH is received and handled by presence module. Presence module updates the “presentity”. Presence module checks for active watchers of the presentity. The active watcher is notified via a NOTIFY SIP request.
Internal publishing
Section titled “Internal publishing”In this mode, the module requires the “dialog” module to be loaded into OpenSIPS. All the publishing will be automatically done (the modules will exchange data directly via C API).
From presence perspective, the OpenSIPS script must be configured to handle the SUBSCRIBE requests only (there is no need for PUBLISH handling as there is no SIP publishing in this mode). So be sure to use the “handle_subscribe()” function (from presence module) in the script.
To trigger the internal publishing (from the dialog module) for a certain call, use the “sca_set_calling_line()” or “sca_set_called_line()” functions from the script when handling a new call. These functions will do all the work (creating dialog, setting the internal publishing, etc) - you just need to use them and eventually specify the name of the line (if other then the one from the SIP INVITE) - see the below documentation.
LIMITATIONS : in this mode, the module does not really check if the line exists or not (like defined) - it blindly trust the traffic; also there is no check on how many indexes are for each line. Such information (lines and indexes) are not provisioned into the module, but the module will dynamically accept and handle any line and index based on the SIP traffic.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module:
- presence.
- dialog.
External Libraries or Applications
Section titled “External Libraries or Applications”None.
Exported Parameters
Section titled “Exported Parameters”call_info_timeout_notification (int)
Section titled “call_info_timeout_notification (int)”Enables or disables call_info event timeout notifications.
Default value is “1” (enabled).
...modparam("presence_callinfo", "call_info_timeout_notification", 0)...line_seize_timeout_notification (int)
Section titled “line_seize_timeout_notification (int)”Enables or disables line_seize event timeout notifications.
Default value is “0” (disabled).
...modparam("presence_callinfo", "line_seize_timeout_notification", 1)...disable_dialog_support_for_sca (int)
Section titled “disable_dialog_support_for_sca (int)”Disables the internal publishing of the “call-info” events (generated by the dialog module). The publishing is expected to be done via SIP PUBLISH from a third-party. See the wroking mode described in the beginning of this document.
Default value is “0” (not disabled).
...modparam("presence_callinfo", "disable_dialog_support_for_sca", 1)...line_hash_size (int)
Section titled “line_hash_size (int)”Allows you to controll the size of the internal hash table used for storing the information about the lines and indexes (in the internal publishing mode).
The value must be a power of 2. You may consider increasing the value if using a large set of lines (>1000).
Default value is “64”.
...modparam("presence_callinfo", "line_hash_size", 128)...Exported Functions
Section titled “Exported Functions”sca_set_calling_line([line])
Section titled “sca_set_calling_line([line])”The function (to be used only in internal publishing mode) is setting for the current new call (initinal INVITE) the outbound line - the line used for calling out.
If no parameter is provided, the name of the line is taken from the SIP FROM header of the INVITE. You can override that by providing the name of the line a parameter - be careful as the value must be a SIP URI ! Variables are accepted.
This function can be used from REQUEST_ROUTE.
... if (is_method("INVITE") and !has_totag()) { sca_set_calling_line(); }...sca_set_called_line([line])
Section titled “sca_set_called_line([line])”The function (to be used only in internal publishing mode) is setting for the current new call (initinal INVITE) the inbound line - the line the call was received on.
If no parameter is provided, the name of the line is taken from the SIP RURI of the INVITE. You can override that by providing the name of the line a parameter - be careful as the value must be a SIP URI ! Variables are accepted.
This function can be used from REQUEST_ROUTE.
... if (is_method("INVITE") and !has_totag()) { sca_set_called_line(); }...doc copyrights:
Contributors
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. | Bogdan-Andrei Iancu (@bogdan-iancu) | 26 | 7 | 1602 | 254 |
| 2. | Ovidiu Sas (@ovidiusas) | 12 | 6 | 577 | 7 |
| 3. | Razvan Crainea (@razvancrainea) | 11 | 9 | 32 | 24 |
| 4. | Stefan Darius (@dariusstefan) | 10 | 4 | 393 | 78 |
| 5. | Liviu Chircu (@liviuchircu) | 9 | 7 | 50 | 60 |
| 6. | Walter Doekes (@wdoekes) | 3 | 1 | 2 | 2 |
| 7. | Vlad Patrascu (@rvlad-patrascu) | 2 | 1 | 1 | 0 |
(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) | Oct 2011 - Jun 2026 |
| 3. | Bogdan-Andrei Iancu (@bogdan-iancu) | Jan 2013 - Jun 2018 |
| 4. | Liviu Chircu (@liviuchircu) | Mar 2014 - Jun 2018 |
| 5. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - May 2017 |
| 6. | Walter Doekes (@wdoekes) | Mar 2014 - Mar 2014 |
| 7. | Ovidiu Sas (@ovidiusas) | Dec 2010 - Mar 2011 |
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Liviu Chircu (@liviuchircu), Ovidiu Sas (@ovidiusas).
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0