Mark Michelson [Wed, 21 Nov 2007 19:24:22 +0000 (19:24 +0000)]
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.
Terry Wilson [Wed, 21 Nov 2007 18:59:27 +0000 (18:59 +0000)]
If a channel gets masqueraded in the middle of a park, don't play the
announcement to the masqueraded channel, and dial back to the original
channel on timeout.
Kevin P. Fleming [Tue, 20 Nov 2007 19:12:52 +0000 (19:12 +0000)]
bring back compile-option checking when loading modules, only this time use a string-based storage and comparison mechanism because it is easier to support on other platforms
Mark Michelson [Tue, 20 Nov 2007 17:50:31 +0000 (17:50 +0000)]
According to comments in main/pbx.c, it is essential that if we are going to lock
the conlock as well as the hints lock, it must be locked in that respective order.
In order to prevent a potential deadlock, we need to lock the conlock prior to
locking the hints lock in ast_hint_state_changed (see the call stack example on
issue #11323 for how this can happen).
(closes issue #11323, reported by eelcob, suggestion for patch by eelcob, patch by me)
Joshua Colp [Mon, 19 Nov 2007 15:53:32 +0000 (15:53 +0000)]
Print out the correct filename (features.conf) in the log message when parkpos options are incorrect.
(closes issue #11295)
Reported by: Laureano
Patches:
res_features.c.patch uploaded by Laureano (license 265)
Joshua Colp [Mon, 19 Nov 2007 15:24:12 +0000 (15:24 +0000)]
Clarify documentation a bit, include that a frame has to pass through the core in order for the Local channel optimization to happen.
(closes issue #11246)
Reported by: jon
Russell Bryant [Fri, 16 Nov 2007 22:26:44 +0000 (22:26 +0000)]
Temporarily revert revision 89325, which added md5 magic for keeping track of
what build options were used. We agreed that we should remove this before
making a 1.4 release, and then we can put it back in. Then, we can take a
month or so to play around with it to get it how we want it.
Kevin P. Fleming [Fri, 16 Nov 2007 16:47:46 +0000 (16:47 +0000)]
To help combat problems where people build external modules (asterisk-addons or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash.
If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer.
Russell Bryant [Thu, 15 Nov 2007 17:19:28 +0000 (17:19 +0000)]
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)
Jason Parker [Tue, 13 Nov 2007 19:47:45 +0000 (19:47 +0000)]
Revert change from revision 67064.
It is documented behavior that if a parking extension already exists while using PARKINGEXTEN,
dialplan execution will continue. If blind transferring to a Park with PARKINGEXTEN, you
must keep this in mind, and handle the failure yourself.
Tilghman Lesher [Tue, 13 Nov 2007 13:51:53 +0000 (13:51 +0000)]
Debugging is running into the 16-lock limit. Increase to avoid.
(This define is only effective when debugging is turned on, so there's
no effect for most installations.)
Mark Michelson [Tue, 13 Nov 2007 00:56:46 +0000 (00:56 +0000)]
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.
Tilghman Lesher [Mon, 12 Nov 2007 20:16:18 +0000 (20:16 +0000)]
If two config writes collide, file corruption could result. Use a mkstemp() file, instead.
Reported by: paravoid
Patch by: tilghman
Closes issue #10781
if we're NT and no number was dialed and overlapdial is set, we wait for the ISDN timeout instead of starting our own timer. added a comment for the misdn.conf.sample for the overlapdial config option.
added restart all interfaces Restart_Indicator, to automatically send a RESTART after the L2 of a PTP Port comes up. Also fixed some places where we have send a RELEASE without need for it.
fixed a state/event issue with overlapdial=yes when no extension matched. removed the general sending of a RELEASE_COMPLETE when we receive a RELEASE, this is done by mISDNuser/mISDN. This makes it possible to use asterisk-1.4 with mISDN trunk, but requires users of mISDN/mISDNuser-1.1.X to upgrade to at least mISDNuser-1.1.6 (when using the NT mode at all)
aded ntkeepcalls option, to avoid droÃpping calls when the L2 goes down on a PTP link. There are some pbx which do turn off the L1 for a very short while and restart it immediately. normally T310 should be started and after 10 seconds or so the calls should be dropped, this is a simple fix wihtout this timer.
Mark Michelson [Thu, 8 Nov 2007 16:47:23 +0000 (16:47 +0000)]
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.
Joshua Colp [Thu, 8 Nov 2007 01:28:56 +0000 (01:28 +0000)]
Improve the devicestate logic for multiple devices. If any are available then the extension is considered available.
(closes issue #10164)
Reported by: nic_bellamy
Patches:
sip-hinting-svn-branch-1.4.patch uploaded by nic (license 299)
Joshua Colp [Thu, 8 Nov 2007 01:11:25 +0000 (01:11 +0000)]
Add support for allowing one outgoing transaction. This means if a response comes back out of order chan_sip will still handle it. I dream of a chan_sip with real transaction support.
(closes issue #10946)
Reported by: flefoll
(closes issue #10915)
Reported by: ramonpeek
(closes issue #9567)
Reported by: atca_pres
Tilghman Lesher [Wed, 7 Nov 2007 23:39:37 +0000 (23:39 +0000)]
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
Mark Michelson [Wed, 7 Nov 2007 22:40:35 +0000 (22:40 +0000)]
This patch makes it possible for SIP phones to dial extensions defined with '#' characters
in extensions.conf AND maintain their escaped characters when forming URI's
(closes issue #10681, reported by cahen, patched by me, code review by file)
Steve Murphy [Wed, 7 Nov 2007 21:40:28 +0000 (21:40 +0000)]
In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
Russell Bryant [Tue, 6 Nov 2007 18:20:07 +0000 (18:20 +0000)]
If someone were to delete the files used by an existing MOH class, and then
issue a reload, further use of that class could result in a crash due to
dividing by zero. This set of changes fixes up some places to prevent this
from happening.
(closes issue #10948)
Reported by: jcomellas
Patches:
res_musiconhold_division_by_zero.patch uploaded by jcomellas (license 282)
Additional changes added by me.
Steve Murphy [Tue, 6 Nov 2007 17:52:50 +0000 (17:52 +0000)]
closes issue #8786 - where the [catname](!) and [catname](othercat1,othercat2,...) notation gets dropped across a ConfigUpdate (or any other thing that would cause a config file to be written). While I was at it, I also cleaned up some of the destroy routines to free up comments, which was not being done. Made sure the new struct I introduced is also cleaned up properly at destruction time. My code handles multiple template inclusions. Many thanks to ssokol for his patch, which, while not literally used in the final merge, served as a foundation for the fix.
Joshua Colp [Tue, 6 Nov 2007 17:08:05 +0000 (17:08 +0000)]
Make it so that if a peer is determined to be unreachable using qualify their devicestate will report back unavailable.
(closes issue #11006)
Reported by: pj
Russell Bryant [Tue, 6 Nov 2007 13:50:15 +0000 (13:50 +0000)]
Remove some checks to see if locks are initialized from the non-DEBUG_THREADS
versions of the lock routines. These are incorrect for a number of reasons:
- It breaks the build on mac.
- If there is a problem with locks not getting initialized, then the proper
fix is to find that place and fix the code so that it does get initialized.
- If additional debug code is needed to help find the problem areas, then this
type of things should _only_ be put in the DEBUG_THREADS wrappers.
Russell Bryant [Mon, 5 Nov 2007 22:07:54 +0000 (22:07 +0000)]
After seeing crashes related to channel variables, I went looking around at the
ways that channel variables are handled. In general, they were not handled in
a thread-safe way. The channel _must_ be locked when reading or writing from/to
the channel variable list.
What I have done to improve this situation is to make pbx_builtin_setvar_helper()
and friends lock the channel when doing their thing. Asterisk API calls almost
all lock the channel for you as necessary, but this family of functions did not.
(closes issue #10923, reported by atis)
(closes issue #11159, reported by 850t)
Russell Bryant [Mon, 5 Nov 2007 21:33:56 +0000 (21:33 +0000)]
When traversing the list of channel variables here in transmit_invite(), the
asterisk channel must be locked, as this data may change at any time.
(I have seen numerous reports of crashes related to the handling of channel
variables. There are a couple of issues on the bug tracker related to it,
but it has also been noted on IRC and mailing lists. So, I am finding and
fixing some places where channel variables are handled improperly.)
Russell Bryant [Mon, 5 Nov 2007 20:40:01 +0000 (20:40 +0000)]
Merge changes from asterisk/team/kpfleming/SRV-priority-handling
Previously, the SRV record support in Asterisk was broken. There was no
guarantee on what record Asterisk would choose to actually use. This set of
changes improves the situation by ensuring that Asterisk will choose the
highest priority record.
Russell Bryant [Mon, 5 Nov 2007 20:11:04 +0000 (20:11 +0000)]
Merge the last bit of changes from asterisk/team/russell/readq-1.4
The issue here is that the channel frame readq handling got broken when the
code was converted to use the linked list macros. It caused corruption of the
list head and tail pointers. So, I fixed up the usage of the linked list
macros and in passing, simplified the code. I also documented what the code
is doing, as it was a bit difficult to figure out at first.
This bug showed itself with crashes showing messed up head/tail pointers for
the readq. However, there are a couple of crashes that aren't quite as obvious,
but I think may be related. So, if your bug gets closed by this commit, but
you still have a problem, please reopen or create a new bug report.
Joshua Colp [Mon, 5 Nov 2007 18:47:13 +0000 (18:47 +0000)]
If a SIP channel is put on hold multiple times do not keep incrementing the onHold value.
(closes issue #11085)
Reported by: francesco_r
Tested by: blitzrage
(closes issue #10474)
Reported by: acennami
Russell Bryant [Mon, 5 Nov 2007 17:46:02 +0000 (17:46 +0000)]
Fix up datastore handling in ast_do_masquerade(). The code is intended to move
any channel datastores from the old channel to the new one. However, it did
not use the linked list macros properly to accomplish the task. The existing
code would only work if there was only a single datastore on the old channel.
Tilghman Lesher [Mon, 5 Nov 2007 16:20:13 +0000 (16:20 +0000)]
Don't check used pooled connections for connection status, as it will cause issues for prepared queries.
Reported by: Nick Gorham (via -dev list)
Patch by: tilghman
Luigi Rizzo [Sun, 4 Nov 2007 22:38:13 +0000 (22:38 +0000)]
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
Joshua Colp [Fri, 2 Nov 2007 20:49:45 +0000 (20:49 +0000)]
Make subscribecontext behave as advertised. It will now look for the presence of a hint in the given context (be it subscribecontext or context).
(closes issue #10702)
Reported by: slavon
Joshua Colp [Fri, 2 Nov 2007 20:20:21 +0000 (20:20 +0000)]
If an INFO request within a dialog is received with a content length of 0 simply send back a 200 OK. It is valid to do this and the remote side is probably using it to make sure the signalling is still alive.
(closes issue #5747)
Reported by: chandi
Patches:
infofix-81430-1.patch uploaded by IgorG (license 20)
Joshua Colp [Thu, 1 Nov 2007 01:53:55 +0000 (01:53 +0000)]
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
Steve Murphy [Wed, 31 Oct 2007 17:49:39 +0000 (17:49 +0000)]
closes issue #11108 -- where the 'dialplan save' cli command saves a file where the semicolon is not escaped. Fixed this; User also wanted comments to be preserved across dialplan save, but this is impossible at this point in time, because comments are not stored in the dialplan. They are 'compiled' out of extensions.conf. The only way to preserve those comments is to use the config file reader/writer that the GUI uses to allow online user edits. extensions.conf is first and foremost, a config file, and is read in by the normal config-file reading routines. Then, it is processed into a dialplan (context/exten structs).
Steve Murphy [Wed, 31 Oct 2007 03:51:52 +0000 (03:51 +0000)]
Included some verbage in the check_includes func, to inform the user that included contexts that have no match in the AEL, might be OK, as AEL cannot check in the extensions.conf or the in-memory contexts, as they may not be there at the time of the check.
Russell Bryant [Tue, 30 Oct 2007 21:19:09 +0000 (21:19 +0000)]
Merge the changes from team/russell/iax2_poke_fix and iax2-poke-fix-trunk
There was a race condition related to the handling of POKEing peers. Essentially,
a reference to a peer is held by the scheduler when there are pending callbacks,
but the reference count didn't reflect it. So, it was possible for a peer to hit
a reference count of zero and have its destructor begin to be called at the same
time that the scheduler thread ran a POKE related callback. If that happened,
a crash would likely occur.
Joshua Colp [Tue, 30 Oct 2007 16:13:39 +0000 (16:13 +0000)]
Add two more checks before printing out a warning message about bridging. If either channel has hungup of course the bridge will have failed.
(closes issue #10009)
Reported by: dimas
Kevin P. Fleming [Mon, 29 Oct 2007 22:04:29 +0000 (22:04 +0000)]
don't put '-pipe' into ASTCFLAGS if '-save-temps' is already there (used when debugging preprocessor issues) because the compiler will whine about each compile command
Russell Bryant [Mon, 29 Oct 2007 20:22:07 +0000 (20:22 +0000)]
Add some more details to the output of "core show locks". When a thread
is waiting for a lock, this will now show the details about who currently
has it locked.
(inspired by issue #11100)
Russell Bryant [Mon, 29 Oct 2007 19:21:06 +0000 (19:21 +0000)]
Remove a lock that doesn't make any sense. The regions lock needs to be held
when traversing the list of allocated chunks so that they can be printed out
to the CLI.
(Thanks to eliel on #asterisk-dev for pointing this out!)
Joshua Colp [Mon, 29 Oct 2007 17:20:28 +0000 (17:20 +0000)]
Fix issue where if both sides of the dialog cancelled the dialog at the same time chan_sip could kepe retransmitting a response for no reason.
(closes issue #9566)
Reported by: atca_pres
Patches:
bug9566.patch uploaded by oej