]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODENDP-253
authorBrian West <brian@freeswitch.org>
Fri, 23 Oct 2009 13:27:00 +0000 (13:27 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 23 Oct 2009 13:27:00 +0000 (13:27 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15205 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index 836b2308f6de8c25e3255153286327477cf4616d..3225fda999c565f5c8b14a69043c5f9548b66590 100644 (file)
@@ -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_"
index eb7975e0809d6af8bd662025dd4a6fdcf2df8516..70af207f02a6ecc2d150fcd405fe6688e7cd5dcc 100644 (file)
@@ -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());
                                }