[Freeswitch-users] mod_say / switch_xml.c:2486 Invalid UTF-8 character to ampersand, skip it

Thorsten Göllner tg-maillistings at level5.de
Wed Apr 25 15:28:04 UTC 2018


SOLVED:

The problem only occured with german language. I copied a
xml-config-file from the voice-prompt-provider to the config directory
and did not check it. There was an error within the config file. Now it
works fine.

The correct config file look like this:

<?xml version="1.0" encoding="utf-8"?>
<include>
  <language name="de" sound-path="$${sounds_dir}/de/de/marilda"
tts-engine="cepstral" tts-voice="callie">
    <phrases>
      <macros>
        <X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this
now grabs whole subdir, previously grabbed only demo.xml -->
        <!--voicemail_en_tts is purely implemented with tts, we have the
files based one that is the default. -->
        <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>  <!--
vm/tts.xml if you want to use tts and have cepstral -->
        <X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/>  <!--
dir/tts.xml if you want to use tts and have cepstral -->
      </macros>
    </phrases>
  </language>
</include>

Best regards,
Thorsten

Am 25.04.2018 um 16:59 schrieb Thorsten Göllner:
> Hi,
>
> I "converted" all xml-files under ${conf_dir}/lang/ to utf-8 and added
> the following line to the top of each file:
> <?xml version="1.0" encoding="utf-8"?>
>
> Now the warnings about invalid utf-8-characters vanished.
>
> But I still face the error:
> [ERR] switch_xml.c:3180 Can't find phrases tag
> and I will not hear the dialed extension number (mailbox number).
>
> Because I use FusionPBX I examined the voicemail-lua-app and found the
> following:
>
> --the person at extension 101 is not available record your message at
> the tone press any key or stop talking to end the recording
> if (name == "person_not_available_record_message") then
>         table.insert(actions,
> {app="streamFile",data="voicemail/vm-person.wav"});
>         --pronounce the voicemail_id
>         if (voicemail_alternate_greet_id and
> string.len(voicemail_alternate_greet_id) > 0) then
>                 table.insert(actions,
> {app="say.number.iterated",data=voicemail_alternate_greet_id});
>         elseif (voicemail_greet_id and string.len(voicemail_greet_id) >
> 0) then
>                 table.insert(actions,
> {app="say.number.iterated",data=voicemail_greet_id});
>         else
>                 table.insert(actions,
> {app="say.number.iterated",data=voicemail_id});
>         end
>         table.insert(actions,
> {app="streamFile",data="voicemail/vm-not_available.wav"});
> end
>
> So I thought the problem was "data=voicemail_id". I insertet a
> Log-Output and got the following:
> voicemail_id=13
>
> And yes - I called extension 13.
>
> But the question remains: Why does this lead to "[ERR] switch_xml.c:3180
> Can't find phrases tag."?
>
> Thorsten
>
> Am 25.04.2018 um 15:23 schrieb Thorsten Göllner:
>> Hi,
>>
>> I am using Freeswitch 1.6.19~64bit on CentOs 7 (with FusionPBX 4.2.2) -
>> working fine so far. But when calling a mailbox, I can hear the greeting
>> but can not hear the destination number. I can find this macro is used:
>>
>> <macro name="voicemail_play_greeting">
>>   <input pattern="^(.*)$">
>>     <match>
>>       <action function="play-file" data="voicemail/vm-person.wav"/>
>>       <action function="say" data="$1" method="pronounced"
>> type="name_spelled"/>
>>       <action function="play-file" data="voicemail/vm-not_available.wav"/>
>>     </match>
>>   </input>
>> </macro>
>>
>> This is leading me to track it down to the function "say".
>>
>> So I configured a simple inbound destination which answers the call and
>> just makes "say : de number pronounced 12345". When calling this number
>> I get the following error:
>>
>> EXECUTE sofia/internal/12 at mydomain.cloud say(de number pronounced 12345)
>> 2018-04-25 15:07:09.732930 [DEBUG] freeswitch_lua.cpp:365 DBH handle
>> 0x7f33b405a700 Connected.

>> 2018-04-25 15:07:09.732930 [DEBUG] freeswitch_lua.cpp:382 DBH handle
>> 0x7f33b405a700 released.
>> 2018-04-25 15:07:09.732930 [WARNING] switch_xml.c:2486 Invalid UTF-8
>> character to ampersand, skip it
>> 2018-04-25 15:07:09.732930 [WARNING] switch_xml.c:2486 Invalid UTF-8
>> character to ampersand, skip it
>> 2018-04-25 15:07:09.732930 [WARNING] switch_xml.c:2486 Invalid UTF-8
>> character to ampersand, skip it
>> 2018-04-25 15:07:09.732930 [WARNING] switch_xml.c:2486 Invalid UTF-8
>> character to ampersand, skip it
>> 2018-04-25 15:07:09.732930 [ERR] switch_xml.c:3180 Can't find phrases tag.
>> EXECUTE sofia/internal/12 at mydomain.cloud hangup()
>>
>> I checked the source code but my coding skill is not good enough. I do
>> not really know, where the problem is.
>>
>> Do you have any hint for me?
>>
>> Best regards, Thorsten
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>





More information about the FreeSWITCH-users mailing list