Summary:ASTERISK-03679: [patch] say date support for AGI
Reporter:Matthew Nicholson (mnicholson)Labels:
Date Opened:2005-03-14 17:46:51.000-0600Date Closed:2008-01-15 15:29:20.000-0600
Versions:Frequency of
Environment:Attachments:( 0) say_date.diff.txt
Description:Here is a patch that adds say date functionallity to AGI.  Currently AGI only has say time avaliable.


Disclaimer on File...
Comments:By: Tilghman Lesher (tilghman) 2005-03-14 21:09:24.000-0600

Why not just do a Command SayUnixtime?  It's far more versatile, giving you access to multiple date formats and multiple timezones.  And it isn't any less efficient than a direct AGI command.

By: Matthew Nicholson (mnicholson) 2005-03-15 09:20:48.000-0600

Well if you EXEC SayUnixtime, you don't get any digits the user pressed.

By: Clod Patry (junky) 2005-03-15 10:11:59.000-0600

Your patches returns something? Nothing, like the "EXEC SayUnixtime".

It's just a say, users have nothing to enter in.

And anthm told me it's "bad" to do EXEC into AGI, cause we're losing speed, so maybe that app is good to be born?

edited on: 03-15-05 10:14

By: Tilghman Lesher (tilghman) 2005-03-15 11:08:08.000-0600

The amount of speed that you lose doing an AGI (forking, remember) is so much more than the speed you lose by doing an application lookup that it's laughable to accuse EXEC of being slow.

By: Clod Patry (junky) 2005-03-15 12:47:43.000-0600

if we loosing speed during foking of the agi, why losing time again with an EXEC? My opinion is good to see that in res_agi, but if we don't isn't so bad, cause we can do the EXEC.

By: Tilghman Lesher (tilghman) 2005-03-15 12:57:27.000-0600

The time lost doing an Exec is negligible.  We're talking fractions of a millisecond, here.

By: Matthew Nicholson (mnicholson) 2005-03-15 16:06:17.000-0600

> Your patches returns something? Nothing, like the "EXEC SayUnixtime".

Yes.  Look at the code.  My patch returns the excape digit pressed.

200 result=(digit)

By: Clod Patry (junky) 2005-03-15 18:07:34.000-0600

I've tried it, and see what i've got:
AGI Rx << SAY DATE 1110930297 "123"
   -- Playing 'digits/day-2' (language 'en')
   -- Playing 'digits/mon-2' (language 'en')
   -- Playing 'digits/15' (language 'en')
   -- Playing 'digits/2' (language 'en')
   -- Playing 'digits/thousand' (language 'en')
   -- Playing 'digits/5' (language 'en')
AGI Tx >> 200 result=0

and i've pressed "3" between the 'digits/15' and the 'digits/2' and it returns 0. It always returns 0, except when you hangup during the streaming of the "date", which returns -1.

Why not use ast_say_date_with_format called in like Corydon said?

By: Matthew Nicholson (mnicholson) 2005-03-16 17:55:54.000-0600

So, does 'SAY TIME' return anything?

By: Clod Patry (junky) 2005-03-16 21:31:24.000-0600

when i said returns nothing, it was my fault, sorry.
But now, how do you explain my last post?

By: Matthew Nicholson (mnicholson) 2005-03-17 11:43:56.000-0600

I did not use the say date with format stuff because I did not need it.  This is what I needed, so that's what I put in there.

By: Clod Patry (junky) 2005-03-17 13:52:54.000-0600

If you want to see that agi app into cvs, why not doing it?

By: Tilghman Lesher (tilghman) 2005-03-17 13:56:51.000-0600

No, SAY TIME, while it accepts escape digits, does not actually return them, either.

By: Mark Spencer (markster) 2005-03-30 01:07:15.000-0600

Fixed in CVS head.

By: Olle Johansson (oej) 2005-04-01 00:33:12.000-0600

---New feature, not added to 1.0.

By: Digium Subversion (svnbot) 2008-01-15 15:29:20.000-0600

Repository: asterisk
Revision: 5305

U   trunk/res/res_agi.c

r5305 | markster | 2008-01-15 15:29:20 -0600 (Tue, 15 Jan 2008) | 2 lines

Add say date to AGi (bug ASTERISK-3679)