diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c
index c9b384b3e8..181161617c 100644
--- a/src/mod/endpoints/mod_sofia/sofia_glue.c
+++ b/src/mod/endpoints/mod_sofia/sofia_glue.c
@@ -2658,8 +2658,13 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
tech_pvt->read_impl.samples_per_second != tech_pvt->rm_rate ||
tech_pvt->codec_ms != (uint32_t) tech_pvt->read_impl.microseconds_per_packet / 1000) {
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Changing Codec from %s@%dms to %s@%dms\n",
- tech_pvt->read_impl.iananame, tech_pvt->read_impl.microseconds_per_packet / 1000, tech_pvt->rm_encoding, tech_pvt->codec_ms);
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
+ "Changing Codec from %s@%dms@%dhz to %s@%dms@%luhz\n",
+ tech_pvt->read_impl.iananame, tech_pvt->read_impl.microseconds_per_packet / 1000,
+ tech_pvt->read_impl.samples_per_second,
+ tech_pvt->rm_encoding,
+ tech_pvt->codec_ms,
+ tech_pvt->rm_rate);
switch_core_session_lock_codec_write(tech_pvt->session);
switch_core_session_lock_codec_read(tech_pvt->session);
@@ -4429,7 +4434,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
tech_pvt->rm_encoding = switch_core_session_strdup(session, (char *) map->rm_encoding);
tech_pvt->iananame = switch_core_session_strdup(session, (char *) mimp->iananame);
tech_pvt->pt = (switch_payload_t) map->rm_pt;
- tech_pvt->rm_rate = map->rm_rate;
+ tech_pvt->rm_rate = mimp->samples_per_second;
tech_pvt->codec_ms = mimp->microseconds_per_packet / 1000;
tech_pvt->bitrate = mimp->bits_per_second;
tech_pvt->remote_sdp_audio_ip = switch_core_session_strdup(session, (char *) connection->c_address);
diff --git a/src/switch_core_io.c b/src/switch_core_io.c
index 766bec7a81..ec3fac60e4 100644
--- a/src/switch_core_io.c
+++ b/src/switch_core_io.c
@@ -124,6 +124,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
}
switch_mutex_lock(session->codec_read_mutex);
+
+ if (!switch_core_codec_ready(session->read_codec)) {
+ switch_mutex_unlock(session->codec_read_mutex);
+ 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);
+ *frame = &runtime.dummy_cng_frame;
+ return SWITCH_STATUS_FALSE;
+ }
+
switch_mutex_lock(session->read_codec->mutex);
top:
@@ -181,6 +190,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
}
switch_mutex_lock(session->codec_read_mutex);
+
+ if (!switch_core_codec_ready(session->read_codec)) {
+ switch_mutex_unlock(session->codec_read_mutex);
+ 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);
+ *frame = &runtime.dummy_cng_frame;
+ return SWITCH_STATUS_FALSE;
+ }
+
switch_mutex_lock(session->read_codec->mutex);
if (!switch_core_codec_ready(session->read_codec)) {
*frame = NULL;
diff --git a/w32/Setup/Setup.wixproj b/w32/Setup/Setup.wixproj
index 10dc60004b..4df748f967 100644
--- a/w32/Setup/Setup.wixproj
+++ b/w32/Setup/Setup.wixproj
@@ -12,26 +12,26 @@
bin\x86\Debug\
obj\X86\$(Configuration)\
- Debug;FreeSWITCHConfFilesDir=..\..\..\..\..\conf;FreeSWITCHSoundFilesDir=..\..\..\..\..\Win32\debug\sounds;
+ Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\debug\sounds;
bin\x86\release\
obj\X86\$(Configuration)\
- Debug;FreeSWITCHConfFilesDir=..\..\..\..\..\conf;FreeSWITCHSoundFilesDir=..\..\..\..\..\Win32\release\sounds;
+ Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\Win32\release\sounds;
bin\x64\Debug\
obj\X64\$(Configuration)\
- Debug;FreeSWITCHConfFilesDir=..\..\..\..\..\conf;FreeSWITCHSoundFilesDir=..\..\..\..\..\x64\debug\sounds;
+ Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\debug\sounds;
bin\x64\Release\
obj\X64\$(Configuration)\
- Debug;FreeSWITCHConfFilesDir=..\..\..\..\..\conf;FreeSWITCHSoundFilesDir=..\..\..\..\..\x64\release\sounds;
+ Debug;FreeSWITCHConfFilesDir=$(ProjectDir)..\..\conf;FreeSWITCHSoundFilesDir=$(ProjectDir)..\..\x64\release\sounds;
@@ -735,8 +735,8 @@
- "$(WIX)bin\heat.exe" dir "..\..\..\..\..\conf" -cg FreeSWITCHConfFiles -gg -scom -sreg -sfrag -srd -dr CONFLOCATION -var var.FreeSWITCHConfFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHConfFiles.wxs"
-"$(WIX)bin\heat.exe" dir "..\..\..\..\..\Win32\Release\sounds" -cg FreeSWITCHSoundFiles8 -gg -scom -sreg -sfrag -srd -dr SOUNDLOCATION -var var.FreeSWITCHSoundFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHSoundFiles8.wxs"
+ "$(WIX)bin\heat.exe" dir "$(ProjectDir)..\..\conf" -cg FreeSWITCHConfFiles -gg -scom -sreg -sfrag -srd -dr CONFLOCATION -var var.FreeSWITCHConfFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHConfFiles.wxs"
+"$(WIX)bin\heat.exe" dir "$(ProjectDir)..\..\Win32\Release\sounds" -cg FreeSWITCHSoundFiles8 -gg -scom -sreg -sfrag -srd -dr SOUNDLOCATION -var var.FreeSWITCHSoundFilesDir -out "$(ProjectDir)Fragments\FreeSWITCHSoundFiles8.wxs"