Commit Graph

2693 Commits

Author SHA1 Message Date
Joshua Colp
6b15b32783 Fix a bug where the followme application would continue trying numbers after the caller hung up.
(closes issue #13624)
Reported by: sgenyuk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@192429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 17:43:30 +00:00
Mark Michelson
b67282e2fd Fix a bug which resulted from the Hebrew voicemail commit.
This fixes a case where a certain message could get played twice.

(closes issue #13155)
Reported by: greenfieldtech
Patches:
      app_voicemail.c.multi-lang-patch uploaded by greenfieldtech (license 369)
Tested by: greenfieldtech



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@191778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 18:48:20 +00:00
Mark Michelson
972d9bf53c Kevin has informed me that thi sort of thing is not necessary.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@191629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 10:45:24 +00:00
Mark Michelson
85a8916552 Move static buffers to outside for loops in app_chanspy.
Similar to seanbright's commit 191422, this moves some static buffers
to be defined outside of for loops since it is undefined if memory
will be re-used or if the stack will grow with each iteration of the
loop.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@191628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 10:21:00 +00:00
Sean Bright
b5ec450104 Move the defintion of the a couple arrays out of loops.
According to Kevin, it is unspecified as to whether a variable defined inside
a block is allocated once by the compiler or for each pass through the block
(loops being the only interesting case), so just define these before we get
into our loop to be sure.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@191422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-01 15:42:48 +00:00
Sean Bright
603a56aa69 Fix a crash in app_queue with very long member lists.
A user reported via #asterisk that with very long lists of members, a crash
occurs in ast_strdupa, so just use a single buffer and ast_copy_string instead
of stack allocating copys of each interface name.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@191041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 15:23:07 +00:00
Terry Wilson
59ee389e31 Update CDR appropriately when AST_CAUSE_NO_ANSWER is set
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@189465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 21:10:27 +00:00
Terry Wilson
ef9ef40c19 Don't treat a NOANSWER like a CHANUNAVAIL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@189463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 21:00:52 +00:00
Tilghman Lesher
caef916825 Umask should not be exported into global namespace.
(closes issue #14912)
 Reported by: jcapp


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@188773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-16 21:02:29 +00:00
Tilghman Lesher
1cb43cfa75 Permit zero-length text messages in SIP.
(Related to an issue posted to the -users list, subject "AEL2, BASE64_DECODE and hexadecimal")


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@187362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 16:38:37 +00:00
Mark Michelson
8e31a331b4 Fix a crash due to too few arguments to RetryDial.
(closes issue #14852)
Reported by: junky
Patches:
      retry_fix.diff uploaded by junky (license 177)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@187135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-08 19:16:49 +00:00
Tilghman Lesher
56e7ca00c1 Fix Macro documentation to match current (and intended) behavior.
(See -dev mailing list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@186775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-07 22:16:50 +00:00
Mark Michelson
e2c30564bf Revert commit 186445 because it causes the build to fail when IMAP_STORAGE is used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@186565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-06 13:54:41 +00:00
Tilghman Lesher
3d9585f4ba Found a conflict in the last commit, due to multiple targets
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@186445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 19:56:48 +00:00
Tilghman Lesher
6d08bad538 Distinguish in a sent email between simple sends and forwards.
(closes issue #11678)
 Reported by: jamessan
 Patches: 
       20090330__bug11678.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman, lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@186415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 19:06:58 +00:00
Mark Michelson
7cc775e1ed Fix crash that would occur if an empty member was specified in queues.conf.
(closes issue #14796)
Reported by: pida



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 22:00:01 +00:00
Mark Michelson
e2eaf7f862 Fix Russian voicemail intro to say the word "messages" properly.
(closes issue #14736)
Reported by: chappell
Patches:
      voicemail_no_messages.diff uploaded by chappell (license 8)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 19:45:30 +00:00
Mark Michelson
c48480f5e4 Fix some state_interface stuff that was in trunk but not in the backport to 1.4.
Issue #14359 was fixed between the time that I posted the review of the backport
of the state interface change for 1.4. This merges the changes from that issue
back into 1.4.

(closes issue #14359)
Reported by: francesco_r



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 15:34:05 +00:00
Mark Michelson
fd7d3271c6 Fix queue weight behavior so that calls in low-weight queues are not inappropriately blocked.
(This is copied and pasted from the review request I made for this patch)

Asterisk has some odd behavior when queue weights are used. The current logic used when
potentially calling a queue member is:

If the member we are going to call is part of another queue and _that other queue has any 
callers in it_ and has a higher weight than the queue we are calling from, then don't try 
to contact that member. The issue here is what I have marked with underscores. If the 
higher-weighted queue has any callers in it at all, then the queue member will be unreachable 
from the lower-weighted queue. This has the potential to be really really bad if using a 
queue strategy, such as leastrecent or fewestcalls, with the potential to call the same 
member repeatedly.

The fix proposed by garychen on issue 13220 is very simple and, as far as I can see, works 
well for this situation. With this set of changes, the logic used becomes:

If the member we are going to call is part of another queue, the other queue has a higher 
weight than the queue we are calling from, and the higher weight queue has at least as many 
callers as available members, then do not try to contact the queue member. If the higher 
weighted queue has fewer callers than available members, then there is no reason to deny 
the call to this member since the other queue can afford to spare a member.

Since the fix involved writing a generic function for determining the number of available 
members in the queue, I also modified the is_our_turn function to make use of the new 
num_available_members function to determine if it is our turn to try calling a member. There 
is one small behavior change. Before writing this patch, if you had autofill disabled, then 
if you were the head caller in a queue, you would automatically be told that it was your 
turn to try calling a member. This did not take into account whether there were actually any 
queue members available to take the call. Now we actually make sure there is at least one 
member available to take the call if autofill is disabled.

(closes issue #13220)
Reported by: garychen

Review: http://reviewboard.digium.com/r/202/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 16:17:35 +00:00
Mark Michelson
cf7131dd6a Backport state interface changes to app_queue from trunk.
After several issues raised on the Asterisk bugtracker against
the 1.4 branch were determined to be fixable with the state interface
change available in the 1.6.X series, it finally came time to just
suck it up and backport the change.

For a detailed explanation of what this change entails, the original
trunk commit for this feature may be found here:

http://svn.digium.com/view/asterisk?view=revision&revision=97203

In addition, the details for the use of this change to fix the problems
stated in issue #12970 may be found in the review request I made for
this change. It is linked below.

(closes issue #12970)
Reported by: edugs15

Review: http://reviewboard.digium.com/r/116



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@184980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 15:23:59 +00:00
Russell Bryant
23de13f3da Ensure targs variable is fully initialized.
(closes issue #14758)
Reported by: tim_ringenbach


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@184842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-29 05:51:55 +00:00
David Vossel
d64575ac5c pri loop TestClient/TestServer fails: server SEND DTMF 8
app_test was failing when sending the last DTMF digit, 8, because of the 100ms pause issued after DTMF is sent.  During this pause the other side would hang up causing the test to look like it failed. Now the other side waits a second before hanging up.

(closes issue #12442)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@184388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-26 21:07:32 +00:00
Mark Michelson
4a209dbe40 Change NULL pointer check to be ast_strlen_zero.
The 'digit' variable is guaranteed to be non-NULL, so the if
statement could never evaluate true. Changing to ast_strlen_zero
makes the logic correct.

This was found while reviewing ast_channel_ao2 code review.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@184078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-24 22:34:45 +00:00
Terry Wilson
2da89b3022 Add missing datastore inherit (exists in all other branches)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 23:37:59 +00:00
David Vossel
f42e9eb6bf Cleaning up a few things in detect disconnect patch
Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory.  Cleaned up /param tags in features.h.  No longer send dynamic features in ast_feature_detect. 

issue #11583


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 19:40:07 +00:00
David Vossel
dd17912d68 Allow disconnect feature before a call is bridged
feature.conf has a disconnect option.  By default this option is set to '*', but it could be anything.  If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else.  This is because features are unavailable until bridging takes place.  The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different.  This patch allows features to be detected from outside of the bridge, but not operated on.  In this case, the disconnect feature can be detected before briding and handled outside of features.c.

(closes issue #11583)
Reported by: sobomax
Patches:
	patch-apps__app_dial.c uploaded by sobomax (license 359)
	11583.latest-patch uploaded by murf (license 17)
	detect_disconnect.diff uploaded by dvossel (license 671)
Tested by: sobomax, dvossel
Review: http://reviewboard.digium.com/r/195/






git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 16:15:16 +00:00
Russell Bryant
6efa254bea Fix cases where the internal poll() was not being used when it needed to be.
We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:09:13 +00:00
Kevin P. Fleming
59f867a5cb revert commit that included extranous changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 01:51:21 +00:00
Kevin P. Fleming
f1f417a9d8 Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.
With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 01:28:42 +00:00
Jason Parker
62fbf19157 Allow dahdichanname to work as advertised.
(closes issue #14056)
Reported by: dsedivec
Patches:
      load_from_zapata_conf.patch uploaded by dsedivec (license 638)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 20:13:40 +00:00
Jeff Peeler
21ca773c28 Fix malloc debug macros to work properly with h323.
The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. Because using the ast prefix calls are
a better choice, ast_free_ptr is the new wrapper for free to pass to functions.
Also, a little bit of clean up was done to avoid the debug macros intentionally
being redefined.

(closes issue #13593)
Reported by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 03:25:04 +00:00
Mark Michelson
a8e2597803 Make compilation succeed in dev-mode when IMAP storage is enabled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-06 18:23:09 +00:00
Mark Michelson
aef6c114f1 [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts.
There was a fix put in a while back so that an X-Asterisk-VM-Context message header was
added to stored IMAP voicemails. This would allow for us to differentiate if the same
mailbox name was used in multiple contexts. The problem still left was that not all places
where messages were retrieved actually attempted to use this header for information when
retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain
work as expected.

(closes issue #13853)
Reported by: vicks1
Patches:
      13853_v2.patch uploaded by mmichelson (license 60)
Tested by: lmadsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 23:26:11 +00:00
Mark Michelson
7e44582f57 Fix broken mailbox parsing when searchcontexts option is enabled.
When using the searchcontexts option in voicemail.conf, the code
made the assumption that all mailbox names defined were unique across
all contexts. However, the code did nothing to actually enforce this
assumption, nor did it do anything to alert a user that he may have
created an ambiguity in his voicemail.conf file by defining the same
mailbox name in multiple contexts.

With this change, we now will issue a nice long warning if searchcontexts
is on and we encounter the same mailbox name in multiple contexts and ignore
any duplicates after the first box. Whether searchcontexts is enabled or not,
if we come across a duplicate mailbox in the same context, then we will issue
a warning and ignore the duplicated mailbox. I have also added a small note
to voicemail.conf.sample in the explanation for searchcontexts explaining
that you cannot define the same mailbox in multiple contexts if you have
enabled the option.

(closes issue #14599)
Reported by: lmadsen
Patches:
      14599.patch uploaded by mmichelson (license 60) (with slight modification)
Tested by: lmadsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 18:58:48 +00:00
Mark Michelson
ab5b88843c Clarify some documentation of queues.conf.sample
It had always been possible to explicitly specify a "blank"
value for a sound file in queues.conf and have no sound played
back. The problem with this is that it would result in some ugly
CLI warnings from file.c.

This commit introduces a check when playing a file in app_queue
to see if the name of the file is zero-length and return early if
that is the case. Also, the ability to specify the blank sound
files in queues.conf is now mentioned more clearly in queues.conf.sample

(closes issue #14227)
Reported by: caspy




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 22:48:18 +00:00
Russell Bryant
dadbbb0a56 Move ast_waitfor() down to avoid the results of the API call becoming stale.
This call to ast_waitfor() was being done way too soon in this section of code.
Specifically, there was code in between the call to waitfor and the code that
uses the result that puts the channel in autoservice.  By putting the channel
in autoservice, the previous results of ast_waitfor() become meaningless,
as the autoservice thread will do it's own ast_waitfor() and ast_read()
on the channel.

So, when we came back out of autoservice and eventually hit the block of code
that calls ast_read() on the channel, there may not actually be any input on
the channel available.  Even though the previous call to ast_waitfor() in
app_meetme said there was input, the autoservice thread has since serviced
the channel for some period of time.

This bug manifested itself while dvossel was doing some testing of MeetMe in
Asterisk trunk.  He was using the timerfd timing module.  When the code hit
ast_read() erroneously, it determined that it must have been called because of
input on the timer fd, as chan->fdno was set to AST_TIMING_FD, since that was 
the cause of the last legitimate call to ast_read() done by autoservice.  

In this test, an IAX2 channel was calling into the MeetMe conference.  It was
_much_ more likely to be seen with an IAX2 channel because of the way audio
is handled.  Every audio frame that comes in results in a call to
ast_queue_frame(), which then uses ast_timer_enable_continuous() to notify
the channel thread that a frame is waiting to be handled.  So, the chances
of ast_waitfor() indicating that a channel needs servicing due to a timer
event on an IAX2 event is very high.

Finally, it is interesting to note that if a different timing interface was
being used, this bug would probably not be noticed.  When ast_read() is called
and erroneously thinks that there is a timer event to handle, it calls the
ast_timer_ack() function.  The pthread and dahdi timing modules handle the
ack() function being called when there is no event by simply ignoring it.
In the case of the timerfd module, it results in a read() on the timer fd
that will block forever, as there is no data to read.  This caused Asterisk
to lock up very quickly.

Thanks to dvossel and mmichelson for the fun debugging session.  :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02 23:34:13 +00:00
Terry Wilson
cdf5240895 Change include order to make compile on Centos 5 with DAHDI
If BIT_TYPES_DEFINED gets defined before linux/types.h is included, the
__s32 type doesn't get defined


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-24 17:02:20 +00:00
Tilghman Lesher
4675032a30 Fix up potential crashes, by reducing the sharing between interactive and non-interactive threads.
(closes issue #14253)
 Reported by: Skavin
 Patches: 
       20090219__bug14253.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Skavin


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19 22:26:01 +00:00
Joshua Colp
0d96c97ced If we are able to create a speech structure unset the ERROR variable in case it was previously set.
(issue #LUMENVOX-13)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19 16:37:25 +00:00
Mark Michelson
b30800adfb Remove unused variable and make dev-mode compilation happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 21:39:21 +00:00
Mark Michelson
5ae664d5aa Open the DAHDI pseudo device and set it to be nonblocking atomically
Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately
from opening the file was causing an "inappropriate ioctl for device" error.
While I cannot fathom why this would be happening, I certainly am not opposed
to making the code a bit more compact/efficient if it also fixes a bug.

(closes issue #14482)
Reported by: ys
Patches:
      meetme.patch uploaded by ys (license 281)
Tested by: ys



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 21:34:27 +00:00
Mark Michelson
3e0b36d9d0 Fix a potential crash situation when using IMAP voicemail
If calling into VoiceMailMain when using IMAP storage, it was
possible to crash Asterisk by hanging up the phone when prompted
for a voicemail mailbox. This patch fixes the issue.

While it may appear that this patch is superficial, it allows code
execution to continue to the failure case just below the IMAP_STORAGE
code block where this patch has been applied

(closes issue #14473)
Reported by: dwpaul
Patches:
      voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 19:47:48 +00:00
Tilghman Lesher
9e38dd5427 Restore a behavior that was recently changed, when we fixed issue #13962 and
issue #13363 (related to issue #6176).  When a hangup occurs during a Macro
execution in earlier 1.4, the h extension would execute within the Macro
context, whereas it was always supposed to execute only within the main context
(where Macro was called).  So this fix checks for an "h" extension in the
deepest macro context where a hangup occurred; if it exists, that "h" extension
executes, otherwise the main context "h" is executed.
(closes issue #14122)
 Reported by: wetwired
 Patches: 
       20090210__bug14122.diff.txt uploaded by Corydon76 (license 14)
 Tested by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@174885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11 20:54:18 +00:00
Steve Murphy
680cc35607 This patch solves some compiler complaints
in both 32 and 64-bit environments.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@174369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 02:27:40 +00:00
Jeff Peeler
0b026ce04f Add new configuration option to make shared IMAP mailboxes function as expected.
The new option is "imapvmshareid" which is an ID to tag multiple mailboxes
using the same IMAP storage location to function as one mailbox. This allows
all messages to be retrieved for any user in the group. The patch alters the
'X-Asterisk-VM-Extension' header that is responsible for matching voicemails
for a given user.

(closes issue #13673)
Reported by: howardwilkinson



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@173696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 20:47:51 +00:00
Mark Michelson
e7478c7b15 Fix situations where queue members could be autopaused unexpectedly
Specifically, this patch prevents us from autopausing members when
we receive a busy or congestion frame from them.

(closes issue #14376)
Reported by: fiddur
Patches:
      14376.patch uploaded by putnopvut (license 60)
Tested by: fiddur



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@173692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 20:29:09 +00:00
Mark Michelson
d914df762a Add some missing cleanup to app_mixmonitor
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@173592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 18:47:24 +00:00
Mark Michelson
8e764c583d Fix a problem where a channel pointer becomes invalid due to masquerading or hanging up.
app_mixmonitor runs its own thread to monitor the channel's activity and write the mixed
audio to a file. Since this thread runs independently of the channel, it is possible that
the mixmonitor thread's channel pointer will point to freed memory when the channel either
is masqueraded or hangs up (technically, both cases are hangups, but we need to handle the
cases slightly differently).

The solution for this is to employ a datastore, which has the nice benefit of allowing us 
to hook into channel masquerades and hangups and update our pointer as necessary. If this
looks familiar, this same technique is employed in app_chanspy. app_chanspy is a bit more
involved since it does a lot more operations on the channel that is being spied upon.

app_mixmonitor does have an extra touch that app_chanspy doesn't have, though. Since there
is a thread race between the channel's thread and the mixmonitor thread on a hangup, we em-
ploy a condition-and-boolean combination to ensure that the channel thread finishes with
our structure before the mixmonitor thread attempts to free it. No crashes!

(closes issue #14374)
Reported by: aragon
Patches:
	  14374.patch uploaded by putnopvut (license 60)
Tested by: aragon, putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@173559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 17:34:33 +00:00
Mark Michelson
82937be553 Revert my previous change because it was stupid
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@173396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 17:44:48 +00:00
Mark Michelson
fed7d2308b Add a missing unlock. Extremely unlikely to ever matter, but it's needed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@173392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 17:40:29 +00:00