Skip to content

Commit

Permalink
smsops: New module for handling 3GPP SMS over IP
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbock committed May 28, 2015
1 parent 4e6d2ae commit ca2d631
Show file tree
Hide file tree
Showing 8 changed files with 1,127 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.groups
Expand Up @@ -15,7 +15,7 @@ mod_list_basic=async auth benchmark blst cfg_rpc cfgutils corex counters \
nat_traversal nathelper path pike pv ratelimit rr rtimer \
rtpproxy sanity sdpops siputils sl statistics textops \
textopsx tm tmx topoh xlog rtpengine stun sipt tcpops \
auth_xkeys
auth_xkeys smsops

# - extra used modules, with no extra dependency
mod_list_extra=avp auth_diameter call_control dmq domainpolicy msrp pdb \
Expand Down
18 changes: 18 additions & 0 deletions modules/smsops/Makefile
@@ -0,0 +1,18 @@
#
# smsops module makefile
#
#
# WARNING: do not run this directly, it should be run by the master Makefile

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

DEFS+=-DKAMAILIO_MOD_INTERFACE

SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/kmi/kmi
SER_LIBS+=$(SERLIBPATH)/kcore/kcore
SER_LIBS+=$(SERLIBPATH)/srutils/srutils
include ../../Makefile.modules
4 changes: 4 additions & 0 deletions modules/smsops/doc/Makefile
@@ -0,0 +1,4 @@
docs = smsops.xml

docbook_dir = ../../../docbook
include $(docbook_dir)/Makefile.module
43 changes: 43 additions & 0 deletions modules/smsops/doc/smsops.xml
@@ -0,0 +1,43 @@
<?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 "../../../docbook/entities.xml">
%docentities;

]>

<book xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<title>SMS-OPS Module</title>
<productname class="trade">&kamailioname;</productname>
<authorgroup>
<author>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<affiliation><orgname>ng-voice GmbH</orgname></affiliation>
<email>carsten@ng-voice.com</email>
<address>
<otheraddr>
<ulink url="http://www.ng-voice.com">http://www.ng-voice.com</ulink>
</otheraddr>
</address>
</author>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<email>carsten@ng-voice.com</email>
</editor>
</authorgroup>
<copyright>
<year>2015</year>
<holder>Carsten Bock, ng-voice GmbH</holder>
</copyright>
</bookinfo>
<toc></toc>

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


</book>
53 changes: 53 additions & 0 deletions modules/smsops/doc/smsops_admin.xml
@@ -0,0 +1,53 @@
<?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 "../../../docbook/entities.xml">
%docentities;

]>
<!-- Module User's Guide -->

<chapter>

<title>&adminguide;</title>

<section>
<title>Overview</title>
<para>
This module collects the Transformations for 3GPP-SMS-V2.
</para>
</section>
<section>
<title>Dependencies</title>
<section>
<title>&kamailio; Modules</title>
<para>
The following modules must be loaded before this module:
<itemizedlist>
<listitem>
<para>
<emphasis>No dependencies on other &kamailio; modules</emphasis>.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>External Libraries or Applications</title>
<para>
The following libraries or applications must be installed before running
&kamailio; with this module loaded:
<itemizedlist>
<listitem>
<para>
<emphasis>None</emphasis>.
</para>
</listitem>
</itemizedlist>
</para>
</section>
</section>
</chapter>

63 changes: 63 additions & 0 deletions modules/smsops/smsops.c
@@ -0,0 +1,63 @@
/**
* Copyright (C) 2015 Carsten Bock, ng-voice GmbH
*
* This file is part of Kamailio, a free SIP server.
*
* Kamailio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version
*
* Kamailio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "../../sr_module.h"
#include "../../pvar.h"
#include "../../mod_fix.h"

#include "smsops_impl.h"

MODULE_VERSION

static pv_export_t mod_pvs[] = {
{ {"smsack", sizeof("smsack")-1}, PVT_OTHER, pv_sms_ack, 0, 0, 0, 0, 0 },
{ {"rpdata", sizeof("rpdata")-1}, PVT_OTHER, pv_get_sms, pv_set_sms, pv_parse_rpdata_name, 0, 0, 0 },
{ {"tpdu", sizeof("tpdu")-1}, PVT_OTHER, pv_get_sms, pv_set_sms, pv_parse_tpdu_name, 0, 0, 0 },
{ {"smsbody", sizeof("smsbody")-1}, PVT_OTHER, pv_sms_body, 0, 0, 0, 0, 0 },
{ {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
};

static cmd_export_t cmds[]={
{"smsdump", (cmd_function)smsdump, 0, 0, 0, REQUEST_ROUTE},
{"isRPDATA", (cmd_function)isRPDATA, 0, 0, 0, REQUEST_ROUTE},
{0,0,0,0,0,0}
};

/** module exports */
struct module_exports exports= {
"smsops",
DEFAULT_DLFLAGS, /* dlopen flags */
cmds,
0,
0, /* exported statistics */
0, /* exported MI functions */
mod_pvs, /* exported pseudo-variables */
0, /* extra processes */
0, /* module initialization function */
0,
0,
0 /* per-child init function */
};


0 comments on commit ca2d631

Please sign in to comment.