]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
now support 3pcc
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 5 Oct 2007 15:47:48 +0000 (15:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 5 Oct 2007 15:47:48 +0000 (15:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5814 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index b0d21eee655447089cd66930e232f951143ac54d..06d9a2e2bbf74549ab06369af4c7352a4d2bfd0c 100644 (file)
@@ -41,6 +41,7 @@
 
 #define HAVE_APR
 #include <switch.h>
+#include <switch_version.h>
 #ifdef SWITCH_HAVE_ODBC
 #include <switch_odbc.h>
 #endif
@@ -64,7 +65,7 @@ typedef struct private_object private_object_t;
 #define MY_EVENT_EXPIRE "sofia::expire"
 #define MULTICAST_EVENT "multicast::event"
 #define SOFIA_REPLACES_HEADER "_sofia_replaces_"
-#define SOFIA_USER_AGENT "FreeSWITCH(mod_sofia)"
+#define SOFIA_USER_AGENT "FreeSWITCH-" SWITCH_VERSION_FULL "-mod_sofia"
 #define SOFIA_CHAT_PROTO "sip"
 #define SOFIA_SIP_HEADER_PREFIX "sip_h_"
 #define SOFIA_SIP_HEADER_PREFIX_T "~sip_h_"
index 35d0331f27ed6f81e9b86785fc0e81a1a2fb8658..e8f0f9bff69975824bede8ad152eb4fd520f8077 100644 (file)
@@ -1199,10 +1199,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                        goto done;
                                } else {
                                        switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP");
-                                       switch_set_flag(tech_pvt, TFLAG_LATE_NEGOTIATION);
                                        sofia_glue_tech_choose_port(tech_pvt);
                                        sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0);
-                                       
+                                       switch_channel_set_state(channel, CS_HIBERNATE);
                                        nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                SIPTAG_CONTACT_STR(tech_pvt->profile->url),
                                                                SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
@@ -1332,6 +1331,10 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP Error!\n");
                                                                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                                                        }
+                                                       if (switch_channel_get_state(channel) == CS_HIBERNATE) {
+                                                               switch_set_flag_locked(tech_pvt, TFLAG_READY);
+                                                               switch_channel_set_state(channel, CS_INIT);
+                                                       }
                                                        goto done;
                                                }
                                        }
index 801ab1f6e79d7688a2b86bf1b8b64b8f1d2c95f4..c202a4b44fa216fc90b69f06125d6fa39a7c30e9 100644 (file)
@@ -1016,11 +1016,14 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt)
 
 switch_status_t sofia_glue_tech_media(private_object_t *tech_pvt, char *r_sdp)
 {
-       sdp_parser_t *parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0);
+       sdp_parser_t *parser = NULL;
        sdp_session_t *sdp;
        uint8_t match = 0;
 
        assert(tech_pvt != NULL);
+       assert(r_sdp != NULL);
+
+       parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0);
 
        if (switch_strlen_zero(r_sdp)) {
                return SWITCH_STATUS_FALSE;