David Vossel [Tue, 9 Feb 2010 22:55:38 +0000 (22:55 +0000)]
Fixes iaxs and iaxsl size off by one issue.
2^15 = 32768 which is the maximum allowed iax2 callnumber.
Creating the iaxs and iaxsl array of size 32768 means the maximum
callnumber is actually out of bounds. This causes a nasty crash.
Jeff Peeler [Thu, 4 Feb 2010 23:20:21 +0000 (23:20 +0000)]
Change channel state on local channels for busy,answer,ring.
Previously local channels channel state never changed. This became problematic
when the state of the other side of the local channel was lost, for example
during a masquerade. Changing the state of the local channel allows for the
scenario to be detected when the channel state is set to ringing, but the peer
isn't ringing. The specific problem scenario is described in 164201. Although
this was noted on one of the issues, here is the tested dialplan verified to
work:
Tilghman Lesher [Sun, 24 Jan 2010 06:33:01 +0000 (06:33 +0000)]
Only rebuild bison and flex source files on demand, if bison and flex are detected by the configure script.
Changed after discussion on the -dev list about possible unnecessary build
failures, due to checkouts/untars causing these special source files to
possibly be newer than their resulting C files. This should additionally
ensure that nobody need learn about extra Makefile arguments to ensure the
proper files get rebuilt when changes are made to these special source files.
Sean Bright [Wed, 20 Jan 2010 14:12:45 +0000 (14:12 +0000)]
Modify fix for issue 16554 to be more inline with what is already in trunk.
I should have taken a closer look at trunk/1.6.x, as this bug has already been
fixed in a much more simple manner, by just settings o->vars to NULL after the
ast_pbx_outgoing_* calls.
Sean Bright [Wed, 20 Jan 2010 14:06:49 +0000 (14:06 +0000)]
Fix a memory leak in pbx_spool when using SetVar in a call file.
In pbx_spool, when we are freeing our 'outgoing' struct, we weren't deallocating
the ast_variable list we had built from SetVars in a call file. Adding a call to
ast_variables_destroy in our deallocation routine works, but only if the variables
have not already been passed into ast_pbx_outgoing_app() or _exten(), both of
which take care of destroying the variable list for us.
Jeff Peeler [Tue, 19 Jan 2010 17:22:18 +0000 (17:22 +0000)]
Fix deadlock in agent_read by removing call to agent_logoff.
One must always lock the agents list lock before the agent private. agent_read
locks the private immediately, so locking the agents list lock is not an
option (which is what agent_logoff requires). Because agent_read already
has access to the agent private all that is necessary is to do the required
hanging up that agent_logoff performed.
Sean Bright [Mon, 18 Jan 2010 19:54:19 +0000 (19:54 +0000)]
Plug a memory leak when reading configs with their comments.
While reading through configuration files with the intent of returning their
full contents (comments specifically) we allocated some memory and then forgot
to free it. This doesn't fix 16554 but clears up a leak I had in the lab.
David Vossel [Mon, 18 Jan 2010 16:51:35 +0000 (16:51 +0000)]
updated transmit_silence option documentation in asterisk.conf
This patch updates the transmit_silence option to better document
why the option exists, and what it affects. Thanks to russell
for providing the verbage for this update.
Tilghman Lesher [Fri, 15 Jan 2010 20:52:27 +0000 (20:52 +0000)]
Disallow leaving more than maxmsg voicemails.
This is a possibility because our previous method assumed that no messages are
left in parallel, which is not a safe assumption. Due to the vmu structure
duplication, it was necessary to track in-process messages via a separate
structure. If at some point, we switch vmu to an ao2-reference-counted
structure, which would eliminate the prior noted duplication of structures,
then we could incorporate this new in-process structure directly into vmu.
(closes issue #16271)
Reported by: sohosys
Patches:
20100108__issue16271.diff.txt uploaded by tilghman (license 14)
20100108__issue16271__trunk.diff.txt uploaded by tilghman (license 14)
20100108__issue16271__1.6.0.diff.txt uploaded by tilghman (license 14)
Tested by: jsutton
Jeff Peeler [Wed, 13 Jan 2010 19:43:33 +0000 (19:43 +0000)]
Fix regression for timed out parked call returning to caller
This issue seems to have been exposed by the fix in 160390 whereby using a
masquerade prevented a crash. The new channel used in the masquerade was
not copying the macro information from the old channel.
David Vossel [Wed, 13 Jan 2010 17:16:12 +0000 (17:16 +0000)]
add silence gen to wait apps
asterisk.conf's 'transmit_silence' option existed before
this patch, but was limited to only generating silence
while recording and sending DTMF. Now enabling the
transmit_silence option generates silence during wait
times as well.
To achieve this, ast_safe_sleep has been modified to
generate silence anytime no other generators are present
and transmit_silence is enabled. Wait apps not using
ast_safe_sleep now generate silence when transmit_silence
is enabled as well.
Tilghman Lesher [Tue, 12 Jan 2010 03:18:36 +0000 (03:18 +0000)]
Portability and other fixes for the safe_asterisk script
(closes issue #16416)
Reported by: bklang
Patches:
safe_asterisk-compat-1.patch uploaded by bklang (license 919)
20100106__issue16416__trunk.diff.txt uploaded by tilghman (license 14)
Tested by: bklang
Tilghman Lesher [Sat, 9 Jan 2010 00:57:58 +0000 (00:57 +0000)]
-1 is interpreted as an error, intead of the maximum mask.
(closes issue #16241)
Reported by: vnovy
Patches:
manager.c.patch uploaded by vnovy (license 922)
Tilghman Lesher [Mon, 4 Jan 2010 18:19:00 +0000 (18:19 +0000)]
Add a flag to disable the Background behavior, for AGI users.
This is in a section of code that relates to two other issues, namely
issue #14011 and issue #14940), one of which was the behavior of
Background when called with a context argument that matched the current
context. This fix broke FreePBX, however, in a post-Dial situation.
Needless to say, this is an extremely difficult collision of several
different issues. While the use of an exception flag is ugly, fixing all
of the issues linked is rather difficult (although if someone would like
to propose a better solution, we're happy to entertain that suggestion).
(closes issue #16434)
Reported by: rickead2000
Patches:
20091217__issue16434.diff.txt uploaded by tilghman (license 14)
20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14)
Tested by: rickead2000
Tilghman Lesher [Wed, 30 Dec 2009 21:57:10 +0000 (21:57 +0000)]
Don't queue frames to channels that have no means to process them.
(closes issue #15609)
Reported by: aragon
Patches:
20091230__issue16521__1.4__chan_local_only.diff.txt uploaded by tilghman (license 14)
Tested by: aragon
Sean Bright [Mon, 28 Dec 2009 15:12:08 +0000 (15:12 +0000)]
Try a test compile to see if PTHREAD_ONCE_INIT requires extra braces.
There was conditional code (based on build platform) to optioinally wrap
PTHREAD_ONCE_INIT in braces that was removed since it is fixed in newer versions
of Solaris/OpenSolaris, but I am still running into it on Solaris 10 x86 so add
a configure-time check for it.
Sean Bright [Mon, 28 Dec 2009 12:43:36 +0000 (12:43 +0000)]
Avoid a crash with large numbers of MeetMe conferences.
Similar to changes made to Queue(), when we have large numbers of conferences in
meetme.conf (1000s) and we use alloca()/strdupa(), we can blow out the stack and
crash, so instead just use a single fixed buffer.
David Vossel [Tue, 22 Dec 2009 16:58:19 +0000 (16:58 +0000)]
fixes issue with p->method incorrectly set to ACK
It is possible for a second ACK to come in for a retransmitted message.
If an ack does not match an unacked message in our queue, restore the previous
p->method as this ACK is completely ignored.
Jeff Peeler [Mon, 21 Dec 2009 19:43:41 +0000 (19:43 +0000)]
Change Monitor to not assume file to write to does not contain pathing.
227944 changed the fname_base argument to always append the configured monitor
path. This change was necessary to properly compare files for uniqueness.
If a full path is given though, nothing needs to be appended and that is
handled correctly now.
Tilghman Lesher [Mon, 21 Dec 2009 16:45:03 +0000 (16:45 +0000)]
Send parking lot announcement to the channel which parked the call, not the park-ee.
(closes issue #16234)
Reported by: yeshuawatso
Patches:
20091210__issue16234.diff.txt uploaded by tilghman (license 14)
20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
Tested by: yeshuawatso
Jeff Peeler [Fri, 18 Dec 2009 22:29:51 +0000 (22:29 +0000)]
Correct CDR dispositions for BUSY/FAILED
This patch is simple in that it reorders the disposition defines so that the fix
for issue 12946 works properly (the default CDR disposition was changed to
AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
ensure all CDR records are written.
The side effects of CDR changes are scary, so I'm documenting the test cases
performed to attempt to catch any regressions. The following tests were all
performed using 1.4 rev 195881 vs head (235571) + patch:
A calls B
C calls B (busy)
Hangup C
Hangup A
(Both SIP and features)
A calls B
A blind transfers to C
Hangup C
(Both SIP and features)
A calls B
A attended transfers to C
Hangup C
A calls B
A attended transfers to C (SIP)
C blind transfers to A (features)
Hangup A
All of the test scenario CDRs matched.
The following tests were performed just with the patch to ensure proper operation
(with unanswered=yes):
Tilghman Lesher [Thu, 17 Dec 2009 17:17:51 +0000 (17:17 +0000)]
Use context from which Macro is executed, not macro context, if applicable.
Also, ensure that the extension COULD match, not just that it won't match more.
(closes issue #16113)
Reported by: OrNix
Patches:
20091216__issue16113.diff.txt uploaded by tilghman (license 14)
Tested by: OrNix
Tilghman Lesher [Mon, 14 Dec 2009 21:09:56 +0000 (21:09 +0000)]
Deal with the situation where .flavor exists but .version does not.
Also make the script slightly more portable, in keeping with autoconf syntax.
(closes issue #14737)
Reported by: davidw
Olle Johansson [Mon, 14 Dec 2009 10:16:00 +0000 (10:16 +0000)]
Stop sending 183's after call hangup.
There where still cases where the 183 keep-alive mechanism would not stop
sending 183's even though the Asterisk server had sent a final reply to
the invite.
Jeff Peeler [Fri, 11 Dec 2009 22:37:21 +0000 (22:37 +0000)]
Fix talking detection status after conference user is muted.
This patch ensures that when a conference user is muted that the accompanying
AMI Meetme talking off event is sent. Also, the meetme list output is updated
to show the muted user as unmonitored.
Leif Madsen [Thu, 10 Dec 2009 15:49:12 +0000 (15:49 +0000)]
Update chan_spy documentation.
Update the documentation in ChanSpy and ExtenSpy to reflect that only a
single group can be specified to the g() option.
Russell Bryant [Wed, 9 Dec 2009 15:14:21 +0000 (15:14 +0000)]
Set a module load priority for format modules.
A recent change to app_voicemail made it such that the module now assumes that
all format modules are available while processing voicemail configuration.
However, when autoloading modules, it was possible that app_voicemail was
loaded before the format modules. Since format modules don't depend on
anything, set a module load priority on them to ensure that they get loaded
first when autoloading.
This version of the patch is specific to Asterisk 1.4 and 1.6.0. These versions
did not already support module load priority in the module API. This adds a
trivial version of this which is just a module flag to include it in a pass before
loading "everything".
Thanks to mmichelson for the review!
(closes issue #16412)
Reported by: jiddings
Tested by: russell
Russell Bryant [Fri, 4 Dec 2009 17:12:47 +0000 (17:12 +0000)]
Only do frame payload check for HOLD frames.
This code was added for helping to debug the source of invalid HOLD frames.
However, a side effect of this is that it will incorrectly report errors for
frames that have an integer payload. Make the check for this block specific
to the HOLD frame case.
Matthias Nick [Fri, 4 Dec 2009 15:17:03 +0000 (15:17 +0000)]
Warning message gets displayed only once
Added additional field 'int display_inband_dtmf_warning', which when set to '1' displays the warning ('Inband DTMF is not supported on codec %s. Use RFC2833'), and when set to '0' doesn't display the warning. Otherwise you would get hundreds of warnings every second.
Tilghman Lesher [Thu, 3 Dec 2009 20:10:19 +0000 (20:10 +0000)]
Deprecate "cz" in favor of "cs".
Also, change the use of language codes so that language registers as a prefix,
rather than an exact match.
(closes issue #16272)
Reported by: patrol-cz
Patches:
20091203__issue16272.diff.txt uploaded by tilghman (license 14)