[asterisk-dev] Re: AGI SayNumber gender option

Andrei Koulik asterisk-dev at agk.nnov.ru
Thu Sep 28 05:25:13 MST 2006



Wednesday, September 27, 2006, 7:24:24 PM, you wrote:

> In article <1159367439.2234.175.camel at jlangelaptop.darkcore.net>,
> John Lange <j.lange at epic.ca> wrote:
>> Ok, I'll bite. What gender is "c" or "n" ?

> Common and Neuter, I guess, used in Scandinavian languages.
Yes I think those are meaning Common and Neuter.

So patch can be applied in any of Brian Candler editions?

> Cheers
> Tony

>> On Wed, 2006-09-27 at 11:41 +0400, asterisk-dev at agk.nnov.ru wrote:
>> > Hello,
>> > I've tried to use gender option for agi SAY NUMBER command in different way, but failed.
>> > So, I modified source code to make it possible to add 'f', 'm', 'c', or 'n' option at
>> > the end of a number to specify it's gender.
>> > Please, check following patch and apply it to main asterisk source code.
>> > 
>> > --- res_agi.c.orig      2006-09-07 00:02:59.000000000 +0400
>> > +++ res_agi.c   2006-09-26 17:17:27.000000000 +0400
>> > @@ -658,11 +658,17 @@
>> >  {
>> >         int res;
>> >         int num;
>> > +       int len;
>> > +       char opt[] = "\0\0";
>> >         if (argc != 4)
>> >                 return RESULT_SHOWUSAGE;
>> >         if (sscanf(argv[2], "%d", &num) != 1)
>> >                 return RESULT_SHOWUSAGE;
>> > -       res = ast_say_number_full(chan, num, argv[3], chan->language, (char *) NULL,
>> agi->audio, agi->ctrl);
>> > +       len = strlen(argv[2]) - 1;
>> > +       if ( len >=0 && (argv[2][len] == 'f' || argv[2][len] == 'm' 
>> > +         || argv[2][len] == 'c' || argv[2][len] == 'n') ) 
>> > +           opt[0] = argv[2][len];
>> > +       res = ast_say_number_full(chan, num, argv[3], chan->language, opt, agi->audio, agi->ctrl);
>> >         if (res == 1)
>> >                 return RESULT_SUCCESS;
>> >         fdprintf(agi->fd, "200 result=%d\n", res);
>> > 
>> 
>> 
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>> 
>> asterisk-dev mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>> 


-- 
Best regards,
 Koulik Andrei



More information about the asterisk-dev mailing list