PUA XMPP module
Admin Guide
Section titled “Admin Guide”Overview
Section titled “Overview”This module is a gateway for presence between SIP and XMPP.
It translates one format into another and uses xmpp, pua and presence modules to manage the transmition of presence state information.
Dependencies
Section titled “Dependencies”OpenSIPS Modules
Section titled “OpenSIPS Modules”The following modules must be loaded before this module:
- presence.
- pua.
- xmpp.
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:
- libxml.
Exported Parameters
Section titled “Exported Parameters”server_address(str)
Section titled “server_address(str)”The IP address of the server.
...modparam("pua_xmpp", "server_address", "sip:sa@opensips.org:5060")...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_xmpp", "presence_server", "sip:pa@opensips.org:5075")...Exported Functions
Section titled “Exported Functions”Functions exported to be used in configuration file.
pua_xmpp_notify()
Section titled “pua_xmpp_notify()”Function that handles Notify messages addressed to a user from an xmpp domain. It requires filtering after method and domain in configuration file. If the function is successful, a 2xx reply must be sent.
This function can be used from REQUEST_ROUTE.
... if( is_method("NOTIFY") && uri=~"sip:.+@sip-xmpp.siphub.ro") { if(Notify2Xmpp()) t_reply("200", "OK"); exit; }...pua_xmpp_req_winfo(char* request_uri, char* expires)
Section titled “pua_xmpp_req_winfo(char* request_uri, char* expires)”Function called when a Subscribe addressed to a user from a xmpp domain is received. It calls sending a Subscribe for winfo for the user, and the following Notify with dialog-info is translated into a subscription in xmpp. It also requires filtering in configuration file, after method, domain and event(only for presence).
It takes 2 parameters: request_uri and the value of Expires header field in received Subscribe.
This function can be used from REQUEST_ROUTE.
... if( is_method("SUBSCRIBE")) { handle_subscribe(); if(uri=~"sip:.+@sip-xmpp.siphub.ro" && $hdr(Event)== "presence") { pua_xmpp_req_winfo("$ruri", "$hdr(Expires)"); } t_release(); }...Filtering
Section titled “Filtering”Instead of “sip-xmpp.siphub.ro” in the example you should use the value set for the xmpp module parameter named ‘gateway_domain’.
Developer Guide
Section titled “Developer Guide”The module provides no function to be used in other OpenSIPS modules.
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. | Anca Vamanu | 62 | 18 | 3351 | 870 |
| 2. | Bogdan-Andrei Iancu (@bogdan-iancu) | 14 | 11 | 58 | 74 |
| 3. | Daniel-Constantin Mierla (@miconda) | 10 | 8 | 27 | 21 |
| 4. | Stefan Darius (@dariusstefan) | 7 | 4 | 171 | 20 |
| 5. | Sergio Gutierrez | 3 | 1 | 5 | 5 |
| 6. | Konstantin Bokarius | 3 | 1 | 3 | 5 |
| 7. | Juha Heinanen (@juha-h) | 3 | 1 | 3 | 3 |
| 8. | Razvan Crainea (@razvancrainea) | 3 | 1 | 2 | 2 |
| 9. | Edson Gellert Schubert | 3 | 1 | 0 | 94 |
(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. | Bogdan-Andrei Iancu (@bogdan-iancu) | Jul 2007 - Jul 2026 |
| 2. | Stefan Darius (@dariusstefan) | Jun 2026 - Jul 2026 |
| 3. | Razvan Crainea (@razvancrainea) | Jun 2026 - Jun 2026 |
| 4. | Anca Vamanu | Apr 2007 - Apr 2010 |
| 5. | Sergio Gutierrez | Nov 2008 - Nov 2008 |
| 6. | Daniel-Constantin Mierla (@miconda) | Sep 2007 - Mar 2008 |
| 7. | Konstantin Bokarius | Mar 2008 - Mar 2008 |
| 8. | Edson Gellert Schubert | Feb 2008 - Feb 2008 |
| 9. | Juha Heinanen (@juha-h) | Dec 2007 - Dec 2007 |
(1) including any documentation-related commits, excluding merge commits
Documentation
Section titled “Documentation”Contributors
Section titled “Contributors”Last edited by: Razvan Crainea (@razvancrainea), Anca Vamanu, Bogdan-Andrei Iancu (@bogdan-iancu), 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