Mark Michelson
b5ea488a1d
Making some changes designed to not allow for a corrupted mailstream for a vm_state.
...
1. Add locking to the vm_state retrieval functions so that no linked list corruption occurs.
2. Make sure to always grab the persistent vm_state when mailstream access is necessary.
3. Correct an incorrect return value in the init_mailstream function.
(closes issue #11304 , reported by dwhite)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 20:42:07 +00:00
Joshua Colp
edfb14d0f6
If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel.
...
(closes issue #11077 )
Reported by: m4him
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 19:53:52 +00:00
Joshua Colp
be83b74be9
Make app_queue calls work with directed pickup.
...
(closes issue #11700 )
Reported by: jbauer
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 18:36:40 +00:00
Tilghman Lesher
1b289c2998
Apply multiple crash fixes, found in issue #11386 , but not completely
...
closing that issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97077 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 18:02:13 +00:00
Russell Bryant
9aa3d2dd7f
Merged revisions 96931 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r96931 | russell | 2008-01-07 14:46:22 -0600 (Mon, 07 Jan 2008) | 2 lines
Change misery.digium.com to pbx.digium.com
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 20:47:52 +00:00
Russell Bryant
61a1ce95a5
Don't crash if something happens when setting up an SMDI interface and it gets
...
destroyed before the SMDI port handling thread gets created.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 16:39:23 +00:00
Philippe Sultan
ee7978e96e
Indentation fix, makes the code easier to read
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 14:34:36 +00:00
Philippe Sultan
e531dcb1af
Compute the base64 value over the [authzid]\0authcid\0password string,
...
thus excluding the trailing NULL byte.
This change has already been committed to trunk, see #11644 .
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 14:25:29 +00:00
Russell Bryant
b11422fe8f
Don't pass an empty string as the device name.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-05 02:09:19 +00:00
Tilghman Lesher
8770045be8
Fix the problem of notification of a device state change to a device with a '-'
...
in the name. Could probably do with a better fix in trunk, but this bug has
been open way too long without a better solution.
Reported by: stevedavies
Patch by: tilghman
(Closes issue #9668 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04 23:03:40 +00:00
Jason Parker
6cc0887f56
Properly continue in the dialplan if using PARKINGEXTEN and the slot is full.
...
Issue 11237, patch by me.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04 22:55:56 +00:00
Tilghman Lesher
58cc575e52
If you change the bindaddr in sip.conf to a non-bound address and reload, sip goes kablooie.
...
Reported and patched by: one47
(Closes issue #11535 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04 19:27:25 +00:00
Russell Bryant
6787783ce5
Make use of the temporary channel pointer while the pvt is unlocked.
...
(closes issue #11675 )
Reported by: flefoll
Patches:
chan_zap.c.patch-store-owner-before-unlock uploaded by flefoll (license 244)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-04 16:19:22 +00:00
Russell Bryant
6ae86ec183
Don't crash if the iax2 pvt structure has been destroyed before we get to this point
...
(closes issue #11672 , reported by snuffy, patched by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 22:44:22 +00:00
Tilghman Lesher
6d96102150
Missed initialization caused crash.
...
Reported and fixed by: tiziano
(Closes issue #11671 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 21:37:02 +00:00
Christian Richter
2a4a61f914
make sure frame is completely clean, before we send it to asterisk as DTMF. If we don't make it clean, it happens that one way audio occurs..
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 12:12:27 +00:00
Christian Richter
be6e667c1e
when overlapdial was used and no number was dialed, the call was dropped, now we just jump into the s extension, which makes a lot more sense.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 12:08:40 +00:00
Mark Michelson
068e1d8208
We need to reset the membername to NULL on each iteration of this loop, otherwise the result is that
...
multiple members can have the same name, since the variable was not reset on each iteration of the loop.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 23:46:02 +00:00
Russell Bryant
ec8a896935
Convert locks of the contexts list in pbx_config to the appropriate rdlock or wrlock
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 22:14:28 +00:00
Russell Bryant
93748ccb9c
pbx_dundi only needs a rdlock on the contexts list.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 22:04:47 +00:00
Russell Bryant
4ee7457343
app_macro only needs a rdlock on the contexts list.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 22:00:21 +00:00
Joshua Colp
b5087d7743
Allocate a SIP refer structure when performing a transfer using BYE with Also so that the transfer information is properly stored. (AST-2008-001)
...
(closes issue #11637 )
Reported by: greyvoip
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 20:24:09 +00:00
Mark Michelson
60c6826c1c
A change to improve the accuracy of queue logging in the case where a member does not
...
answer during the specified timeout period. Prior to this change, there was a small chance
that the member name recorded in this case would be blank. Also prior to this change, if using
the ringall strategy, if no one answered the call during the specified timeout, the member name
listed in the queue log would randomly be one of the members that was rung.
(closes issue #11498 , reported and tested by hloubser, patched by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 17:51:22 +00:00
Mark Michelson
8fded490ce
Avoiding a potentially bad locking situation. ast_merge_contexts_and_delete writelocks the conlock, then
...
calls ast_hint_extension, which attempts to readlock the same lock. Recursion with read-write locks is
dangerous, so the inner lock needs to be removed. I did this by copying the "guts" of ast_hint_extension
into ast_merge_contexts_and_delete (sans the extra lock).
(this change is inspired by the locking problems seen in issue #11080 , but I have no idea if this is the
problematic area experienced by the reporters of that issue)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 23:43:13 +00:00
Tilghman Lesher
3d142f0271
Allow the default "0" to be returned if the STAT fails
...
(Closes issue #11659 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 20:27:26 +00:00
Russell Bryant
ce3f27c5d5
Remove duplicate increment of the header count in the add_header() function.
...
(closes issue #11648 )
Reported by: makoto
Patch provided by sergee, committed patch by me, inspired by comments from putnopvut
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 18:24:59 +00:00
Mark Michelson
a7dee30a8d
I found a bug while browsing the queue code and managed to reproduce it in a small setup.
...
If a queue uses the ringall strategy, it was possible through unfortunate coincidence for a single member at a given penalty level to
make app_queue think that all members at that penalty level were unavailable and cause the members at the
next penalty level to be rung. With this patch, we will only move to the next penalty level if ALL the members
at a given penalty level are unreachable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 00:16:15 +00:00
Russell Bryant
8b3f41409e
Don't report a syntax error when an empty string is passed to ast_get_group.
...
Just return 0.
(closes issue #11540 )
Reported by: tzafrir
Patches:
group_empty.diff uploaded by tzafrir (license 46)
-- slightly changed by me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@95024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 21:40:02 +00:00
Mark Michelson
5dc1371bf2
Fixing a typo in a comment.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 20:09:06 +00:00
Joshua Colp
e276b231fb
Include types.h in chan_h323 as without it it can not be compiled on some operating systems like FreeBSD to name one.
...
(closes issue #11585 )
Reported by: sobomax
Patches:
chan_h323.c.diff uploaded by sobomax (license 359)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 17:32:15 +00:00
Joshua Colp
856bc2ef76
Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is possible for it to be a pointer to NULL.
...
(closes issue #11557 )
Reported by: FuriousGeorge
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 17:27:11 +00:00
Russell Bryant
c03ccc41f2
Now that the contexts lock is a read/write lock, it should not be locked here
...
in ast_hint_state_changed(). This makes it get locked recursively which now
causes a deadlock.
(closes issue #11080 , thanks to callguy for the access to a deadlocked machine)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 15:16:56 +00:00
Russell Bryant
67df6e008d
Use the constant that I really meant to use here ...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 14:44:29 +00:00
Russell Bryant
c792659cc7
Change ast_translator_best_choice() to only pay attention to audio formats.
...
This fixes a problem where Asterisk claims that a translation path can not be
found for channels involving video.
(closes issue #11638 )
Reported by: cwhuang
Tested by: cwhuang
Patch suggested by cwhuang, with some additional changes by me.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 14:33:21 +00:00
Kevin P. Fleming
eb4d447b78
make this comment explain the situation in an even more explicit fashion
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 01:01:47 +00:00
Tilghman Lesher
3c3eb75062
Workaround for what is probably a glibc bug (but we'll see this crop up again
...
and again, if we don't add the workaround).
Reported by: rolek
Patch by: tilghman
(Closes issue #11601 , closes issue #11426 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 20:43:38 +00:00
Russell Bryant
e6a8750fe7
Just in case the AST_FLAG_END_DTMF_ONLY flag was already set before starting
...
autoservice, remember it and ensure that the channel has the same setting when
autoservice gets stopped. (pointed out by d1mas, patched up by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 19:04:31 +00:00
Russell Bryant
52df524ba0
When a channel is in autoservice, mark a flag on the channel that says that
...
we only care about the END of a digit. That way, no magic digit emulation stuff
will happen when all we're doing is queueing up END frames.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 18:46:39 +00:00
Russell Bryant
39c5c66235
Don't try to send a parked call back to itself.
...
(closes issue #11622 , reported by djrodman, patched by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 17:24:17 +00:00
Russell Bryant
1deba2c9ed
Don't store DTMF BEGIN frames while a channel is in autoservice. It's just
...
going to make ast_read() do a lot of extra work when the channel comes back
out of autoservice.
(closes issue #11628 , patched by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 17:06:26 +00:00
Russell Bryant
a4523fcd83
List include/asterisk/version.h as a .PHONY target because we want the commands
...
listed for this target to be executed regardless of whether the file exists or
not. This fixes having the version not up to date when running from svn.
(closes issue #11619 , reported by plack, fixed by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 17:00:03 +00:00
Joshua Colp
25aef5fc44
file says... build on the builders.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-25 02:27:08 +00:00
Tilghman Lesher
540077b7b1
Race: we need to wait to queue a NewChannel event until after the channel is
...
inserted into the channel list. The reason is because some manager users
immediately queue requests from the channel when they see that event and are
confused when Asterisk reports no such channel. (Closes issue #11632 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 19:36:59 +00:00
Tilghman Lesher
9dbd385de7
More deadlock avoidance code (this time between sip_monitor and sip_hangup)
...
Reported by: apsaras
Patch by: tilghman
(Closes issue #11413 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 16:17:01 +00:00
Tilghman Lesher
f26935218f
Another bit of bad logic in realtime_peer
...
Reported by: dimas
Patch by: dimas
(Closes issue #11631 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-24 15:39:56 +00:00
Tilghman Lesher
1e5463be20
Argh... I suppose third time's the charm.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 01:21:03 +00:00
Mark Michelson
54215d94f1
Bunch of coding guidelines cleanup
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:21:59 +00:00
Mark Michelson
f4663e4f22
Better quota support for using IMAP storage voicemail
...
(closes issue #11415 , reported by jaroth)
(closes issue #11152 , reported by selsky)
Patch provided by jaroth
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:11:34 +00:00
Mark Michelson
c30bab877c
The mail_copy c-client function does not expect a full imap mailbox string, just the name of the mailbox.
...
(closes issue #11419 , reported and patched by jaroth, with additional patchwork from me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 19:59:45 +00:00
Mark Michelson
8c7948fd44
Since we are freeing list elements within a list traversal, we need to use the safe
...
traversal and remove the item from the list before freeing it.
(closes issue 11612, reported by dtyoo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:49:35 +00:00