[asterisk-dev] Re: AGI SayNumber gender option

Tony Mountifield tony at softins.clara.co.uk
Wed Sep 27 08:24:24 MST 2006


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.

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
> 


-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org


More information about the asterisk-dev mailing list