[asterisk-commits] tilghman: branch group/dialplan_aesthetics r75809 - in /team/group/dialplan_a...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 18 18:05:57 CDT 2007
Author: tilghman
Date: Wed Jul 18 18:05:55 2007
New Revision: 75809
URL: http://svn.digium.com/view/asterisk?view=rev&rev=75809
Log:
Merged revisions 75227,75254-75255,75259-75260,75307,75351,75365,75379,75381,75400,75402,75404,75406,75438,75442-75443,75446,75448,75451,75505,75530,75566,75584-75586,75620,75622,75624,75659,75706,75709-75710,75713-75714,75734,75750,75761,75805-75806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r75227 | file | 2007-07-16 10:57:01 -0500 (Mon, 16 Jul 2007) | 2 lines
I found this sillyness when I did my ast_module_user conversion. Return immediately if no data was passed to the Verbose application.
................
r75254 | mmichelson | 2007-07-16 13:18:19 -0500 (Mon, 16 Jul 2007) | 16 lines
Merged revisions 75253 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75253 | mmichelson | 2007-07-16 13:16:15 -0500 (Mon, 16 Jul 2007) | 8 lines
Restoring functionality from 1.2 wherein Retrydial will not exit if there is no announce file specified.
This change makes it so that if there is no announce file specified, the application will continue until finished (or caller hangs up).
If a bogus announce file is specified, then a warning message will be printed saying that the file could not be found, but execution will
still continue.
(closes issue #10186, reported by jon, patched by me)
........
................
r75255 | file | 2007-07-16 13:24:29 -0500 (Mon, 16 Jul 2007) | 2 lines
For my next trick I will make it so dialplan functions no longer need to call ast_module_user_add and ast_module_user_remove. These are now called in the ast_func_read and ast_func_write functions outside of the module.
................
r75259 | file | 2007-07-16 13:36:02 -0500 (Mon, 16 Jul 2007) | 2 lines
Add in check for the GCC attribute deprecated. It may be used soon!
................
r75260 | file | 2007-07-16 13:38:28 -0500 (Mon, 16 Jul 2007) | 2 lines
Change the function name slightly... just for kpfleming!
................
r75307 | kpfleming | 2007-07-16 15:58:56 -0500 (Mon, 16 Jul 2007) | 19 lines
Merged revisions 75306 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75306 | kpfleming | 2007-07-16 15:53:24 -0500 (Mon, 16 Jul 2007) | 11 lines
Merged revisions 75304 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75304 | kpfleming | 2007-07-16 15:46:58 -0500 (Mon, 16 Jul 2007) | 3 lines
provide proper copyright/license attribution for this structure that was copied from a BSD-licensed header file long, long ago...
........
................
................
r75351 | qwell | 2007-07-17 07:01:05 -0500 (Tue, 17 Jul 2007) | 6 lines
Fix an incorrect parenthesization (TODO: Find a better word) in app_dial
Pointed out by Fanzhou Zhao
Closes issue #10216
................
r75365 | rizzo | 2007-07-17 07:46:25 -0500 (Tue, 17 Jul 2007) | 7 lines
Initialize a variable to avoid a warning when the compiler
(and/or the optimization level) may think it is used uninitialized.
The code was indeed correct, but unfortunately the result of
some compiler checks such as -Wunused and -Wuninitialized depends
heavily on the optimization level.
................
r75379 | rizzo | 2007-07-17 09:32:15 -0500 (Tue, 17 Jul 2007) | 16 lines
Introduce ast_parse_arg() , a generic function to parse strings
in a consistent way. This is meant to replace the custom code
which is repeated all over the place in the various files when
parsing config files, CLI entries and other string information.
Right now the code supports parsing int32, uint32 and sockaddr_in with
optional default values and bound checks. It contains minimal error
checking, but that can be easily extended as the need arises.
Being a new API i am introducing this only in trunk, though I believe
that once the interface has been ironed out it might become a
worthwhile addition to 1.4 as well - basically, the first time
we will need to fix a piece of argument parsing code, we might as
well bring in this change and use the new API instead.
................
r75381 | file | 2007-07-17 09:48:17 -0500 (Tue, 17 Jul 2007) | 2 lines
Make trunk build once again.
................
r75400 | murf | 2007-07-17 14:40:29 -0500 (Tue, 17 Jul 2007) | 1 line
via 10206, I have added an option (e) to Dial to allow the h exten to get run on peer. Had to upgrade ast_flag stuff to 64 bits to do this.
................
r75402 | russell | 2007-07-17 14:46:13 -0500 (Tue, 17 Jul 2007) | 11 lines
Merged revisions 75401 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75401 | russell | 2007-07-17 14:45:07 -0500 (Tue, 17 Jul 2007) | 3 lines
Remove a duplicated newline character in AGI debug output.
(closes issue #10207, patch by seanbright)
........
................
r75404 | russell | 2007-07-17 15:01:54 -0500 (Tue, 17 Jul 2007) | 20 lines
Merged revisions 75403 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75403 | russell | 2007-07-17 15:01:12 -0500 (Tue, 17 Jul 2007) | 12 lines
(closes issue #10209)
Reported by: juggie
Patches:
10209-trunk-2.patch uploaded by juggie
Tested by: juggie, blitzrage
In ast_pbx_run(), mark a channel as hung up after an application returned -1,
or when it runs out of extensions to execute. This is so that code can detect
that this channel has been hung up for things like making sure DeadAGI is used
on actual dead channels, and is beneficial for other things, like making sure
someone doesn't try to start spying on a channel that is about to go away.
........
................
r75406 | mmichelson | 2007-07-17 15:05:19 -0500 (Tue, 17 Jul 2007) | 14 lines
Merged revisions 75405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75405 | mmichelson | 2007-07-17 15:03:48 -0500 (Tue, 17 Jul 2007) | 6 lines
Fixing an error I made earlier. ast_fileexists can return -1 on failure, so I need to be sure that we only enter the if
statement if it is successful.
Related to my fix to issue #10186
........
................
r75438 | russell | 2007-07-17 15:34:52 -0500 (Tue, 17 Jul 2007) | 15 lines
Blocked revisions 75437 via svnmerge
........
r75437 | russell | 2007-07-17 15:33:06 -0500 (Tue, 17 Jul 2007) | 8 lines
(issue #10210)
Reported by: juggie
Patches:
10210-1.4-grr.patch uploaded by juggie (license #24)
Tested by: juggie, blitzrage
Log a warning if someone uses DeadAGI on a live channel.
........
................
r75442 | russell | 2007-07-17 15:42:50 -0500 (Tue, 17 Jul 2007) | 20 lines
Merged revisions 75441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75441 | russell | 2007-07-17 15:42:12 -0500 (Tue, 17 Jul 2007) | 12 lines
Merged revisions 75440 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75440 | russell | 2007-07-17 15:41:41 -0500 (Tue, 17 Jul 2007) | 4 lines
After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)
........
................
................
r75443 | file | 2007-07-17 15:44:55 -0500 (Tue, 17 Jul 2007) | 9 lines
Blocked revisions 75439 via svnmerge
........
r75439 | file | 2007-07-17 17:40:57 -0300 (Tue, 17 Jul 2007) | 2 lines
Ensure that the pointer to STUN data does not go to unaccessible memory. (ASA-2007-017)
........
................
r75446 | russell | 2007-07-17 15:49:09 -0500 (Tue, 17 Jul 2007) | 21 lines
Merged revisions 75445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75445 | russell | 2007-07-17 15:48:21 -0500 (Tue, 17 Jul 2007) | 13 lines
Merged revisions 75444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)
........
................
................
r75448 | russell | 2007-07-17 15:52:20 -0500 (Tue, 17 Jul 2007) | 8 lines
Blocked revisions 75447 via svnmerge
........
r75447 | russell | 2007-07-17 15:51:25 -0500 (Tue, 17 Jul 2007) | 1 line
cast arguments to ast_log so that it builds without warnings for me
........
................
r75451 | russell | 2007-07-17 15:58:40 -0500 (Tue, 17 Jul 2007) | 19 lines
Merged revisions 75450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75450 | russell | 2007-07-17 15:57:56 -0500 (Tue, 17 Jul 2007) | 11 lines
Merged revisions 75449 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75449 | russell | 2007-07-17 15:57:09 -0500 (Tue, 17 Jul 2007) | 3 lines
Properly check for the length in the skinny packet to prevent an invalid memcpy.
(ASA-2007-016)
........
................
................
r75505 | murf | 2007-07-17 16:52:51 -0500 (Tue, 17 Jul 2007) | 1 line
Spotted this bug today myself, trying to reproduce a BE bug. Use a vert bar instead of a comma, when calling RAND.
................
r75530 | tilghman | 2007-07-18 07:38:36 -0500 (Wed, 18 Jul 2007) | 10 lines
Merged revisions 75529 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75529 | tilghman | 2007-07-18 07:29:41 -0500 (Wed, 18 Jul 2007) | 2 lines
Using a freed frame causes crashes (closes issue #9317)
........
................
r75566 | file | 2007-07-18 08:59:01 -0500 (Wed, 18 Jul 2007) | 2 lines
Minor code tweaks. Variables were being checked wrong in some situations and didn't need to be checked in others.
................
r75584 | file | 2007-07-18 09:20:19 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75583 | file | 2007-07-18 11:18:53 -0300 (Wed, 18 Jul 2007) | 5 lines
(closes issue #10224)
Reported by: irroot
Record the threadid of each running thread before shutting them down as the thread themselves may change the value.
........
................
r75585 | murf | 2007-07-18 09:35:07 -0500 (Wed, 18 Jul 2007) | 1 line
This corrects the problem with flags and %lld formats on 64-bit machines, where uint64_t is NOT acceptable for %lld, and also works on 32-bit machines. At least, with gcc.
................
r75586 | file | 2007-07-18 09:59:20 -0500 (Wed, 18 Jul 2007) | 2 lines
Clean up func_curl a bit.
................
r75620 | file | 2007-07-18 10:26:52 -0500 (Wed, 18 Jul 2007) | 10 lines
Merged revisions 75619 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75619 | file | 2007-07-18 12:25:45 -0300 (Wed, 18 Jul 2007) | 2 lines
Don't bother reloading chan_h323 if it did not load successfully in the first place. This would otherwise cause a crash.
........
................
r75622 | file | 2007-07-18 10:42:11 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75621 | file | 2007-07-18 12:41:06 -0300 (Wed, 18 Jul 2007) | 5 lines
(closes issue #10165)
Reported by: elandivar
It is possible for hold status to exist without call limits set, so we need to ensure update_call_counter is executed regardless.
........
................
r75624 | file | 2007-07-18 10:45:18 -0500 (Wed, 18 Jul 2007) | 10 lines
Merged revisions 75623 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75623 | file | 2007-07-18 12:44:02 -0300 (Wed, 18 Jul 2007) | 2 lines
Few more places that needs to check for onhold state.
........
................
r75659 | dhubbard | 2007-07-18 12:59:56 -0500 (Wed, 18 Jul 2007) | 17 lines
Merged revisions 75658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75658 | dhubbard | 2007-07-18 12:56:30 -0500 (Wed, 18 Jul 2007) | 9 lines
Merged revisions 75657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75657 | dhubbard | 2007-07-18 12:48:33 -0500 (Wed, 18 Jul 2007) | 1 line
removed the word 'pissed' from ast_log(...) function call for BE-90
........
................
................
r75706 | tilghman | 2007-07-18 14:47:20 -0500 (Wed, 18 Jul 2007) | 2 lines
Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
................
r75709 | russell | 2007-07-18 14:50:21 -0500 (Wed, 18 Jul 2007) | 1 line
convert some lines indented with spaces to tabs
................
r75710 | qwell | 2007-07-18 14:51:18 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
(closes issue #9887)
........
r75707 | qwell | 2007-07-18 14:48:12 -0500 (Wed, 18 Jul 2007) | 4 lines
Fix issues with new 79x1 phones.
Issue 9887, patches by DEA
........
................
r75713 | file | 2007-07-18 15:01:52 -0500 (Wed, 18 Jul 2007) | 9 lines
Blocked revisions 75712 via svnmerge
........
r75712 | file | 2007-07-18 17:00:23 -0300 (Wed, 18 Jul 2007) | 2 lines
Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode using GCC 4.2.
........
................
r75714 | qwell | 2007-07-18 15:05:45 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
(closes issue #9245)
........
r75711 | qwell | 2007-07-18 14:54:32 -0500 (Wed, 18 Jul 2007) | 4 lines
Fixes for 7935/7936 conference phones.
Issue 9245, patch by slimey.
........
................
r75734 | qwell | 2007-07-18 15:18:00 -0500 (Wed, 18 Jul 2007) | 9 lines
Merged revisions 75732 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75732 | qwell | 2007-07-18 15:17:27 -0500 (Wed, 18 Jul 2007) | 1 line
Umm, why are we transmitting dialtone on cfwdall?
........
................
r75750 | tilghman | 2007-07-18 15:43:54 -0500 (Wed, 18 Jul 2007) | 18 lines
Merged revisions 75749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75749 | tilghman | 2007-07-18 15:40:18 -0500 (Wed, 18 Jul 2007) | 10 lines
Merged revisions 75748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75748 | tilghman | 2007-07-18 15:31:36 -0500 (Wed, 18 Jul 2007) | 2 lines
Store prior to copy (closes issue #10193)
........
................
................
r75761 | russell | 2007-07-18 16:10:27 -0500 (Wed, 18 Jul 2007) | 21 lines
Merged revisions 75759 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75759 | russell | 2007-07-18 16:09:46 -0500 (Wed, 18 Jul 2007) | 13 lines
Merged revisions 75757 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75757 | russell | 2007-07-18 16:09:13 -0500 (Wed, 18 Jul 2007) | 5 lines
When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)
........
................
................
r75805 | tilghman | 2007-07-18 17:40:03 -0500 (Wed, 18 Jul 2007) | 2 lines
Change IAX variables to use datastores (closes issue #9315)
................
r75806 | russell | 2007-07-18 17:52:54 -0500 (Wed, 18 Jul 2007) | 5 lines
I thought I noticed a memory leak earlier when I saw that the contents of this
list were not destroyed when the module is unloaded. However, after reading
the code related to the use of this list a lot today, I realized that it isn't
necessary. So, I have added a comment to explain why it isn't necessary.
................
Modified:
team/group/dialplan_aesthetics/ (props changed)
team/group/dialplan_aesthetics/apps/app_alarmreceiver.c
team/group/dialplan_aesthetics/apps/app_dial.c
team/group/dialplan_aesthetics/apps/app_meetme.c
team/group/dialplan_aesthetics/apps/app_minivm.c
team/group/dialplan_aesthetics/apps/app_mixmonitor.c
team/group/dialplan_aesthetics/apps/app_playback.c
team/group/dialplan_aesthetics/apps/app_queue.c
team/group/dialplan_aesthetics/apps/app_rpt.c
team/group/dialplan_aesthetics/apps/app_sms.c
team/group/dialplan_aesthetics/apps/app_verbose.c
team/group/dialplan_aesthetics/apps/app_voicemail.c
team/group/dialplan_aesthetics/cdr/cdr_csv.c
team/group/dialplan_aesthetics/cdr/cdr_manager.c
team/group/dialplan_aesthetics/cdr/cdr_odbc.c
team/group/dialplan_aesthetics/cdr/cdr_pgsql.c
team/group/dialplan_aesthetics/cdr/cdr_radius.c
team/group/dialplan_aesthetics/cdr/cdr_sqlite.c
team/group/dialplan_aesthetics/cdr/cdr_tds.c
team/group/dialplan_aesthetics/channels/chan_agent.c
team/group/dialplan_aesthetics/channels/chan_h323.c
team/group/dialplan_aesthetics/channels/chan_iax2.c
team/group/dialplan_aesthetics/channels/chan_local.c
team/group/dialplan_aesthetics/channels/chan_mgcp.c
team/group/dialplan_aesthetics/channels/chan_phone.c
team/group/dialplan_aesthetics/channels/chan_sip.c
team/group/dialplan_aesthetics/channels/chan_skinny.c
team/group/dialplan_aesthetics/channels/chan_zap.c
team/group/dialplan_aesthetics/channels/iax2-parser.c
team/group/dialplan_aesthetics/channels/iax2-parser.h
team/group/dialplan_aesthetics/channels/iax2-provision.c
team/group/dialplan_aesthetics/channels/iax2-provision.h
team/group/dialplan_aesthetics/channels/misdn/ie.c
team/group/dialplan_aesthetics/configure
team/group/dialplan_aesthetics/configure.ac
team/group/dialplan_aesthetics/funcs/func_curl.c
team/group/dialplan_aesthetics/funcs/func_cut.c
team/group/dialplan_aesthetics/funcs/func_enum.c
team/group/dialplan_aesthetics/funcs/func_odbc.c
team/group/dialplan_aesthetics/funcs/func_rand.c
team/group/dialplan_aesthetics/funcs/func_realtime.c
team/group/dialplan_aesthetics/funcs/func_strings.c
team/group/dialplan_aesthetics/funcs/func_timeout.c
team/group/dialplan_aesthetics/funcs/func_version.c
team/group/dialplan_aesthetics/funcs/func_vmcount.c
team/group/dialplan_aesthetics/include/asterisk/abstract_jb.h
team/group/dialplan_aesthetics/include/asterisk/autoconfig.h.in
team/group/dialplan_aesthetics/include/asterisk/cdr.h
team/group/dialplan_aesthetics/include/asterisk/channel.h
team/group/dialplan_aesthetics/include/asterisk/chanspy.h
team/group/dialplan_aesthetics/include/asterisk/config.h
team/group/dialplan_aesthetics/include/asterisk/dundi.h
team/group/dialplan_aesthetics/include/asterisk/features.h
team/group/dialplan_aesthetics/include/asterisk/jabber.h
team/group/dialplan_aesthetics/include/asterisk/localtime.h
team/group/dialplan_aesthetics/include/asterisk/module.h
team/group/dialplan_aesthetics/include/asterisk/options.h
team/group/dialplan_aesthetics/include/asterisk/pbx.h
team/group/dialplan_aesthetics/include/asterisk/speech.h
team/group/dialplan_aesthetics/include/asterisk/strings.h
team/group/dialplan_aesthetics/include/asterisk/utils.h
team/group/dialplan_aesthetics/main/asterisk.c
team/group/dialplan_aesthetics/main/callerid.c
team/group/dialplan_aesthetics/main/cdr.c
team/group/dialplan_aesthetics/main/channel.c
team/group/dialplan_aesthetics/main/cli.c
team/group/dialplan_aesthetics/main/config.c
team/group/dialplan_aesthetics/main/dns.c
team/group/dialplan_aesthetics/main/http.c
team/group/dialplan_aesthetics/main/loader.c
team/group/dialplan_aesthetics/main/logger.c
team/group/dialplan_aesthetics/main/manager.c
team/group/dialplan_aesthetics/main/pbx.c
team/group/dialplan_aesthetics/main/rtp.c
team/group/dialplan_aesthetics/main/say.c
team/group/dialplan_aesthetics/main/stdtime/localtime.c
team/group/dialplan_aesthetics/main/utils.c
team/group/dialplan_aesthetics/pbx/pbx_ael.c
team/group/dialplan_aesthetics/pbx/pbx_dundi.c
team/group/dialplan_aesthetics/pbx/pbx_realtime.c
team/group/dialplan_aesthetics/res/res_agi.c
team/group/dialplan_aesthetics/res/res_features.c
team/group/dialplan_aesthetics/res/res_musiconhold.c
team/group/dialplan_aesthetics/res/snmp/agent.c
team/group/dialplan_aesthetics/utils/ael_main.c
team/group/dialplan_aesthetics/utils/check_expr.c
Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
automerge = *
Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul 18 18:05:55 2007
@@ -1,1 +1,1 @@
-/trunk:1-75218
+/trunk:1-75806
Modified: team/group/dialplan_aesthetics/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_alarmreceiver.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_alarmreceiver.c (original)
+++ team/group/dialplan_aesthetics/apps/app_alarmreceiver.c Wed Jul 18 18:05:55 2007
@@ -306,8 +306,8 @@
static int write_metadata( FILE *logfile, char *signalling_type, struct ast_channel *chan)
{
int res = 0;
- time_t t;
- struct tm now;
+ struct timeval t;
+ struct ast_tm now;
char *cl,*cn;
char workstring[80];
char timestamp[80];
@@ -324,12 +324,12 @@
/* Get the current time */
- time(&t);
+ t = ast_tvnow();
ast_localtime(&t, &now, NULL);
/* Format the time */
- strftime(timestamp, sizeof(timestamp), time_stamp_format, &now);
+ ast_strftime(timestamp, sizeof(timestamp), time_stamp_format, &now);
res = fprintf(logfile, "\n\n[metadata]\n\n");
Modified: team/group/dialplan_aesthetics/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_dial.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_dial.c (original)
+++ team/group/dialplan_aesthetics/apps/app_dial.c Wed Jul 18 18:05:55 2007
@@ -109,7 +109,8 @@
" party has answered, but before the call gets bridged. The 'called'\n"
" DTMF string is sent to the called party, and the 'calling' DTMF\n"
" string is sent to the calling party. Both parameters can be used\n"
-" alone.\n"
+" alone.\n"
+" e - execute the 'h' extension for peer after the call ends\n"
" f - Force the callerid of the *calling* channel to be set as the\n"
" extension associated with the channel using a dialplan 'hint'.\n"
" For example, some PSTNs do not allow CallerID to be set to anything\n"
@@ -256,10 +257,11 @@
OPT_IGNORE_FORWARDING = (1 << 27),
OPT_CALLEE_GOSUB = (1 << 28),
OPT_CANCEL_ELSEWHERE = (1 << 29),
+ OPT_PEER_H = (1 << 30),
};
-#define DIAL_STILLGOING (1 << 30)
-#define DIAL_NOFORWARDHTML (1 << 31)
+#define DIAL_STILLGOING (1 << 31)
+#define DIAL_NOFORWARDHTML ((uint64_t)1 << 32) /* flags are now 64 bits, so keep it up! */
enum {
OPT_ARG_ANNOUNCE = 0,
@@ -282,6 +284,7 @@
AST_APP_OPTION('c', OPT_CANCEL_ELSEWHERE),
AST_APP_OPTION('d', OPT_DTMF_EXIT),
AST_APP_OPTION_ARG('D', OPT_SENDDTMF, OPT_ARG_SENDDTMF),
+ AST_APP_OPTION('e', OPT_PEER_H),
AST_APP_OPTION('f', OPT_FORCECLID),
AST_APP_OPTION('g', OPT_GO_ON),
AST_APP_OPTION_ARG('G', OPT_GOTO, OPT_ARG_GOTO),
@@ -314,7 +317,7 @@
struct chanlist {
struct chanlist *next;
struct ast_channel *chan;
- unsigned int flags;
+ uint64_t flags;
int forwards;
};
@@ -1567,7 +1570,7 @@
ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]);
peer->priority++;
ast_pbx_start(peer);
- hanguptree(outgoing, NULL, ast_test_flag(&opts, OPT_CANCEL_ELSEWHERE ? 1 : 0));
+ hanguptree(outgoing, NULL, ast_test_flag(&opts, OPT_CANCEL_ELSEWHERE) ? 1 : 0);
if (continue_exec)
*continue_exec = 1;
res = 0;
@@ -1789,7 +1792,29 @@
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
-
+
+
+ if (ast_test_flag(&opts, OPT_PEER_H)) {
+ ast_log(LOG_NOTICE,"PEER context: %s; PEER exten: %s; PEER priority: %d\n",
+ peer->context, peer->exten, peer->priority);
+ }
+
+ strcpy(peer->context, chan->context);
+
+ if (ast_test_flag(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) {
+ strcpy(peer->exten, "h");
+ peer->priority = 1;
+ while (ast_exists_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num)) {
+ if ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num))) {
+ /* Something bad happened, or a hangup has been requested. */
+ ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", peer->context, peer->exten, peer->priority, peer->name);
+ if (option_verbose > 1)
+ ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", peer->context, peer->exten, peer->priority, peer->name);
+ break;
+ }
+ peer->priority++;
+ }
+ }
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)
chan->hangupcause = peer->hangupcause;
@@ -1880,22 +1905,33 @@
res = dial_exec_full(chan, args.dialdata, &peerflags, &continue_exec);
if (continue_exec)
break;
+
if (res == 0) {
if (ast_test_flag(&peerflags, OPT_DTMF_EXIT)) {
- if (!(res = ast_streamfile(chan, args.announce, chan->language)))
- res = ast_waitstream(chan, AST_DIGIT_ANY);
+ if (!ast_strlen_zero(args.announce)) {
+ if (ast_fileexists(args.announce, NULL, chan->language) > 0) {
+ if(!(res = ast_streamfile(chan, args.announce, chan->language)))
+ ast_waitstream(chan, AST_DIGIT_ANY);
+ } else
+ ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce);
+ }
if (!res && sleep) {
if (!ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_start(chan, NULL, NULL);
res = ast_waitfordigit(chan, sleep);
}
} else {
- if (!(res = ast_streamfile(chan, args.announce, chan->language)))
- res = ast_waitstream(chan, "");
+ if (!ast_strlen_zero(args.announce)) {
+ if (ast_fileexists(args.announce, NULL, chan->language) > 0) {
+ if (!(res = ast_streamfile(chan, args.announce, chan->language)))
+ res = ast_waitstream(chan, "");
+ } else
+ ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce);
+ }
if (sleep) {
if (!ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_start(chan, NULL, NULL);
- if (!res)
+ if (!res)
res = ast_waitfordigit(chan, sleep);
}
}
Modified: team/group/dialplan_aesthetics/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_meetme.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_meetme.c (original)
+++ team/group/dialplan_aesthetics/apps/app_meetme.c Wed Jul 18 18:05:55 2007
@@ -3115,7 +3115,7 @@
}
if (cnf->origframe)
ast_frfree(cnf->origframe);
- cnf->origframe = f;
+ cnf->origframe = ast_frdup(f);
ast_mutex_unlock(&cnf->listenlock);
if (s)
res = ast_writestream(s, f);
Modified: team/group/dialplan_aesthetics/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_minivm.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_minivm.c (original)
+++ team/group/dialplan_aesthetics/apps/app_minivm.c Wed Jul 18 18:05:55 2007
@@ -364,7 +364,7 @@
char attachfmt[80]; /*!< Format for voicemail audio file attachment */
char etemplate[80]; /*!< Pager template */
char ptemplate[80]; /*!< Voicemail format */
- unsigned int flags; /*!< MVM_ flags */
+ uint64_t flags; /*!< MVM_ flags */
struct ast_variable *chanvars; /*!< Variables for e-mail template */
double volgain; /*!< Volume gain for voicemails sent via e-mail */
AST_LIST_ENTRY(minivm_account) list;
@@ -395,7 +395,7 @@
/*! \brief Options for leaving voicemail with the voicemail() application */
struct leave_vm_options {
- unsigned int flags;
+ uint64_t flags;
signed char record_gain;
};
@@ -425,9 +425,9 @@
int timezones; /*!< Number of time zones */
int templates; /*!< Number of templates */
- time_t reset; /*!< Time for last reset */
+ struct timeval reset; /*!< Time for last reset */
int receivedmessages; /*!< Number of received messages since reset */
- time_t lastreceived; /*!< Time for last voicemail sent */
+ struct timeval lastreceived; /*!< Time for last voicemail sent */
};
/*! \brief Statistics for voicemail */
@@ -713,12 +713,11 @@
static int get_date(char *s, int len)
{
- struct tm tm;
- time_t t;
-
- t = time(0);
- ast_localtime(&t, &tm, NULL);
- return strftime(s, len, "%a %b %e %r %Z %Y", &tm);
+ struct ast_tm tm;
+ struct timeval tv = ast_tvnow();
+
+ ast_localtime(&tv, &tm, NULL);
+ return ast_strftime(s, len, "%a %b %e %r %Z %Y", &tm);
}
@@ -898,8 +897,8 @@
char dur[PATH_MAX];
char tmp[80] = "/tmp/astmail-XXXXXX";
char tmp2[PATH_MAX];
- time_t now;
- struct tm tm;
+ struct timeval now;
+ struct ast_tm tm;
struct minivm_zone *the_zone = NULL;
int len_passdata;
struct ast_channel *ast;
@@ -986,15 +985,15 @@
AST_LIST_UNLOCK(&minivm_zones);
}
- time(&now);
+ now = ast_tvnow();
ast_localtime(&now, &tm, the_zone ? the_zone->timezone : NULL);
- strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", &tm);
+ ast_strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", &tm);
/* Start printing the email to the temporary file */
fprintf(p, "Date: %s\n", date);
/* Set date format for voicemail mail */
- strftime(date, sizeof(date), template->dateformat, &tm);
+ ast_strftime(date, sizeof(date), template->dateformat, &tm);
/* Populate channel with channel variables for substitution */
@@ -1550,14 +1549,13 @@
if (!txt) {
ast_log(LOG_WARNING, "Error opening text file for output\n");
} else {
- struct tm tm;
- time_t now;
+ struct ast_tm tm;
+ struct timeval now = ast_tvnow();
char timebuf[30];
char logbuf[BUFSIZ];
get_date(date, sizeof(date));
- now = time(NULL);
ast_localtime(&now, &tm, NULL);
- strftime(timebuf, sizeof(timebuf), "%H:%M:%S", &tm);
+ ast_strftime(timebuf, sizeof(timebuf), "%H:%M:%S", &tm);
snprintf(logbuf, sizeof(logbuf),
/* "Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:origtime:duration:durationstatus:accountcode" */
@@ -1608,7 +1606,7 @@
pbx_builtin_setvar_helper(chan, "MVM_FORMAT", fmt);
}
- global_stats.lastreceived = time(NULL);
+ global_stats.lastreceived = ast_tvnow();
global_stats.receivedmessages++;
// /* Go ahead and delete audio files from system, they're not needed any more */
// if (ast_fileexists(tmptxtfile, NULL, NULL) <= 0) {
@@ -1982,7 +1980,7 @@
char filename[PATH_MAX];
char tmp[PATH_MAX];
char *domain;
- char *tmpptr;
+ char *tmpptr = NULL;
struct minivm_account *vmu;
char *username = argv[0];
struct ast_flags flags = { 0 };
@@ -2384,8 +2382,8 @@
ast_set2_flag((&globalflags), FALSE, MVM_OPERATOR);
strcpy(global_charset, "ISO-8859-1");
/* Reset statistics */
- memset(&global_stats, 0, sizeof(struct minivm_stats));
- global_stats.reset = time(NULL);
+ memset(&global_stats, 0, sizeof(global_stats));
+ global_stats.reset = ast_tvnow();
/* Make sure we could load configuration file */
if (!cfg) {
@@ -2651,7 +2649,7 @@
/*! \brief Show stats */
static int handle_minivm_show_stats(int fd, int argc, char *argv[])
{
- struct tm time;
+ struct ast_tm time;
char buf[BUFSIZ];
ast_cli(fd, "* Mini-Voicemail statistics\n");
@@ -2665,11 +2663,11 @@
} else {
ast_cli(fd, " Received messages since last reset: %d\n", global_stats.receivedmessages);
ast_localtime(&global_stats.lastreceived, &time, NULL);
- strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &time);
+ ast_strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &time);
ast_cli(fd, " Last received voicemail: %s\n", buf);
}
ast_localtime(&global_stats.reset, &time, NULL);
- strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &time);
+ ast_strftime(buf, sizeof(buf), "%a %b %e %r %Z %Y", &time);
ast_cli(fd, " Last reset: %s\n", buf);
ast_cli(fd, "\n");
Modified: team/group/dialplan_aesthetics/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_mixmonitor.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_mixmonitor.c (original)
+++ team/group/dialplan_aesthetics/apps/app_mixmonitor.c Wed Jul 18 18:05:55 2007
@@ -97,7 +97,7 @@
char *filename;
char *post_process;
char *name;
- unsigned int flags;
+ uint64_t flags;
};
enum {
@@ -226,7 +226,7 @@
return NULL;
}
-static void launch_monitor_thread(struct ast_channel *chan, const char *filename, unsigned int flags,
+static void launch_monitor_thread(struct ast_channel *chan, const char *filename, uint64_t flags,
int readvol, int writevol, const char *post_process)
{
pthread_t thread;
Modified: team/group/dialplan_aesthetics/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_playback.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_playback.c (original)
+++ team/group/dialplan_aesthetics/apps/app_playback.c Wed Jul 18 18:05:55 2007
@@ -281,12 +281,13 @@
const char *ints, const char *lang, const char *format, const char *timezone, const char *prefix)
{
char buf[128];
- struct tm tm;
+ struct ast_tm tm;
+ struct timeval tv = { t, 0 };
say_args_t a = { chan, ints, lang, -1, -1 };
if (format == NULL)
format = "";
- ast_localtime(&t, &tm, NULL);
+ ast_localtime(&tv, &tm, NULL);
snprintf(buf, sizeof(buf), "%s:%s:%04d%02d%02d%02d%02d.%02d-%d-%3d",
prefix,
format,
Modified: team/group/dialplan_aesthetics/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_queue.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_queue.c (original)
+++ team/group/dialplan_aesthetics/apps/app_queue.c Wed Jul 18 18:05:55 2007
@@ -2598,7 +2598,7 @@
res2 |= ast_autoservice_stop(qe->chan);
if (peer->_softhangup) {
/* Agent must have hung up */
- ast_log(LOG_WARNING, "Agent on %s hungup on the customer. They're going to be pissed.\n", peer->name);
+ ast_log(LOG_WARNING, "Agent on %s hungup on the customer.\n", peer->name);
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "AGENTDUMP", "%s", "");
record_abandoned(qe);
if (qe->parent->eventwhencalled)
Modified: team/group/dialplan_aesthetics/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_rpt.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_rpt.c (original)
+++ team/group/dialplan_aesthetics/apps/app_rpt.c Wed Jul 18 18:05:55 2007
@@ -587,6 +587,7 @@
int i, j;
long long diff;
char a[100] = "";
+ struct ast_tm tm;
struct timeval lasttv;
ast_mutex_lock(&locklock);
@@ -597,8 +598,8 @@
lasttv.tv_sec = lasttv.tv_usec = 0;
for (i = 0; i < 32; i++) {
j = (i + lock_ring_index_copy) % 32;
- strftime(a, sizeof(a) - 1, "%m/%d/%Y %H:%M:%S",
- localtime(&lock_ring_copy[j].tv.tv_sec));
+ ast_strftime(a, sizeof(a) - 1, "%m/%d/%Y %H:%M:%S",
+ ast_localtime(&lock_ring_copy[j].tv, &tm, NULL));
diff = 0;
if (lasttv.tv_sec) {
diff = (lock_ring_copy[j].tv.tv_sec - lasttv.tv_sec) * 1000000;
@@ -1890,7 +1891,7 @@
struct ast_channel *mychannel;
const char *p, *ct;
time_t t;
- struct tm localtm;
+ struct ast_tm localtm;
#ifdef APP_RPT_LOCK_DEBUG
struct lockthread *t;
#endif
@@ -5619,7 +5620,7 @@
static void do_scheduler(struct rpt *myrpt)
{
int res;
- struct tm tmnow;
+ struct ast_tm tmnow;
memcpy(&myrpt->lasttv, &myrpt->curtv, sizeof(struct timeval));
Modified: team/group/dialplan_aesthetics/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_sms.c?view=diff&rev=75809&r1=75808&r2=75809
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_sms.c (original)
+++ team/group/dialplan_aesthetics/apps/app_sms.c Wed Jul 18 18:05:55 2007
@@ -277,9 +277,10 @@
/*! \brief static, return a date/time in ISO format */
static char *isodate(time_t t, char *buf, int len)
{
- struct tm tm;
- ast_localtime(&t, &tm, NULL);
- strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm);
+ struct ast_tm tm;
+ struct timeval tv = { t, 0 };
+ ast_localtime(&tv, &tm, NULL);
+ ast_strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm);
return buf;
}
@@ -511,10 +512,11 @@
/*! \brief pack a date and return */
static void packdate(unsigned char *o, time_t w)
{
- struct tm t;
+ struct ast_tm t;
+ struct timeval tv = { w, 0 };
int z;
- ast_localtime(&w, &t, NULL);
+ ast_localtime(&tv, &t, NULL);
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
z = -t.tm_gmtoff / 60 / 15;
#else
@@ -1113,7 +1115,8 @@
static void sms_compose2(sms_t *h, int more)
{
- struct tm tm;
+ struct ast_tm tm;
+ struct timeval tv = { h->scts, 0 };
char stm[9];
h->omsg[0] = 0x00; /* set later... */
@@ -1122,7 +1125,7 @@
if (h->smsc) { /* deliver */
h->omsg[0] = 0x11; /* SMS_DELIVERY */
/* Required: 10 11 12 13 14 15 17 (seems they must be ordered!) */
- ast_localtime(&h->scts, &tm, NULL);
+ ast_localtime(&tv, &tm, NULL);
sprintf(stm, "%02d%02d%02d%02d", tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min); /* Date mmddHHMM */
adddata_proto2(h, 0x14, stm, 8); /* Date */
if (*h->oa == 0)
@@ -1160,14 +1163,15 @@
{
int f, i, sz = 0;
int msg, msgsz;
- struct tm tm;
+ struct ast_tm tm;
+ struct timeval tv = { 0, 0 };
char debug_buf[MAX_DEBUG_LEN * 3 + 1];
sz = h->imsg[1] + 2;
/* ast_verbose(VERBOSE_PREFIX_3 "SMS-P2 Frame: %s\n", sms_hexdump(h->imsg, sz, debug_buf)); */
/* Parse message body (called payload) */
- h->scts = time(NULL);
+ tv.tv_sec = h->scts = time(NULL);
for (f = 4; f < sz; ) {
msg = h->imsg[f++];
msgsz = h->imsg[f++];
@@ -1183,14 +1187,14 @@
h->udl = msgsz;
break;
case 0x14: /* Date SCTS */
- h->scts = time(NULL);
- ast_localtime(&h->scts, &tm, NULL);
+ tv.tv_sec = h->scts = time(NULL);
+ ast_localtime(&tv, &tm, NULL);
[... 5592 lines stripped ...]
More information about the asterisk-commits
mailing list