[Freeswitch-dev] FreeSWITCH reads commented lines from vars.xml

Seven Du dujinfang at gmail.com
Sun Aug 29 09:16:27 PDT 2010


I use <xX-PRE-PROCESS   ;)

On Sun, Aug 29, 2010 at 11:05 PM, Giovanni Maruzzelli
<gmaruzz at celliax.org> wrote:
> On Sun, Aug 29, 2010 at 4:48 PM, Oleg Khovayko <khovayko at gmail.com> wrote:
>> Hi all,
>>
>> Today I found bug in the FreeSWITCH v 1.0.6.
>>
>> When I write in the file vars.xml following codecs config lines {{{
>>
>> <X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA"/>
>> <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA"/>
>>
>> <!--
>> <X-PRE-PROCESS cmd="set"
>> data="global_codec_prefs=G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM,H264,H263,H263-1998"/>
>>
>> <X-PRE-PROCESS cmd="set"
>> data="outbound_codec_prefs=PCMU,PCMA,GSM,H264,H263,H263-1998"/>
>> -->
>>
>> }}}
>>
>> FreeSWITCH reads config values from the comments, and, since comments
>> located after correct values,
>> then values from comments overwrites correct config values.
>
>
> That's not a bug.
>
> The PRE-PROCESS tags and values are read wherever they are.
>
> They are not parsed by the XML parser that parse all the rest of the
> config files, but they are used as macros by the preprocessor (that
> runs before the XML parser).
>
> So, if you want to comment it, you can edit as in:
> X-COMMENTED-PRE-PROCESS so the preprocessor will not use it.
>
> -giovanni
>
>
>>
>> and command: sofia status profile internal
>> shows:
>> CODECS IN
>> G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM,H264,H263,H263-1998
>> CODECS OUT
>> G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM,H264,H263,H263-1998
>>
>> ATTN:
>> After modify vars.xml, for see this bug, need perform full restart of
>> freeswitch, by commands like:
>>  /usr/local/etc/rc.d/freeswitch stop
>> /usr/local/etc/rc.d/freeswitch start
>>
>> If you just execute "reloadxml" in the fs_cli, codecs lines will be
>> unchanged.
>>
>> Oleg
>>
>>
>> _______________________________________________
>> FreeSWITCH-dev mailing list
>> FreeSWITCH-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>
>
>
> --
> Sincerely,
>
> Giovanni Maruzzelli
> Cell : +39-347-2665618
>
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn



More information about the FreeSWITCH-dev mailing list