Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
freeswitch ESL connector: First draft
- Loading branch information
1 parent
7432001
commit bf74897
Showing
3 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# $Id$ | ||
# | ||
# WARNING: do not run this directly, it should be run by the master Makefile | ||
|
||
include ../../Makefile.defs | ||
auto_gen= | ||
NAME=freeswitch.so | ||
LIBS= | ||
|
||
include ../../Makefile.modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* FreeSWITCH API | ||
* | ||
* This module is intended to be used as a middle layer SIP component in | ||
* environments where a large proportion of SIP UAs (e.g. mobile devices) | ||
* register at high enough frequencies that they actually degrade the | ||
* performance of their registrars. | ||
* | ||
* Copyright (C) 2016 OpenSIPS Solutions | ||
* | ||
* This file is part of opensips, a free SIP server. | ||
* | ||
* opensips 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 | ||
* | ||
* opensips 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 | ||
* | ||
* History: | ||
* -------- | ||
* 2017-01-19 initial version (liviu) | ||
*/ | ||
|
||
#ifndef __FREESWITCH_API__ | ||
#define __FREESWITCH_API__ | ||
|
||
typedef struct _fs_api_t fs_api_t; | ||
struct _fs_api_t { | ||
int a; | ||
}; | ||
|
||
|
||
#endif /* __FREESWITCH_API__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* Client for the FreeSWITCH ESL (Event Socket Layer) | ||
* | ||
* This module is intended to be used as a middle layer SIP component in | ||
* environments where a large proportion of SIP UAs (e.g. mobile devices) | ||
* register at high enough frequencies that they actually degrade the | ||
* performance of their registrars. | ||
* | ||
* Copyright (C) 2016 OpenSIPS Solutions | ||
* | ||
* This file is part of opensips, a free SIP server. | ||
* | ||
* opensips 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 | ||
* | ||
* opensips 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 | ||
* | ||
* History: | ||
* -------- | ||
* 2017-01-19 initial version (liviu) | ||
*/ | ||
|
||
#include "../../sr_module.h" | ||
#include "../../ut.h" | ||
#include "../../timer.h" | ||
#include "../../mod_fix.h" | ||
#include "../../parser/msg_parser.h" | ||
|
||
#include "fs_api.h" | ||
|
||
static int mod_init(void); | ||
int fs_bind(fs_api_t *fapi); | ||
|
||
static cmd_export_t cmds[] = { | ||
{ "fs_bind", (cmd_function)fs_bind, 1, NULL, NULL, 0 }, | ||
{ NULL, NULL, 0, NULL, NULL, 0 } | ||
}; | ||
|
||
static param_export_t mod_params[] = { | ||
{ 0,0,0 } | ||
}; | ||
|
||
static dep_export_t deps = { | ||
{ /* OpenSIPS module dependencies */ | ||
{ MOD_TYPE_NULL, NULL, 0 }, | ||
}, | ||
{ /* modparam dependencies */ | ||
{ NULL, NULL }, | ||
}, | ||
}; | ||
|
||
struct module_exports exports= { | ||
"mid_registrar", /* module's name */ | ||
MOD_TYPE_DEFAULT,/* class of this module */ | ||
MODULE_VERSION, | ||
DEFAULT_DLFLAGS, /* dlopen flags */ | ||
&deps, /* OpenSIPS module dependencies */ | ||
cmds, /* exported functions */ | ||
NULL, /* exported async functions */ | ||
mod_params, /* param exports */ | ||
NULL, /* exported statistics */ | ||
NULL, /* exported MI functions */ | ||
NULL, /* exported pseudo-variables */ | ||
NULL, /* extra processes */ | ||
mod_init, /* module initialization function */ | ||
NULL, /* reply processing function */ | ||
NULL, | ||
NULL /* per-child init function */ | ||
}; | ||
|
||
static int mod_init(void) | ||
{ | ||
return 0; | ||
} | ||
|
||
int fs_bind(fs_api_t *fapi) | ||
{ | ||
return 0; | ||
} |