[Freeswitch-dev] FreeSWITCH reads commented lines from vars.xml
Michael Collins
msc at freeswitch.org
Sun Aug 29 19:44:23 PDT 2010
Giovanni,
This answer is very well-crafted. I think I will try to find a good spot on
the wiki to add this knowledge. I didn't see it explicitly mentioned, just
implicitly on the mod_xml_curl page. I'll add it to the list of stuff to
talk about on the next FS community conf call.
Thanks,
MC
On Sun, Aug 29, 2010 at 8:05 AM, 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20100829/a8ba4027/attachment.html
More information about the FreeSWITCH-dev
mailing list