]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
WIP
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 29 Aug 2006 02:42:27 +0000 (02:42 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 29 Aug 2006 02:42:27 +0000 (02:42 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2422 d0543943-73ff-0310-b7d9-9358b9ac24b2

build/checkversion.sh
src/mod/endpoints/mod_sofia/mod_sofia.c

index 2b2ad2b79341ec4af23cdfcc87af0ceb92fe9b24..f17be108c5ba5366b66e33d91757b91e5fd72d91 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if [ -f .noversion ] ; then
+    exit
+fi
+
 if eval test x${1} = xforce ; then
        rm -f .version
 fi
index cd52a5e3601090a643f43638ed24fe55c469488a..2b0061437453be025f71ad964df2b7cf9414fc88 100644 (file)
@@ -724,7 +724,9 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
                set_local_sdp(tech_pvt);
                activate_rtp(tech_pvt);
                if (tech_pvt->nh) {
-                       nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT(tech_pvt->contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
+                       nua_respond(tech_pvt->nh, SIP_200_OK, 
+                                               //SIPTAG_CONTACT(tech_pvt->contact),
+                                               SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP:\n%s\n", tech_pvt->local_sdp_str);
                }
        }
@@ -1001,7 +1003,9 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                        set_local_sdp(tech_pvt);
                        activate_rtp(tech_pvt);
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "183 SDP:\n%s\n", tech_pvt->local_sdp_str);
-                       nua_respond(tech_pvt->nh, SIP_183_SESSION_PROGRESS, SIPTAG_CONTACT(tech_pvt->contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
+                       nua_respond(tech_pvt->nh, SIP_183_SESSION_PROGRESS,
+                                               //SIPTAG_CONTACT(tech_pvt->contact),
+                                               SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
                        //nua_respond(tech_pvt->nh, SIP_200_OK, SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
            }
        }
@@ -1241,7 +1245,9 @@ static void sip_i_state(int status,
                        }
                }
                switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
-               nua_respond(nh, SIP_488_NOT_ACCEPTABLE, SIPTAG_CONTACT(tech_pvt->contact), TAG_END());
+               nua_respond(nh, SIP_488_NOT_ACCEPTABLE, 
+                                       //SIPTAG_CONTACT(tech_pvt->contact), 
+                                       TAG_END());
                break;
        case nua_callstate_completing:
                nua_ack(nh, TAG_END());
@@ -1270,12 +1276,13 @@ static void sip_i_state(int status,
                                switch_channel_set_state(channel, CS_INIT);
                                switch_set_flag_locked(tech_pvt, TFLAG_READY);
                                switch_core_session_thread_launch(session);
-                               //nua_respond(nh, SIP_100_TRYING, SIPTAG_CONTACT(tech_pvt->contact), TAG_END());
                                return;
                        }
                }
                switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
-               nua_respond(nh, SIP_488_NOT_ACCEPTABLE, SIPTAG_CONTACT(tech_pvt->contact), TAG_END());
+               nua_respond(nh, SIP_488_NOT_ACCEPTABLE, 
+                                       //SIPTAG_CONTACT(tech_pvt->contact), 
+                                       TAG_END());
                break;          
        case nua_callstate_early:
                break;
@@ -1314,7 +1321,9 @@ static void sip_i_state(int status,
                        }
                }
                switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS");
-               nua_respond(nh, SIP_488_NOT_ACCEPTABLE, SIPTAG_CONTACT(tech_pvt->contact), TAG_END());
+               nua_respond(nh, SIP_488_NOT_ACCEPTABLE, 
+                                       //SIPTAG_CONTACT(tech_pvt->contact), 
+                                       TAG_END());
                break;
        case nua_callstate_terminating:
                break;
@@ -1366,6 +1375,8 @@ static void sip_i_invite(nua_t *nua,
                        
                        snprintf(username, sizeof(username), "%s@%s", (char *) from->a_url->url_user, (char *) from->a_url->url_host);
                        attach_private(session, profile, tech_pvt, username);
+
+                       snprintf(username, sizeof(username), "sip:%s@%s", (char *) from->a_url->url_user, (char *) from->a_url->url_host);
                        tech_pvt->contact = sip_contact_create(tech_pvt->home, URL_STRING_MAKE(username), NULL);
                        
                        channel = switch_core_session_get_channel(session);