Skip to content

Commit

Permalink
Merge pull request #3333 from carstenbock/presence_add_pua_reginfo
Browse files Browse the repository at this point in the history
Presence add pua reginfo
  • Loading branch information
bogdan-iancu committed Apr 18, 2024
2 parents 8ef1bf4 + 9f0de9e commit 0d1a6d0
Show file tree
Hide file tree
Showing 13 changed files with 1,940 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/pua/add_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ int pua_add_events(void)
LM_ERR("while adding event presence\n");
return -1;
}
/* add application/reginfo+xml */
if(add_pua_event(REGINFO_EVENT, "reg", "application/reginfo+xml", 0)< 0)
{
LM_ERR("while adding event application/reginfo+xml with version "
"increase\n");
return -1;
}

return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions modules/pua/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#define XCAPDIFF_EVENT 1<<5
#define DIALOG_EVENT 1<<6
#define CALLINFO_EVENT 1<<7
#define REGINFO_EVENT 1<<8

#define UL_PUBLISH 1<<0
#define BLA_PUBLISH 1<<1
Expand All @@ -55,6 +56,8 @@
#define RLS_SUBSCRIBE 1<<9
#define DIALOG_PUBLISH 1<<10
#define CALLINFO_PUBLISH 1<<11
#define REGINFO_SUBSCRIBE 1<<12
#define REGINFO_PUBLISH 1<<13

#define NO_UPDATEDB_FLAG 0
#define UPDATEDB_FLAG 1
Expand Down
29 changes: 29 additions & 0 deletions modules/pua_reginfo/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PUA_REGINFO
#
#
# WARNING: do not run this directly, it should be run by the main Makefile

include ../../Makefile.defs
auto_gen=
NAME=pua_reginfo.so
LIBS=

ifeq ($(CROSS_COMPILE),)
XML2CFG=$(shell which xml2-config)
ifeq ($(XML2CFG),)
XML2CFG=$(shell \
if pkg-config --exists libxml-2.0; then \
echo 'pkg-config libxml-2.0'; \
fi)
endif
endif

ifneq ($(XML2CFG),)
DEFS += $(shell $(XML2CFG) --cflags )
LIBS += $(shell $(XML2CFG) --libs)
else
DEFS+=-I$(LOCALBASE)/include/libxml2 -I$(LOCALBASE)/include
LIBS+=-L$(LOCALBASE)/lib -lxml2
endif

include ../../Makefile.modules
39 changes: 39 additions & 0 deletions modules/pua_reginfo/doc/pua_reginfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml">
%docentities;

]>

<book xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<title>pua_reginfo Module</title>
<productname class="trade">&osipsname;</productname>
<authorgroup>
<author>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<email>carsten@ng-voice.com</email>
</author>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<email>carsten@ng-voice.com</email>
</editor>
</authorgroup>
<copyright>
<year>2011, 2023</year>
<holder>Carsten Bock, carsten@ng-voice.com, http://www.ng-voice.com</holder>
</copyright>
</bookinfo>
<toc></toc>

<xi:include href="pua_reginfo_admin.xml"/>


</book>


0 comments on commit 0d1a6d0

Please sign in to comment.