PUA MI module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”The pua_mi offers the possibility to publish presence information and subscribe to presence information via MI transports.
Using this module you can create independent applications/scripts to publish not sip-related information (e.g., system resources like CPU-usage, memory, number of active subscribers …). Also, this module allows non-SIP speaking applications to subscribe presence information kept in a SIP presence server.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module:
- pua
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”presence_server (str)
Section titled “presence_server (str)”The the address of the presence server. If set, it will be used as outbound proxy when sending PUBLISH requests.
...modparam("pua_mi", "presence_server", "sip:pa@opensips.org:5075")...Exported Functions
Section titled “Exported Functions”The module does not export functions to be used in configuration script.
Exported MI Functions
Section titled “Exported MI Functions”pua_publish
Section titled “pua_publish”Command parameters:
- presentity_uri - e.g. sip:system@opensips.org
- expires - Relative expires time in seconds (e.g. 3600).
- event_package - Event package that is target of published information (e.g. presence).
- content_type (optional) - Content type of published information (e.g. application/pidf+xml). If this parameter is provided, the body parameter is also required.
- etag (optional) - ETag that publish should match.
- extra_headers (optional) - Extra headers added to PUBLISH request.
- body (optioanl) - The body of the publish request containing published information or missing if no published information. It has to be a single line for FIFO transport. If this parameter is provided, the content_type parameter is also required.
opensips-cli -x mi pua_publish sip:system@opensips.org 3600 presence application/pidf+xml <?xml version='1.0'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='system@opensips.org'><tuple id='0x81475a0'><status><basic>open</basic></status></tuple><dm:person id='pdd748945'><rpid:activities><rpid:away/>away</rpid:activities><dm:note>CPU:16 MEM:476</dm:note></dm:person></presence>pua_subscribe
Section titled “pua_subscribe”Command parameters:
- presentity_uri - e.g. sip:presentity@opensips.org
- watcher_uri - e.g. sip:watcher@opensips.org
- event_package
- expires - Relative time in seconds for the desired validity of the subscription.
opensips-cli -x mi pua_subscribe sip:system@opensips.org sip:400@opensips.org presence 3600Contributors
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. | Anca Vamanu | 32 | 15 | 1288 | 309 |
| 2. | Bogdan-Andrei Iancu (@bogdan-iancu) | 15 | 13 | 44 | 55 |
| 3. | Razvan Crainea (@razvancrainea) | 12 | 10 | 18 | 19 |
| 4. | Liviu Chircu (@liviuchircu) | 12 | 9 | 73 | 90 |
| 5. | Juha Heinanen (@juha-h) | 11 | 7 | 166 | 79 |
| 6. | Vlad Patrascu (@rvlad-patrascu) | 11 | 4 | 293 | 226 |
| 7. | Daniel-Constantin Mierla (@miconda) | 9 | 7 | 37 | 34 |
| 8. | Stefan Darius (@dariusstefan) | 8 | 5 | 164 | 33 |
| 9. | Ovidiu Sas (@ovidiusas) | 3 | 1 | 14 | 3 |
| 10. | Konstantin Bokarius | 3 | 1 | 2 | 5 |
All remaining contributors: Peter Lemenkov (@lemenkov), Edson Gellert Schubert, Julien Blache.
(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) | Sep 2011 - Jun 2026 |
| 3. | Liviu Chircu (@liviuchircu) | Mar 2014 - May 2024 |
| 4. | Vlad Patrascu (@rvlad-patrascu) | May 2017 - Nov 2020 |
| 5. | Bogdan-Andrei Iancu (@bogdan-iancu) | Dec 2006 - Apr 2019 |
| 6. | Peter Lemenkov (@lemenkov) | Jun 2018 - Jun 2018 |
| 7. | Ovidiu Sas (@ovidiusas) | Jan 2013 - Jan 2013 |
| 8. | Anca Vamanu | Nov 2006 - Aug 2010 |
| 9. | Juha Heinanen (@juha-h) | Apr 2007 - May 2008 |
| 10. | Daniel-Constantin Mierla (@miconda) | Feb 2007 - Mar 2008 |
All remaining contributors: Konstantin Bokarius, Edson Gellert Schubert, Julien Blache.
(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), Bogdan-Andrei Iancu (@bogdan-iancu), Anca Vamanu, Juha Heinanen (@juha-h), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert.
License
Section titled “License”All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0