diff --git a/src/include/switch_types.h b/src/include/switch_types.h index e553d54605..0e56c0c13d 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -465,7 +465,8 @@ typedef enum { CF_CONTROLLED = (1 << 12), CF_NOMEDIA = (1 << 13), CF_SUSPEND = (1 << 14), - CF_EVENT_PARSE = (1 << 15) + CF_EVENT_PARSE = (1 << 15), + CF_NO_EARLY = (1 << 16) } switch_channel_flag_t; diff --git a/src/mod/codecs/mod_g729/Makefile b/src/mod/codecs/mod_g729/Makefile index ad8c52540c..0b47c55915 100644 --- a/src/mod/codecs/mod_g729/Makefile +++ b/src/mod/codecs/mod_g729/Makefile @@ -1,13 +1,9 @@ -ifeq ($(shell ls $(BASE)/libs/libg729),$(BASE)/libs/libg729) -CFLAGS += -I$(PREFIX)/include/g729 + +CFLAGS += -I$(PREFIX)/include/libg729 LDFLAGS +=-lg729 -else -CFLAGS += -DG729_PASSTHROUGH - -endif all: $(MODNAME).$(DYNAMIC_LIB_EXTEN) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index a6a053e83a..c3f78b07d7 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2548,6 +2548,12 @@ static void sip_i_state(int status, } } if (r_sdp) { + if (switch_channel_test_flag(channel, CF_NO_EARLY)) { + //ignore 183 but how do we say we dont want it and not end the call + //nua_respond(nh, SIP_403_FORBIDDEN, TAG_END()); + return; + } + if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) { switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA); switch_channel_set_flag(channel, CF_EARLY_MEDIA); diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 2c40593f4d..7f01da6293 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -2436,7 +2436,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess peer_sessions[i] = NULL; continue; } - + //switch_channel_set_flag(peer_channels[i], CF_NO_EARLY); switch_core_session_read_lock(peer_sessions[i]); pool = NULL;