From 4969a5eaecdeb352fb23e0149e904c11c294ff2e Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 23 Oct 2009 13:27:00 +0000 Subject: [PATCH] MODENDP-253 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15205 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.h | 1 + src/mod/endpoints/mod_sofia/sofia.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index 836b2308f6..3225fda999 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -79,6 +79,7 @@ typedef struct private_object private_object_t; #define MY_EVENT_EXPIRE "sofia::expire" #define MY_EVENT_GATEWAY_STATE "sofia::gateway_state" #define MY_EVENT_NOTIFY_REFER "sofia::notify_refer" +#define MY_EVENT_REINVITE "sofia::reinvite" #define MULTICAST_EVENT "multicast::event" #define SOFIA_REPLACES_HEADER "_sofia_replaces_" diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index eb7975e080..70af207f02 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -3475,6 +3475,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, switch_channel_t *other_channel = NULL; char st[80] = ""; int is_dup_sdp = 0; + switch_event_t *s_event = NULL; tl_gets(tags, NUTAG_CALLSTATE_REF(ss_state), @@ -3893,6 +3894,11 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, SOATAG_REUSE_REJECTED(1), SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END()); + + if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_REINVITE) == SWITCH_STATUS_SUCCESS) { + switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(session)); + switch_event_fire(&s_event); + } } else { nua_respond(tech_pvt->nh, SIP_488_NOT_ACCEPTABLE, TAG_END()); }