[Freeswitch-svn] [commit] r4125 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Mon Feb 5 14:42:02 EST 2007
Author: anthm
Date: Mon Feb 5 14:42:02 2007
New Revision: 4125
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
add absolute_codec_string
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Feb 5 14:42:02 2007
@@ -779,7 +779,7 @@
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 @@
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;
+ }
}
}
}
More information about the Freeswitch-svn
mailing list