src/switch_core_rwlock.c \
src/switch_core_port_allocator.c \
src/switch_core.c \
+ src/switch_version.c \
src/switch_core_media.c \
src/switch_sdp.c \
src/switch_scheduler.c \
libfreeswitch_la_SOURCES += src/switch_cpp.cpp
endif
-$(top_builddir)/libfreeswitch_la-switch_console.lo: src/include/switch_version.h
-
$(libfreeswitch_la_SOURCES): $(CORE_LIBS) $(switch_builddir)/quiet_libtool $(switch_builddir)/modules.conf
src/include/switch_swigable_cpp.h: $(switch_srcdir)/src/include/switch_cpp.h
cd src/mod/legacy/languages/mod_lua
make swigclean
make lua_wrap
-cd ../../../..
+cd ../../../../..
cd src/mod/languages/mod_perl
make swigclean
#endif
#include <switch.h>
-#include <switch_version.h>
-
/* Picky compiler */
#ifdef __ICC
SWITCH_DECLARE(switch_call_direction_t) switch_ice_direction(switch_core_session_t *session);
SWITCH_DECLARE(void) switch_core_session_debug_pool(switch_stream_handle_t *stream);
+SWITCH_DECLARE(const char *)switch_version_major(void);
+SWITCH_DECLARE(const char *)switch_version_minor(void);
+SWITCH_DECLARE(const char *)switch_version_micro(void);
+
+SWITCH_DECLARE(const char *)switch_version_revision(void);
+SWITCH_DECLARE(const char *)switch_version_revision_human(void);
+SWITCH_DECLARE(const char *)switch_version_full(void);
+SWITCH_DECLARE(const char *)switch_version_full_human(void);
+
SWITCH_END_EXTERN_C
#endif
/* For Emacs:
*/
#include <switch.h>
#include <switch_stun.h>
-#include <switch_version.h>
SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_commands_shutdown);
char *mydata = NULL, *argv[2];
if (zstr(cmd)) {
- stream->write_function(stream, "FreeSWITCH Version %s (%s)\n", SWITCH_VERSION_FULL, SWITCH_VERSION_REVISION_HUMAN);
+ stream->write_function(stream, "FreeSWITCH Version %s (%s)\n", switch_version_full(), switch_version_revision_human());
goto end;
}
argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
if (argc > 0 && switch_stristr("short", argv[0])) {
- stream->write_function(stream, "%s.%s.%s\n", SWITCH_VERSION_MAJOR,SWITCH_VERSION_MINOR,SWITCH_VERSION_MICRO);
+ stream->write_function(stream, "%s.%s.%s\n", switch_version_major(),switch_version_minor(),switch_version_micro());
} else {
- stream->write_function(stream, "FreeSWITCH Version %s (%s)\n", SWITCH_VERSION_FULL, SWITCH_VERSION_FULL_HUMAN);
+ stream->write_function(stream, "FreeSWITCH Version %s (%s)\n", switch_version_full(), switch_version_full_human());
}
switch_safe_free(mydata);
duration.sec, duration.sec == 1 ? "" : "s", duration.ms , duration.ms == 1 ? "" : "s", duration.mms,
duration.mms == 1 ? "" : "s", nl);
- stream->write_function(stream, "FreeSWITCH (Version %s) is %s%s", SWITCH_VERSION_FULL_HUMAN,
+ stream->write_function(stream, "FreeSWITCH (Version %s) is %s%s", switch_version_full_human(),
switch_core_ready() ? "ready" : "not ready", nl);
stream->write_function(stream, "%" SWITCH_SIZE_T_FMT " session(s) since startup%s", switch_core_session_id() - 1, nl);
}
-#include <switch_version.h>
+
SWITCH_STANDARD_JSON_API(json_status_function)
{
cJSON *o, *oo, *reply = cJSON_CreateObject();
cJSON_AddItemToObject(o, "microseconds", cJSON_CreateNumber(duration.mms));
cJSON_AddItemToObject(reply, "uptime", o);
- cJSON_AddItemToObject(reply, "version", cJSON_CreateString(SWITCH_VERSION_FULL_HUMAN));
+ cJSON_AddItemToObject(reply, "version", cJSON_CreateString(switch_version_full_human()));
o = cJSON_CreateObject();
cJSON_AddItemToObject(reply, "sessions", o);
#define GSMOPEN_ALSA
#endif // NO_ALSA
#include <switch.h>
-#include <switch_version.h>
#ifndef WIN32
#include <termios.h>
#include <sys/ioctl.h>
//#define SAMPLES_PER_FRAME SAMPLERATE_GSMOPEN/50
#ifndef GSMOPEN_SVN_VERSION
-#define GSMOPEN_SVN_VERSION SWITCH_VERSION_FULL
+#define GSMOPEN_SVN_VERSION switch_version_full()
#endif /* GSMOPEN_SVN_VERSION */
typedef enum {
#define SAMPLERATE_GSMOPEN 8000
#include <switch.h>
-#include <switch_version.h>
#ifndef WIN32
#include <termios.h>
#include <sys/ioctl.h>
#endif
#ifndef GSMOPEN_SVN_VERSION
-#define GSMOPEN_SVN_VERSION SWITCH_VERSION_FULL
+#define GSMOPEN_SVN_VERSION switch_version_full()
#endif /* GSMOPEN_SVN_VERSION */
#include "ctb-0.16/ctb.h"
#define HAVE_APR
#include <switch.h>
-#include <switch_version.h>
#define MODNAME "mod_h323"
#define OpalT38_IFP_COR GetOpalT38_IFP_COR()
#define OpalT38_IFP_PRE GetOpalT38_IFP_PRE()
#define _DEFS_H_
/* formatation macros */
-#include "switch_version.h"
#include "revision.h"
#define KHOMP_LOG __FILE__, __SWITCH_FUNC__, __LINE__
#include <switch.h>
-#include <switch_version.h>
#ifndef WIN32
#include <sys/time.h>
#endif
#ifndef SKYPOPEN_SVN_VERSION
-#define SKYPOPEN_SVN_VERSION SWITCH_VERSION_FULL
+#define SKYPOPEN_SVN_VERSION switch_version_full()
#endif /* SKYPOPEN_SVN_VERSION */
typedef enum {
#define SOFIA_QUEUE_SIZE 50000
#define HAVE_APR
#include <switch.h>
-#include <switch_version.h>
#define SOFIA_NAT_SESSION_TIMEOUT 90
#define SOFIA_MAX_ACL 100
#ifdef _MSC_VER
#define MULTICAST_EVENT "multicast::event"
#define SOFIA_REPLACES_HEADER "_sofia_replaces_"
-#define SOFIA_USER_AGENT "FreeSWITCH-mod_sofia/" SWITCH_VERSION_FULL
#define SOFIA_CHAT_PROTO "sip"
#define SOFIA_MULTIPART_PREFIX "sip_mp_"
#define SOFIA_MULTIPART_PREFIX_T "~sip_mp_"
profile->auto_rtp_bugs = RTP_BUG_CISCO_SKIP_MARK_BIT_2833;// | RTP_BUG_SONUS_SEND_INVALID_TIMESTAMP_2833;
profile->pool = pool;
- profile->user_agent = SOFIA_USER_AGENT;
+
+ profile->user_agent = switch_core_sprintf(profile->pool, "FreeSWITCH-mod_sofia/%s", switch_version_full());
profile->name = switch_core_strdup(profile->pool, xprofilename);
switch_snprintf(url, sizeof(url), "sofia_reg_%s", xprofilename);
*
*/
#include <switch.h>
-#include <switch_version.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
{
netsnmp_request_info *request = NULL;
oid subid;
- static char const version[] = SWITCH_VERSION_FULL;
+ static char const version[] = switch_version_full();
char uuid[40] = "";
switch(reqinfo->mode) {
}
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_major() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_major();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_minor() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_minor();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_micro() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_micro();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_revision() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_revision();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_revision_human() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_revision_human();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_full() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_full();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_version_full_human() {
+ char * jresult ;
+ char *result = 0 ;
+
+ result = (char *)switch_version_full_human();
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
SWIGEXPORT void SWIGSTDCALL CSharp_switch_loadable_module_interface_module_name_set(void * jarg1, char * jarg2) {
switch_loadable_module_interface *arg1 = (switch_loadable_module_interface *) 0 ;
char *arg2 = (char *) 0 ;
freeswitchPINVOKE.switch_core_session_debug_pool(switch_stream_handle.getCPtr(stream));
}
+ public static string switch_version_major() {
+ string ret = freeswitchPINVOKE.switch_version_major();
+ return ret;
+ }
+
+ public static string switch_version_minor() {
+ string ret = freeswitchPINVOKE.switch_version_minor();
+ return ret;
+ }
+
+ public static string switch_version_micro() {
+ string ret = freeswitchPINVOKE.switch_version_micro();
+ return ret;
+ }
+
+ public static string switch_version_revision() {
+ string ret = freeswitchPINVOKE.switch_version_revision();
+ return ret;
+ }
+
+ public static string switch_version_revision_human() {
+ string ret = freeswitchPINVOKE.switch_version_revision_human();
+ return ret;
+ }
+
+ public static string switch_version_full() {
+ string ret = freeswitchPINVOKE.switch_version_full();
+ return ret;
+ }
+
+ public static string switch_version_full_human() {
+ string ret = freeswitchPINVOKE.switch_version_full_human();
+ return ret;
+ }
+
public static switch_status_t switch_loadable_module_init(switch_bool_t autoload) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_loadable_module_init((int)autoload);
return ret;
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_session_debug_pool")]
public static extern void switch_core_session_debug_pool(HandleRef jarg1);
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_major")]
+ public static extern string switch_version_major();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_minor")]
+ public static extern string switch_version_minor();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_micro")]
+ public static extern string switch_version_micro();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_revision")]
+ public static extern string switch_version_revision();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_revision_human")]
+ public static extern string switch_version_revision_human();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_full")]
+ public static extern string switch_version_full();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_version_full_human")]
+ public static extern string switch_version_full_human();
+
[DllImport("mod_managed", EntryPoint="CSharp_switch_loadable_module_interface_module_name_set")]
public static extern void switch_loadable_module_interface_module_name_set(HandleRef jarg1, string jarg2);
public enum switch_rtp_flag_t {
SWITCH_RTP_FLAG_NOBLOCK = 0,
+ SWITCH_RTP_FLAG_DTMF_ON,
SWITCH_RTP_FLAG_IO,
SWITCH_RTP_FLAG_USE_TIMER,
SWITCH_RTP_FLAG_RTCP_PASSTHRU,
*
*/
#include <switch.h>
-#include <switch_version.h>
#ifdef _MSC_VER
#pragma warning(disable:4142)
#endif
const char *uri = 0;
TRequestInfo *info = 0;
switch_event_t *evnt = 0; /* shortcut to stream.param_event */
+ char v[256] = "";
if (!r || !(info = &r->requestInfo) || !(uri = info->uri)) {
return FALSE;
}
/* Generation of the server field */
- ResponseAddField(r, "Server", "FreeSWITCH-" SWITCH_VERSION_FULL "-mod_xml_rpc");
+ switch_sprintf(v, sizeof(v), "FreeSWITCH-%s-mod_xml_rpc", switch_version_full());
+ ResponseAddField(r, "Server", v);
if (html) {
ResponseAddField(r, "Content-Type", "text/html");
#endif
#include <switch.h>
-#include <switch_version.h>
#include "private/switch_core_pvt.h"
/* pid filename: Stores the process id of the freeswitch process */
}
else if (!strcmp(local_argv[x], "-version")) {
- fprintf(stdout, "FreeSWITCH version: %s (%s)\n", SWITCH_VERSION_FULL, SWITCH_VERSION_REVISION_HUMAN);
+ fprintf(stdout, "FreeSWITCH version: %s (%s)\n", switch_version_full(), switch_version_revision_human());
exit(EXIT_SUCCESS);
}
#endif
#include <switch.h>
#include <switch_console.h>
-#include <switch_version.h>
#ifndef _MSC_VER
#include <switch_private.h>
#endif
#include <switch_ssl.h>
#include <switch_stun.h>
#include <switch_nat.h>
-#include <switch_version.h>
#include "private/switch_core_pvt.h"
#include <switch_curl.h>
#ifndef WIN32
duration.sec, duration.sec == 1 ? "" : "s",
duration.ms, duration.ms == 1 ? "" : "s", duration.mms, duration.mms == 1 ? "" : "s");
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Version", SWITCH_VERSION_FULL);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Version", switch_version_full());
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Uptime-msec", "%"SWITCH_TIME_T_FMT, switch_core_uptime() / 1000);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Count", "%u", switch_core_session_count());
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Max-Sessions", "%u", switch_core_session_limit(0));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE,
"\nFreeSWITCH Version %s (%s)\n\nFreeSWITCH Started\nMax Sessions [%u]\nSession Rate [%d]\nSQL [%s]\n",
- SWITCH_VERSION_FULL, SWITCH_VERSION_REVISION_HUMAN,
+ switch_version_full(), switch_version_revision_human(),
switch_core_session_limit(0),
switch_core_sessions_per_second(0), switch_test_flag((&runtime), SCF_USE_SQL) ? "Enabled" : "Disabled");
#include <switch_ssl.h>
#include <switch_stun.h>
#include <switch_nat.h>
-#include <switch_version.h>
#include "private/switch_core_pvt.h"
#include <switch_curl.h>
#include <errno.h>
#include <datatypes.h>
#include <srtp.h>
#include <srtp_priv.h>
-#include <switch_version.h>
#include <switch_ssl.h>
#define FIR_COUNTDOWN 50
switch_stun_packet_attribute_add_priority(packet, ice->ice_params->cands[ice->ice_params->chosen[ice->proto]][ice->proto].priority);
- switch_snprintf(sw, sizeof(sw), "FreeSWITCH (%s)", SWITCH_VERSION_REVISION_HUMAN);
+ switch_snprintf(sw, sizeof(sw), "FreeSWITCH (%s)", switch_version_revision_human());
switch_stun_packet_attribute_add_software(packet, sw, (uint16_t)strlen(sw));
if ((ice->type & ICE_CONTROLLED)) {
#endif
#include <switch.h>
-#include <switch_version.h>
-
-
/* Picky compiler */
#ifdef __ICC