]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
working on 2 boxes at once ignore me
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 13 Oct 2009 20:28:45 +0000 (20:28 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 13 Oct 2009 20:28:45 +0000 (20:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15150 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_core.h
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c
src/switch_core_session.c
src/switch_ivr_bridge.c

index bb5f507e42054455523f43fbd92e3b377c54890c..5f4f4d3d2dab719ab23730ac9ad55aca46eb984b 100644 (file)
@@ -59,6 +59,8 @@ struct switch_app_log {
        struct switch_app_log *next;
 };
 
+#define MESSAGE_STAMP_FFL(_m) _m->_file = __FILE__; _m->_func = __SWITCH_FUNC__; _m->_line = __LINE__
+
 #define MESSAGE_STRING_ARG_MAX 10
 /*! \brief A message object designed to allow unlike technologies to exchange data */
 struct switch_core_session_message {
index 16f9729d34ac245e728f72044b105327de593117..9335cab6a7d36051783056435d3fe75f6372775a 100644 (file)
@@ -1295,8 +1295,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                        nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
                                                         TAG_IF(!switch_strlen_zero(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
                                                         SIPTAG_PAYLOAD_STR(message), TAG_END());
-                               } else if ((ua && (switch_stristr("polycom", ua) || switch_stristr("FreeSWITCH", ua))) || 
-                                                  switch_stristr("UPDATE", tech_pvt->x_actually_support_remote)) {
+                               } else if ((ua && (switch_stristr("polycom", ua) ||
+                                                                  switch_stristr("UPDATE", tech_pvt->x_actually_support_remote)))) {
                                        snprintf(message, sizeof(message), "P-Asserted-Identity: \"%s\" <%s>", name, number);
                                        nua_update(tech_pvt->nh,
                                                           TAG_IF(!switch_strlen_zero_buf(message), SIPTAG_HEADER_STR(message)),
index 926ce85cb21e1e55721c7e7a91907f8c904f8975..609543409bcef1b9ff04a93ebc89d5dad17ca726 100644 (file)
@@ -404,6 +404,7 @@ void sofia_send_callee_id(switch_core_session_t *session, const char *name, cons
                switch_core_session_message_t *msg;
                
                msg = switch_core_session_alloc(session_b, sizeof(*msg));
+               MESSAGE_STAMP_FFL(msg);
                msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
                msg->string_array_arg[0] = switch_core_session_strdup(session_b, name);
                msg->string_array_arg[1] = switch_core_session_strdup(session_b, number);
@@ -443,7 +444,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
                        }
                }
        }
-
+       
        if ((tmp = switch_channel_get_variable(channel, "sip_callee_id_name"))) {
                name = (char *)tmp;
        }
@@ -467,7 +468,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
        caller_profile = switch_channel_get_caller_profile(channel);
        caller_profile->callee_id_name = switch_core_strdup(caller_profile->pool, name);
        caller_profile->callee_id_number = switch_core_strdup(caller_profile->pool, number);
-
+       
        if (send) {
                sofia_send_callee_id(session, NULL, NULL);
        }
@@ -483,8 +484,8 @@ static void sofia_handle_sip_i_update(nua_t *nua, sofia_profile_t *profile, nua_
                return;
        }
 
-
        sofia_update_callee_id(session, profile, sip, SWITCH_TRUE);
+       nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
 }
 
 
index b3672f5fa9268efba1dedc86bd07ea2f703fdd06..b892524cbda9dd6476ecbcdde256a786ea0ba38c 100644 (file)
@@ -582,15 +582,24 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
                return status;
        }
 
-       message->_file = file;
-       message->_func = func;
-       message->_line = line;
+       if (!message->_file) {
+               message->_file = file;
+       }
+
+       if (!message->_func) {
+               message->_func = func;
+       }
+
+       if (!message->_line) {
+               message->_line = line;
+       }
 
        if (message->message_id > SWITCH_MESSAGE_INVALID) {
                message->message_id = SWITCH_MESSAGE_INVALID;
        }
 
-       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "%s receive message [%s]\n",
+       switch_log_printf(SWITCH_CHANNEL_ID_LOG, message->_file, message->_func, message->_line, 
+                                         switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "%s receive message [%s]\n",
                                          switch_channel_get_name(session->channel), message_names[message->message_id]);
        
        if (session->endpoint_interface->io_routines->receive_message) {
index 04f0af9eafb77b8fb0155871742a06dab5c08acb..020026920f88e7999b95dab88a5155fa877bfb66 100644 (file)
@@ -161,7 +161,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
        const char *silence_var, *var;
        int silence_val = 0, bypass_media_after_bridge = 0;
        const char *bridge_answer_timeout = NULL;
-       int answer_timeout, sent_update = -5;
+       int answer_timeout, sent_update = -50;
        time_t answer_limit = 0;
        
 #ifdef SWITCH_VIDEO_IN_THREADS