]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add absolute_codec_string
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 5 Feb 2007 19:42:02 +0000 (19:42 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 5 Feb 2007 19:42:02 +0000 (19:42 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4125 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index bbdf3f21385036c536e976f72a508cda2a33b73e..c239604abff659185f8de11021ef0e717bb95f8d 100644 (file)
@@ -779,7 +779,7 @@ static void set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, c
 static void tech_set_codecs(private_object_t *tech_pvt)
 {
     switch_channel_t *channel;
-    char *codec_string = NULL;
+    char *abs, *codec_string = NULL;
     char *csdyn = NULL;
     char *ocodec = NULL;
 
@@ -797,18 +797,22 @@ static void tech_set_codecs(private_object_t *tech_pvt)
     assert (channel != NULL);
 
 
-    if (!(codec_string = switch_channel_get_variable(channel, "codec_string"))) {
-        codec_string = tech_pvt->profile->codec_string;
-    }
-
-    if ((ocodec = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
-        if (!codec_string || (tech_pvt->profile->pflags & PFLAG_DISABLE_TRANSCODING)) {
-            codec_string = ocodec;
-        } else {
-            if ((csdyn = switch_mprintf("%s,%s", ocodec, codec_string))) {
-                codec_string = csdyn;
-            } else {
+    if ((abs = switch_channel_get_variable(channel, "absolute_codec_string"))) {
+        codec_string = abs;
+    } else {
+        if (!(codec_string = switch_channel_get_variable(channel, "codec_string"))) {
+            codec_string = tech_pvt->profile->codec_string;
+        }
+        
+        if ((ocodec = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
+            if (!codec_string || (tech_pvt->profile->pflags & PFLAG_DISABLE_TRANSCODING)) {
                 codec_string = ocodec;
+            } else {
+                if ((csdyn = switch_mprintf("%s,%s", ocodec, codec_string))) {
+                    codec_string = csdyn;
+                } else {
+                    codec_string = ocodec;
+                }
             }
         }
     }