tech_pvt = (private_t *) switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL);
+ memset(tech_pvt->buffer2, 0, sizeof(tech_pvt->buffer2));
+
channel = switch_core_session_get_channel(session);
switch_assert(channel != NULL);
//ERRORA("%s CHANNEL INIT\n", GSMOPEN_P_LOG, tech_pvt->name);
if (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED) {
tech_pvt->phone_callflow = CALLFLOW_CALL_IDLE;
}
+ memset(tech_pvt->buffer2, 0, sizeof(tech_pvt->buffer2));
switch_core_session_set_private(session, NULL);
} else {
DEBUGA_GSMOPEN("!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n", GSMOPEN_P_LOG, switch_core_session_get_uuid(session));
if (tech_pvt->no_sound) {
goto cng;
}
+ memset(buffer2, 0, sizeof(buffer2));
samples = tech_pvt->serialPort_serial_audio->Read(buffer2, 640);
if (samples >= 320) {
tech_pvt->buffer2_full = 0;
samples = 320;
DEBUGA_GSMOPEN("samples=%d FROM BUFFER\n", GSMOPEN_P_LOG, samples);
+ memset(tech_pvt->buffer2, 0, sizeof(tech_pvt->buffer2));
}
}
switch_mutex_unlock(tech_pvt->flag_mutex);
if (samples != 320) {
+ memset(tech_pvt->buffer2, 0, sizeof(tech_pvt->buffer2));
if (samples != 0) {
DEBUGA_GSMOPEN("samples=%d, goto cng\n", GSMOPEN_P_LOG, samples);
}