mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 16:15:04 +00:00
Fix for -Wunused-but-set-variable required compiler. : mod_freetdm mod_avmd mod_cidlookup mod_ladspa mod_lcr mod_nibblebill mod_rss mod_vdm mod_dahdi_codec mod_skinny mod_cdr_pg_csv
This commit is contained in:
parent
5bcf487df9
commit
ba7dc9fde8
@ -720,7 +720,6 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||||||
ftdm_size_t len;
|
ftdm_size_t len;
|
||||||
unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
|
unsigned char data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
|
||||||
ftdm_wait_flag_t wflags = FTDM_WRITE;
|
ftdm_wait_flag_t wflags = FTDM_WRITE;
|
||||||
ftdm_status_t status;
|
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
@ -755,7 +754,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
|
|||||||
|
|
||||||
|
|
||||||
wflags = FTDM_WRITE;
|
wflags = FTDM_WRITE;
|
||||||
status = ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, ftdm_channel_get_io_interval(tech_pvt->ftdmchan) * 10);
|
ftdm_channel_wait(tech_pvt->ftdmchan, &wflags, ftdm_channel_get_io_interval(tech_pvt->ftdmchan) * 10);
|
||||||
|
|
||||||
if (!(wflags & FTDM_WRITE)) {
|
if (!(wflags & FTDM_WRITE)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Dropping frame! (write not ready)\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Dropping frame! (write not ready)\n");
|
||||||
|
@ -479,7 +479,7 @@ static void avmd_process(avmd_session_t *session, switch_frame_t *frame)
|
|||||||
double success = 0.0;
|
double success = 0.0;
|
||||||
double amp = 0.0;
|
double amp = 0.0;
|
||||||
double s_rate;
|
double s_rate;
|
||||||
double e_rate;
|
// double e_rate;
|
||||||
double avg_a;
|
double avg_a;
|
||||||
double sine_len;
|
double sine_len;
|
||||||
uint32_t sine_len_i;
|
uint32_t sine_len_i;
|
||||||
@ -523,7 +523,7 @@ static void avmd_process(avmd_session_t *session, switch_frame_t *frame)
|
|||||||
/*! Every once in a while we evaluate the desa2 and amplitude results */
|
/*! Every once in a while we evaluate the desa2 and amplitude results */
|
||||||
if(((pos + 1) % sine_len_i) == 0){
|
if(((pos + 1) % sine_len_i) == 0){
|
||||||
s_rate = success / (error + success);
|
s_rate = success / (error + success);
|
||||||
e_rate = error / (error + success);
|
// e_rate = error / (error + success);
|
||||||
avg_a = amp / sine_len;
|
avg_a = amp / sine_len;
|
||||||
|
|
||||||
/*! Results out of these ranges are considered invalid */
|
/*! Results out of these ranges are considered invalid */
|
||||||
|
@ -729,6 +729,9 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
|
|||||||
if (!session && pool) {
|
if (!session && pool) {
|
||||||
switch_core_destroy_memory_pool(&pool);
|
switch_core_destroy_memory_pool(&pool);
|
||||||
}
|
}
|
||||||
|
/* This is so compile doesn't failed because status is never used */
|
||||||
|
if (status) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_STANDARD_API(cidlookup_function)
|
SWITCH_STANDARD_API(cidlookup_function)
|
||||||
|
@ -565,12 +565,11 @@ switch_status_t ladspa_session(switch_core_session_t *session, const char *flags
|
|||||||
static void ladspa_parse(switch_core_session_t *session, const char *data)
|
static void ladspa_parse(switch_core_session_t *session, const char *data)
|
||||||
{
|
{
|
||||||
char *argv[5] = { 0 };
|
char *argv[5] = { 0 };
|
||||||
int argc;
|
|
||||||
char *lbuf;
|
char *lbuf;
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
lbuf = strdup(data);
|
lbuf = strdup(data);
|
||||||
argc = switch_separate_string(lbuf, '|', argv, (sizeof(argv) / sizeof(argv[0])));
|
switch_separate_string(lbuf, '|', argv, (sizeof(argv) / sizeof(argv[0])));
|
||||||
ladspa_session(session, argv[0], argv[1], argv[2], argv[3]);
|
ladspa_session(session, argv[0], argv[1], argv[2], argv[3]);
|
||||||
free(lbuf);
|
free(lbuf);
|
||||||
}
|
}
|
||||||
|
@ -248,14 +248,13 @@ static char *get_bridge_data(switch_memory_pool_t *pool, char *dialed_number, ch
|
|||||||
size_t tstrip;
|
size_t tstrip;
|
||||||
char *data = NULL;
|
char *data = NULL;
|
||||||
char *destination_number = NULL;
|
char *destination_number = NULL;
|
||||||
char *orig_destination_number = NULL;
|
|
||||||
char *codec = NULL;
|
char *codec = NULL;
|
||||||
char *cid = NULL;
|
char *cid = NULL;
|
||||||
char *header = NULL;
|
char *header = NULL;
|
||||||
char *user_rate = NULL;
|
char *user_rate = NULL;
|
||||||
char *export_fields = NULL;
|
char *export_fields = NULL;
|
||||||
|
|
||||||
orig_destination_number = destination_number = switch_core_strdup(pool, dialed_number);
|
destination_number = switch_core_strdup(pool, dialed_number);
|
||||||
|
|
||||||
tstrip = ((cur_route->digit_len - cur_route->tstrip) + 1);
|
tstrip = ((cur_route->digit_len - cur_route->tstrip) + 1);
|
||||||
lstrip = cur_route->lstrip;
|
lstrip = cur_route->lstrip;
|
||||||
@ -1263,7 +1262,6 @@ static switch_call_cause_t lcr_outgoing_channel(switch_core_session_t *session,
|
|||||||
const char *intralata = NULL;
|
const char *intralata = NULL;
|
||||||
switch_core_session_t *mysession = NULL;
|
switch_core_session_t *mysession = NULL;
|
||||||
switch_channel_t *channel = NULL;
|
switch_channel_t *channel = NULL;
|
||||||
switch_caller_profile_t *caller_profile = NULL;
|
|
||||||
|
|
||||||
dest = strdup(outbound_profile->destination_number);
|
dest = strdup(outbound_profile->destination_number);
|
||||||
|
|
||||||
@ -1290,7 +1288,6 @@ static switch_call_cause_t lcr_outgoing_channel(switch_core_session_t *session,
|
|||||||
timelimit = atoi(var);
|
timelimit = atoi(var);
|
||||||
}
|
}
|
||||||
routes.session = session;
|
routes.session = session;
|
||||||
caller_profile = switch_channel_get_caller_profile(channel);
|
|
||||||
intrastate = switch_channel_get_variable(channel, "intrastate");
|
intrastate = switch_channel_get_variable(channel, "intrastate");
|
||||||
intralata = switch_channel_get_variable(channel, "intralata");
|
intralata = switch_channel_get_variable(channel, "intralata");
|
||||||
cid_name_override = switch_channel_get_variable(channel, "origination_caller_id_name");
|
cid_name_override = switch_channel_get_variable(channel, "origination_caller_id_name");
|
||||||
@ -1670,7 +1667,7 @@ SWITCH_STANDARD_API(dialplan_lcr_function)
|
|||||||
char *argv[4] = { 0 };
|
char *argv[4] = { 0 };
|
||||||
int argc;
|
int argc;
|
||||||
char *mydata = NULL;
|
char *mydata = NULL;
|
||||||
char *dialstring = NULL;
|
//char *dialstring = NULL;
|
||||||
char *lcr_profile = NULL;
|
char *lcr_profile = NULL;
|
||||||
lcr_route current = NULL;
|
lcr_route current = NULL;
|
||||||
max_obj_t maximum_lengths = { 0 };
|
max_obj_t maximum_lengths = { 0 };
|
||||||
@ -1792,7 +1789,8 @@ SWITCH_STANDARD_API(dialplan_lcr_function)
|
|||||||
current = cb_struct.head;
|
current = cb_struct.head;
|
||||||
while (current) {
|
while (current) {
|
||||||
|
|
||||||
dialstring = get_bridge_data(pool, cb_struct.lookup_number, cb_struct.cid, current, cb_struct.profile, cb_struct.session);
|
//dialstring =
|
||||||
|
get_bridge_data(pool, cb_struct.lookup_number, cb_struct.cid, current, cb_struct.profile, cb_struct.session);
|
||||||
rowcount++;
|
rowcount++;
|
||||||
|
|
||||||
if (as_xml) {
|
if (as_xml) {
|
||||||
|
@ -399,7 +399,7 @@ static switch_status_t do_billing(switch_core_session_t *session)
|
|||||||
const char *billrate;
|
const char *billrate;
|
||||||
const char *billaccount;
|
const char *billaccount;
|
||||||
float nobal_amt = globals.nobal_amt;
|
float nobal_amt = globals.nobal_amt;
|
||||||
float lowbal_amt = globals.lowbal_amt;
|
//float lowbal_amt = globals.lowbal_amt;
|
||||||
float balance;
|
float balance;
|
||||||
|
|
||||||
if (!session) {
|
if (!session) {
|
||||||
@ -421,10 +421,11 @@ static switch_status_t do_billing(switch_core_session_t *session)
|
|||||||
if (!zstr(switch_channel_get_variable(channel, "nobal_amt"))) {
|
if (!zstr(switch_channel_get_variable(channel, "nobal_amt"))) {
|
||||||
nobal_amt = (float)atof(switch_channel_get_variable(channel, "nobal_amt"));
|
nobal_amt = (float)atof(switch_channel_get_variable(channel, "nobal_amt"));
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (!zstr(switch_channel_get_variable(channel, "lowbal_amt"))) {
|
if (!zstr(switch_channel_get_variable(channel, "lowbal_amt"))) {
|
||||||
lowbal_amt = (float)atof(switch_channel_get_variable(channel, "lowbal_amt"));
|
lowbal_amt = (float)atof(switch_channel_get_variable(channel, "lowbal_amt"));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/* Return if there's no billing information on this session */
|
/* Return if there's no billing information on this session */
|
||||||
if (!billrate || !billaccount) {
|
if (!billrate || !billaccount) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
@ -802,9 +803,6 @@ SWITCH_STANDARD_API(nibblebill_api_function)
|
|||||||
if ((argc == 2 || argc == 3) && !zstr(argv[0])) {
|
if ((argc == 2 || argc == 3) && !zstr(argv[0])) {
|
||||||
char *uuid = argv[0];
|
char *uuid = argv[0];
|
||||||
if ((psession = switch_core_session_locate(uuid))) {
|
if ((psession = switch_core_session_locate(uuid))) {
|
||||||
switch_channel_t *channel;
|
|
||||||
channel = switch_core_session_get_channel(psession);
|
|
||||||
|
|
||||||
if (!strcasecmp(argv[1], "adjust") && argc == 3) {
|
if (!strcasecmp(argv[1], "adjust") && argc == 3) {
|
||||||
nibblebill_adjust(psession, (float) atof(argv[2]));
|
nibblebill_adjust(psession, (float) atof(argv[2]));
|
||||||
} else if (!strcasecmp(argv[1], "flush")) {
|
} else if (!strcasecmp(argv[1], "flush")) {
|
||||||
|
@ -175,7 +175,7 @@ SWITCH_STANDARD_APP(rss_function)
|
|||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char *argv[3], *feed_list[TTS_MAX_ENTRIES] = { 0 }, *feed_names[TTS_MAX_ENTRIES] = {
|
char *argv[3], *feed_list[TTS_MAX_ENTRIES] = { 0 }, *feed_names[TTS_MAX_ENTRIES] = {
|
||||||
0};
|
0};
|
||||||
int argc, feed_index = 0;
|
int feed_index = 0;
|
||||||
const char *cf = "rss.conf";
|
const char *cf = "rss.conf";
|
||||||
switch_xml_t cfg, cxml, feeds, feed;
|
switch_xml_t cfg, cxml, feeds, feed;
|
||||||
char buf[1024] = "";
|
char buf[1024] = "";
|
||||||
@ -236,7 +236,7 @@ SWITCH_STANDARD_APP(rss_function)
|
|||||||
|
|
||||||
if (!zstr(data)) {
|
if (!zstr(data)) {
|
||||||
if ((mydata = switch_core_session_strdup(session, data))) {
|
if ((mydata = switch_core_session_strdup(session, data))) {
|
||||||
argc = switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]));
|
switch_separate_string(mydata, ' ', argv, sizeof(argv) / sizeof(argv[0]));
|
||||||
|
|
||||||
if (argv[0]) {
|
if (argv[0]) {
|
||||||
engine = argv[0];
|
engine = argv[0];
|
||||||
|
@ -237,9 +237,8 @@ static switch_bool_t process_data(vmd_session_info_t *vmd_info, switch_frame_t *
|
|||||||
double pts[P];
|
double pts[P];
|
||||||
int16_t *data;
|
int16_t *data;
|
||||||
int16_t max;
|
int16_t max;
|
||||||
switch_ssize_t len;
|
|
||||||
|
|
||||||
len = frame->samples * sizeof(int16_t);
|
//len = frame->samples * sizeof(int16_t);
|
||||||
data = (int16_t *) frame->data;
|
data = (int16_t *) frame->data;
|
||||||
|
|
||||||
for (max = (int16_t) abs(data[0]), i = 1; i < frame->samples; i++) {
|
for (max = (int16_t) abs(data[0]), i = 1; i < frame->samples; i++) {
|
||||||
|
@ -250,7 +250,6 @@ static switch_status_t switch_dahdi_encode(switch_codec_t *codec,
|
|||||||
{
|
{
|
||||||
int32_t res;
|
int32_t res;
|
||||||
short *dbuf_linear;
|
short *dbuf_linear;
|
||||||
unsigned char *ebuf_g729;
|
|
||||||
unsigned char ebuf_ulaw[decoded_data_len / 2];
|
unsigned char ebuf_ulaw[decoded_data_len / 2];
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
struct dahdi_context *context = NULL;
|
struct dahdi_context *context = NULL;
|
||||||
@ -268,7 +267,6 @@ static switch_status_t switch_dahdi_encode(switch_codec_t *codec,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dbuf_linear = decoded_data;
|
dbuf_linear = decoded_data;
|
||||||
ebuf_g729 = encoded_data;
|
|
||||||
for (i = 0; i < decoded_data_len / sizeof(short); i++) {
|
for (i = 0; i < decoded_data_len / sizeof(short); i++) {
|
||||||
ebuf_ulaw[i] = linear_to_ulaw(dbuf_linear[i]);
|
ebuf_ulaw[i] = linear_to_ulaw(dbuf_linear[i]);
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ PaError OpenAudioStream(PABLIO_Stream ** rwblPtr,
|
|||||||
PABLIO_Stream *aStream;
|
PABLIO_Stream *aStream;
|
||||||
long numFrames;
|
long numFrames;
|
||||||
//long numBytes;
|
//long numBytes;
|
||||||
int channels = 1;
|
//int channels = 1;
|
||||||
|
|
||||||
if (!(inputParameters || outputParameters)) {
|
if (!(inputParameters || outputParameters)) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -262,11 +262,13 @@ PaError OpenAudioStream(PABLIO_Stream ** rwblPtr,
|
|||||||
switch_assert(aStream);
|
switch_assert(aStream);
|
||||||
memset(aStream, 0, sizeof(PABLIO_Stream));
|
memset(aStream, 0, sizeof(PABLIO_Stream));
|
||||||
|
|
||||||
|
/*
|
||||||
if (inputParameters) {
|
if (inputParameters) {
|
||||||
channels = inputParameters->channelCount;
|
channels = inputParameters->channelCount;
|
||||||
} else if (outputParameters) {
|
} else if (outputParameters) {
|
||||||
channels = outputParameters->channelCount;
|
channels = outputParameters->channelCount;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
numFrames = RoundUpToNextPowerOf2(samples_per_packet * 5);
|
numFrames = RoundUpToNextPowerOf2(samples_per_packet * 5);
|
||||||
aStream->bytesPerFrame = bytesPerSample;
|
aStream->bytesPerFrame = bytesPerSample;
|
||||||
|
@ -462,7 +462,6 @@ uint32_t skinny_line_get_state(listener_t *listener, uint32_t line_instance, uin
|
|||||||
|
|
||||||
switch_status_t skinny_tech_set_codec(private_t *tech_pvt, int force)
|
switch_status_t skinny_tech_set_codec(private_t *tech_pvt, int force)
|
||||||
{
|
{
|
||||||
int ms;
|
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
int resetting = 0;
|
int resetting = 0;
|
||||||
|
|
||||||
@ -542,7 +541,7 @@ switch_status_t skinny_tech_set_codec(private_t *tech_pvt, int force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tech_pvt->read_frame.rate = tech_pvt->rm_rate;
|
tech_pvt->read_frame.rate = tech_pvt->rm_rate;
|
||||||
ms = tech_pvt->write_codec.implementation->microseconds_per_packet / 1000;
|
//ms = tech_pvt->write_codec.implementation->microseconds_per_packet / 1000;
|
||||||
|
|
||||||
if (!switch_core_codec_ready(&tech_pvt->read_codec)) {
|
if (!switch_core_codec_ready(&tech_pvt->read_codec)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_ERROR, "Can't load codec?\n");
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_ERROR, "Can't load codec?\n");
|
||||||
@ -880,7 +879,6 @@ switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_
|
|||||||
{
|
{
|
||||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||||
private_t *tech_pvt = switch_core_session_get_private(session);
|
private_t *tech_pvt = switch_core_session_get_private(session);
|
||||||
int payload = 0;
|
|
||||||
|
|
||||||
while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
|
while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
|
||||||
if (switch_channel_ready(channel)) {
|
if (switch_channel_ready(channel)) {
|
||||||
@ -908,7 +906,7 @@ switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_
|
|||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
payload = tech_pvt->read_frame.payload;
|
//payload = tech_pvt->read_frame.payload;
|
||||||
|
|
||||||
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
|
if (switch_rtp_has_dtmf(tech_pvt->rtp_session)) {
|
||||||
switch_dtmf_t dtmf = { 0 };
|
switch_dtmf_t dtmf = { 0 };
|
||||||
|
@ -588,14 +588,12 @@ switch_call_cause_t skinny_ring_lines(private_t *tech_pvt, switch_core_session_t
|
|||||||
|
|
||||||
switch_status_t skinny_session_ring_out(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
switch_status_t skinny_session_ring_out(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = NULL;
|
|
||||||
private_t *tech_pvt = NULL;
|
private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
switch_assert(session);
|
switch_assert(session);
|
||||||
switch_assert(listener);
|
switch_assert(listener);
|
||||||
switch_assert(listener->profile);
|
switch_assert(listener->profile);
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
send_start_tone(listener, SKINNY_TONE_ALERT, 0, line_instance, tech_pvt->call_id);
|
send_start_tone(listener, SKINNY_TONE_ALERT, 0, line_instance, tech_pvt->call_id);
|
||||||
@ -732,14 +730,12 @@ switch_status_t skinny_session_start_media(switch_core_session_t *session, liste
|
|||||||
|
|
||||||
switch_status_t skinny_session_hold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
switch_status_t skinny_session_hold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = NULL;
|
|
||||||
private_t *tech_pvt = NULL;
|
private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
switch_assert(session);
|
switch_assert(session);
|
||||||
switch_assert(listener);
|
switch_assert(listener);
|
||||||
switch_assert(listener->profile);
|
switch_assert(listener->profile);
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
skinny_session_stop_media(session, listener, line_instance);
|
skinny_session_stop_media(session, listener, line_instance);
|
||||||
@ -760,17 +756,15 @@ switch_status_t skinny_session_hold_line(switch_core_session_t *session, listene
|
|||||||
|
|
||||||
switch_status_t skinny_session_unhold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
switch_status_t skinny_session_unhold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = NULL;
|
|
||||||
private_t *tech_pvt = NULL;
|
private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
switch_assert(session);
|
switch_assert(session);
|
||||||
switch_assert(listener);
|
switch_assert(listener);
|
||||||
switch_assert(listener->profile);
|
switch_assert(listener->profile);
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
skinny_hold_active_calls(listener);
|
skinny_hold_active_calls(listener);
|
||||||
send_set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0, tech_pvt->call_id);
|
send_set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0, tech_pvt->call_id);
|
||||||
send_set_speaker_mode(listener, SKINNY_SPEAKER_ON);
|
send_set_speaker_mode(listener, SKINNY_SPEAKER_ON);
|
||||||
send_select_soft_keys(listener, line_instance, tech_pvt->call_id, SKINNY_KEY_SET_RING_OUT, 0xffff);
|
send_select_soft_keys(listener, line_instance, tech_pvt->call_id, SKINNY_KEY_SET_RING_OUT, 0xffff);
|
||||||
@ -825,14 +819,12 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
|
|||||||
|
|
||||||
switch_status_t skinny_session_stop_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
switch_status_t skinny_session_stop_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = NULL;
|
|
||||||
private_t *tech_pvt = NULL;
|
private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
switch_assert(session);
|
switch_assert(session);
|
||||||
switch_assert(listener);
|
switch_assert(listener);
|
||||||
switch_assert(listener->profile);
|
switch_assert(listener->profile);
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
|
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
|
||||||
@ -1773,7 +1765,6 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn
|
|||||||
uint32_t call_id = 0;
|
uint32_t call_id = 0;
|
||||||
switch_core_session_t *session = NULL;
|
switch_core_session_t *session = NULL;
|
||||||
switch_channel_t *channel = NULL;
|
switch_channel_t *channel = NULL;
|
||||||
private_t *tech_pvt = NULL;
|
|
||||||
|
|
||||||
skinny_check_data_length(request, sizeof(request->data.soft_key_event.event));
|
skinny_check_data_length(request, sizeof(request->data.soft_key_event.event));
|
||||||
|
|
||||||
@ -1790,7 +1781,6 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn
|
|||||||
break;
|
break;
|
||||||
case SOFTKEY_NEWCALL:
|
case SOFTKEY_NEWCALL:
|
||||||
status = skinny_create_incoming_session(listener, &line_instance, &session);
|
status = skinny_create_incoming_session(listener, &line_instance, &session);
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
|
||||||
|
|
||||||
skinny_session_process_dest(session, listener, line_instance, NULL, '\0', 0);
|
skinny_session_process_dest(session, listener, line_instance, NULL, '\0', 0);
|
||||||
break;
|
break;
|
||||||
@ -1874,13 +1864,10 @@ switch_status_t skinny_handle_unregister(listener_t *listener, skinny_message_t
|
|||||||
switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, skinny_message_t *request)
|
switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, skinny_message_t *request)
|
||||||
{
|
{
|
||||||
skinny_message_t *message;
|
skinny_message_t *message;
|
||||||
skinny_profile_t *profile;
|
|
||||||
|
|
||||||
switch_assert(listener->profile);
|
switch_assert(listener->profile);
|
||||||
switch_assert(listener->device_name);
|
switch_assert(listener->device_name);
|
||||||
|
|
||||||
profile = listener->profile;
|
|
||||||
|
|
||||||
message = switch_core_alloc(listener->pool, 12+sizeof(message->data.soft_key_template));
|
message = switch_core_alloc(listener->pool, 12+sizeof(message->data.soft_key_template));
|
||||||
message->type = SOFT_KEY_TEMPLATE_RES_MESSAGE;
|
message->type = SOFT_KEY_TEMPLATE_RES_MESSAGE;
|
||||||
message->length = 4 + sizeof(message->data.soft_key_template);
|
message->length = 4 + sizeof(message->data.soft_key_template);
|
||||||
|
@ -160,7 +160,6 @@ static void do_rotate(cdr_fd_t *fd)
|
|||||||
char date[80] = "";
|
char date[80] = "";
|
||||||
switch_size_t retsize;
|
switch_size_t retsize;
|
||||||
char *p;
|
char *p;
|
||||||
size_t len;
|
|
||||||
|
|
||||||
close(fd->fd);
|
close(fd->fd);
|
||||||
fd->fd = -1;
|
fd->fd = -1;
|
||||||
@ -169,7 +168,6 @@ static void do_rotate(cdr_fd_t *fd)
|
|||||||
switch_time_exp_lt(&tm, switch_micro_time_now());
|
switch_time_exp_lt(&tm, switch_micro_time_now());
|
||||||
switch_strftime_nocheck(date, &retsize, sizeof(date), "%Y-%m-%d-%H-%M-%S", &tm);
|
switch_strftime_nocheck(date, &retsize, sizeof(date), "%Y-%m-%d-%H-%M-%S", &tm);
|
||||||
|
|
||||||
len = strlen(fd->path) + strlen(date) + 2;
|
|
||||||
p = switch_mprintf("%s.%s", fd->path, date);
|
p = switch_mprintf("%s.%s", fd->path, date);
|
||||||
assert(p);
|
assert(p);
|
||||||
switch_file_rename(fd->path, p, globals.pool);
|
switch_file_rename(fd->path, p, globals.pool);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user