]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
(MODENDP-148) Move "a=sendrecv" from session to media section of SDP
authorMichael Jerris <mike@jerris.com>
Tue, 11 Nov 2008 15:29:35 +0000 (15:29 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 11 Nov 2008 15:29:35 +0000 (15:29 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10331 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 55eb949858c91d9f56246570123fbf1d11bf749a..112aea997f482e2600e1c63db0fd8af26ff554dc 100644 (file)
@@ -91,10 +91,10 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
                                        "o=FreeSWITCH %010u %010u IN %s %s\n"
                                        "s=FreeSWITCH\n"
                                        "c=IN %s %s\n" "t=0 0\n"
-                                       "a=%s\n"
-                                       "m=audio %d RTP/%sAVP", tech_pvt->owner_id, tech_pvt->session_id, family, ip, family, ip, sr, port,
-                                       (!switch_strlen_zero(tech_pvt->local_crypto_key) && switch_test_flag(tech_pvt, TFLAG_SECURE)) ? "S" : "");
-
+                                       "m=audio %d RTP/%sAVP", 
+                                       tech_pvt->owner_id, tech_pvt->session_id, family, ip, family, ip, port,
+                                       (!switch_strlen_zero(tech_pvt->local_crypto_key) 
+                                       && switch_test_flag(tech_pvt,TFLAG_SECURE)) ? "S" : "");
 
        if (tech_pvt->rm_encoding) {
                switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " %d", tech_pvt->pt);
@@ -187,6 +187,9 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
                switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=ptime:%d\n", ptime);
        }
 
+       if (sr) {
+               switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=%s\n", sr);
+       } 
 
        if (!switch_strlen_zero(tech_pvt->local_crypto_key) && switch_test_flag(tech_pvt, TFLAG_SECURE)) {
                switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=crypto:%s\n", tech_pvt->local_crypto_key);