[asterisk-dev] AGI SayNumber gender option

Andrew Latham lathama at gmail.com
Wed Sep 27 08:53:34 MST 2006


I would guess that it means Custom and None.

On 9/27/06, John Lange <j.lange at epic.ca> wrote:
> Ok, I'll bite. What gender is "c" or "n" ?
>
> 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
>


-- 
---
Andrew Latham - AKA: LATHAMA (lay-th-ham-eh)
lathama at lathama.com - lathama at gmail.com
If any of the above are down we have bigger problems than my email!
Hind sight is most always 20/20 or better.
---


More information about the asterisk-dev mailing list