Merge branch 'master' into v1.4.beta

Conflicts:
	configure.in
This commit is contained in:
Ken Rice
2013-12-05 12:09:12 -06:00
56 changed files with 2330 additions and 604 deletions
+2 -2
View File
@@ -6,10 +6,10 @@ NAME = freeswitch
AM_LIBAPR_CFLAGS := $(shell ./libs/apr/apr-1-config --cflags)
AM_LIBAPR_CPPFLAGS := $(shell ./libs/apr/apr-1-config --cppflags --includes)
AM_LIBAPR_LDFLAGS := $(shell ./libs/apr/apr-1-config --ldflags)
AM_LIBAPR_LIBS := $(subst $(CURDIR)/,,$(shell ./libs/apr/apr-1-config \--link-libtool \--libs))
AM_LIBAPR_LIBS := $(subst $(switch_srcdir)/,,$(shell ./libs/apr/apr-1-config \--link-libtool \--libs))
AM_LIBAPU_CPPFLAGS := $(shell ./libs/apr-util/apu-1-config --includes)
AM_LIBAPU_LDFLAGS := $(shell ./libs/apr-util/apu-1-config --ldflags)
AM_LIBAPU_LIBS := $(subst $(CURDIR)/,,$(shell ./libs/apr-util/apu-1-config \--link-libtool \--libs))
AM_LIBAPU_LIBS := $(subst $(switch_srcdir)/,,$(shell ./libs/apr-util/apu-1-config \--link-libtool \--libs))
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -Ilibs/sofia-sip/libsofia-sip-ua/sdp -Ilibs/sofia-sip/libsofia-sip-ua/su
+18
View File
@@ -27,6 +27,7 @@ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
* Remapping function pointer type to accept apr_uint32_t's type-safely
* as the arguments for as our apr_atomic_foo32 Functions
*/
#if (_MSC_VER < 1800)
typedef WINBASEAPI apr_uint32_t (WINAPI * apr_atomic_win32_ptr_fn)
(apr_uint32_t volatile *);
typedef WINBASEAPI apr_uint32_t (WINAPI * apr_atomic_win32_ptr_val_fn)
@@ -38,11 +39,14 @@ typedef WINBASEAPI apr_uint32_t (WINAPI * apr_atomic_win32_ptr_val_val_fn)
typedef WINBASEAPI void * (WINAPI * apr_atomic_win32_ptr_ptr_ptr_fn)
(volatile void **,
void *, const void *);
#endif
APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64))
return InterlockedExchangeAdd(mem, val);
#elif (_MSC_VER >= 1800)
return InterlockedExchangeAdd(mem, val);
#else
return ((apr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, val);
#endif
@@ -55,6 +59,8 @@ APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64))
InterlockedExchangeAdd(mem, -val);
#elif (_MSC_VER >= 1800)
InterlockedExchangeAdd(mem, -val);
#else
((apr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, -val);
#endif
@@ -65,6 +71,8 @@ APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem)
/* we return old value, win32 returns new value :( */
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedIncrement(mem) - 1;
#elif (_MSC_VER >= 1800)
return InterlockedIncrement(mem) - 1;
#else
return ((apr_atomic_win32_ptr_fn)InterlockedIncrement)(mem) - 1;
#endif
@@ -74,6 +82,8 @@ APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedDecrement(mem);
#elif (_MSC_VER >= 1800)
return InterlockedDecrement(mem);
#else
return ((apr_atomic_win32_ptr_fn)InterlockedDecrement)(mem);
#endif
@@ -83,6 +93,8 @@ APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
InterlockedExchange(mem, val);
#elif (_MSC_VER >= 1800)
InterlockedExchange(mem, val);
#else
((apr_atomic_win32_ptr_val_fn)InterlockedExchange)(mem, val);
#endif
@@ -98,6 +110,8 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint3
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedCompareExchange(mem, with, cmp);
#elif (_MSC_VER >= 1800)
return InterlockedCompareExchange(mem, with, cmp);
#else
return ((apr_atomic_win32_ptr_val_val_fn)InterlockedCompareExchange)(mem, with, cmp);
#endif
@@ -107,6 +121,8 @@ APR_DECLARE(void *) apr_atomic_casptr(volatile void **mem, void *with, const voi
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedCompareExchangePointer(mem, with, cmp);
#elif (_MSC_VER >= 1800)
return InterlockedCompareExchangePointer(mem, with, cmp);
#else
/* Too many VC6 users have stale win32 API files, stub this */
return ((apr_atomic_win32_ptr_ptr_ptr_fn)InterlockedCompareExchange)(mem, with, cmp);
@@ -117,6 +133,8 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedExchange(mem, val);
#elif (_MSC_VER >= 1800)
return InterlockedExchange(mem, val);
#else
return ((apr_atomic_win32_ptr_val_fn)InterlockedExchange)(mem, val);
#endif
+9 -8
View File
@@ -1123,6 +1123,12 @@ ESL_DECLARE(esl_status_t) esl_disconnect(esl_handle_t *handle)
return ESL_FAIL;
}
if (handle->sock != ESL_SOCK_INVALID) {
closesocket(handle->sock);
handle->sock = ESL_SOCK_INVALID;
status = ESL_SUCCESS;
}
if (mutex) {
esl_mutex_lock(mutex);
}
@@ -1145,12 +1151,6 @@ ESL_DECLARE(esl_status_t) esl_disconnect(esl_handle_t *handle)
esl_event_safe_destroy(&handle->last_ievent);
esl_event_safe_destroy(&handle->info_event);
if (handle->sock != ESL_SOCK_INVALID) {
closesocket(handle->sock);
handle->sock = ESL_SOCK_INVALID;
status = ESL_SUCCESS;
}
if (mutex) {
esl_mutex_unlock(mutex);
esl_mutex_lock(mutex);
@@ -1231,8 +1231,9 @@ static esl_ssize_t handle_recv(esl_handle_t *handle, void *data, esl_size_t data
if ((activity & ESL_POLL_ERROR)) {
activity = -1;
} else if ((activity & ESL_POLL_READ)) {
activity = recv(handle->sock, data, datalen, 0);
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
if (!(activity = recv(handle->sock, data, datalen, 0))) {
activity = -1;
} else if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
activity = 0;
}
}
+1 -1
View File
@@ -308,7 +308,7 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
esl_assert(x < 1000000);
hash = esl_ci_hashfunc_default(header_name, &hlen);
if ((!hp->hash || hash == hp->hash) && (hp->name && !strcasecmp(header_name, hp->name)) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
if ((!hp->hash || hash == hp->hash) && (hp->name && !strcasecmp(header_name, hp->name)) && (esl_strlen_zero(val) || (hp->value && !strcmp(hp->value, val)))) {
if (lp) {
lp->next = hp->next;
} else {
@@ -1397,7 +1397,6 @@ static FIO_GET_ALARMS_FUNCTION(wanpipe_get_alarms)
* on at application startup, until that is fixed we check the link status here too */
ftdm_channel_command(ftdmchan, FTDM_COMMAND_GET_LINK_STATUS, &sangoma_status);
ftdmchan->alarm_flags = sangoma_status == FTDM_HW_LINK_DISCONNECTED ? FTDM_ALARM_RED : FTDM_ALARM_NONE;
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Link status is %d\n", sangoma_status);
}
}
+2
View File
@@ -40,6 +40,7 @@
#include "hpOutput.h"
#include "syntFilter.h"
#if (defined(WIN32) || defined(_WIN32)) && (_MSC_VER < 1800)
#if (defined(WIN32) || defined(_WIN32)) && !defined(_WIN64)
__inline long int rint(double dbl)
{
@@ -63,6 +64,7 @@
#endif
}
#endif
#endif
/*----------------------------------------------------------------*
* Initiation of decoder instance.
+2
View File
@@ -158,6 +158,7 @@
}
#elif defined(_WIN64)
#if (_MSC_VER < 1800)
__inline long int lrint(double x)
{
return (long int) (x);
@@ -166,6 +167,7 @@
{
return (long int) (x);
}
#endif
#elif (defined (__MWERKS__) && defined (macintosh))
/* This MacOS 9 solution was provided by Stephane Letz */
+1 -1
View File
@@ -1 +1 @@
Fri Oct 25 23:51:29 CDT 2013
Wed Nov 27 10:20:13 CST 2013
@@ -270,8 +270,10 @@ void nua_session_usage_remove(nua_handle_t *nh,
ss->ss_reporting = 0;
}
if (cr == du->du_cr && cr->cr_orq)
if (cr == du->du_cr && cr->cr_orq) {
nua_client_request_unref(cr);
continue;
}
if (cr->cr_status < 200) {
nua_stack_event(nh->nh_nua, nh,
@@ -1808,8 +1808,10 @@ static int parse_ul(sdp_parser_t *p, char **r,
}
#if !HAVE_STRTOULL
#if !((defined(WIN32) || defined(_WIN32)) && (_MSC_VER >= 1800))
unsigned long long strtoull(char const *string, char **return_end, int base);
#endif
#endif
/*
* parse_ull: parse an unsigned long long
+6 -1
View File
@@ -73,7 +73,10 @@ static char cvtIn[] = {
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35};
#if !((defined(WIN32) || defined(_WIN32)) && (_MSC_VER >= 1800))
/**Convert an ASCII string into an unsigned long long integer.
*
* @param[in] string String of ASCII digits, possibly preceded by white
@@ -284,3 +287,5 @@ strtoull(const char *string, char **endPtr, int base)
return (unsigned longlong)-1;
}
#endif
@@ -60,8 +60,10 @@
#include <sofia-sip/su_string.h>
#ifndef HAVE_STRTOULL
#if !((defined(WIN32) || defined(_WIN32)) && (_MSC_VER >= 1800))
unsigned longlong strtoull(const char *, char **, int);
#endif
#endif
/**@defgroup su_tag Tag Item Lists
*
+92
View File
@@ -87,6 +87,98 @@
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
<step dir="T" type="POSTAMBLE"/>
</test>
<test name="V17-12000-V29-9600">
<!-- Tester calls, trying to provoke a crash seen in some versions of spandsp, when
an initial renegotiation to lower speed occurs for an ECM FAX -->
<step type="CALL"/>
<!--<step dir="T" type="CNG"/>-->
<step dir="R" type="CED"/>
<step dir="R" type="HDLC" modem="V.21" tag="DIS" value="FF C8 01 ..." timeout="60000"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 54 1F 20"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.17/12000" value="2250"/>
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 60 1F 20"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.29/9600" value="1800"/>
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.29/9600"/>
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" frame_size="64" min_bits="141"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="PPS-NULL" value="FF C8 7D 00 00 00 08"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.29/9600"/>
<step dir="T" type="PP" value="etsi_300_242_a4_stairstep.tif" frame_size="64"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="PPS-MPS" value="FF C8 7D 72 00 80 08"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
<step dir="R" type="HDLC" modem="V.21" tag="RNR" value="FF C8 37"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="RR" value="FF C8 76"/>
<step dir="T" type="POSTAMBLE"/>
</possible-step>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.29/9600"/>
<step dir="T" type="PP" value="etsi_300_242_a4_white.tif" frame_size="64"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="PPS-EOP" value="FF C8 7D 74 80 00 10"/>
<step dir="T" type="POSTAMBLE"/>
<possible-step>
<step dir="R" type="HDLC" modem="V.21" tag="RNR" value="FF C8 37"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="RR" value="FF C8 76"/>
<step dir="T" type="POSTAMBLE"/>
</possible-step>
<step dir="R" type="HDLC" modem="V.21" tag="MCF" value="FF C8 31"/>
<step dir="R" type="SILENCE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
+1 -1
View File
@@ -423,7 +423,7 @@
<step dir="T" type="HDLC" tag="DCS" value="FF C8 41 00 50 00"/>
<step dir="T" type="POSTAMBLE"/>
<step type="WAIT" value="75"/>
<step dir="T" type="TCF" modem="V.27ter/4800" value="900" pattern="7"/> <!-- 01010 for 50 bits, and then zero for the test of the TCF -->
<step dir="T" type="TCF" modem="V.27ter/4800" value="900" pattern="7"/> <!-- 01010 for 50 bits, and then zero for the rest of the TCF -->
<step dir="R" type="HDLC" modem="V.21" tag="CFR" value="FF C8 21"/>
<step dir="R" type="SILENCE"/>
+9 -2
View File
@@ -77,6 +77,10 @@
#include "spandsp/v27ter_rx.h"
#include "spandsp/v17tx.h"
#include "spandsp/v17rx.h"
#if defined(SPANDSP_SUPPORT_V34)
#include "spandsp/bitstream.h"
#include "spandsp/v34.h"
#endif
#include "spandsp/timezone.h"
#include "spandsp/t4_rx.h"
#include "spandsp/t4_tx.h"
@@ -103,6 +107,10 @@
#include "spandsp/private/fsk.h"
#include "spandsp/private/modem_connect_tones.h"
#include "spandsp/private/v8.h"
#if defined(SPANDSP_SUPPORT_V34)
#include "spandsp/private/bitstream.h"
#include "spandsp/private/v34.h"
#endif
#include "spandsp/private/v17tx.h"
#include "spandsp/private/v17rx.h"
#include "spandsp/private/v27ter_tx.h"
@@ -248,8 +256,7 @@ static void fax_set_rx_type(void *user_data, int type, int bit_rate, int short_t
return;
t->current_rx_type = type;
t->rx_bit_rate = bit_rate;
if (use_hdlc)
hdlc_rx_init(&t->hdlc_rx, false, true, HDLC_FRAMING_OK_THRESHOLD, t30_hdlc_accept, &s->t30);
hdlc_rx_init(&t->hdlc_rx, false, true, HDLC_FRAMING_OK_THRESHOLD, fax_modems_hdlc_accept, t);
switch (type)
{
+40 -7
View File
@@ -5,7 +5,7 @@
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2003, 2005, 2006, 2008 Steve Underwood
* Copyright (C) 2003, 2005, 2006, 2008, 2013 Steve Underwood
*
* All rights reserved.
*
@@ -139,19 +139,26 @@ SPAN_DECLARE(const char *) fax_modem_to_str(int modem)
return "V.27ter Rx";
case FAX_MODEM_V29_RX:
return "V.29 Rx";
#if defined(SPANDSP_SUPPORT_V34)
case FAX_MODEM_V34_TX:
return "V.34 HDX Tx";
case FAX_MODEM_V34_RX:
return "V.34 HDX Rx";
#endif
}
/*endswitch*/
return "???";
}
/*- End of function --------------------------------------------------------*/
static void fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
//static void fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
SPAN_DECLARE(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
{
fax_modems_state_t *s;
s = (fax_modems_state_t *) user_data;
if (ok)
s->rx_frame_received = false;
if (len >= 0 && ok)
s->rx_frame_received = true;
if (s->hdlc_accept)
s->hdlc_accept(s->hdlc_accept_user_data, msg, len, ok);
}
@@ -322,7 +329,7 @@ SPAN_DECLARE(void) fax_modems_start_slow_modem(fax_modems_state_t *s, int which)
fsk_rx_init(&s->v21_rx, &preset_fsk_specs[FSK_V21CH2], FSK_FRAME_MODE_SYNC, (put_bit_func_t) hdlc_rx_put_bit, &s->hdlc_rx);
fax_modems_set_rx_handler(s, (span_rx_handler_t) &fsk_rx, &s->v21_rx, (span_rx_fillin_handler_t) &fsk_rx_fillin, &s->v21_rx);
fsk_rx_signal_cutoff(&s->v21_rx, -39.09f);
s->rx_frame_received = false;
//hdlc_rx_init(&s->hdlc_rx, false, true, HDLC_FRAMING_OK_THRESHOLD, fax_modems_hdlc_accept, s);
break;
case FAX_MODEM_CED_TONE_RX:
modem_connect_tones_rx_init(&s->connect_rx, MODEM_CONNECT_TONES_FAX_CED, s->tone_callback, s->tone_callback_user_data);
@@ -348,6 +355,8 @@ SPAN_DECLARE(void) fax_modems_start_slow_modem(fax_modems_state_t *s, int which)
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
}
/*endswitch*/
s->rx_frame_received = false;
}
/*- End of function --------------------------------------------------------*/
@@ -365,6 +374,7 @@ SPAN_DECLARE(void) fax_modems_start_fast_modem(fax_modems_state_t *s, int which,
get_bit_user_data = (void *) &s->hdlc_tx;
put_bit = (put_bit_func_t) hdlc_rx_put_bit;
put_bit_user_data = (void *) &s->hdlc_rx;
//hdlc_rx_init(&s->hdlc_rx, false, true, HDLC_FRAMING_OK_THRESHOLD, fax_modems_hdlc_accept, s);
}
else
{
@@ -382,8 +392,6 @@ SPAN_DECLARE(void) fax_modems_start_fast_modem(fax_modems_state_t *s, int which,
s->current_rx_type = which;
s->short_train = false;
s->fast_modem = which;
if (hdlc_mode)
s->rx_frame_received = false;
switch (s->fast_modem)
{
case FAX_MODEM_V27TER_RX:
@@ -417,6 +425,18 @@ SPAN_DECLARE(void) fax_modems_start_fast_modem(fax_modems_state_t *s, int which,
fax_modems_set_tx_handler(s, (span_tx_handler_t) &v17_tx, &s->fast_modems.v17_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
#if defined(SPANDSP_SUPPORT_V34)
case FAX_MODEM_V34_RX:
v34_init(&s->fast_modems.v34, 2400, s->bit_rate, true, false, NULL, NULL, put_bit, put_bit_user_data);
//fax_modems_set_tx_handler(s, (span_tx_handler_t) &v34_rx, &s->fast_modems.v34_rx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
case FAX_MODEM_V34_TX:
v34_init(&s->fast_modems.v34, 2400, s->bit_rate, true, false, get_bit, get_bit_user_data, NULL, NULL);
//fax_modems_set_tx_handler(s, (span_tx_handler_t) &v34_tx, &s->fast_modems.v34_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
#endif
}
/*endswitch*/
}
@@ -461,10 +481,23 @@ SPAN_DECLARE(void) fax_modems_start_fast_modem(fax_modems_state_t *s, int which,
fax_modems_set_tx_handler(s, (span_tx_handler_t) &v17_tx, &s->fast_modems.v17_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
#if defined(SPANDSP_SUPPORT_V34)
case FAX_MODEM_V34_RX:
v34_restart(&s->fast_modems.v34, 2400, s->bit_rate, false);
//fax_modems_set_tx_handler(s, (span_tx_handler_t) &v34_rx, &s->fast_modems.v34_rx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
case FAX_MODEM_V34_TX:
v34_restart(&s->fast_modems.v34, 2400, s->bit_rate, false);
//fax_modems_set_tx_handler(s, (span_tx_handler_t) &v34_tx, &s->fast_modems.v34_tx);
fax_modems_set_next_tx_handler(s, (span_tx_handler_t) NULL, NULL);
break;
#endif
}
/*endswitch*/
}
/*endif*/
s->rx_frame_received = false;
}
/*- End of function --------------------------------------------------------*/
-68
View File
@@ -1,68 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "msvc\make_at_dictionary.2005.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "msvc\make_modem_filter.2005.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libspandsp.2005.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
ProjectSection(ProjectDependencies) = postProject
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {329A6FA0-0FCC-4435-A950-E670AEFA9838}
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {DEE932AB-5911-4700-9EEB-8C7090A0A330}
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp_sim", "..\spandsp-sim\libspandsp_sim.2005.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
ProjectSection(ProjectDependencies) = postProject
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {329A6FA0-0FCC-4435-A950-E670AEFA9838}
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {DEE932AB-5911-4700-9EEB-8C7090A0A330}
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libtiff.2005.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
ProjectSection(ProjectDependencies) = postProject
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "msvc\Download_TIFF.2005.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|Win32.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|Win32.Build.0 = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|Win32.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|Win32.Build.0 = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Release|Win32.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|Win32.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|Win32.Build.0 = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|Win32.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|Win32.Build.0 = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Release|Win32.ActiveCfg = All|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|Win32.ActiveCfg = Release|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|Win32.Build.0 = Release|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.ActiveCfg = Debug|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.Build.0 = Debug|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.ActiveCfg = Release|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.Build.0 = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|Win32.ActiveCfg = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|Win32.Build.0 = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.ActiveCfg = Debug|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.Build.0 = Debug|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.ActiveCfg = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.Build.0 = Release|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.All|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.All|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.Build.0 = All|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
-209
View File
@@ -1,209 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "msvc\make_at_dictionary.2008.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "msvc\make_modem_filter.2008.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libspandsp.2008.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
ProjectSection(ProjectDependencies) = postProject
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {329A6FA0-0FCC-4435-A950-E670AEFA9838}
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {DEE932AB-5911-4700-9EEB-8C7090A0A330}
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_line_models", "..\spandsp-sim\msvc\make_line_models.2008.vcproj", "{F290BADE-82DE-4037-B49D-D563E43169DA}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp_sim", "..\spandsp-sim\libspandsp_sim.2008.vcproj", "{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libtiff.2008.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
ProjectSection(ProjectDependencies) = postProject
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "msvc\Download_TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t38_core_tests", "..\tests\msvc\t38_core_tests.vcproj", "{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "t38_non_ecm_buffer_tests", "..\tests\msvc\t38_non_ecm_buffer_tests.vcproj", "{80A3D9D9-3846-4DA5-8676-F940D725EA62}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_int_tests", "..\tests\msvc\vector_int_tests.vcproj", "{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_float_tests", "..\tests\msvc\vector_float_tests.vcproj", "{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_tests", "..\tests\msvc\complex_tests.vcproj", "{A349379F-0FEA-49C8-9535-05F39663337B}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_vector_float_tests", "..\tests\msvc\complex_vector_float_tests.vcproj", "{2B0D705C-1CF2-401C-BFBC-A43FB806908C}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complex_vector_int_tests", "..\tests\msvc\complex_vector_int_tests.vcproj", "{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}"
ProjectSection(ProjectDependencies) = postProject
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
All|x64 = All|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|Win32.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|Win32.Build.0 = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|x64.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|Win32.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|Win32.Build.0 = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|x64.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Release|Win32.ActiveCfg = All|Win32
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Release|x64.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|Win32.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|Win32.Build.0 = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|x64.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|Win32.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|Win32.Build.0 = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|x64.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Release|Win32.ActiveCfg = All|Win32
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Release|x64.ActiveCfg = All|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|Win32.ActiveCfg = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|x64.ActiveCfg = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|x64.Build.0 = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.ActiveCfg = Debug|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.Build.0 = Debug|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|x64.ActiveCfg = Debug|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|x64.Build.0 = Debug|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.ActiveCfg = Release|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.Build.0 = Release|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.ActiveCfg = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.Build.0 = Release|x64
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.All|Win32.ActiveCfg = Release|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.All|Win32.Build.0 = Release|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.All|x64.ActiveCfg = Release|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.Debug|Win32.ActiveCfg = Debug|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.Debug|Win32.Build.0 = Debug|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.Debug|x64.ActiveCfg = Debug|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.Release|Win32.ActiveCfg = Release|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.Release|Win32.Build.0 = Release|Win32
{502F1E51-F0A0-4607-AB7F-05BAB530AAE1}.Release|x64.ActiveCfg = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|Win32.ActiveCfg = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|x64.ActiveCfg = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|x64.Build.0 = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.ActiveCfg = Debug|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.Build.0 = Debug|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.ActiveCfg = Debug|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.Build.0 = Debug|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.ActiveCfg = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.Build.0 = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.ActiveCfg = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.Build.0 = Release|x64
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.All|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.All|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.All|x64.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Debug|x64.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.ActiveCfg = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|Win32.Build.0 = All|Win32
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}.Release|x64.ActiveCfg = All|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|Win32.ActiveCfg = Release|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|Win32.Build.0 = Release|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.All|x64.ActiveCfg = Release|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|Win32.ActiveCfg = Debug|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|Win32.Build.0 = Debug|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Debug|x64.ActiveCfg = Debug|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|Win32.ActiveCfg = Release|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|Win32.Build.0 = Release|Win32
{A34A9D0E-A7E2-4A04-B044-7BB2FE709EF3}.Release|x64.ActiveCfg = Release|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|Win32.ActiveCfg = Release|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|Win32.Build.0 = Release|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.All|x64.ActiveCfg = Release|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|Win32.ActiveCfg = Debug|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|Win32.Build.0 = Debug|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.Debug|x64.ActiveCfg = Debug|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|Win32.ActiveCfg = Release|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|Win32.Build.0 = Release|Win32
{80A3D9D9-3846-4DA5-8676-F940D725EA62}.Release|x64.ActiveCfg = Release|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|Win32.ActiveCfg = Release|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|Win32.Build.0 = Release|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.All|x64.ActiveCfg = Release|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|Win32.ActiveCfg = Debug|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|Win32.Build.0 = Debug|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Debug|x64.ActiveCfg = Debug|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|Win32.ActiveCfg = Release|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|Win32.Build.0 = Release|Win32
{80A60464-29E8-4EE8-BAFA-8708B7C08CC3}.Release|x64.ActiveCfg = Release|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|Win32.ActiveCfg = Release|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|Win32.Build.0 = Release|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.All|x64.ActiveCfg = Release|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|Win32.ActiveCfg = Debug|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|Win32.Build.0 = Debug|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Debug|x64.ActiveCfg = Debug|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|Win32.ActiveCfg = Release|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|Win32.Build.0 = Release|Win32
{EA745FF7-9E4B-4C13-BA19-2EE8165A6245}.Release|x64.ActiveCfg = Release|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.All|Win32.ActiveCfg = Release|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.All|Win32.Build.0 = Release|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.All|x64.ActiveCfg = Release|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.Debug|Win32.ActiveCfg = Debug|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.Debug|Win32.Build.0 = Debug|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.Debug|x64.ActiveCfg = Debug|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.Release|Win32.ActiveCfg = Release|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.Release|Win32.Build.0 = Release|Win32
{A349379F-0FEA-49C8-9535-05F39663337B}.Release|x64.ActiveCfg = Release|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|Win32.ActiveCfg = Release|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|Win32.Build.0 = Release|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.All|x64.ActiveCfg = Release|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|Win32.ActiveCfg = Debug|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|Win32.Build.0 = Debug|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Debug|x64.ActiveCfg = Debug|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|Win32.ActiveCfg = Release|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|Win32.Build.0 = Release|Win32
{2B0D705C-1CF2-401C-BFBC-A43FB806908C}.Release|x64.ActiveCfg = Release|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|Win32.ActiveCfg = Release|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|Win32.Build.0 = Release|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.All|x64.ActiveCfg = Release|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|Win32.ActiveCfg = Debug|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|Win32.Build.0 = Debug|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Debug|x64.ActiveCfg = Debug|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|Win32.ActiveCfg = Release|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|Win32.Build.0 = Release|Win32
{C2E8B4D1-A398-4D57-94F8-B61F20C7D514}.Release|x64.ActiveCfg = Release|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.All|Win32.ActiveCfg = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.All|Win32.Build.0 = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.All|x64.ActiveCfg = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.Debug|Win32.ActiveCfg = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.Debug|Win32.Build.0 = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.Debug|x64.ActiveCfg = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.Release|Win32.ActiveCfg = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.Release|Win32.Build.0 = All|Win32
{F290BADE-82DE-4037-B49D-D563E43169DA}.Release|x64.ActiveCfg = All|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
+2
View File
@@ -74,7 +74,9 @@
#define _MMX_H_
#if !((defined(WIN32) || defined(_WIN32)) && (_MSC_VER >= 1800))
#define cbrtf(value) pow((float)value, (float).333)
#endif
#include <malloc.h> // To get alloca
+4
View File
@@ -247,6 +247,7 @@ extern "C"
* Therefore implement inline versions of these functions here.
*/
#if (_MSC_VER < 1800)
__inline long int lrint(double x)
{
long int i;
@@ -288,6 +289,7 @@ extern "C"
frndint
}
}
#endif
__inline long int lfastrint(double x)
{
@@ -317,6 +319,7 @@ extern "C"
/* x86_64 machines will do best with a simple assignment. */
#include <intrin.h>
#if (_MSC_VER < 1800)
__inline long int lrint(double x)
{
return (long int)_mm_cvtsd_si64x( _mm_loadu_pd ((const double*)&x) );
@@ -326,6 +329,7 @@ extern "C"
{
return _mm_cvt_ss2si( _mm_load_ss((const float*)&x) );
}
#endif
__inline long int lfastrint(double x)
{
+2
View File
@@ -59,6 +59,8 @@ extern "C"
{
#endif
SPAN_DECLARE(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
/*! Convert a FAX modem type to a short text description.
\brief Convert a FAX modem type to a short text description.
\param modem The modem code.
+8
View File
@@ -75,6 +75,10 @@
#include "spandsp/v27ter_rx.h"
#include "spandsp/v17tx.h"
#include "spandsp/v17rx.h"
#if defined(SPANDSP_SUPPORT_V34)
#include "spandsp/bitstream.h"
#include "spandsp/v34.h"
#endif
#include "spandsp/super_tone_rx.h"
#include "spandsp/modem_connect_tones.h"
#include "spandsp/timezone.h"
@@ -100,6 +104,10 @@
#include "spandsp/private/silence_gen.h"
#include "spandsp/private/power_meter.h"
#include "spandsp/private/fsk.h"
#if defined(SPANDSP_SUPPORT_V34)
#include "spandsp/private/bitstream.h"
#include "spandsp/private/v34.h"
#endif
#include "spandsp/private/v17tx.h"
#include "spandsp/private/v17rx.h"
#include "spandsp/private/v27ter_tx.h"
+1 -1
View File
@@ -28,7 +28,7 @@ run_tsb85_test()
fi
}
for TEST in PPS-MPS-lost-PPS
for TEST in PPS-MPS-lost-PPS V17-12000-V29-9600
do
run_tsb85_test
done
+1 -1
View File
@@ -142,7 +142,7 @@
<ClCompile Include="..\..\celt-0.10.0\libcelt\vq.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Download CELT.vcxproj">
<ProjectReference Include="..\Download CELT.2012.vcxproj">
<Project>{fff82f9b-6a2b-4be3-95d8-dc5a4fc71e19}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
+1
View File
@@ -1304,6 +1304,7 @@ SWITCH_DECLARE(switch_status_t) switch_mcast_join(switch_socket_t *sock, switch_
SWITCH_DECLARE(switch_status_t) switch_mcast_hops(switch_socket_t *sock, uint8_t ttl);
SWITCH_DECLARE(switch_status_t) switch_mcast_loopback(switch_socket_t *sock, uint8_t opt);
SWITCH_DECLARE(switch_status_t) switch_mcast_interface(switch_socket_t *sock, switch_sockaddr_t *iface);
/** @} */
+1 -1
View File
@@ -96,7 +96,7 @@ typedef struct icand_s {
uint8_t ready;
} icand_t;
#define MAX_CAND 25
#define MAX_CAND 50
typedef struct ice_s {
icand_t cands[MAX_CAND][2];
+3
View File
@@ -668,6 +668,8 @@ typedef enum {
SWITCH_RTP_FLAG_KILL_JB,
SWITCH_RTP_FLAG_VIDEO_BREAK,
SWITCH_RTP_FLAG_PAUSE,
SWITCH_RTP_FLAG_FIR,
SWITCH_RTP_FLAG_PLI,
SWITCH_RTP_FLAG_INVALID
} switch_rtp_flag_t;
@@ -1360,6 +1362,7 @@ typedef enum {
CF_VIDEO_ECHO,
CF_SLA_INTERCEPT,
CF_VIDEO_BREAK,
CF_MEDIA_PAUSE,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX
+2
View File
@@ -539,6 +539,8 @@ static void avmd_process(avmd_session_t *session, switch_frame_t *frame)
/*! If variance is less than threshold then we have detection */
if(v < VARIANCE_THRESHOLD){
switch_channel_execute_on(switch_core_session_get_channel(session->session), "execute_on_avmd_beep");
/*! Throw an event to FreeSWITCH */
status = switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, AVMD_EVENT_BEEP);
if(status != SWITCH_STATUS_SUCCESS) {
@@ -1249,13 +1249,74 @@ end:
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t load_tier(const char *queue, const char *agent, const char *level, const char *position)
{
/* Hack to check if an tier already exist */
if (cc_tier_update("unknown", "unknown", queue, agent) == CC_STATUS_TIER_NOT_FOUND) {
if (level && position) {
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), atoi(level), atoi(position));
} else {
/* default to level 1 and position 1 within the level */
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), 0, 0);
}
} else {
if (level) {
cc_tier_update("level", level, queue, agent);
}
if (position) {
cc_tier_update("position", position, queue, agent);
}
}
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t load_tiers(switch_bool_t load_all, const char *queue_name, const char *agent_name)
{
switch_xml_t x_tiers, x_tier, cfg, xml;
switch_status_t result = SWITCH_STATUS_FALSE;
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
return SWITCH_STATUS_FALSE;
}
if (!(x_tiers = switch_xml_child(cfg, "tiers"))) {
goto end;
}
/* Importing from XML config Agent Tiers */
for (x_tier = switch_xml_child(x_tiers, "tier"); x_tier; x_tier = x_tier->next) {
const char *agent = switch_xml_attr(x_tier, "agent");
const char *queue = switch_xml_attr(x_tier, "queue");
const char *level = switch_xml_attr(x_tier, "level");
const char *position = switch_xml_attr(x_tier, "position");
if (load_all == SWITCH_TRUE) {
result = load_tier(queue, agent, level, position);
} else if (!zstr(agent_name) && !zstr(queue_name) && !strcasecmp(agent, agent_name) && !strcasecmp(queue, queue_name)) {
result = load_tier(queue, agent, level, position);
} else if (zstr(agent_name) && !strcasecmp(queue, queue_name)) {
result = load_tier(queue, agent, level, position);
} else if (zstr(queue_name) && !strcasecmp(agent, agent_name)) {
result = load_tier(queue, agent, level, position);
}
}
end:
if (xml) {
switch_xml_free(xml);
}
return result;
}
static switch_status_t load_config(void)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_xml_t cfg, xml, settings, param, x_queues, x_queue, x_agents, x_agent, x_tiers, x_tier;
switch_xml_t cfg, xml, settings, param, x_queues, x_queue, x_agents, x_agent;
switch_cache_db_handle_t *dbh = NULL;
char *sql = NULL;
if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
status = SWITCH_STATUS_TERM;
@@ -1323,32 +1384,7 @@ static switch_status_t load_config(void)
}
/* Importing from XML config Agent Tiers */
if ((x_tiers = switch_xml_child(cfg, "tiers"))) {
for (x_tier = switch_xml_child(x_tiers, "tier"); x_tier; x_tier = x_tier->next) {
const char *agent = switch_xml_attr(x_tier, "agent");
const char *queue_name = switch_xml_attr(x_tier, "queue");
const char *level = switch_xml_attr(x_tier, "level");
const char *position = switch_xml_attr(x_tier, "position");
if (agent && queue_name) {
/* Hack to check if an tier already exist */
if (cc_tier_update("unknown", "unknown", queue_name, agent) == CC_STATUS_TIER_NOT_FOUND) {
if (level && position) {
cc_tier_add(queue_name, agent, cc_tier_state2str(CC_TIER_STATE_READY), atoi(level), atoi(position));
} else {
/* default to level 1 and position 1 within the level */
cc_tier_add(queue_name, agent, cc_tier_state2str(CC_TIER_STATE_READY), 0, 0);
}
} else {
if (level) {
cc_tier_update("level", level, queue_name, agent);
}
if (position) {
cc_tier_update("position", position, queue_name, agent);
}
}
}
}
}
load_tiers(SWITCH_TRUE, NULL, NULL);
end:
switch_mutex_unlock(globals.mutex);
@@ -1584,7 +1620,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
if (atoi(res) == 0) {
goto done;
}
switch_core_session_hupall_matching_var("cc_member_pre_answer_uuid", h->member_uuid, SWITCH_CAUSE_ORIGINATOR_CANCEL);
switch_core_session_hupall_matching_var("cc_member_pre_answer_uuid", h->member_uuid, SWITCH_CAUSE_LOSE_RACE);
}
t_agent_answered = local_epoch_time_now(NULL);
@@ -2736,6 +2772,7 @@ static int list_result_callback(void *pArg, int argc, char **argv, char **column
#define CC_CONFIG_API_SYNTAX "callcenter_config <target> <args>,\n"\
"\tcallcenter_config agent add [name] [type] | \n" \
"\tcallcenter_config agent del [name] | \n" \
"\tcallcenter_config agent reload [name] | \n" \
"\tcallcenter_config agent set status [agent_name] [status] | \n" \
"\tcallcenter_config agent set state [agent_name] [state] | \n" \
"\tcallcenter_config agent set contact [agent_name] [contact] | \n" \
@@ -2752,6 +2789,7 @@ static int list_result_callback(void *pArg, int argc, char **argv, char **column
"\tcallcenter_config tier set level [queue_name] [agent_name] [level] | \n" \
"\tcallcenter_config tier set position [queue_name] [agent_name] [position] | \n" \
"\tcallcenter_config tier del [queue_name] [agent_name] | \n" \
"\tcallcenter_config tier reload [queue_name] [agent_name] | \n" \
"\tcallcenter_config tier list | \n" \
"\tcallcenter_config queue load [queue_name] | \n" \
"\tcallcenter_config queue unload [queue_name] | \n" \
@@ -2837,6 +2875,22 @@ SWITCH_STANDARD_API(cc_config_api_function)
}
}
} else if (action && !strcasecmp(action, "reload")) {
if (argc-initial_argc < 1) {
stream->write_function(stream, "%s", "-ERR Invalid!\n");
goto done;
} else {
const char *agent = argv[0 + initial_argc];
switch (load_agent(agent)) {
case SWITCH_STATUS_SUCCESS:
stream->write_function(stream, "%s", "+OK\n");
break;
default:
stream->write_function(stream, "%s", "-ERR Unknown Error!\n");
goto done;
}
}
} else if (action && !strcasecmp(action, "set")) {
if (argc-initial_argc < 3) {
stream->write_function(stream, "%s", "-ERR Invalid!\n");
@@ -3002,6 +3056,28 @@ SWITCH_STANDARD_API(cc_config_api_function)
}
}
} else if (action && !strcasecmp(action, "reload")) {
if (argc-initial_argc < 1) {
stream->write_function(stream, "%s", "-ERR Invalid!\n");
goto done;
} else {
const char *queue = argv[0 + initial_argc];
const char *agent = argv[1 + initial_argc];
switch_bool_t load_all = SWITCH_FALSE;
if (!strcasecmp(queue, "all")) {
load_all = SWITCH_TRUE;
}
switch (load_tiers(load_all, queue, agent)) {
case SWITCH_STATUS_SUCCESS:
stream->write_function(stream, "%s", "+OK\n");
break;
default:
stream->write_function(stream, "%s", "-ERR Unknown Error!\n");
goto done;
}
}
} else if (action && !strcasecmp(action, "list")) {
struct list_result cbt;
cbt.row_process = 0;
@@ -3194,6 +3270,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_callcenter_load)
switch_console_set_complete("add callcenter_config agent add");
switch_console_set_complete("add callcenter_config agent del");
switch_console_set_complete("add callcenter_config agent reload");
switch_console_set_complete("add callcenter_config agent set status");
switch_console_set_complete("add callcenter_config agent set state");
switch_console_set_complete("add callcenter_config agent set uuid");
@@ -3207,6 +3284,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_callcenter_load)
switch_console_set_complete("add callcenter_config tier add");
switch_console_set_complete("add callcenter_config tier del");
switch_console_set_complete("add callcenter_config tier reload");
switch_console_set_complete("add callcenter_config tier set state");
switch_console_set_complete("add callcenter_config tier set level");
switch_console_set_complete("add callcenter_config tier set position");
@@ -1946,6 +1946,16 @@ SWITCH_STANDARD_API(cond_function)
}
}
if (strspn(a, "!<>=")) {
expr = a;
}
if (expr == a) {
a = "";
}
while (*expr == ' ') expr++;
while(expr && *expr) {
switch(*expr) {
case '!':
@@ -273,6 +273,7 @@ typedef struct conference_file_node {
uint32_t leadin;
struct conference_file_node *next;
char *file;
switch_bool_t mux;
} conference_file_node_t;
typedef enum {
@@ -540,7 +541,7 @@ static void launch_conference_video_thread(conference_obj_t *conference);
static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *obj);
static switch_status_t conference_local_play_file(conference_obj_t *conference, switch_core_session_t *session, char *path, uint32_t leadin, void *buf,
uint32_t buflen);
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin);
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin, switch_bool_t mux);
static switch_status_t conference_member_say(conference_member_t *member, char *text, uint32_t leadin);
static uint32_t conference_member_stop_file(conference_member_t *member, file_stop_t stop);
static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_core_session_t *session, switch_memory_pool_t *pool);
@@ -3160,7 +3161,7 @@ static void conference_loop_fn_energy_up(conference_member_t *member, caller_con
switch_snprintf(str, sizeof(str), "%d", abs(member->energy_level) / 200);
for (p = str; p && *p; p++) {
switch_snprintf(msg, sizeof(msg), "digits/%c.wav", *p);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
@@ -3192,7 +3193,7 @@ static void conference_loop_fn_energy_equ_conf(conference_member_t *member, call
switch_snprintf(str, sizeof(str), "%d", abs(member->energy_level) / 200);
for (p = str; p && *p; p++) {
switch_snprintf(msg, sizeof(msg), "digits/%c.wav", *p);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
}
@@ -3224,7 +3225,7 @@ static void conference_loop_fn_energy_dn(conference_member_t *member, caller_con
switch_snprintf(str, sizeof(str), "%d", abs(member->energy_level) / 200);
for (p = str; p && *p; p++) {
switch_snprintf(msg, sizeof(msg), "digits/%c.wav", *p);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
}
@@ -3253,11 +3254,11 @@ static void conference_loop_fn_volume_talk_up(conference_member_t *member, calle
if (member->volume_out_level < 0) {
switch_snprintf(msg, sizeof(msg), "currency/negative.wav", member->volume_out_level);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
switch_snprintf(msg, sizeof(msg), "digits/%d.wav", abs(member->volume_out_level));
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
@@ -3285,11 +3286,11 @@ static void conference_loop_fn_volume_talk_zero(conference_member_t *member, cal
if (member->volume_out_level < 0) {
switch_snprintf(msg, sizeof(msg), "currency/negative.wav", member->volume_out_level);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
switch_snprintf(msg, sizeof(msg), "digits/%d.wav", abs(member->volume_out_level));
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
static void conference_loop_fn_volume_talk_dn(conference_member_t *member, caller_control_action_t *action)
@@ -3316,11 +3317,11 @@ static void conference_loop_fn_volume_talk_dn(conference_member_t *member, calle
if (member->volume_out_level < 0) {
switch_snprintf(msg, sizeof(msg), "currency/negative.wav", member->volume_out_level);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
switch_snprintf(msg, sizeof(msg), "digits/%d.wav", abs(member->volume_out_level));
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
static void conference_loop_fn_volume_listen_up(conference_member_t *member, caller_control_action_t *action)
@@ -3347,11 +3348,11 @@ static void conference_loop_fn_volume_listen_up(conference_member_t *member, cal
if (member->volume_in_level < 0) {
switch_snprintf(msg, sizeof(msg), "currency/negative.wav", member->volume_in_level);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
switch_snprintf(msg, sizeof(msg), "digits/%d.wav", abs(member->volume_in_level));
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
@@ -3378,11 +3379,11 @@ static void conference_loop_fn_volume_listen_zero(conference_member_t *member, c
if (member->volume_in_level < 0) {
switch_snprintf(msg, sizeof(msg), "currency/negative.wav", member->volume_in_level);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
switch_snprintf(msg, sizeof(msg), "digits/%d.wav", abs(member->volume_in_level));
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
@@ -3410,11 +3411,11 @@ static void conference_loop_fn_volume_listen_dn(conference_member_t *member, cal
if (member->volume_in_level < 0) {
switch_snprintf(msg, sizeof(msg), "currency/negative.wav", member->volume_in_level);
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
switch_snprintf(msg, sizeof(msg), "digits/%d.wav", abs(member->volume_in_level));
conference_member_play_file(member, msg, 0);
conference_member_play_file(member, msg, 0, SWITCH_TRUE);
}
static void conference_loop_fn_event(conference_member_t *member, caller_control_action_t *action)
@@ -3650,6 +3651,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
switch_set_flag_locked(member, MFLAG_ACK_VIDEO);
switch_channel_clear_flag(channel, CF_VIDEO_ECHO);
switch_core_session_refresh_video(member->session);
conference_set_video_floor_holder(member->conference, member, SWITCH_FALSE);
}
/* if we have caller digits, feed them to the parser to find an action */
@@ -3999,9 +4001,13 @@ static void member_add_file_data(conference_member_t *member, int16_t *data, swi
}
for (i = 0; i < file_sample_len; i++) {
sample = data[i] + file_frame[i];
switch_normalize_to_16bit(sample);
data[i] = sample;
if (member->fnode->mux) {
sample = data[i] + file_frame[i];
switch_normalize_to_16bit(sample);
data[i] = sample;
} else {
data[i] = file_frame[i];
}
}
}
@@ -4161,7 +4167,7 @@ static void conference_loop_output(conference_member_t *member)
goto end;
}
conference_member_play_file(member, "tone_stream://%(500,0,640)", 0);
conference_member_play_file(member, "tone_stream://%(500,0,640)", 0, SWITCH_TRUE);
}
if (!switch_test_flag(member->conference, CFLAG_ANSWERED)) {
@@ -4323,7 +4329,7 @@ static void conference_loop_output(conference_member_t *member)
if (switch_test_flag(member, MFLAG_INDICATE_MUTE)) {
if (!zstr(member->conference->muted_sound)) {
conference_member_play_file(member, member->conference->muted_sound, 0);
conference_member_play_file(member, member->conference->muted_sound, 0, SWITCH_TRUE);
} else {
char msg[512];
@@ -4335,7 +4341,7 @@ static void conference_loop_output(conference_member_t *member)
if (switch_test_flag(member, MFLAG_INDICATE_MUTE_DETECT)) {
if (!zstr(member->conference->mute_detect_sound)) {
conference_member_play_file(member, member->conference->mute_detect_sound, 0);
conference_member_play_file(member, member->conference->mute_detect_sound, 0, SWITCH_TRUE);
} else {
char msg[512];
@@ -4347,7 +4353,7 @@ static void conference_loop_output(conference_member_t *member)
if (switch_test_flag(member, MFLAG_INDICATE_UNMUTE)) {
if (!zstr(member->conference->unmuted_sound)) {
conference_member_play_file(member, member->conference->unmuted_sound, 0);
conference_member_play_file(member, member->conference->unmuted_sound, 0, SWITCH_TRUE);
} else {
char msg[512];
@@ -4849,7 +4855,7 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char *
}
/* Play a file in the conference room to a member */
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin)
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin, switch_bool_t mux)
{
switch_status_t status = SWITCH_STATUS_FALSE;
char *dfile = NULL, *expanded = NULL;
@@ -4896,6 +4902,8 @@ static switch_status_t conference_member_play_file(conference_member_t *member,
}
fnode->type = NODE_TYPE_FILE;
fnode->leadin = leadin;
fnode->mux = mux;
/* Open the file */
fnode->fh.pre_buffer_datalen = SWITCH_DEFAULT_FILE_BUFFER_LEN;
if (switch_core_file_open(&fnode->fh,
@@ -6233,12 +6241,17 @@ static switch_status_t conf_api_sub_play(conference_obj_t *conference, switch_st
stream->write_function(stream, "(play) File: %s not found.\n", argv[2] ? argv[2] : "(unspecified)");
}
ret_status = SWITCH_STATUS_SUCCESS;
} else if (argc == 4) {
} else if (argc >= 4) {
uint32_t id = atoi(argv[3]);
conference_member_t *member;
switch_bool_t mux = SWITCH_TRUE;
if (argc > 4 && !strcasecmp(argv[4], "nomux")) {
mux = SWITCH_FALSE;
}
if ((member = conference_member_get(conference, id))) {
if (conference_member_play_file(member, argv[2], 0) == SWITCH_STATUS_SUCCESS) {
if (conference_member_play_file(member, argv[2], 0, mux) == SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "(play) Playing file %s to member %u\n", argv[2], id);
if (test_eflag(conference, EFLAG_PLAY_FILE_MEMBER) &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
@@ -7039,7 +7052,7 @@ static api_command_t conf_api_sub_commands[] = {
{"energy", (void_fn_t) & conf_api_sub_energy, CONF_API_SUB_MEMBER_TARGET, "energy", "<member_id|all|last|non_moderator> [<newval>]"},
{"volume_in", (void_fn_t) & conf_api_sub_volume_in, CONF_API_SUB_MEMBER_TARGET, "volume_in", "<member_id|all|last|non_moderator> [<newval>]"},
{"volume_out", (void_fn_t) & conf_api_sub_volume_out, CONF_API_SUB_MEMBER_TARGET, "volume_out", "<member_id|all|last|non_moderator> [<newval>]"},
{"play", (void_fn_t) & conf_api_sub_play, CONF_API_SUB_ARGS_SPLIT, "play", "<file_path> [async|<member_id>]"},
{"play", (void_fn_t) & conf_api_sub_play, CONF_API_SUB_ARGS_SPLIT, "play", "<file_path> [async|<member_id> [nomux]]"},
{"pause_play", (void_fn_t) & conf_api_sub_pause_play, CONF_API_SUB_ARGS_SPLIT, "pause", ""},
{"file_seek", (void_fn_t) & conf_api_sub_file_seek, CONF_API_SUB_ARGS_SPLIT, "file_seek", "[+-]<val>"},
{"say", (void_fn_t) & conf_api_sub_say, CONF_API_SUB_ARGS_AS_ONE, "say", "<text>"},
+318 -49
View File
@@ -35,6 +35,45 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_esf_load);
SWITCH_MODULE_DEFINITION(mod_esf, mod_esf_load, NULL, NULL);
#ifdef _MSC_VER
#pragma pack(push, r1, 1)
#else
#pragma pack(1)
#endif
struct polycom_packet {
switch_byte_t op;
switch_byte_t channel;
uint32_t serno;
uint8_t cid_len;
unsigned char cid[13];
};
typedef struct polycom_packet polycom_packet_t;
typedef struct {
switch_byte_t codec;
switch_byte_t flags;
uint32_t seq;
} polycom_audio_header_t;
typedef struct polycom_alert_packet {
polycom_packet_t header;
polycom_audio_header_t audio_header;
uint8_t data[];
} polycom_alert_packet_t;
#ifdef _MSC_VER
#pragma pack(pop, r1)
#else
#pragma pack()
#endif
struct ls_control_packet {
uint32_t unique_id;
uint32_t command;
@@ -52,35 +91,82 @@ typedef enum {
typedef enum {
SEND_TYPE_UNKNOWN = 0,
SEND_TYPE_RTP = 1,
SEND_TYPE_RAW = 2,
SEND_TYPE_NOMEDIA = 3
SEND_TYPE_NOMEDIA = 2
} ls_how_t;
static uint32_t SERNO = 0;
switch_mutex_t *MUTEX = NULL;
uint32_t get_serno(void)
{
uint32_t r = 0;
switch_mutex_lock(MUTEX);
r = SERNO;
switch_mutex_unlock(MUTEX);
return r;
}
void inc_serno(void)
{
switch_mutex_lock(MUTEX);
SERNO++;
switch_mutex_unlock(MUTEX);
}
void dec_serno(void)
{
switch_mutex_lock(MUTEX);
SERNO--;
switch_mutex_unlock(MUTEX);
}
SWITCH_STANDARD_APP(bcast_function)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_socket_t *socket;
switch_sockaddr_t *audio_addr = NULL, *control_packet_addr;
switch_socket_t *socket, *polycom_socket = NULL;
switch_sockaddr_t *audio_addr = NULL, *control_packet_addr = NULL, *polycom_addr = NULL, *local_addr = NULL;
switch_frame_t *read_frame = NULL;
switch_status_t status;
switch_size_t bytes;
ls_control_packet_t control_packet;
unsigned char polycom_buf[1024] = { 0 };
unsigned char last_polycom_buf[1024] = { 0 };
uint32_t last_polycom_len = 0;
polycom_packet_t *polycom_packet = (polycom_packet_t *) polycom_buf;
polycom_alert_packet_t *alert_packet = (polycom_alert_packet_t *) polycom_buf;
switch_codec_t codec = { 0 };
switch_codec_t write_codec = { 0 };
switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID] = {0};
const char *err;
switch_rtp_t *rtp_session = NULL;
switch_port_t rtp_port;
char guess_ip[25];
switch_port_t rtp_port = 0;
ls_how_t ready = SEND_TYPE_UNKNOWN;
//int argc;
char *mydata, *argv[5];
char *mcast_ip = "224.168.168.168";
switch_port_t mcast_port = 34567;
switch_port_t mcast_control_port = 6061;
char *mcast_port_str = "34567";
const char *esf_broadcast_ip = NULL, *var;
char *polycom_ip = "224.0.1.116";
const char *source_ip = NULL;
switch_port_t polycom_port = 5001;
const char *var;
switch_codec_implementation_t read_impl = { 0 };
int mcast_ttl = 1;
const char *caller_id_name = NULL;
int x = 0;
uint32_t seq = 0;
const char *codec_name = "PCMU";
int read_rate = 8000;
int need_transcode = 0;
inc_serno();
switch_core_session_get_read_impl(session, &read_impl);
@@ -115,6 +201,9 @@ SWITCH_STANDARD_APP(bcast_function)
}
}
switch_channel_set_variable_printf(channel, "multicast_ttl", "%d", mcast_ttl);
if (switch_true(switch_channel_get_variable(channel, SWITCH_BYPASS_MEDIA_VARIABLE))) {
switch_core_session_message_t msg = { 0 };
@@ -132,13 +221,27 @@ SWITCH_STANDARD_APP(bcast_function)
switch_channel_answer(channel);
}
if (!(source_ip = switch_channel_get_variable(channel, "esf_multicast_bind_ip"))) {
if (!(source_ip = switch_channel_get_variable(channel, "local_ip_v4"))) {
source_ip = "127.0.0.1";
}
}
/* everyone */
if (switch_sockaddr_info_get(&local_addr, source_ip, SWITCH_UNSPEC,
0, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "address Error\n");
goto fail;
}
if (switch_socket_create(&socket, AF_INET, SOCK_DGRAM, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 1\n");
goto fail;
}
if (switch_mcast_hops(socket, (uint8_t) mcast_ttl) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Mutlicast TTL set failed\n");
if (switch_socket_opt_set(socket, SWITCH_SO_REUSEADDR, 1) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Option Error\n");
goto fail;
}
@@ -148,29 +251,121 @@ SWITCH_STANDARD_APP(bcast_function)
goto fail;
}
if (switch_socket_bind(socket, local_addr) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket bind Error\n");
goto fail;
}
if (switch_mcast_interface(socket, local_addr) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket interface Error\n");
goto fail;
}
if (switch_mcast_join(socket, control_packet_addr, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Multicast Error\n");
goto fail;
}
if (switch_mcast_hops(socket, (uint8_t) mcast_ttl) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Mutlicast TTL set failed\n");
goto fail;
}
/* polycom */
if (switch_sockaddr_info_get(&polycom_addr, polycom_ip, SWITCH_UNSPEC,
polycom_port, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 3\n");
goto fail;
}
if (switch_socket_create(&polycom_socket, AF_INET, SOCK_DGRAM, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 1\n");
goto fail;
}
if (switch_socket_opt_set(polycom_socket, SWITCH_SO_REUSEADDR, 1) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Option Error\n");
goto fail;
}
if (switch_socket_bind(polycom_socket, local_addr) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket bind Error\n");
goto fail;
}
if (switch_mcast_interface(polycom_socket, local_addr) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket interface Error\n");
goto fail;
}
if (switch_mcast_join(polycom_socket, polycom_addr, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Multicast Error\n");
goto fail;
}
if (switch_mcast_hops(polycom_socket, (uint8_t) mcast_ttl) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Mutlicast TTL set failed\n");
goto fail;
}
while (!ready) {
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (read_frame && switch_test_flag(read_frame, SFF_CNG)) {
continue;
}
if (!SWITCH_READ_ACCEPTABLE(status) || !read_frame) {
goto fail;
}
if (read_frame->packet && read_frame->packetlen && read_impl.ianacode == 0) {
ready = SEND_TYPE_RAW;
} else {
ready = SEND_TYPE_RTP;
if (switch_test_flag(read_frame, SFF_CNG)) {
continue;
}
ready = SEND_TYPE_RTP;
}
alert_packet->audio_header.codec = 0x00;
alert_packet->audio_header.flags = 0;
if ((var = switch_channel_get_variable(channel, "esf_multicast_write_codec"))) {
if (!strcasecmp(var, "PCMU")) {
codec_name = var;
} else if (!strcasecmp(var, "G722")) {
codec_name = var;
read_rate = 16000;
alert_packet->audio_header.codec = 0x09;
}
}
if (ready == SEND_TYPE_RTP) {
if (read_impl.ianacode != 0) {
if (strcasecmp(read_impl.iananame, codec_name)) {
need_transcode = 1;
if (switch_core_codec_init(&codec,
"L16",
NULL,
read_rate,
20,
1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
NULL, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
switch_core_session_set_read_codec(session, &codec);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Codec Activation Success\n");
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Codec Activation Fail\n");
goto fail;
}
if (switch_core_codec_init(&write_codec,
codec_name,
NULL,
8000,
20,
1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
@@ -182,39 +377,28 @@ SWITCH_STANDARD_APP(bcast_function)
goto fail;
}
}
if ((var = switch_channel_get_variable(channel, "esf_broadcast_ip"))) {
esf_broadcast_ip = switch_core_session_strdup(session, var);
} else {
switch_find_local_ip(guess_ip, sizeof(guess_ip), NULL, AF_INET);
esf_broadcast_ip = guess_ip;
}
if (!(rtp_port = switch_rtp_request_port(esf_broadcast_ip))) {
if (!(rtp_port = switch_rtp_request_port(source_ip))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "RTP Port Error\n");
goto fail;
}
rtp_session = switch_rtp_new(esf_broadcast_ip,
rtp_session = switch_rtp_new(source_ip,
rtp_port,
mcast_ip,
mcast_port,
0,
alert_packet->audio_header.codec,
160,
20000, flags, "soft", &err, switch_core_session_get_pool(session));
if (!switch_rtp_ready(rtp_session)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "RTP Error\n");
goto fail;
}
} else if (ready == SEND_TYPE_NOMEDIA) {
switch_yield(10000);
} else if (ready == SEND_TYPE_RAW) {
if (switch_sockaddr_info_get(&audio_addr, mcast_ip, SWITCH_UNSPEC, mcast_port, 0, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Socket Error 2\n");
goto fail;
}
}
control_packet.unique_id = htonl((u_long) switch_epoch_time_now(NULL));
@@ -227,6 +411,38 @@ SWITCH_STANDARD_APP(bcast_function)
bytes = 16;
switch_socket_sendto(socket, control_packet_addr, 0, (void *) &control_packet, &bytes);
if (!(caller_id_name = switch_channel_get_variable(channel, "caller_id_name"))) {
caller_id_name = "FreeSWITCH";
}
strncpy((char *)polycom_packet->cid, caller_id_name, sizeof(polycom_packet->cid));
polycom_packet->cid_len = 13;
polycom_packet->op = 0x0F;
polycom_packet->channel = 0x1a;
polycom_packet->serno = htonl(get_serno());
if ((var = switch_channel_get_variable(channel, "esf_multicast_channel"))) {
int channel_no = atoi(var);
if (channel_no > 0 && channel_no < 255) {
polycom_packet->channel = (uint8_t) channel_no;
}
}
for (x = 0; x < 32; x++) {
bytes = sizeof(polycom_packet_t);
switch_socket_sendto(socket, polycom_addr, 0, (void *) polycom_packet, &bytes);
//switch_yield(30000);
}
polycom_packet->op = 0x10;
if ((var = switch_channel_get_variable(channel, "esf_multicast_alert_sound"))) {
switch_ivr_displace_session(session, var, 0, "mr");
}
while (switch_channel_ready(channel)) {
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
@@ -234,26 +450,57 @@ SWITCH_STANDARD_APP(bcast_function)
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
if (switch_test_flag(read_frame, SFF_CNG)) {
continue;
}
if (ready == SEND_TYPE_RTP) {
short *dbuf;
unsigned char *ebuf;
uint32_t i;
unsigned char encoded_data[4192];
dbuf = read_frame->data;
ebuf = encoded_data;
for (i = 0; i < read_frame->datalen / sizeof(short); i++) {
ebuf[i] = linear_to_ulaw(dbuf[i]);
if (ready == SEND_TYPE_RTP) {
unsigned char *ebuf;
unsigned char encoded_data[4192];
uint32_t encoded_datalen = sizeof(encoded_data);
if (need_transcode) {
uint32_t rate = codec.implementation->actual_samples_per_second;
uint32_t flag = 0;
ebuf = encoded_data;
switch_core_codec_encode(&write_codec,
&codec,
read_frame->data,
read_frame->datalen,
read_impl.actual_samples_per_second,
ebuf, &encoded_datalen, &rate, &flag);
read_frame->data = encoded_data;
read_frame->datalen = encoded_datalen;
} else {
ebuf = read_frame->data;
encoded_datalen = read_frame->datalen;
}
read_frame->data = encoded_data;
read_frame->datalen = read_frame->datalen / 2;
switch_rtp_write_frame(rtp_session, read_frame);
read_frame->data = dbuf;
read_frame->datalen = read_frame->datalen * 2;
seq += 160;
alert_packet->audio_header.seq = htonl(seq);
if (last_polycom_len) {
memcpy(alert_packet->data, last_polycom_buf, last_polycom_len);
memcpy(alert_packet->data + last_polycom_len, ebuf, encoded_datalen);
} else {
memcpy(alert_packet->data, ebuf, encoded_datalen);
}
bytes = sizeof(*alert_packet) + encoded_datalen + last_polycom_len;
switch_socket_sendto(socket, polycom_addr, 0, (void *) polycom_buf, &bytes);
last_polycom_len = encoded_datalen;
memcpy((void *)last_polycom_buf, (void *)ebuf, last_polycom_len);
} else {
bytes = read_frame->packetlen;
switch_socket_sendto(socket, audio_addr, 0, read_frame->packet, &bytes);
@@ -267,6 +514,16 @@ SWITCH_STANDARD_APP(bcast_function)
bytes = 8;
switch_socket_sendto(socket, control_packet_addr, 0, (void *) &control_packet, &bytes);
polycom_packet->op = 0xFF;
//switch_yield(50000);
for (x = 0; x < 12; x++) {
bytes = sizeof(*polycom_packet);
switch_socket_sendto(socket, polycom_addr, 0, (void *) polycom_packet, &bytes);
//switch_yield(30000);
}
fail:
switch_core_session_set_read_codec(session, NULL);
@@ -281,6 +538,16 @@ SWITCH_STANDARD_APP(bcast_function)
if (socket) {
switch_socket_close(socket);
}
if (polycom_socket) {
switch_socket_close(polycom_socket);
}
if (rtp_port) {
switch_rtp_release_port(source_ip, rtp_port);
}
dec_serno();
return;
}
@@ -289,6 +556,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_esf_load)
{
switch_application_interface_t *app_interface;
switch_mutex_init(&MUTEX, SWITCH_MUTEX_NESTED, pool);
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
SWITCH_ADD_APP(app_interface, "esf_page_group", NULL, NULL, bcast_function, NULL, SAF_NONE);
+38
View File
@@ -2244,6 +2244,10 @@ static void dec_use_count(switch_core_session_t *session, const char *type)
if (type) {
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
uint64_t hold_usec = 0, tt_usec = 0;
switch_caller_profile_t *originator_cp = NULL;
originator_cp = switch_channel_get_caller_profile(channel);
switch_channel_event_set_data(channel, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", MANUAL_QUEUE_NAME);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "channel-consumer-stop");
@@ -2252,6 +2256,18 @@ static void dec_use_count(switch_core_session_t *session, const char *type)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Outbound-ID", outbound_id);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Use-Count", "%d", fifo_get_use_count(outbound_id));
}
hold_usec = originator_cp->times->hold_accum;
tt_usec = (switch_micro_time_now() - originator_cp->times->bridged) - hold_usec;
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Bridge-Time-us", "%"SWITCH_TIME_T_FMT, originator_cp->times->bridged);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Bridge-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(originator_cp->times->bridged / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Bridge-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(originator_cp->times->bridged / 1000000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Talk-Time-us", "%"SWITCH_TIME_T_FMT, tt_usec);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Talk-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(tt_usec / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Talk-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(tt_usec / 1000000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Hold-Time-us", "%"SWITCH_TIME_T_FMT, hold_usec);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Hold-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(hold_usec / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Hold-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(hold_usec / 1000000));
switch_event_fire(&event);
}
}
@@ -3260,6 +3276,7 @@ SWITCH_STANDARD_APP(fifo_function)
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
uint64_t hold_usec = 0, tt_usec = 0;
switch_channel_event_set_data(channel, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", arg_fifo_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "channel-consumer-stop");
@@ -3268,6 +3285,18 @@ SWITCH_STANDARD_APP(fifo_function)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Outbound-ID", outbound_id);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Use-Count", "%d", fifo_get_use_count(outbound_id));
}
hold_usec = originator_cp->times->hold_accum;
tt_usec = (switch_micro_time_now() - originator_cp->times->bridged) - hold_usec;
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Bridge-Time-us", "%"SWITCH_TIME_T_FMT, originator_cp->times->bridged);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Bridge-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(originator_cp->times->bridged / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Bridge-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(originator_cp->times->bridged / 1000000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Talk-Time-us", "%"SWITCH_TIME_T_FMT, tt_usec);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Talk-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(tt_usec / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Talk-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(tt_usec / 1000000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Hold-Time-us", "%"SWITCH_TIME_T_FMT, hold_usec);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Hold-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(hold_usec / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Consumer-Hold-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(hold_usec / 1000000));
switch_event_fire(&event);
}
@@ -3286,9 +3315,18 @@ SWITCH_STANDARD_APP(fifo_function)
switch_event_fire(&event);
}
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, FIFO_EVENT) == SWITCH_STATUS_SUCCESS) {
uint64_t hold_usec = 0, tt_usec = 0;
switch_channel_event_set_data(other_channel, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Name", argv[0]);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "FIFO-Action", "bridge-caller-stop");
hold_usec = originatee_cp->times->hold_accum;
tt_usec = (switch_micro_time_now() - originatee_cp->times->bridged) - hold_usec;
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-Talk-Time-us", "%"SWITCH_TIME_T_FMT, tt_usec);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-Talk-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(tt_usec / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-Talk-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(tt_usec / 1000000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-Hold-Time-us", "%"SWITCH_TIME_T_FMT, hold_usec);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-Hold-Time-ms", "%"SWITCH_TIME_T_FMT, (uint64_t)(hold_usec / 1000));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FIFO-Caller-Hold-Time-s", "%"SWITCH_TIME_T_FMT, (uint64_t)(hold_usec / 1000000));
switch_event_fire(&event);
}
@@ -1473,7 +1473,6 @@ static switch_status_t httapi_sync(client_t *client)
if (!put_file) {
switch_curl_process_form_post_params(client->params, curl_handle, &formpost);
get_style_method = 1;
}
if (formpost) {
+2 -2
View File
@@ -170,8 +170,8 @@ int udptl_rx_packet(udptl_state_t *s, const uint8_t buf[], int len)
int count;
int total_count;
int seq_no;
const uint8_t *msg;
const uint8_t *data;
const uint8_t *msg = NULL;
const uint8_t *data = NULL;
int msg_len;
int repaired[16];
const uint8_t *bufs[16] = {0};
@@ -1724,7 +1724,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
switch_event_create(&my_params, SWITCH_EVENT_REQUEST_PARAMS);
switch_assert(my_params);
status = switch_xml_locate_user_merged("id", vm_cc, cbt->domain, NULL, &x_user, my_params);
status = switch_xml_locate_user_merged("id:number-alias", vm_cc, cbt->domain, NULL, &x_user, my_params);
switch_event_destroy(&my_params);
if (status != SWITCH_STATUS_SUCCESS) {
@@ -2440,7 +2440,7 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "destination_number", caller_profile->destination_number);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "caller_id_number", caller_id_number);
if (switch_xml_locate_user_merged("id", myid, domain_name, switch_channel_get_variable(channel, "network_addr"),
if (switch_xml_locate_user_merged("id:number-alias", myid, domain_name, switch_channel_get_variable(channel, "network_addr"),
&x_user, params) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", myid, domain_name);
ok = 0;
@@ -3388,7 +3388,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
switch_assert(locate_params);
switch_event_add_header_string(locate_params, SWITCH_STACK_BOTTOM, "action", "voicemail-lookup");
if (switch_xml_locate_user_merged("id", id, domain_name, switch_channel_get_variable(channel, "network_addr"),
if (switch_xml_locate_user_merged("id:number-alias", id, domain_name, switch_channel_get_variable(channel, "network_addr"),
&x_user, locate_params) == SWITCH_STATUS_SUCCESS) {
id = switch_core_session_strdup(session, switch_xml_attr(x_user, "id"));
@@ -5689,7 +5689,7 @@ SWITCH_STANDARD_API(vm_fsdb_auth_login_function)
}
switch_event_create(&params, SWITCH_EVENT_GENERAL);
if (switch_xml_locate_user_merged("id", id, domain, NULL, &x_user, params) != SWITCH_STATUS_SUCCESS) {
if (switch_xml_locate_user_merged("id:number-alias", id, domain, NULL, &x_user, params) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Can't find user [%s@%s]\n", id, domain);
stream->write_function(stream, "-ERR User not found\n");
} else {
+1 -1
View File
@@ -1031,7 +1031,7 @@ switch_status_t FSConnection::receive_message(switch_core_session_message_t *msg
{
PTRACE(2, "mod_opal\tRequesting switch to T.38");
PSafePtr<OpalConnection> other = GetOtherPartyConnection();
if (other != NULL && other->SwitchT38(true))
if (other != NULL && other->SwitchFaxMediaStreams(true))
switch_channel_set_flag(m_fsChannel, CF_REQ_MEDIA);
else {
PTRACE(1, "mod_opal\tMode change request to T.38 failed");
+9 -8
View File
@@ -32,13 +32,17 @@
#endif
#include <ptlib.h>
#include <opal/manager.h>
#if !defined(PTLIB_CHECK_VERSION)
#error PTLib is too old to use, must be >= 2.10.6
#ifndef OPAL_CHECK_VERSION
#define OPAL_CHECK_VERSION(a,b,c) 0
#endif
#include <opal/manager.h>
#include <opal/localep.h>
#if !OPAL_CHECK_VERSION(3,12,8)
#error OPAL is too old to use, must be >= 2.12.8
#endif
#include <ep/localep.h>
#include <h323/h323ep.h>
#include <iax2/iax2ep.h>
@@ -53,11 +57,8 @@
#define MODNAME "mod_opal"
#ifndef OPAL_CHECK_VERSION
#define OPAL_CHECK_VERSION(a,b,c) 0
#endif
#define HAVE_T38 OPAL_T38_CAPABILITY
#define HAVE_T38 (OPAL_CHECK_VERSION(3,11,2) && OPAL_T38_CAPABILITY)
class FSEndPoint;
+6 -6
View File
@@ -1245,19 +1245,19 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
case SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ:
{
const char *pl = "<media_control><vc_primitive><to_encoder><picture_fast_update/></to_encoder></vc_primitive></media_control>";
time_t now = switch_epoch_time_now(NULL);
const char *pl = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<media_control>\n<vc_primitive>\n<to_encoder>\n<picture_fast_update>\n</picture_fast_update>\n</to_encoder>\n</vc_primitive>\n</media_control>";
//time_t now = switch_epoch_time_now(NULL);
if (!tech_pvt->last_vid_info || (now - tech_pvt->last_vid_info) > 5) {
tech_pvt->last_vid_info = now;
//if (!tech_pvt->last_vid_info || (now - tech_pvt->last_vid_info) > 5) {
// tech_pvt->last_vid_info = now;
if (!zstr(msg->string_arg)) {
pl = msg->string_arg;
}
nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("application/media_control+xml"), SIPTAG_PAYLOAD_STR(pl), TAG_END());
}
//}
}
break;
+1 -1
View File
@@ -6478,7 +6478,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
switch_channel_set_flag(tech_pvt->channel, CF_REINVITE);
if (tech_pvt->mparams.num_codecs) {
match = sofia_media_negotiate_sdp(session, r_sdp, SDP_TYPE_REQUEST);
match = sofia_media_negotiate_sdp(session, r_sdp, SDP_TYPE_RESPONSE);
}
if (match) {
if (switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0) != SWITCH_STATUS_SUCCESS) {
+5 -2
View File
@@ -3770,11 +3770,14 @@ void sofia_presence_handle_sip_i_subscribe(int status,
if (sub_state == nua_substate_active) {
sstr = switch_mprintf("active;expires=%ld", exp_delta);
sql = switch_mprintf("update sip_subscriptions "
"set expires=%ld "
"set expires=%ld, "
"network_ip='%q',network_port='%d',sip_user='%q',sip_host='%q',full_via='%q',full_to='%q',full_from='%q',contact='%q' "
"where call_id='%q' and profile_name='%q' and hostname='%q'",
(long) switch_epoch_time_now(NULL) + exp_delta,
np.network_ip, np.network_port, from_user, from_host, full_via, full_to, full_from, contact_str,
call_id, profile->name, mod_sofia_globals.hostname);
if (mod_sofia_globals.debug_presence > 0 || mod_sofia_globals.debug_sla > 0) {
+8 -2
View File
@@ -3936,10 +3936,15 @@ static int presence_api(char *cmd, switch_stream_handle_t *stream)
SWITCH_STANDARD_API(rayo_api)
{
struct rayo_cmd_alias *alias;
char *cmd_dup = strdup(cmd);
char *cmd_dup = NULL;
char *argv[2] = { 0 };
int success = 0;
if (zstr(cmd) ) {
goto done;
}
cmd_dup = strdup(cmd);
switch_separate_string(cmd_dup, ' ', argv, sizeof(argv) / sizeof(argv[0]));
/* check if a command alias */
@@ -3957,11 +3962,12 @@ SWITCH_STANDARD_API(rayo_api)
success = presence_api(argv[1], stream);
}
done:
if (!success) {
stream->write_function(stream, "-ERR: USAGE %s\n", RAYO_API_SYNTAX);
}
free(cmd_dup);
switch_safe_free(cmd_dup);
return SWITCH_STATUS_SUCCESS;
}
+709 -14
View File
@@ -6967,6 +6967,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_node_t_hup_profile_get(void *
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_node_t_direction_set(void * jarg1, int jarg2) {
switch_device_node_t *arg1 = (switch_device_node_t *) 0 ;
switch_call_direction_t arg2 ;
arg1 = (switch_device_node_t *)jarg1;
arg2 = (switch_call_direction_t)jarg2;
if (arg1) (arg1)->direction = arg2;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_device_node_t_direction_get(void * jarg1) {
int jresult ;
switch_device_node_t *arg1 = (switch_device_node_t *) 0 ;
switch_call_direction_t result;
arg1 = (switch_device_node_t *)jarg1;
result = (switch_call_direction_t) ((arg1)->direction);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_node_t_parent_set(void * jarg1, void * jarg2) {
switch_device_node_t *arg1 = (switch_device_node_t *) 0 ;
switch_device_record_s *arg2 = (switch_device_record_s *) 0 ;
@@ -7055,6 +7078,52 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_total_get(void
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_total_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->total_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_total_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->total_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_total_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->total_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_total_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->total_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_offhook_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
@@ -7078,6 +7147,52 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_offhook_get(vo
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_offhook_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->offhook_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_offhook_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->offhook_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_offhook_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->offhook_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_offhook_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->offhook_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_active_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
@@ -7101,6 +7216,52 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_active_get(voi
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_active_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->active_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_active_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->active_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_active_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->active_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_active_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->active_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_held_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
@@ -7124,6 +7285,52 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_held_get(void
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_held_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->held_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_held_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->held_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_held_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->held_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_held_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->held_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_hup_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
@@ -7147,6 +7354,52 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_hup_get(void *
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_hup_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->hup_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_hup_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->hup_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_hup_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->hup_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_hup_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->hup_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_ringing_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
@@ -7170,6 +7423,52 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_ringing_get(vo
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_ringing_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->ringing_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_ringing_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->ringing_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_ringing_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->ringing_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_ringing_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->ringing_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_early_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
@@ -7193,6 +7492,75 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_early_get(void
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_early_in_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->early_in = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_early_in_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->early_in);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_early_out_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->early_out = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_early_out_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->early_out);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_stats_t_ring_wait_set(void * jarg1, unsigned long jarg2) {
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t arg2 ;
arg1 = (switch_device_stats_t *)jarg1;
arg2 = (uint32_t)jarg2;
if (arg1) (arg1)->ring_wait = arg2;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_device_stats_t_ring_wait_get(void * jarg1) {
unsigned long jresult ;
switch_device_stats_t *arg1 = (switch_device_stats_t *) 0 ;
uint32_t result;
arg1 = (switch_device_stats_t *)jarg1;
result = (uint32_t) ((arg1)->ring_wait);
jresult = (unsigned long)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_device_stats_t() {
void * jresult ;
switch_device_stats_t *result = 0 ;
@@ -7318,6 +7686,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_stats_get(void * jar
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_last_stats_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_device_stats_t *arg2 = (switch_device_stats_t *) 0 ;
arg1 = (switch_device_record_t *)jarg1;
arg2 = (switch_device_stats_t *)jarg2;
if (arg1) (arg1)->last_stats = *arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_last_stats_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_device_stats_t *result = 0 ;
arg1 = (switch_device_record_t *)jarg1;
result = (switch_device_stats_t *)& ((arg1)->last_stats);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_state_set(void * jarg1, int jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_device_state_t arg2 ;
@@ -7451,6 +7842,151 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_last_call_time_get(v
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_ring_start_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t arg2 ;
switch_time_t *argp2 ;
arg1 = (switch_device_record_t *)jarg1;
argp2 = (switch_time_t *)jarg2;
if (!argp2) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_time_t", 0);
return ;
}
arg2 = *argp2;
if (arg1) (arg1)->ring_start = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_ring_start_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t result;
arg1 = (switch_device_record_t *)jarg1;
result = ((arg1)->ring_start);
jresult = new switch_time_t((switch_time_t &)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_ring_stop_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t arg2 ;
switch_time_t *argp2 ;
arg1 = (switch_device_record_t *)jarg1;
argp2 = (switch_time_t *)jarg2;
if (!argp2) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_time_t", 0);
return ;
}
arg2 = *argp2;
if (arg1) (arg1)->ring_stop = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_ring_stop_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t result;
arg1 = (switch_device_record_t *)jarg1;
result = ((arg1)->ring_stop);
jresult = new switch_time_t((switch_time_t &)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_hold_start_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t arg2 ;
switch_time_t *argp2 ;
arg1 = (switch_device_record_t *)jarg1;
argp2 = (switch_time_t *)jarg2;
if (!argp2) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_time_t", 0);
return ;
}
arg2 = *argp2;
if (arg1) (arg1)->hold_start = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_hold_start_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t result;
arg1 = (switch_device_record_t *)jarg1;
result = ((arg1)->hold_start);
jresult = new switch_time_t((switch_time_t &)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_hold_stop_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t arg2 ;
switch_time_t *argp2 ;
arg1 = (switch_device_record_t *)jarg1;
argp2 = (switch_time_t *)jarg2;
if (!argp2) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_time_t", 0);
return ;
}
arg2 = *argp2;
if (arg1) (arg1)->hold_stop = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_hold_stop_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t result;
arg1 = (switch_device_record_t *)jarg1;
result = ((arg1)->hold_stop);
jresult = new switch_time_t((switch_time_t &)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_call_start_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t arg2 ;
switch_time_t *argp2 ;
arg1 = (switch_device_record_t *)jarg1;
argp2 = (switch_time_t *)jarg2;
if (!argp2) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_time_t", 0);
return ;
}
arg2 = *argp2;
if (arg1) (arg1)->call_start = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_call_start_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
switch_time_t result;
arg1 = (switch_device_record_t *)jarg1;
result = ((arg1)->call_start);
jresult = new switch_time_t((switch_time_t &)result);
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_uuid_list_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
device_uuid_node_s *arg2 = (device_uuid_node_s *) 0 ;
@@ -7543,6 +8079,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_pool_get(void * jarg
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_device_record_t_user_data_set(void * jarg1, void * jarg2) {
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
void *arg2 = (void *) 0 ;
arg1 = (switch_device_record_t *)jarg1;
arg2 = (void *)jarg2;
if (arg1) (arg1)->user_data = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_device_record_t_user_data_get(void * jarg1) {
void * jresult ;
switch_device_record_t *arg1 = (switch_device_record_t *) 0 ;
void *result = 0 ;
arg1 = (switch_device_record_t *)jarg1;
result = (void *) ((arg1)->user_data);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_device_record_t() {
void * jresult ;
switch_device_record_t *result = 0 ;
@@ -12579,9 +13138,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_time_set_monotonic(int jarg1) {
SWIGEXPORT void SWIGSTDCALL CSharp_switch_time_set_timerfd(int jarg1) {
switch_bool_t arg1 ;
int arg1 ;
arg1 = (switch_bool_t)jarg1;
arg1 = (int)jarg1;
switch_time_set_timerfd(arg1);
}
@@ -14059,6 +14618,14 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_ice_direction(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_session_debug_pool(void * jarg1) {
switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ;
arg1 = (switch_stream_handle_t *)jarg1;
switch_core_session_debug_pool(arg1);
}
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 ;
@@ -18098,6 +18665,29 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_caller_profile_direction_get(void * jar
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_logical_direction_set(void * jarg1, int jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
switch_call_direction_t arg2 ;
arg1 = (switch_caller_profile *)jarg1;
arg2 = (switch_call_direction_t)jarg2;
if (arg1) (arg1)->logical_direction = arg2;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_caller_profile_logical_direction_get(void * jarg1) {
int jresult ;
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
switch_call_direction_t result;
arg1 = (switch_caller_profile *)jarg1;
result = (switch_call_direction_t) ((arg1)->logical_direction);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_caller_profile_soft_set(void * jarg1, void * jarg2) {
switch_caller_profile *arg1 = (switch_caller_profile *) 0 ;
profile_node_t *arg2 = (profile_node_t *) 0 ;
@@ -19101,6 +19691,29 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_frame_user_data_get(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_frame_pmap_set(void * jarg1, void * jarg2) {
switch_frame *arg1 = (switch_frame *) 0 ;
payload_map_t *arg2 = (payload_map_t *) 0 ;
arg1 = (switch_frame *)jarg1;
arg2 = (payload_map_t *)jarg2;
if (arg1) (arg1)->pmap = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_switch_frame_pmap_get(void * jarg1) {
void * jresult ;
switch_frame *arg1 = (switch_frame *) 0 ;
payload_map_t *result = 0 ;
arg1 = (switch_frame *)jarg1;
result = (payload_map_t *) ((arg1)->pmap);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_frame() {
void * jresult ;
switch_frame *result = 0 ;
@@ -29824,6 +30437,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_direction(void * jarg1) {
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_channel_logical_direction(void * jarg1) {
int jresult ;
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_call_direction_t result;
arg1 = (switch_channel_t *)jarg1;
result = (switch_call_direction_t)switch_channel_logical_direction(arg1);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_channel_set_direction(void * jarg1, int jarg2) {
switch_channel_t *arg1 = (switch_channel_t *) 0 ;
switch_call_direction_t arg2 ;
@@ -32169,6 +32794,72 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_live_array_parse_json(void * jarg1, un
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_live_array_add_alias(void * jarg1, char * jarg2, char * jarg3) {
int jresult ;
switch_live_array_t *arg1 = (switch_live_array_t *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
switch_bool_t result;
arg1 = (switch_live_array_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
result = (switch_bool_t)switch_live_array_add_alias(arg1,(char const *)arg2,(char const *)arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_live_array_clear_alias(void * jarg1, char * jarg2, char * jarg3) {
int jresult ;
switch_live_array_t *arg1 = (switch_live_array_t *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
switch_bool_t result;
arg1 = (switch_live_array_t *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
result = (switch_bool_t)switch_live_array_clear_alias(arg1,(char const *)arg2,(char const *)arg3);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_event_channel_permission_verify(char * jarg1, char * jarg2) {
int jresult ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
switch_bool_t result;
arg1 = (char *)jarg1;
arg2 = (char *)jarg2;
result = (switch_bool_t)switch_event_channel_permission_verify((char const *)arg1,(char const *)arg2);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_event_channel_permission_modify(char * jarg1, char * jarg2, int jarg3) {
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
switch_bool_t arg3 ;
arg1 = (char *)jarg1;
arg2 = (char *)jarg2;
arg3 = (switch_bool_t)jarg3;
switch_event_channel_permission_modify((char const *)arg1,(char const *)arg2,arg3);
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_event_channel_permission_clear(char * jarg1) {
char *arg1 = (char *) 0 ;
arg1 = (char *)jarg1;
switch_event_channel_permission_clear((char const *)arg1);
}
SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RESAMPLE_QUALITY_get() {
int jresult ;
int result;
@@ -35883,7 +36574,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_MAX_CAND_get() {
int jresult ;
int result;
result = (int) 25;
result = (int) 50;
jresult = result;
return jresult;
@@ -35900,7 +36591,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ice_t_cands_set(void * jarg1, void * jarg2) {
icand_t (*inp)[2] = (icand_t (*)[2])(arg2);
icand_t (*dest)[2] = (icand_t (*)[2])(arg1->cands);
size_t ii = 0;
for (; ii < 25; ++ii) {
for (; ii < 50; ++ii) {
icand_t *ip = inp[ii];
icand_t *dp = dest[ii];
size_t jj = 0;
@@ -36923,16 +37614,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_set_telephony_recv_event(void * ja
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_set_recv_pt(void * jarg1, unsigned char jarg2) {
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
switch_payload_t arg2 ;
arg1 = (switch_rtp_t *)jarg1;
arg2 = (switch_payload_t)jarg2;
switch_rtp_set_recv_pt(arg1,arg2);
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_set_cng_pt(void * jarg1, unsigned char jarg2) {
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
switch_payload_t arg2 ;
@@ -36955,6 +37636,20 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_switch_rtp_get_private(void * jarg1) {
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_set_payload_map(void * jarg1, void * jarg2) {
int jresult ;
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
payload_map_t **arg2 = (payload_map_t **) 0 ;
switch_status_t result;
arg1 = (switch_rtp_t *)jarg1;
arg2 = (payload_map_t **)jarg2;
result = (switch_status_t)switch_rtp_set_payload_map(arg1,arg2);
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_intentional_bugs(void * jarg1, int jarg2) {
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
switch_rtp_bug_flag_t arg2 ;
+548 -12
View File
@@ -2749,8 +2749,8 @@ public class freeswitch {
freeswitchPINVOKE.switch_time_set_monotonic((int)enable);
}
public static void switch_time_set_timerfd(switch_bool_t enable) {
freeswitchPINVOKE.switch_time_set_timerfd((int)enable);
public static void switch_time_set_timerfd(int enable) {
freeswitchPINVOKE.switch_time_set_timerfd(enable);
}
public static void switch_time_set_nanosleep(switch_bool_t enable) {
@@ -3146,6 +3146,10 @@ public class freeswitch {
return ret;
}
public static void switch_core_session_debug_pool(switch_stream_handle stream) {
freeswitchPINVOKE.switch_core_session_debug_pool(switch_stream_handle.getCPtr(stream));
}
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;
@@ -4581,6 +4585,11 @@ public class freeswitch {
return ret;
}
public static switch_call_direction_t switch_channel_logical_direction(SWIGTYPE_p_switch_channel channel) {
switch_call_direction_t ret = (switch_call_direction_t)freeswitchPINVOKE.switch_channel_logical_direction(SWIGTYPE_p_switch_channel.getCPtr(channel));
return ret;
}
public static void switch_channel_set_direction(SWIGTYPE_p_switch_channel channel, switch_call_direction_t direction) {
freeswitchPINVOKE.switch_channel_set_direction(SWIGTYPE_p_switch_channel.getCPtr(channel), (int)direction);
}
@@ -5129,6 +5138,29 @@ public class freeswitch {
freeswitchPINVOKE.switch_live_array_parse_json(SWIGTYPE_p_cJSON.getCPtr(json), channel_id);
}
public static switch_bool_t switch_live_array_add_alias(SWIGTYPE_p_switch_live_array_s la, string event_channel, string name) {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_live_array_add_alias(SWIGTYPE_p_switch_live_array_s.getCPtr(la), event_channel, name);
return ret;
}
public static switch_bool_t switch_live_array_clear_alias(SWIGTYPE_p_switch_live_array_s la, string event_channel, string name) {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_live_array_clear_alias(SWIGTYPE_p_switch_live_array_s.getCPtr(la), event_channel, name);
return ret;
}
public static switch_bool_t switch_event_channel_permission_verify(string cookie, string event_channel) {
switch_bool_t ret = (switch_bool_t)freeswitchPINVOKE.switch_event_channel_permission_verify(cookie, event_channel);
return ret;
}
public static void switch_event_channel_permission_modify(string cookie, string event_channel, switch_bool_t set) {
freeswitchPINVOKE.switch_event_channel_permission_modify(cookie, event_channel, (int)set);
}
public static void switch_event_channel_permission_clear(string cookie) {
freeswitchPINVOKE.switch_event_channel_permission_clear(cookie);
}
public static switch_status_t switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t new_resampler, uint from_rate, uint to_rate, uint to_size, int quality, uint channels, string file, string func, int line) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_resample_perform_create(SWIGTYPE_p_p_switch_audio_resampler_t.getCPtr(new_resampler), from_rate, to_rate, to_size, quality, channels, file, func, line);
return ret;
@@ -6197,10 +6229,6 @@ public class freeswitch {
freeswitchPINVOKE.switch_rtp_set_telephony_recv_event(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), te);
}
public static void switch_rtp_set_recv_pt(SWIGTYPE_p_switch_rtp rtp_session, byte pt) {
freeswitchPINVOKE.switch_rtp_set_recv_pt(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), pt);
}
public static void switch_rtp_set_cng_pt(SWIGTYPE_p_switch_rtp rtp_session, byte pt) {
freeswitchPINVOKE.switch_rtp_set_cng_pt(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), pt);
}
@@ -6211,6 +6239,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_rtp_set_payload_map(SWIGTYPE_p_switch_rtp rtp_session, SWIGTYPE_p_p_payload_map_t pmap) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_set_payload_map(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), SWIGTYPE_p_p_payload_map_t.getCPtr(pmap));
return ret;
}
public static void switch_rtp_intentional_bugs(SWIGTYPE_p_switch_rtp rtp_session, switch_rtp_bug_flag_t bugs) {
freeswitchPINVOKE.switch_rtp_intentional_bugs(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), (int)bugs);
}
@@ -8903,6 +8936,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_node_t_hup_profile_get")]
public static extern IntPtr switch_device_node_t_hup_profile_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_node_t_direction_set")]
public static extern void switch_device_node_t_direction_set(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_node_t_direction_get")]
public static extern int switch_device_node_t_direction_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_node_t_parent_set")]
public static extern void switch_device_node_t_parent_set(HandleRef jarg1, HandleRef jarg2);
@@ -8927,42 +8966,132 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_total_get")]
public static extern uint switch_device_stats_t_total_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_total_in_set")]
public static extern void switch_device_stats_t_total_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_total_in_get")]
public static extern uint switch_device_stats_t_total_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_total_out_set")]
public static extern void switch_device_stats_t_total_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_total_out_get")]
public static extern uint switch_device_stats_t_total_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_offhook_set")]
public static extern void switch_device_stats_t_offhook_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_offhook_get")]
public static extern uint switch_device_stats_t_offhook_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_offhook_in_set")]
public static extern void switch_device_stats_t_offhook_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_offhook_in_get")]
public static extern uint switch_device_stats_t_offhook_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_offhook_out_set")]
public static extern void switch_device_stats_t_offhook_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_offhook_out_get")]
public static extern uint switch_device_stats_t_offhook_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_active_set")]
public static extern void switch_device_stats_t_active_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_active_get")]
public static extern uint switch_device_stats_t_active_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_active_in_set")]
public static extern void switch_device_stats_t_active_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_active_in_get")]
public static extern uint switch_device_stats_t_active_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_active_out_set")]
public static extern void switch_device_stats_t_active_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_active_out_get")]
public static extern uint switch_device_stats_t_active_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_held_set")]
public static extern void switch_device_stats_t_held_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_held_get")]
public static extern uint switch_device_stats_t_held_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_held_in_set")]
public static extern void switch_device_stats_t_held_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_held_in_get")]
public static extern uint switch_device_stats_t_held_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_held_out_set")]
public static extern void switch_device_stats_t_held_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_held_out_get")]
public static extern uint switch_device_stats_t_held_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_hup_set")]
public static extern void switch_device_stats_t_hup_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_hup_get")]
public static extern uint switch_device_stats_t_hup_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_hup_in_set")]
public static extern void switch_device_stats_t_hup_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_hup_in_get")]
public static extern uint switch_device_stats_t_hup_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_hup_out_set")]
public static extern void switch_device_stats_t_hup_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_hup_out_get")]
public static extern uint switch_device_stats_t_hup_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ringing_set")]
public static extern void switch_device_stats_t_ringing_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ringing_get")]
public static extern uint switch_device_stats_t_ringing_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ringing_in_set")]
public static extern void switch_device_stats_t_ringing_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ringing_in_get")]
public static extern uint switch_device_stats_t_ringing_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ringing_out_set")]
public static extern void switch_device_stats_t_ringing_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ringing_out_get")]
public static extern uint switch_device_stats_t_ringing_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_early_set")]
public static extern void switch_device_stats_t_early_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_early_get")]
public static extern uint switch_device_stats_t_early_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_early_in_set")]
public static extern void switch_device_stats_t_early_in_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_early_in_get")]
public static extern uint switch_device_stats_t_early_in_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_early_out_set")]
public static extern void switch_device_stats_t_early_out_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_early_out_get")]
public static extern uint switch_device_stats_t_early_out_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ring_wait_set")]
public static extern void switch_device_stats_t_ring_wait_set(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_stats_t_ring_wait_get")]
public static extern uint switch_device_stats_t_ring_wait_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_device_stats_t")]
public static extern IntPtr new_switch_device_stats_t();
@@ -8993,6 +9122,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_stats_get")]
public static extern IntPtr switch_device_record_t_stats_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_last_stats_set")]
public static extern void switch_device_record_t_last_stats_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_last_stats_get")]
public static extern IntPtr switch_device_record_t_last_stats_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_state_set")]
public static extern void switch_device_record_t_state_set(HandleRef jarg1, int jarg2);
@@ -9023,6 +9158,36 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_last_call_time_get")]
public static extern IntPtr switch_device_record_t_last_call_time_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_ring_start_set")]
public static extern void switch_device_record_t_ring_start_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_ring_start_get")]
public static extern IntPtr switch_device_record_t_ring_start_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_ring_stop_set")]
public static extern void switch_device_record_t_ring_stop_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_ring_stop_get")]
public static extern IntPtr switch_device_record_t_ring_stop_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_hold_start_set")]
public static extern void switch_device_record_t_hold_start_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_hold_start_get")]
public static extern IntPtr switch_device_record_t_hold_start_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_hold_stop_set")]
public static extern void switch_device_record_t_hold_stop_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_hold_stop_get")]
public static extern IntPtr switch_device_record_t_hold_stop_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_call_start_set")]
public static extern void switch_device_record_t_call_start_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_call_start_get")]
public static extern IntPtr switch_device_record_t_call_start_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_uuid_list_set")]
public static extern void switch_device_record_t_uuid_list_set(HandleRef jarg1, HandleRef jarg2);
@@ -9047,6 +9212,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_pool_get")]
public static extern IntPtr switch_device_record_t_pool_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_user_data_set")]
public static extern void switch_device_record_t_user_data_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_device_record_t_user_data_get")]
public static extern IntPtr switch_device_record_t_user_data_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_device_record_t")]
public static extern IntPtr new_switch_device_record_t();
@@ -10538,6 +10709,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_ice_direction")]
public static extern int switch_ice_direction(HandleRef jarg1);
[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_loadable_module_interface_module_name_set")]
public static extern void switch_loadable_module_interface_module_name_set(HandleRef jarg1, string jarg2);
@@ -11426,6 +11600,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_direction_get")]
public static extern int switch_caller_profile_direction_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_logical_direction_set")]
public static extern void switch_caller_profile_logical_direction_set(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_logical_direction_get")]
public static extern int switch_caller_profile_logical_direction_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_caller_profile_soft_set")]
public static extern void switch_caller_profile_soft_set(HandleRef jarg1, HandleRef jarg2);
@@ -11663,6 +11843,12 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_frame_user_data_get")]
public static extern IntPtr switch_frame_user_data_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_frame_pmap_set")]
public static extern void switch_frame_pmap_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_frame_pmap_get")]
public static extern IntPtr switch_frame_pmap_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_new_switch_frame")]
public static extern IntPtr new_switch_frame();
@@ -14327,6 +14513,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_direction")]
public static extern int switch_channel_direction(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_logical_direction")]
public static extern int switch_channel_logical_direction(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_channel_set_direction")]
public static extern void switch_channel_set_direction(HandleRef jarg1, int jarg2);
@@ -14849,6 +15038,21 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_live_array_parse_json")]
public static extern void switch_live_array_parse_json(HandleRef jarg1, uint jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_live_array_add_alias")]
public static extern int switch_live_array_add_alias(HandleRef jarg1, string jarg2, string jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_live_array_clear_alias")]
public static extern int switch_live_array_clear_alias(HandleRef jarg1, string jarg2, string jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_channel_permission_verify")]
public static extern int switch_event_channel_permission_verify(string jarg1, string jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_channel_permission_modify")]
public static extern void switch_event_channel_permission_modify(string jarg1, string jarg2, int jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_event_channel_permission_clear")]
public static extern void switch_event_channel_permission_clear(string jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RESAMPLE_QUALITY_get")]
public static extern int SWITCH_RESAMPLE_QUALITY_get();
@@ -15836,15 +16040,15 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_telephony_recv_event")]
public static extern void switch_rtp_set_telephony_recv_event(HandleRef jarg1, byte jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_recv_pt")]
public static extern void switch_rtp_set_recv_pt(HandleRef jarg1, byte jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_cng_pt")]
public static extern void switch_rtp_set_cng_pt(HandleRef jarg1, byte jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_get_private")]
public static extern IntPtr switch_rtp_get_private(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_set_payload_map")]
public static extern int switch_rtp_set_payload_map(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_intentional_bugs")]
public static extern void switch_rtp_intentional_bugs(HandleRef jarg1, int jarg2);
@@ -20882,6 +21086,36 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_payload_map_t {
private HandleRef swigCPtr;
internal SWIGTYPE_p_payload_map_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_payload_map_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_payload_map_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_p_char {
private HandleRef swigCPtr;
@@ -20972,6 +21206,36 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_p_payload_map_t {
private HandleRef swigCPtr;
internal SWIGTYPE_p_p_payload_map_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_p_payload_map_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_p_payload_map_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_p_p_char {
private HandleRef swigCPtr;
@@ -26140,6 +26404,16 @@ public class switch_caller_profile : IDisposable {
}
}
public switch_call_direction_t logical_direction {
set {
freeswitchPINVOKE.switch_caller_profile_logical_direction_set(swigCPtr, (int)value);
}
get {
switch_call_direction_t ret = (switch_call_direction_t)freeswitchPINVOKE.switch_caller_profile_logical_direction_get(swigCPtr);
return ret;
}
}
public profile_node_t soft {
set {
freeswitchPINVOKE.switch_caller_profile_soft_set(swigCPtr, profile_node_t.getCPtr(value));
@@ -26241,6 +26515,7 @@ public enum switch_channel_callstate_t {
CCS_EARLY,
CCS_ACTIVE,
CCS_HELD,
CCS_RING_WAIT,
CCS_HANGUP,
CCS_UNHOLD
}
@@ -26360,6 +26635,7 @@ public enum switch_channel_flag_t {
CF_CONFIRM_BLIND_TRANSFER,
CF_NO_PRESENCE,
CF_CONFERENCE,
CF_CONFERENCE_ADV,
CF_RECOVERING,
CF_RECOVERING_BRIDGE,
CF_TRACKED,
@@ -26393,6 +26669,7 @@ public enum switch_channel_flag_t {
CF_VIDEO_ECHO,
CF_SLA_INTERCEPT,
CF_VIDEO_BREAK,
CF_MEDIA_PAUSE,
CF_FLAG_MAX
}
@@ -28314,6 +28591,7 @@ public enum switch_core_session_message_types_t {
SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE,
SWITCH_MESSAGE_INDICATE_STUN_ERROR,
SWITCH_MESSAGE_INDICATE_MEDIA_RENEG,
SWITCH_MESSAGE_REFER_EVENT,
SWITCH_MESSAGE_ANSWER_EVENT,
SWITCH_MESSAGE_PROGRESS_EVENT,
SWITCH_MESSAGE_RING_EVENT,
@@ -28644,6 +28922,16 @@ public class switch_device_node_t : IDisposable {
}
}
public switch_call_direction_t direction {
set {
freeswitchPINVOKE.switch_device_node_t_direction_set(swigCPtr, (int)value);
}
get {
switch_call_direction_t ret = (switch_call_direction_t)freeswitchPINVOKE.switch_device_node_t_direction_get(swigCPtr);
return ret;
}
}
public switch_device_record_t parent {
set {
freeswitchPINVOKE.switch_device_node_t_parent_set(swigCPtr, switch_device_record_t.getCPtr(value));
@@ -28754,6 +29042,17 @@ public class switch_device_record_t : IDisposable {
}
}
public switch_device_stats_t last_stats {
set {
freeswitchPINVOKE.switch_device_record_t_last_stats_set(swigCPtr, switch_device_stats_t.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.switch_device_record_t_last_stats_get(swigCPtr);
switch_device_stats_t ret = (cPtr == IntPtr.Zero) ? null : new switch_device_stats_t(cPtr, false);
return ret;
}
}
public switch_device_state_t state {
set {
freeswitchPINVOKE.switch_device_record_t_state_set(swigCPtr, (int)value);
@@ -28810,6 +29109,66 @@ public class switch_device_record_t : IDisposable {
}
}
public SWIGTYPE_p_switch_time_t ring_start {
set {
freeswitchPINVOKE.switch_device_record_t_ring_start_set(swigCPtr, SWIGTYPE_p_switch_time_t.getCPtr(value));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
}
get {
SWIGTYPE_p_switch_time_t ret = new SWIGTYPE_p_switch_time_t(freeswitchPINVOKE.switch_device_record_t_ring_start_get(swigCPtr), true);
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public SWIGTYPE_p_switch_time_t ring_stop {
set {
freeswitchPINVOKE.switch_device_record_t_ring_stop_set(swigCPtr, SWIGTYPE_p_switch_time_t.getCPtr(value));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
}
get {
SWIGTYPE_p_switch_time_t ret = new SWIGTYPE_p_switch_time_t(freeswitchPINVOKE.switch_device_record_t_ring_stop_get(swigCPtr), true);
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public SWIGTYPE_p_switch_time_t hold_start {
set {
freeswitchPINVOKE.switch_device_record_t_hold_start_set(swigCPtr, SWIGTYPE_p_switch_time_t.getCPtr(value));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
}
get {
SWIGTYPE_p_switch_time_t ret = new SWIGTYPE_p_switch_time_t(freeswitchPINVOKE.switch_device_record_t_hold_start_get(swigCPtr), true);
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public SWIGTYPE_p_switch_time_t hold_stop {
set {
freeswitchPINVOKE.switch_device_record_t_hold_stop_set(swigCPtr, SWIGTYPE_p_switch_time_t.getCPtr(value));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
}
get {
SWIGTYPE_p_switch_time_t ret = new SWIGTYPE_p_switch_time_t(freeswitchPINVOKE.switch_device_record_t_hold_stop_get(swigCPtr), true);
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public SWIGTYPE_p_switch_time_t call_start {
set {
freeswitchPINVOKE.switch_device_record_t_call_start_set(swigCPtr, SWIGTYPE_p_switch_time_t.getCPtr(value));
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
}
get {
SWIGTYPE_p_switch_time_t ret = new SWIGTYPE_p_switch_time_t(freeswitchPINVOKE.switch_device_record_t_call_start_get(swigCPtr), true);
if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public switch_device_node_t uuid_list {
set {
freeswitchPINVOKE.switch_device_record_t_uuid_list_set(swigCPtr, switch_device_node_t.getCPtr(value));
@@ -28854,6 +29213,17 @@ public class switch_device_record_t : IDisposable {
}
}
public SWIGTYPE_p_void user_data {
set {
freeswitchPINVOKE.switch_device_record_t_user_data_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.switch_device_record_t_user_data_get(swigCPtr);
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
return ret;
}
}
public switch_device_record_t() : this(freeswitchPINVOKE.new_switch_device_record_t(), true) {
}
@@ -28931,6 +29301,26 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint total_in {
set {
freeswitchPINVOKE.switch_device_stats_t_total_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_total_in_get(swigCPtr);
return ret;
}
}
public uint total_out {
set {
freeswitchPINVOKE.switch_device_stats_t_total_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_total_out_get(swigCPtr);
return ret;
}
}
public uint offhook {
set {
freeswitchPINVOKE.switch_device_stats_t_offhook_set(swigCPtr, value);
@@ -28941,6 +29331,26 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint offhook_in {
set {
freeswitchPINVOKE.switch_device_stats_t_offhook_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_offhook_in_get(swigCPtr);
return ret;
}
}
public uint offhook_out {
set {
freeswitchPINVOKE.switch_device_stats_t_offhook_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_offhook_out_get(swigCPtr);
return ret;
}
}
public uint active {
set {
freeswitchPINVOKE.switch_device_stats_t_active_set(swigCPtr, value);
@@ -28951,6 +29361,26 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint active_in {
set {
freeswitchPINVOKE.switch_device_stats_t_active_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_active_in_get(swigCPtr);
return ret;
}
}
public uint active_out {
set {
freeswitchPINVOKE.switch_device_stats_t_active_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_active_out_get(swigCPtr);
return ret;
}
}
public uint held {
set {
freeswitchPINVOKE.switch_device_stats_t_held_set(swigCPtr, value);
@@ -28961,6 +29391,26 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint held_in {
set {
freeswitchPINVOKE.switch_device_stats_t_held_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_held_in_get(swigCPtr);
return ret;
}
}
public uint held_out {
set {
freeswitchPINVOKE.switch_device_stats_t_held_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_held_out_get(swigCPtr);
return ret;
}
}
public uint hup {
set {
freeswitchPINVOKE.switch_device_stats_t_hup_set(swigCPtr, value);
@@ -28971,6 +29421,26 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint hup_in {
set {
freeswitchPINVOKE.switch_device_stats_t_hup_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_hup_in_get(swigCPtr);
return ret;
}
}
public uint hup_out {
set {
freeswitchPINVOKE.switch_device_stats_t_hup_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_hup_out_get(swigCPtr);
return ret;
}
}
public uint ringing {
set {
freeswitchPINVOKE.switch_device_stats_t_ringing_set(swigCPtr, value);
@@ -28981,6 +29451,26 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint ringing_in {
set {
freeswitchPINVOKE.switch_device_stats_t_ringing_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_ringing_in_get(swigCPtr);
return ret;
}
}
public uint ringing_out {
set {
freeswitchPINVOKE.switch_device_stats_t_ringing_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_ringing_out_get(swigCPtr);
return ret;
}
}
public uint early {
set {
freeswitchPINVOKE.switch_device_stats_t_early_set(swigCPtr, value);
@@ -28991,6 +29481,36 @@ public class switch_device_stats_t : IDisposable {
}
}
public uint early_in {
set {
freeswitchPINVOKE.switch_device_stats_t_early_in_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_early_in_get(swigCPtr);
return ret;
}
}
public uint early_out {
set {
freeswitchPINVOKE.switch_device_stats_t_early_out_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_early_out_get(swigCPtr);
return ret;
}
}
public uint ring_wait {
set {
freeswitchPINVOKE.switch_device_stats_t_ring_wait_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_device_stats_t_ring_wait_get(swigCPtr);
return ret;
}
}
public switch_device_stats_t() : this(freeswitchPINVOKE.new_switch_device_stats_t(), true) {
}
@@ -31337,6 +31857,17 @@ public class switch_frame : IDisposable {
}
}
public SWIGTYPE_p_payload_map_t pmap {
set {
freeswitchPINVOKE.switch_frame_pmap_set(swigCPtr, SWIGTYPE_p_payload_map_t.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.switch_frame_pmap_get(swigCPtr);
SWIGTYPE_p_payload_map_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_payload_map_t(cPtr, false);
return ret;
}
}
public switch_frame() : this(freeswitchPINVOKE.new_switch_frame(), true) {
}
@@ -34147,9 +34678,11 @@ namespace FreeSWITCH.Native {
SOF_NONE = 0,
SOF_NOBLOCK = (1 << 0),
SOF_FORKED_DIAL = (1 << 1),
SOF_NO_EFFECTIVE_CID_NUM = (1 << 2),
SOF_NO_EFFECTIVE_CID_NAME = (1 << 3),
SOF_NO_LIMITS = (1 << 4)
SOF_NO_EFFECTIVE_ANI = (1 << 2),
SOF_NO_EFFECTIVE_ANIII = (1 << 3),
SOF_NO_EFFECTIVE_CID_NUM = (1 << 4),
SOF_NO_EFFECTIVE_CID_NAME = (1 << 5),
SOF_NO_LIMITS = (1 << 6)
}
}
@@ -34605,6 +35138,9 @@ public enum switch_rtp_flag_t {
SWITCH_RTP_FLAG_RTCP_MUX,
SWITCH_RTP_FLAG_KILL_JB,
SWITCH_RTP_FLAG_VIDEO_BREAK,
SWITCH_RTP_FLAG_PAUSE,
SWITCH_RTP_FLAG_FIR,
SWITCH_RTP_FLAG_PLI,
SWITCH_RTP_FLAG_INVALID
}
@@ -666,6 +666,10 @@ switch_xml_t mod_xml_radius_auth_invite(switch_event_t *params) {
switch_xml_set_attr_d(usr, "id", switch_event_get_header(params, "user"));
var = switch_xml_add_child_d(vars, "variable", param_idx++);
switch_xml_set_attr_d(var, "name", "radius_auth_result");
switch_xml_set_attr_d(var, "value", "0");
service_vp = recv;
while (service_vp != NULL) {
rc_avpair_tostr(new_handle, service_vp, name, 512, value, 512);
@@ -774,10 +778,6 @@ switch_xml_t mod_xml_radius_auth_reg(switch_event_t *params) {
switch_xml_set_attr_d(usr, "id", switch_event_get_header(params, "user"));
var = switch_xml_add_child_d(vars, "variable", param_idx++);
switch_xml_set_attr_d(var, "name", "radius_auth_result");
switch_xml_set_attr_d(var, "value", "0");
service_vp = recv;
while (service_vp != NULL) {
rc_avpair_tostr(new_handle, service_vp, name, 512, value, 512);
+6
View File
@@ -834,6 +834,12 @@ SWITCH_DECLARE(switch_status_t) switch_mcast_loopback(switch_socket_t *sock, uin
return apr_mcast_loopback(sock, opt);
}
SWITCH_DECLARE(switch_status_t) switch_mcast_interface(switch_socket_t *sock, switch_sockaddr_t *iface)
{
return apr_mcast_interface(sock, iface);
}
/* socket functions */
SWITCH_DECLARE(const char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in)
+23
View File
@@ -26,6 +26,7 @@
* Anthony Minessale II <anthm@freeswitch.org>
* Michael Jerris <mike@jerris.com>
* Paul D. Tinsley <pdt at jackhammer.org>
* Seven Du <dujinfang@gmail.com>
*
*
* switch_core_io.c -- Main Core Library (Media I/O)
@@ -45,6 +46,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
return SWITCH_STATUS_FALSE;
}
if (switch_channel_test_flag(session->channel, CF_MEDIA_PAUSE)) {
return SWITCH_STATUS_SUCCESS;
}
if (session->endpoint_interface->io_routines->write_video_frame) {
if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) {
@@ -69,6 +74,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
return SWITCH_STATUS_FALSE;
}
if (switch_channel_test_flag(session->channel, CF_MEDIA_PAUSE)) {
*frame = &runtime.dummy_cng_frame;
switch_yield(20000);
return SWITCH_STATUS_SUCCESS;
}
if (session->endpoint_interface->io_routines->read_video_frame) {
if ((status = session->endpoint_interface->io_routines->read_video_frame(session, frame, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
for (ptr = session->event_hooks.video_read_frame; ptr; ptr = ptr->next) {
@@ -165,6 +176,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
*frame = &runtime.dummy_cng_frame;
return SWITCH_STATUS_SUCCESS;
}
if (switch_channel_test_flag(session->channel, CF_MEDIA_PAUSE)) {
switch_yield(20000);
*frame = &runtime.dummy_cng_frame;
// switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Media Paused!!!!\n");
return SWITCH_STATUS_SUCCESS;
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "%s has no read codec.\n", switch_channel_get_name(session->channel));
switch_channel_hangup(session->channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
return SWITCH_STATUS_FALSE;
@@ -1033,6 +1052,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
}
}
if (switch_channel_test_flag(session->channel, CF_MEDIA_PAUSE)) {
return SWITCH_STATUS_SUCCESS;
}
if (!(session->write_codec && switch_core_codec_ready(session->write_codec)) && !pass_cng) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "%s has no write codec.\n", switch_channel_get_name(session->channel));
switch_channel_hangup(session->channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
+76 -25
View File
@@ -140,10 +140,14 @@ typedef struct switch_rtp_engine_s {
struct media_helper mh;
switch_thread_t *media_thread;
switch_mutex_t *read_mutex;
switch_mutex_t *read_mutex[2];
uint8_t reset_codec;
uint8_t codec_negotiated;
uint8_t fir;
uint8_t pli;
} switch_rtp_engine_t;
@@ -493,6 +497,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core
recv_pt = pmap->recv_pt;
fmtp = pmap->rm_fmtp;
found++;
break;
}
}
switch_mutex_unlock(smh->sdp_mutex);
@@ -531,6 +536,7 @@ SWITCH_DECLARE(payload_map_t *) switch_core_media_add_payload_map(switch_core_se
int exists = 0;
switch_media_handle_t *smh;
switch_rtp_engine_t *engine;
int local_pt = 0;
switch_assert(session);
@@ -544,9 +550,18 @@ SWITCH_DECLARE(payload_map_t *) switch_core_media_add_payload_map(switch_core_se
for (pmap = engine->payload_map; pmap && pmap->allocated; pmap = pmap->next) {
exists = (!strcasecmp(name, pmap->iananame) && (!pmap->rate || rate == pmap->rate) && (pmap->ptime || pmap->ptime == ptime));
exists = (!strcasecmp(name, pmap->iananame) && (!pmap->rate || rate == pmap->rate) && (!pmap->ptime || pmap->ptime == ptime));
if (exists) {
if (!zstr(fmtp) && !zstr(pmap->rm_fmtp)) {
if (strcmp(pmap->rm_fmtp, fmtp)) {
exists = 0;
local_pt = pmap->pt;
continue;
}
}
break;
}
}
@@ -577,15 +592,18 @@ SWITCH_DECLARE(payload_map_t *) switch_core_media_add_payload_map(switch_core_se
pmap->rate = rate;
}
if (!zstr(fmtp) && (!pmap->rm_fmtp || strcmp(pmap->rm_fmtp, fmtp))) {
if (!zstr(fmtp) && (zstr(pmap->rm_fmtp) || strcmp(pmap->rm_fmtp, fmtp))) {
pmap->rm_fmtp = switch_core_strdup(session->pool, fmtp);
}
pmap->allocated = 1;
pmap->recv_pt = (switch_payload_t)pt;
pmap->recv_pt = (switch_payload_t) pt;
if (sdp_type == SDP_TYPE_REQUEST || !exists) {
pmap->pt = (switch_payload_t)pt;
pmap->pt = (switch_payload_t) (local_pt ? local_pt : pt);
}
if (negotiated) {
@@ -1409,7 +1427,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_read_frame(switch_core_session
return SWITCH_STATUS_FALSE;
}
if (switch_mutex_trylock(engine->read_mutex) != SWITCH_STATUS_SUCCESS) {
if (engine->read_mutex[type] && switch_mutex_trylock(engine->read_mutex[type]) != SWITCH_STATUS_SUCCESS) {
/* return CNG, another thread is already reading */
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG1, "%s is already being read for %s\n",
switch_channel_get_name(session->channel), type2str(type));
@@ -1741,7 +1759,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_read_frame(switch_core_session
end:
switch_mutex_unlock(engine->read_mutex);
if (engine->read_mutex[type]) {
switch_mutex_unlock(engine->read_mutex[type]);
}
return status;
}
@@ -2315,7 +2335,7 @@ static void check_ice(switch_media_handle_t *smh, switch_media_type_t type, sdp_
argc = switch_split(data, ' ', fields);
if (argc < 5 || engine->ice_in.cand_idx >= MAX_CAND) {
if (argc < 5 || engine->ice_in.cand_idx >= MAX_CAND - 1) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(smh->session), SWITCH_LOG_WARNING, "Invalid data\n");
continue;
}
@@ -3278,7 +3298,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
pmap->rm_encoding = switch_core_session_strdup(session, (char *) mmap->rm_encoding);
pmap->iananame = switch_core_session_strdup(session, (char *) mimp->iananame);
pmap->pt = (switch_payload_t) mmap->rm_pt;
pmap->recv_pt = (switch_payload_t) mmap->rm_pt;
pmap->rm_rate = mimp->samples_per_second;
pmap->adv_rm_rate = mimp->samples_per_second;
if (strcasecmp(mimp->iananame, "g722")) {
@@ -3318,7 +3338,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
if (match) {
char tmp[50];
const char *mirror = switch_channel_get_variable(session->channel, "rtp_mirror_remote_audio_codec_payload");
//const char *mirror = switch_channel_get_variable(session->channel, "rtp_mirror_remote_audio_codec_payload");
switch_snprintf(tmp, sizeof(tmp), "%d", a_engine->cur_payload_map->remote_sdp_port);
@@ -3326,11 +3346,13 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
switch_channel_set_variable(session->channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, tmp);
#if 0
if (!switch_true(mirror) &&
switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND &&
(!switch_channel_test_flag(session->channel, CF_REINVITE) || switch_media_handle_test_media_flag(smh, SCMF_RENEG_ON_REINVITE))) {
switch_core_media_get_offered_pt(session, matches[0].imp, &a_engine->cur_payload_map->recv_pt);
}
#endif
switch_snprintf(tmp, sizeof(tmp), "%d", a_engine->cur_payload_map->recv_pt);
switch_channel_set_variable(session->channel, "rtp_audio_recv_pt", tmp);
@@ -3427,8 +3449,19 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
for (attr = m->m_attributes; attr; attr = attr->a_next) {
if (!strcasecmp(attr->a_name, "framerate") && attr->a_value) {
//framerate = atoi(attr->a_value);
}
if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value && !strcmp(attr->a_value, "1")) {
} else if (!strcasecmp(attr->a_name, "rtcp-fb")) {
if (!zstr(attr->a_value)) {
if (switch_stristr("fir", attr->a_value)) {
v_engine->fir++;
}
if (switch_stristr("pli", attr->a_value)) {
v_engine->pli++;
}
smh->mparams->rtcp_video_interval_msec = "10000";
}
} else if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value && !strcmp(attr->a_value, "1")) {
switch_channel_set_variable(session->channel, "rtp_remote_video_rtcp_port", attr->a_value);
v_engine->remote_rtcp_port = (switch_port_t)atoi(attr->a_value);
} else if (!got_video_crypto && !strcasecmp(attr->a_name, "crypto") && !zstr(attr->a_value)) {
@@ -3487,7 +3520,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
matches[m_idx].imp = imp;
matches[m_idx].map = map;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Video Codec Compare [%s:%d] is saved as a match\n",
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Video Codec Compare [%s:%d] +++ is saved as a match\n",
imp->iananame, imp->ianacode);
m_idx++;
}
@@ -3498,7 +3531,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
if (m_idx) {
char tmp[50];
const char *mirror = switch_channel_get_variable(session->channel, "rtp_mirror_remote_video_codec_payload");
//const char *mirror = switch_channel_get_variable(session->channel, "rtp_mirror_remote_video_codec_payload");
int j = 0;
if (greedy) { /* sort in favor of mine */
@@ -3518,7 +3551,6 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
matches[j].imp->samples_per_second,
matches[j].imp->microseconds_per_packet / 1000,
SWITCH_TRUE);
if (j == 0) {
v_engine->cur_payload_map = pmap;
}
@@ -3527,7 +3559,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
map = matches[j].map;
pmap->rm_encoding = switch_core_session_strdup(session, (char *) map->rm_encoding);
pmap->pt = (switch_payload_t) map->rm_pt;
pmap->recv_pt = (switch_payload_t) map->rm_pt;
pmap->rm_rate = map->rm_rate;
pmap->codec_ms = mimp->microseconds_per_packet / 1000;
@@ -3539,11 +3571,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
pmap->agreed_pt = (switch_payload_t) map->rm_pt;
pmap->recv_pt = (switch_payload_t)map->rm_pt;
#if 0
if (j == 0 && (!switch_true(mirror) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND)) {
switch_core_media_get_offered_pt(session, mimp, &pmap->recv_pt);
}
#endif
}
@@ -3822,7 +3855,7 @@ static switch_status_t start_video_thread(switch_core_session_t *session)
switch_thread_cond_create(&v_engine->mh.cond, pool);
switch_mutex_init(&v_engine->mh.cond_mutex, SWITCH_MUTEX_NESTED, pool);
switch_mutex_init(&v_engine->read_mutex, SWITCH_MUTEX_NESTED, pool);
switch_mutex_init(&v_engine->read_mutex[SWITCH_MEDIA_TYPE_VIDEO], SWITCH_MUTEX_NESTED, pool);
switch_thread_create(&v_engine->media_thread, thd_attr, video_helper_thread, &v_engine->mh, switch_core_session_get_pool(session));
return SWITCH_STATUS_SUCCESS;
@@ -4634,7 +4667,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
uint8_t inb = switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND;
const char *ssrc;
switch_mutex_init(&a_engine->read_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
switch_mutex_init(&a_engine->read_mutex[SWITCH_MEDIA_TYPE_AUDIO], SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
//switch_core_media_set_rtp_session(session, SWITCH_MEDIA_TYPE_AUDIO, a_engine->rtp_session);
@@ -5087,6 +5120,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
if (switch_rtp_ready(v_engine->rtp_session)) {
const char *ssrc;
if (v_engine->fir) {
switch_rtp_set_flag(v_engine->rtp_session, SWITCH_RTP_FLAG_FIR);
}
if (v_engine->pli) {
switch_rtp_set_flag(v_engine->rtp_session, SWITCH_RTP_FLAG_PLI);
}
switch_rtp_set_payload_map(v_engine->rtp_session, &v_engine->payload_map);
start_video_thread(session);
@@ -6311,12 +6352,12 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
if (ov_fmtp) {
pass_fmtp = ov_fmtp;
} else if (switch_true(switch_channel_get_variable_dup(session->channel, "rtp_mirror_fmtp", SWITCH_FALSE, -1))) {
} else { //if (switch_true(switch_channel_get_variable_dup(session->channel, "rtp_mirror_fmtp", SWITCH_FALSE, -1))) {
// seems to break eyebeam at least...
pass_fmtp = switch_channel_get_variable(session->channel, "rtp_video_fmtp");
}
}
if (pass_fmtp) {
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=fmtp:%d %s\n", v_engine->cur_payload_map->pt, pass_fmtp);
}
@@ -6395,6 +6436,10 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
fmtp = switch_event_get_header(map, imp->iananame);
}
if (smh->fmtps[i]) {
fmtp = smh->fmtps[i];
}
if (zstr(fmtp)) fmtp = imp->fmtp;
if (zstr(fmtp)) fmtp = (char *) pass_fmtp;
@@ -6428,6 +6473,12 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
}
}
if (v_engine->fir || v_engine->pli) {
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf),
"a=rtcp-fb:* %s%s\n", v_engine->fir ? "fir " : "", v_engine->pli ? "pli" : "");
}
//switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=ssrc:%u\n", v_engine->ssrc);
if (v_engine->ice_out.cands[0][0].ready) {
@@ -6457,11 +6508,11 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "b=AS:%d\n", bw);
}
if (vp8) {
if (vp8 && switch_channel_test_flag(session->channel, CF_WEBRTC)) {
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf),
"a=rtcp-fb:%d ccm fir\n", vp8);
}
if (red) {
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf),
"a=rtcp-fb:%d nack\n", vp8);
@@ -8250,7 +8301,7 @@ SWITCH_DECLARE (void) switch_core_media_recover_session(switch_core_session_t *s
}
if ((tmp = switch_channel_get_variable(session->channel, "rtp_video_recv_pt"))) {
v_engine->cur_payload_map->recv_pt = (switch_payload_t)atoi(tmp);;
v_engine->cur_payload_map->recv_pt = (switch_payload_t)atoi(tmp);
}
v_engine->cur_payload_map->rm_encoding = (char *) switch_channel_get_variable(session->channel, "rtp_use_video_codec_name");
+11 -2
View File
@@ -766,6 +766,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
switch_assert(session != NULL);
if (message->message_id == SWITCH_MESSAGE_INDICATE_SIGNAL_DATA) {
if (session->endpoint_interface->io_routines->receive_message) {
status = session->endpoint_interface->io_routines->receive_message(session, message);
}
switch_core_session_free_message(&message);
return status;
}
if ((status = switch_core_session_read_lock_hangup(session)) != SWITCH_STATUS_SUCCESS) {
return status;
}
@@ -821,7 +830,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
}
if (switch_channel_down_nosig(session->channel) && message->message_id != SWITCH_MESSAGE_INDICATE_SIGNAL_DATA) {
if (switch_channel_down_nosig(session->channel)) {
switch_log_printf(SWITCH_CHANNEL_ID_LOG, message->_file, message->_func, message->_line,
switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "%s skip receive message [%s] (channel is hungup already)\n",
switch_channel_get_name(session->channel), message_names[message->message_id]);
@@ -830,7 +839,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
if (session->media_handle) {
status = switch_core_media_receive_message(session, message);
}
if (status == SWITCH_STATUS_SUCCESS || message->message_id == SWITCH_MESSAGE_INDICATE_SIGNAL_DATA) {
if (status == SWITCH_STATUS_SUCCESS) {
if (session->endpoint_interface->io_routines->receive_message) {
status = session->endpoint_interface->io_routines->receive_message(session, message);
}
+3
View File
@@ -811,6 +811,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_signal_data(switch_core_ses
int i = 0;
switch_channel_t *channel = switch_core_session_get_channel(session);
if (!switch_core_session_in_thread(session)) {
return SWITCH_STATUS_FALSE;
}
if (switch_channel_test_flag(channel, CF_SIGNAL_DATA)) {
return SWITCH_STATUS_FALSE;
+8 -8
View File
@@ -976,18 +976,12 @@ static switch_status_t sb_on_dtmf(switch_core_session_t *session, const switch_d
static switch_status_t hanguphook(switch_core_session_t *session)
{
switch_core_session_message_t msg = { 0 };
switch_core_session_message_t *msg = NULL;
switch_channel_t *channel = NULL;
switch_event_t *event;
channel = switch_core_session_get_channel(session);
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
msg.from = __FILE__;
msg.string_arg = switch_channel_get_variable(channel, SWITCH_SIGNAL_BRIDGE_VARIABLE);
if (switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
switch_channel_clear_flag_recursive(channel, CF_BRIDGE_ORIGINATOR);
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_UNBRIDGE) == SWITCH_STATUS_SUCCESS) {
@@ -996,8 +990,14 @@ static switch_status_t hanguphook(switch_core_session_t *session)
}
}
msg = switch_core_session_alloc(session, sizeof(*msg));
MESSAGE_STAMP_FFL(msg);
msg->message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
msg->from = __FILE__;
msg->string_arg = switch_channel_get_variable(channel, SWITCH_SIGNAL_BRIDGE_VARIABLE);
switch_core_session_queue_message(session, msg);
switch_core_session_receive_message(session, &msg);
switch_core_event_hook_remove_state_change(session, hanguphook);
return SWITCH_STATUS_SUCCESS;
+12 -3
View File
@@ -130,6 +130,7 @@ typedef struct {
typedef enum {
IDX_XFER = -5,
IDX_KEY_CANCEL = -4,
IDX_TIMEOUT = -3,
IDX_CANCEL = -2,
@@ -3358,7 +3359,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_channel_set_flag(peer_channel, CF_LAZY_ATTENDED_TRANSFER);
switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(peer_session));
holding = NULL;
oglobals.idx = IDX_NADA;
oglobals.idx = IDX_XFER;
if (caller_channel && switch_channel_up_nosig(caller_channel) && !switch_channel_test_flag(caller_channel, CF_INTERCEPTED)) {
switch_channel_hangup(caller_channel, SWITCH_CAUSE_ATTENDED_TRANSFER);
}
@@ -3478,6 +3479,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if (switch_channel_test_flag(caller_channel, CF_PROXY_MODE)) {
status = SWITCH_STATUS_SUCCESS;
} else {
switch_channel_pass_callee_id(peer_channel, caller_channel);
status = switch_channel_pre_answer(caller_channel);
}
} else {
@@ -3667,8 +3669,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
} else if (oglobals.idx == IDX_TIMEOUT) {
*cause = SWITCH_CAUSE_NO_ANSWER;
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(oglobals.session), SWITCH_LOG_DEBUG,
"Originate Resulted in Error Cause: %d [%s]\n", *cause, switch_channel_cause2str(*cause));
if (oglobals.idx == IDX_XFER) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(oglobals.session), SWITCH_LOG_DEBUG,
"Originate Resulted in Attended Transfer Cause: %d [%s]\n", *cause, switch_channel_cause2str(*cause));
goto outer_for;
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(oglobals.session), SWITCH_LOG_DEBUG,
"Originate Resulted in Error Cause: %d [%s]\n", *cause, switch_channel_cause2str(*cause));
}
}
}
+73 -66
View File
@@ -1,4 +1,4 @@
/*
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2012, Anthony Minessale II <anthm@freeswitch.org>
*
@@ -22,7 +22,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Anthony Minessale II <anthm@freeswitch.org>
* Paul D. Tinsley <pdt at jackhammer.org>
* Neal Horman <neal at wanlink dot com>
@@ -314,12 +314,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
switch_ivr_sleep(session, pause, SWITCH_FALSE, NULL);
switch_safe_free(expanded);
switch_safe_free(substituted);
}
}
switch_regex_safe_free(re);
if ((match && do_break && switch_true(do_break)) || status == SWITCH_STATUS_BREAK) {
break;
}
@@ -438,7 +438,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
}
}
if ((vval = switch_channel_get_variable(channel, "record_fill_cng"))) {
if (!strcasecmp(vval, "true")) {
@@ -449,7 +449,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
}
}
}
if ((vval = switch_channel_get_variable(channel, "record_waste_resources"))) {
@@ -539,7 +539,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
if (sample_start > 0) {
uint32_t pos = 0;
switch_core_file_seek(fh, &pos, sample_start, SEEK_SET);
switch_clear_flag(fh, SWITCH_FILE_SEEK);
switch_clear_flag(fh, SWITCH_FILE_SEEK);
fh->samples = 0;
}
@@ -547,7 +547,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
if (switch_test_flag(fh, SWITCH_FILE_NATIVE)) {
asis = 1;
}
restart_limit_on_dtmf = switch_true(switch_channel_get_variable(channel, "record_restart_limit_on_dtmf"));
if ((p = switch_channel_get_variable(channel, "RECORD_TITLE"))) {
@@ -655,7 +655,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
if (args) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during playback
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
if (switch_channel_has_dtmf(channel)) {
@@ -675,7 +675,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
if ((status = switch_ivr_dmachine_feed(args->dmachine, ds, NULL)) != SWITCH_STATUS_SUCCESS) {
break;
}
}
}
if (args->input_callback) {
status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
@@ -693,7 +693,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
if ((ostatus = args->input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, args->buf, args->buflen)) != SWITCH_STATUS_SUCCESS) {
status = ostatus;
}
switch_event_destroy(&event);
}
}
@@ -760,7 +760,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
len = write_frame.datalen / 2;
if (switch_core_file_write(fh, write_frame.data, &len) != SWITCH_STATUS_SUCCESS) {
break;
}
}
}
if (waste_resources) {
@@ -782,22 +782,22 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
char *cmd = switch_core_session_strdup(session, var);
char *data, *expanded = NULL;
switch_stream_handle_t stream = { 0 };
SWITCH_STANDARD_STREAM(stream);
if ((data = strchr(cmd, ':'))) {
*data++ = '\0';
expanded = switch_channel_expand_variables(channel, data);
}
switch_api_execute(cmd, expanded, session, &stream);
if (expanded && expanded != data) {
free(expanded);
}
switch_safe_free(stream.data);
}
if (read_impl.actual_samples_per_second) {
@@ -916,7 +916,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_gentones(switch_core_session_t *sessi
if (args) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during gentones
dtmf handler function you can hook up to be executed when a digit is dialed during gentones
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
if (switch_channel_has_dtmf(channel)) {
@@ -931,7 +931,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_gentones(switch_core_session_t *sessi
if ((status = switch_ivr_dmachine_feed(args->dmachine, ds, NULL)) != SWITCH_STATUS_SUCCESS) {
break;
}
}
}
if (args->input_callback) {
status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
@@ -943,7 +943,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_gentones(switch_core_session_t *sessi
if (args->input_callback) {
switch_event_t *event;
if (switch_core_session_dequeue_event(session, &event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
switch_status_t ostatus = args->input_callback(session, event, SWITCH_INPUT_TYPE_EVENT, args->buf, args->buflen);
if (ostatus != SWITCH_STATUS_SUCCESS) {
@@ -985,7 +985,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_get_file_handle(switch_core_session_t
*fh = NULL;
switch_core_session_io_read_lock(session);
if ((fhp = switch_channel_get_private(channel, "__fh"))) {
*fh = fhp;
return SWITCH_STATUS_SUCCESS;
@@ -1105,12 +1105,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
fh = &lfh;
memset(fh, 0, sizeof(lfh));
}
if (fh->samples > 0) {
sample_start = fh->samples;
fh->samples = 0;
}
@@ -1122,9 +1122,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
fh->samples = sample_start = 0;
if (sleep_val_i) {
status = switch_ivr_sleep(session, sleep_val_i, SWITCH_FALSE, args);
if(status != SWITCH_STATUS_SUCCESS) {
break;
}
if(status != SWITCH_STATUS_SUCCESS) {
break;
}
}
}
@@ -1300,7 +1300,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
//date = switch_core_session_strdup(session, p);
switch_channel_set_variable(channel, "RECORD_DATE", p);
}
interval = read_impl.microseconds_per_packet / 1000;
if (!fh->audio_buffer) {
@@ -1309,7 +1309,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
}
codec_name = "L16";
if (!switch_core_codec_ready((&codec))) {
if (switch_core_codec_init(&codec,
codec_name,
@@ -1318,17 +1318,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
interval, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, pool) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session),
SWITCH_LOG_DEBUG, "Codec Activated %s@%uhz %u channels %dms\n", codec_name, fh->samplerate, fh->channels, interval);
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG,
"Raw Codec Activation Failed %s@%uhz %u channels %dms\n", codec_name, fh->samplerate, fh->channels, interval);
switch_core_session_io_write_lock(session);
switch_channel_set_private(channel, "__fh", NULL);
switch_core_session_io_rwunlock(session);
switch_core_file_close(fh);
switch_core_session_reset(session, SWITCH_TRUE, SWITCH_FALSE);
status = SWITCH_STATUS_GENERR;
continue;
@@ -1346,7 +1346,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
samples = codec.implementation->samples_per_packet;
framelen = codec.implementation->decoded_bytes_per_packet;
}
last_native = test_native;
if (timer_name && !timer.samplecount) {
@@ -1395,7 +1395,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
int do_speed = 1;
int last_speed = -1;
int f;
if (!switch_channel_ready(channel)) {
status = SWITCH_STATUS_FALSE;
break;
@@ -1414,7 +1414,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
if (args) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during playback
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
if (switch_channel_has_dtmf(channel)) {
@@ -1430,7 +1430,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
if ((status = switch_ivr_dmachine_feed(args->dmachine, ds, NULL)) != SWITCH_STATUS_SUCCESS) {
break;
}
}
}
if (args->input_callback) {
status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
@@ -1523,14 +1523,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
eof++;
continue;
}
test_native = switch_test_flag(fh, SWITCH_FILE_NATIVE);
if (test_native != last_native) {
if (test_native) {
write_frame.codec = switch_core_session_get_read_codec(session);
samples = read_impl.samples_per_packet;
framelen = read_impl.encoded_bytes_per_packet;
framelen = read_impl.encoded_bytes_per_packet;
} else {
write_frame.codec = &codec;
samples = codec.implementation->samples_per_packet;
@@ -1616,7 +1616,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
last_speed = fh->speed;
continue;
}
if (olen < llen) {
uint8_t *dp = (uint8_t *) write_frame.data;
memset(dp + (int) olen, 255, (int) (llen - olen));
@@ -1631,7 +1631,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
} else { /* time off the channel (if you must) */
switch_frame_t *read_frame;
switch_status_t tstatus;
while (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_HOLD)) {
switch_ivr_parse_all_messages(session);
switch_yield(10000);
@@ -1704,7 +1704,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
break;
}
}
if (status == SWITCH_STATUS_MORE_DATA) {
status = SWITCH_STATUS_SUCCESS;
@@ -1721,6 +1721,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "done playing file %s\n", file);
switch_channel_set_variable_printf(channel, "playback_last_offset_pos", "%d", fh->offset_pos);
if (read_impl.samples_per_second) {
switch_channel_set_variable_printf(channel, "playback_seconds", "%d", fh->samples_in / fh->native_rate);
@@ -1853,26 +1854,32 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_silence(switch_core_session_
if (sample_count) {
sample_count -= raw_codec.implementation->samples_per_packet;
if (sample_count <= 0) {
switch_channel_set_variable(channel, "wait_for_silence_timeout", "true");
switch_channel_set_variable_printf(channel, "wait_for_silence_listenhits", "%d", listening);
switch_channel_set_variable_printf(channel, "wait_for_silence_silence_hits", "%d", silence_hits);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "switch_ivr_wait_for_silence: TIMEOUT %d\n", countdown);
break;
}
}
if (abuf) {
switch_size_t olen = raw_codec.implementation->samples_per_packet;
if (switch_core_file_read(&fh, abuf, &olen) != SWITCH_STATUS_SUCCESS) {
break;
}
write_frame.samples = (uint32_t) olen;
write_frame.datalen = (uint32_t) (olen * sizeof(int16_t));
if ((status = switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0)) != SWITCH_STATUS_SUCCESS) {
break;
}
}
if (countdown) {
if (!--countdown) {
switch_channel_set_variable(channel, "wait_for_silence_timeout", "false");
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "switch_ivr_wait_for_silence: SILENCE DETECTED\n");
break;
} else {
continue;
@@ -1919,9 +1926,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
uint32_t max_digits,
const char *prompt_audio_file,
const char *var_name,
char *digit_buffer,
switch_size_t digit_buffer_length,
uint32_t timeout,
char *digit_buffer,
switch_size_t digit_buffer_length,
uint32_t timeout,
const char *valid_terminators,
uint32_t digit_timeout)
@@ -1932,7 +1939,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
size_t len = 0;
char tb[2] = "";
int term_required = 0;
if (valid_terminators && *valid_terminators == '=') {
term_required = 1;
@@ -1985,7 +1992,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
if ((min_digits && len < min_digits) || len < max_digits) {
args.buf = digit_buffer + len;
args.buflen = (uint32_t) (digit_buffer_length - len);
status = switch_ivr_collect_digits_count(session, digit_buffer, digit_buffer_length, max_digits, valid_terminators, &tb[0],
status = switch_ivr_collect_digits_count(session, digit_buffer, digit_buffer_length, max_digits, valid_terminators, &tb[0],
len ? digit_timeout : timeout, digit_timeout, 0);
}
@@ -2048,8 +2055,8 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
const char *prompt_audio_file,
const char *bad_input_audio_file,
const char *var_name,
char *digit_buffer,
uint32_t digit_buffer_length,
char *digit_buffer,
uint32_t digit_buffer_length,
const char *digits_regex,
uint32_t digit_timeout,
const char *transfer_on_failure)
@@ -2102,10 +2109,10 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
}
memset(digit_buffer, 0, digit_buffer_length);
/* If we get here then check for transfer-on-failure ext/dp/context */
/* split this arg on spaces to get ext, dp, and context */
if (!zstr(transfer_on_failure)) {
const char *failure_ext = NULL;
const char *failure_dialplan = NULL;
@@ -2113,18 +2120,18 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
char *target[4];
char *mydata = switch_core_session_strdup(session, transfer_on_failure);
int argc;
argc = switch_separate_string(mydata, ' ', target, (sizeof(target) / sizeof(target[0])));
if ( argc < 1 ) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,"Bad target for PAGD failure: [%s]\n", transfer_on_failure);
return SWITCH_STATUS_FALSE;
}
if ( argc > 0 ) {
failure_ext = target[0];
}
if ( argc > 1 ) {
failure_dialplan = target[1];
}
@@ -2133,14 +2140,14 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
failure_context = target[2];
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
"PAGD failure! Transfer to: %s / %s / %s\n", failure_ext, failure_dialplan, failure_context);
switch_ivr_session_transfer(session,failure_ext, failure_dialplan, failure_context);
return SWITCH_STATUS_FALSE;
}
return SWITCH_STATUS_FALSE;
}
return SWITCH_STATUS_FALSE;
}
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session,
@@ -2275,7 +2282,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
}
if (args) {
/* dtmf handler function you can hook up to be executed when a digit is dialed during playback
/* dtmf handler function you can hook up to be executed when a digit is dialed during playback
* if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
if (switch_channel_has_dtmf(channel)) {
@@ -2294,7 +2301,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
if ((status = switch_ivr_dmachine_feed(args->dmachine, ds, NULL)) != SWITCH_STATUS_SUCCESS) {
break;
}
}
}
if (args->input_callback) {
status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
+49 -7
View File
@@ -1459,7 +1459,7 @@ static void send_fir(switch_rtp_t *rtp_session)
}
#if 0
static void send_pli(switch_rtp_t *rtp_session)
{
@@ -1542,7 +1542,7 @@ static void send_pli(switch_rtp_t *rtp_session)
return;
}
#endif
static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
{
@@ -1557,8 +1557,11 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session)
}
if (rtp_session->fir_countdown == FIR_COUNTDOWN || rtp_session->fir_countdown == 1) {
send_fir(rtp_session);
//send_pli(rtp_session);
if (rtp_session->flags[SWITCH_RTP_FLAG_PLI]) {
send_pli(rtp_session);
} else {
send_fir(rtp_session);
}
}
rtp_session->fir_countdown--;
@@ -1996,6 +1999,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
{
switch_socket_t *new_sock = NULL, *old_sock = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
int j = 0;
#ifndef WIN32
char o[5] = "TEST", i[5] = "";
switch_size_t len, ilen = 0;
@@ -2054,6 +2058,40 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
goto done;
}
if ((j = atoi(host)) && j > 223 && j < 240) { /* mcast */
if (switch_mcast_interface(new_sock, rtp_session->local_addr) != SWITCH_STATUS_SUCCESS) {
*err = "Multicast Socket interface Error";
goto done;
}
if (switch_mcast_join(new_sock, rtp_session->local_addr, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
*err = "Multicast Error";
goto done;
}
if (rtp_session->session) {
switch_channel_t *channel = switch_core_session_get_channel(rtp_session->session);
const char *var;
if ((var = switch_channel_get_variable(channel, "multicast_ttl"))) {
int ttl = atoi(var);
if (ttl > 0 && ttl < 256) {
if (switch_mcast_hops(new_sock, (uint8_t) ttl) != SWITCH_STATUS_SUCCESS) {
*err = "Mutlicast TTL set failed";
goto done;
}
}
}
}
}
#ifndef WIN32
len = sizeof(i);
switch_socket_opt_set(new_sock, SWITCH_SO_NONBLOCK, TRUE);
@@ -3460,9 +3498,9 @@ SWITCH_DECLARE(void) switch_rtp_flush(switch_rtp_t *rtp_session)
SWITCH_DECLARE(void) switch_rtp_video_refresh(switch_rtp_t *rtp_session)
{
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && rtp_session->ice.ice_user) {
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] &&
(rtp_session->ice.ice_user || rtp_session->flags[SWITCH_RTP_FLAG_FIR] || rtp_session->flags[SWITCH_RTP_FLAG_PLI])) {
if (!rtp_session->fir_countdown) {
//send_fir(rtp_session);
rtp_session->fir_countdown = FIR_COUNTDOWN;
}
}
@@ -4083,6 +4121,7 @@ static int check_recv_payload(switch_rtp_t *rtp_session)
if (!pmap->negotiated) {
continue;
}
if (rtp_session->recv_msg.header.pt == pmap->pt) {
ok = 1;
}
@@ -5008,6 +5047,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
payload_map_t *pmap;
switch_mutex_lock(rtp_session->flag_mutex);
for (pmap = *rtp_session->pmaps; pmap && pmap->allocated; pmap = pmap->next) {
if (!pmap->negotiated) {
continue;
}
@@ -5017,6 +5057,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if (pmapP) {
*pmapP = pmap;
}
break;
}
}
switch_mutex_unlock(rtp_session->flag_mutex);
@@ -5025,6 +5066,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if (!accept_packet &&
!(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PAYLOAD) && !(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PACKETS)) {
/* drop frames of incorrect payload number and return CNG frame instead */
return_cng_frame();
}
}
@@ -6204,7 +6246,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
switch_mutex_lock(rtp_session->flag_mutex);
for (pmap = *rtp_session->pmaps; pmap; pmap = pmap->next) {
if (pmap->hash == frame->pmap->hash && !strcmp(pmap->iananame, frame->pmap->iananame)) {
if (pmap->negotiated && pmap->hash == frame->pmap->hash) {
payload = pmap->recv_pt;
break;
}
+1 -1
View File
@@ -756,7 +756,7 @@ static switch_status_t timer_step(switch_timer_t *timer)
}
check_roll();
samples = timer->samples * (private_info->reference - private_info->start);
samples = (uint64_t)timer->samples * (private_info->reference - private_info->start);
if (samples > UINT32_MAX) {
private_info->start = private_info->reference - 1; /* Must have a diff */
+43 -25
View File
@@ -2044,34 +2044,52 @@ SWITCH_DECLARE(switch_status_t) switch_xml_locate_user_merged(const char *key, c
{
switch_xml_t xml, domain, group, x_user, x_user_dup;
switch_status_t status = SWITCH_STATUS_FALSE;
char *kdup = NULL;
char *keys[10] = {0};
int i, nkeys;
if ((status = switch_xml_locate_user_cache(key, user_name, domain_name, &x_user)) == SWITCH_STATUS_SUCCESS) {
*user = x_user;
} else if ((status = switch_xml_locate_user(key, user_name, domain_name, ip, &xml, &domain, &x_user, &group, params)) == SWITCH_STATUS_SUCCESS) {
const char *cacheable = NULL;
x_user_dup = switch_xml_dup(x_user);
switch_xml_merge_user(x_user_dup, domain, group);
cacheable = switch_xml_attr(x_user_dup, "cacheable");
if (switch_true(cacheable)) {
switch_time_t expires = 0;
switch_time_t time_now = 0;
if (switch_is_number(cacheable)) {
int cache_ms = atol(cacheable);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "caching lookup for user %s@%s for %d milliseconds\n", user_name, domain_name, cache_ms);
time_now = switch_micro_time_now();
expires = time_now + (cache_ms * 1000);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "caching lookup for user %s@%s indefinitely\n", user_name, domain_name);
}
switch_xml_user_cache(key, user_name, domain_name, x_user_dup, expires);
}
*user = x_user_dup;
switch_xml_free(xml);
if (strchr(key, ':')) {
kdup = strdup(key);
nkeys = switch_split(kdup, ':', keys);
} else {
keys[0] = (char *)key;
nkeys = 1;
}
for(i = 0; i < nkeys; i++) {
if ((status = switch_xml_locate_user_cache(keys[i], user_name, domain_name, &x_user)) == SWITCH_STATUS_SUCCESS) {
*user = x_user;
break;
} else if ((status = switch_xml_locate_user(keys[i], user_name, domain_name, ip, &xml, &domain, &x_user, &group, params)) == SWITCH_STATUS_SUCCESS) {
const char *cacheable = NULL;
x_user_dup = switch_xml_dup(x_user);
switch_xml_merge_user(x_user_dup, domain, group);
cacheable = switch_xml_attr(x_user_dup, "cacheable");
if (switch_true(cacheable)) {
switch_time_t expires = 0;
switch_time_t time_now = 0;
if (switch_is_number(cacheable)) {
int cache_ms = atol(cacheable);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "caching lookup for user %s@%s for %d milliseconds\n",
user_name, domain_name, cache_ms);
time_now = switch_micro_time_now();
expires = time_now + (cache_ms * 1000);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "caching lookup for user %s@%s indefinitely\n", user_name, domain_name);
}
switch_xml_user_cache(keys[i], user_name, domain_name, x_user_dup, expires);
}
*user = x_user_dup;
switch_xml_free(xml);
break;
}
}
switch_safe_free(kdup);
return status;
}