Commit Graph

2409 Commits

Author SHA1 Message Date
Mark Michelson
ad89849308 Removing a debug message I accidentally just committed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:11:44 +00:00
Mark Michelson
eac09a0cd0 Fixing Portuguese syntax for saying dates and times. Also some coding guidelines cleanup.
(closes issue #11599, reported and patched by caio1982, coding guidelines cleanup by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 15:45:14 +00:00
Mark Michelson
2fa91746e3 We need to create the directory for a voicemail user even if they are using IMAP storage
since greetings are stored in the filesystem.

(closes issue #11388, reported by spditner, patch by me inspired by a patch by spditner)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 19:53:48 +00:00
Olle Johansson
517dacce70 Issue 11574: Add dependencies on res_monitor and res_features.
I wonder if Asterisk can run at all without res_features. My guess is that 
there's propably a lot of more modules and the core that depends on it.

Reported by: caio1982
(closes issue #11574)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:15:13 +00:00
Kevin P. Fleming
627f595c58 In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Mark Michelson
7f7cbe7f69 Prevent another potential fd leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:03:20 +00:00
Mark Michelson
fb077e33cb Prevent a possible fd leak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 19:49:55 +00:00
Jason Parker
4a869fa0c3 Don't increment user count until after name has been recorded (if enabled).
Issue 11048, tested by pep.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92617 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 21:15:45 +00:00
Mark Michelson
ef5f25b6c1 Removing an unused variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 16:08:55 +00:00
Mark Michelson
c8b5d2ea03 Fixing autofill to be more accurate. Specifically, if calls ahead of the current
caller were ringing members (but not yet bridged) there could be available members
and waiting callers who would not get matched up. The member availability checker
was correctly determining the number of available members in this scenario, but
the queue itself did not parallelly reflect this status on the pending calls. This
commit corrects the issue.

(closes issue #11459, reported by equissoftware, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11 17:42:25 +00:00
Mark Michelson
626053ac64 If there are no members in a queue, then the loop where the datastore for detecting
duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means
that when we try to free it, there's a crash. This stops that crash from occurring.

(closes issue #11499, reported by slavon, patched by eliel)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:29:44 +00:00
Russell Bryant
3e913c706f * Add channel locking around datastore operations that expect the channel
to be locked.
* Document why we don't record Local channels in the dialed interfaces list.
* Remove the dialed variable as it isn't needed.
* Restructure some code for clarity and coding guidelines stuff


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 16:38:48 +00:00
Russell Bryant
d1f1b3c4d6 * Add channel locking around datastore operations that expect the channel
to be locked.
* Document why we don't record Local channels in the dialed interfaces list.
* Handle memory allocation failure.
* Remove the dialed variable, as it wasn't actually needed.
* Tweak some formatting to conform to coding guidelines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 16:25:25 +00:00
Russell Bryant
c13539cb13 Don't unlock the dialed_interfaces list until we're done messing with the iterator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:51:22 +00:00
Russell Bryant
85e0e1919d Allow dialing local channels from Queue() and Dial() again. There was a slight
flaw in the code to prevent call forwards from looping that caused this problem.
(related to issue #11486)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:38:40 +00:00
Russell Bryant
079b4a2b18 Fix in an issue in the call forwarding handling code that was causing crashes
on every call into a queue.  I'm not entirely sure about the logic in this part
of the code, so I want to look at it some more tomorrow.  However, this makes
it safe and keeps it from crashing.

(closes issue #11486, reported by adamg, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:19:45 +00:00
Mark Michelson
ad820243bd IMAP storage did not honor the maxmsg setting in voicemail.conf, and it also had the possibility
of crashing if a user had more than 256 messages in their voicemail. This patch kills two birds with
one stone by adding maxmsg support and also setting a hard limit on the number of messages at 255 so
that the crashes cannot happen.

(closes issue #11101, reported by Skavin, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 20:25:11 +00:00
Mark Michelson
41661777a4 Reverting extra stuff I didn't mean to commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:57:13 +00:00
Mark Michelson
a1a592f3f0 The 'G' option for Dial() did not properly handle the case where only a label was
provided. This was due to the fact that the answering channel did not have an extension
set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto
on the answering channel since it is a wasteful call. The answering channel and the calling
channel are both directed to the same extension and context, just different priorities, so
we can just copy the values from the calling channel to the answering channel and increment
the answering channel's priority.

(closes issue #11382, reported by jon, patch by me with correction by jon)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:35:52 +00:00
Joshua Colp
335d271dda Fix build issue on the build cluster.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 05:29:33 +00:00
Mark Michelson
7b052b78e1 A big one...
This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop.
This is accomplished by creating a datastore on the calling channel which has a linked list of all devices
dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this
progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply
be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore
is detached from the channel and destroyed.

This change also introduces some side effects to the code which I shall enumerate here:

1. Datastore inheritance has been backported from trunk into 1.4
2. A large chunk of code has been removed from app_dial. This chunk is the section of code
   which handles the call forward case after the channel has been requested but before it has
   been called. This was removed because call-forwarding still works fine without it, it makes the
   code less error-prone should it need changing, and it made this set of changes much less painful
   to just have the forwarding handled in one place in each module.
3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore
   which is attached to the channel may be created and attached in either app_dial or app_queue, so they
   need a common place to find the datastore info. This approach was taken in case similar datastores are
   needed in the future, there will be a common place to add them.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 23:12:17 +00:00
Jason Parker
8315785663 Make sure we always close the conference fd if we have an open one.
Issue 11383, reported by markmhy, patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 22:06:36 +00:00
Russell Bryant
d208d0fc37 The other day when I went through making changes as a result of the ao2_link()
change, I added some code to set pointers to NULL after they were unreferenced.
This pointed out that in this place, the object was unreferenced before the
code was done using it.  So, move the unref down a little bit.
(crash reported by jmls on IRC)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-02 18:18:52 +00:00
Russell Bryant
1f8caa100d Change the behavior of ao2_link(). Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.

This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container.  It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 19:26:04 +00:00
Mark Michelson
aafa661ed7 This patch handles the case where a queue member with a negative penalty is added
via the manager. If a negative value is submitted for a member penalty, we set it to 0.

(closes issue #11411, reported and patched by Laureano)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 19:38:39 +00:00
Joshua Colp
c24b0e152a Fix a few memory leaks.
(closes issue #11405)
Reported by: eliel
Patches:
      load_realtime.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@90101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 22:59:28 +00:00
Mark Michelson
f1d612adb9 Recording greetings when using IMAP storage was causing zero-length files to be stored.
Since greetings are not retrieved from IMAP anyway, it is pointless to attempt storing them there.

(closes issue #11359, reported by spditner, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 17:30:47 +00:00
Russell Bryant
a5c9a71b4e Instead of depending on the return value of ast_true(), explicitly set the
eventwhencalled variable to 1.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:21:13 +00:00
Mark Michelson
a5db0a6103 Two changes with regards to the 'eventwhencalled' option of queues.conf
1) Due to some signed vs. unsigned silliness, setting 'eventwhencalled' to 
   'vars' or 'yes' did exactly the same thing. Thus the sign change of the
   ast_true call.

2) The vars2manager function overwrote a \n for every channel variable it parsed, resulting
   in bizarre output for the channel variables. This patch remedies this.

(related to issue #11385, however I'm not sure if this will actually be enough to close it)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:10:05 +00:00
Steve Murphy
1975b6e753 closes issue #11379; OK, this is an attempt to make both sides happy. To the cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 06:24:02 +00:00
Mark Michelson
7166081028 After issuing a "say load new", if a caller hangs up during the middle of playback of a number,
app_playback will continue to try to play the remaining files. With this change, no more files will
be played back upon hangup.

(closes issue #11345, reported and patched by IgorG)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 23:10:49 +00:00
Mark Michelson
f669a1c661 After issuing a "say load new" tons of warning messages are printed
out to the CLI every time do_say in app_playback is called. Removing these
warnings



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 23:02:30 +00:00
Joshua Colp
19fc56c14d Close the audio file before sending it to the post processing application.
(closes issue #11357)
Reported by: reformed
Patches:
      mixmonitor.patch uploaded by reformed (license 330)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:20:58 +00:00
Mark Michelson
5efa50746e Revert vmu->email back to an empty string if it was empty when imap_store_file
was called. This prevents sending a duplicate e-mail. 

(closes issue #11204, reported by spditner, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 15:48:06 +00:00
Joshua Colp
1884c603d6 When unloading app_meetme destroy any auto created contexts created by SLA.
(closes issue #11367)
Reported by: eliel


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 14:41:03 +00:00
Tilghman Lesher
e671cb909d Currently, zero-length voicemail messages cause a hangup in VoicemailMain.
This change fixes the problem, with a multi-faceted approach.  First, we
do our best to avoid these messages from being created in the first place,
and second, if that fails, we detect when the voicemail message is
zero-length and avoid exiting at that point.
Reported by: dtyoo
Patch by: gkloepfer,tilghman
(Closes issue #11083)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-24 06:19:23 +00:00
Mark Michelson
ddc5bf5b47 Fix a small error I made in my previous commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 19:27:51 +00:00
Mark Michelson
d105c24a57 Changing an inaccurate debug message to be less inaccurate. Under the circumstances, this
message would always report that there were 0 members available, even though that may not be true.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 19:24:22 +00:00
Mark Michelson
891b3bab2a Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.
(closes issue #11271, reported and patched by atis, with small modifications from me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 15:28:22 +00:00
Russell Bryant
bd5b8a4014 Update the SLAStation application to account for the case where the SLA thread
has a call out to the station,  but the user has pressed a line button to answer
the call instead of picking up the handset.  If they do, the phone sends out a
new INVITE.  So, the SLAStation app must check to see if it is picking up a
ringing trunk, and ensure that the other stations stop ringing.

(reported internally, patched by me, tested by mogorman)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 17:19:28 +00:00
Mark Michelson
dc6e3e9d5d Reverting commit made in revision 89205 since it is unnecessary.
Thanks to Kevin for pointing this out



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 16:02:02 +00:00
Mark Michelson
4155b5f984 Some sanity checking for MixMonitor. If only 1 argument is given, then the args.options
and args.post_process strings are uninitialized and could contain garbage. This change
handles this situation properly by only using arguments that we have parsed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 00:56:46 +00:00
Mark Michelson
9f5cf47a6f I made this same adjustment in trunk to fix a bug, and it makes sense to do it in 1.4 as
well. If an imapfolder is specified in voicemail.conf, don't ever explicitly connect to 
INBOX since it may not exist.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 16:47:23 +00:00
Tilghman Lesher
45c16cc29b The member refcount must be incremented, to avoid using it after deallocation.
A huge thanks go to lvl- for patiently providing the necessary valgrind output
that was necessary to finding this problem of memory corruption.
Reported by: lvl-
Patch by: tilghman
Closes issue #11174


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:39:37 +00:00
Luigi Rizzo
a0edff2477 Rename ast_string_field_free_pool to ast_string_field_free_memory,
and ast_string_field_free_all to ast_string_field_reset_all
to avoid misuse (due to too similar names and an error in
documentation). Fix two related memory leaks in app_meetme.

No need to merge to trunk, different fix already applied there.
Not applicable to 1.2



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-04 22:38:13 +00:00
Joshua Colp
f66e8c91ea Fix up commit for my Zap channel with spies in Meetme fix. (thanks Tony Mountifield!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 13:27:37 +00:00
Joshua Colp
7ee6cdf0c7 If a Zap channel contains a spy or a spy is added take it out of the conference in kernel space and make it go through Asterisk so the spy gets audio from both sides.
(closes issue #10060)
Reported by: mparker


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 01:53:55 +00:00
Joshua Colp
06e768e60d Return 1.4 to a state where it builds. Changing the arguments to a function and not changing where they are used is bad, mmmk?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 15:10:13 +00:00
BJ Weschke
c0d2b5b16d Fix issue where the recorded name wasn't getting removed correctly.
(closes issue #11115) 
 Reported by: davevg
 Patches:
    followme-v3.diff


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 14:31:45 +00:00
Mark Michelson
a4c50fdd7b Removing a completely unnecessary quota check from IMAP code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 21:06:31 +00:00