Encoding bug?

Jul 3, 2014 at 10:19 PM
Edited Jul 3, 2014 at 11:25 PM
Hi. I tried Exec command passing non English words, but asterisk got it wrong and replaced with ?.

I see that there is agiServer.SocketEncoding which defaults to ASCII. Why?
If I set to agiServer.SocketEncoding = Encoding.UTF8;, it crashes.

Is this bug and how can I resolve this problem?
Jul 4, 2014 at 11:21 AM
I've never had this issue. I also use the "googletts.agi" via Exec and have no issues at all.

Can you provide the output of "agi debug on" please, this can only be done from the console, and not a connected (asterisk -rc) session. What language are you passing in the options. I am having at guess at Russian from the "ru" option at the end of the exec. I have to admit, i've only ever tested in English.

If you can provide the output of the debug then we can look at this issue from there.
Jul 4, 2014 at 11:29 AM
When you say changing it to UTF8 causes it to "crash", what exactly do you mean? Is there an exception? If so, what's the output of the exception? I assume also you mean AsterNET crashes?
Jul 7, 2014 at 12:25 PM

My code:
 AsteriskFastAGI agiServer = new AsteriskFastAGI();
            agiServer.SocketEncoding = Encoding.UTF8;
            agiServer.MappingStrategy = new GeneralMappingStrategy(
                new List<ScriptMapping>()
                new ScriptMapping() {
                    ScriptName = "acccheck",
                    ScriptClass = "AccCheckExample.AccCheckAGI"

            Console.WriteLine("Press ctrl-c to exit...");

Exec("AGI", @"googletts.agi,'Здравствуйте.',ru");
Jul 7, 2014 at 12:31 PM
When UTF8 option is not used, ANSWER works, but there is no sound (as Russian string is wrongly passed and not decoded).
Jul 9, 2014 at 3:04 PM
Any ideas? Should I resubmit this to Issues section?
Jul 10, 2014 at 8:15 AM

Yeah, please. We had a quick look at this the other day and agree, once UTF-8 is selected no commands are accepted by Asterisk. what would be great is when you raise the issue, is it possible for you to submit a wireshark trace of the conversation between asterisk and FastAGI? (ensure you remove any sensitive information). This will help us see exactly what is being sent over the wire.

Odd, as UTF-8 is ASCII compatible.

Thanks for your help in getting this resolved.