Skip to content

PUA XMPP module

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.

The following modules must be loaded before this module:

  • presence.
  • pua.
  • xmpp.

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • libxml.

The IP address of the server.

Set server_address parameter
...
modparam("pua_xmpp", "server_address", "sip:sa@opensips.org:5060")
...

The the address of the presence server. If set, it will be used as outbound proxy when sending PUBLISH requests.

Set presence_server parameter
...
modparam("pua_xmpp", "presence_server", "sip:pa@opensips.org:5075")
...

Functions exported to be used in configuration file.

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.

Notify2Xmpp usage
...
if( is_method("NOTIFY") && $ru=~"sip:.+@sip-xmpp.siphub.ro")
{
if(Notify2Xmpp())
t_reply(200, "OK");
exit;
}
...

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).

Parameters:

  • request_uri (string)
  • expires (int) - value of Expires header field in received Subscribe.

This function can be used from REQUEST_ROUTE.

xmpp_send_winfo usage
...
if( is_method("SUBSCRIBE"))
{
handle_subscribe();
if($ru=~"sip:.+@sip-xmpp.siphub.ro" && $hdr(Event)== "presence")
{
pua_xmpp_req_winfo($ruri, $hdr(Expires));
}
t_release();
}
...

Instead of “sip-xmpp.siphub.ro” in the example you should use the value set for the xmpp module parameter named ‘gateway_domain’.

The module provides no function to be used in other OpenSIPS modules.

Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

#NameDevScoreCommitsLines++Lines—
1.Anca Vamanu61173351870
2.Bogdan-Andrei Iancu (@bogdan-iancu)211541685
3.Razvan Crainea (@razvancrainea)16135875
4.Liviu Chircu (@liviuchircu)1611149172
5.Daniel-Constantin Mierla (@miconda)1082721
6.Stefan Darius (@dariusstefan)7417520
7.Vlad Patrascu (@rvlad-patrascu)743671
8.Ovidiu Sas (@ovidiusas)31142
9.Vlad Paiu (@vladpaiu)31515
10.Sergio Gutierrez3155

All remaining contributors: Maksym Sobolyev (@sobomax), Konstantin Bokarius, Juha Heinanen (@juha-h), Ken Rice, Peter Lemenkov (@lemenkov), Walter Doekes (@wdoekes), Edson Gellert Schubert, Stanislaw Pitucha.

(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

#NameCommit Activity
1.Bogdan-Andrei Iancu (@bogdan-iancu)Jul 2007 - Jul 2026
2.Stefan Darius (@dariusstefan)Jun 2026 - Jul 2026
3.Razvan Crainea (@razvancrainea)Feb 2012 - Jun 2026
4.Ken RiceSep 2025 - Sep 2025
5.Liviu Chircu (@liviuchircu)Mar 2014 - May 2024
6.Maksym Sobolyev (@sobomax)Feb 2023 - Feb 2023
7.Vlad Patrascu (@rvlad-patrascu)May 2017 - Apr 2019
8.Peter Lemenkov (@lemenkov)Jun 2018 - Jun 2018
9.Ovidiu Sas (@ovidiusas)Jan 2013 - Jan 2013
10.Vlad Paiu (@vladpaiu)Aug 2011 - Aug 2011

All remaining contributors: Stanislaw Pitucha, Walter Doekes (@wdoekes), Anca Vamanu, Sergio Gutierrez, Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Juha Heinanen (@juha-h).

(1) including any documentation-related commits, excluding merge commits

Last edited by: Razvan Crainea (@razvancrainea), Vlad Patrascu (@rvlad-patrascu), Peter Lemenkov (@lemenkov), Liviu Chircu (@liviuchircu), Bogdan-Andrei Iancu (@bogdan-iancu), Anca Vamanu, Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert.

All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0