Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)
Russell Bryant [Tue, 24 Apr 2007 21:33:59 +0000 (21:33 +0000)]
Don't crash if a manager connection provides a username that exists in
manager.conf but does not have a password, and also requests MD5
authentication. (ASA-2007-012)
added lock for sending messages to avoid double sending. shuffled some empty_chans after the cb_event calls, this avoids that a release_complete from a quite different call releases a fresh created setup by accident.
Jason Parker [Fri, 20 Apr 2007 19:49:54 +0000 (19:49 +0000)]
If the '* to hangup' option is not enabled, we don't need to disable * as a valid exit key.
If it was enabled, this statement would've never been checked in the first place.
Bug 9557 - Specifying the GetVar AMI action without a Channel parameter can
cause Asterisk to crash. The reason this needs to be fixed in the functions
instead of in AMI is because Channel can legitimately be NULL, such as when
retrieving global variables.
Add OUTBOUND_GROUP_ONCE variable to app_dial. This behaves the same as OUTBOUND_GROUP except it will get unset after use so it won't get accidentally inherited. (issue #BE-140)
Russell Bryant [Wed, 11 Apr 2007 16:01:25 +0000 (16:01 +0000)]
If someone sets the "useragent" option in sip.conf to be empty, then don't add
the User-Agent header at all. It is an optional header, anyway. Also, the bug
report says that some of Japan's SIP providers don't allow it for some weird
reason. (issue #9488, reported by makoto, fixed by me)
Russell Bryant [Wed, 11 Apr 2007 15:05:36 +0000 (15:05 +0000)]
Fix a bug with switching between host=dynamic and using specific hosts for
peers. The code would only reset the peer's address when it is dynamic if
it was a new peer structure. Now, it will also reset the address if it was
already in the peer list, but before the reload, it was not dynamic.
(issue #9515, reported by caio1982, fixed by me)
Russell Bryant [Wed, 11 Apr 2007 14:02:54 +0000 (14:02 +0000)]
Remove the attempt at reporting configuration errors in sip.conf. This can
cause a bunch of improper messages when using realtime. I give up. As oej
tried to convince me when I put this in, there is just no easy way to do it.
(inspired by a message on the -dev list)
Don't check for error when lowering priority (according to the manpage, it should never happen anyway). It might could happen, though, if another thread messed with the priority, so safeguard against that (reported via -dev list).
When calling a device that then forwards us elsewhere... we have to make our channels compatible if it is the only channel being dialed. (issue #9445 reported by marcelbarbulescu)
Russell Bryant [Wed, 4 Apr 2007 17:38:47 +0000 (17:38 +0000)]
It is valid to redirect channels via the manager interface that are not in the
UP state. Instead of checking for that to prevent to ensure a dead channel
doesn't get redirected, just use the ast_check_hangup() API call.
(issue #9457, reported by Callmewind, patch by me)
(related to issue #8977)
Russell Bryant [Wed, 4 Apr 2007 16:37:04 +0000 (16:37 +0000)]
Fix the return value of handle_common_options() so that it always properly
indicates whether it handled the option or not.
(issue #9455, reported by Netview, fixed by me)
Russell Bryant [Tue, 3 Apr 2007 19:15:04 +0000 (19:15 +0000)]
Don't attempt to report configuration errors in build_user(). oej pointed out
that for a "friend" entry, this won't work, because all user options are valid
for peers, but not the other way around.
Russell Bryant [Tue, 3 Apr 2007 17:58:19 +0000 (17:58 +0000)]
When doing a built-in blind or attended transfer, restore the ability to use '#'
to terminate the number and immediately do the transfer instead of having to
dial the number and just wait for the feature digit timeout.
(issue #8366, xueliangliang)
added option which allows us to accept incoming SETUP Messages without automatically sending Proceeding or Setup Acknowledge, this is useful with some broken switches and if you want to Release incoming calls without previously having acknowledged them. The new option is noautorespond_on_setup=yes|no default is no, so we don't break the existing behaviour
Russell Bryant [Sun, 1 Apr 2007 22:35:25 +0000 (22:35 +0000)]
Add the SO_REUSEADDR flag to sockets handled by netsock. This is needed by
the patch that went in for issue 7874. chan_iax2 needs to be able to create
socket that is lisetning on INADDR_ANY, but also be able to bind sockets to
specific addresses. (Thanks to Stevenson on the asterisk-dev mailing list
for explaining why this flag was needed.)
Joshua Colp [Thu, 29 Mar 2007 17:33:58 +0000 (17:33 +0000)]
Keep a global array of variables indicating whether certain conference rooms are in use. This ensures that two people going into a new dynamic conference when the 'e' option is set don't go into the same conference room. (issue #8835 reported by eliel)
Russell Bryant [Thu, 29 Mar 2007 17:14:33 +0000 (17:14 +0000)]
If an error occurs when reading from an RTP socket, and the error code does not
indicate that we should try again, then return NULL instead of a "null frame".
This will prevent Asterisk from trying over and over again, and eventually
causing the system to crash. (issue #8285, john)
Tilghman Lesher [Thu, 29 Mar 2007 16:04:46 +0000 (16:04 +0000)]
Issue 9415 - No point to getting a diagnostic field if we aren't doing anything with the information.
(Plus, it tends to crash the Postgres ODBC driver.)
Russell Bryant [Tue, 27 Mar 2007 18:04:02 +0000 (18:04 +0000)]
Fix the use of the "sourceaddress" option when "bindaddr" is set to 0.0.0.0
instead of having each interface explicitly listed.
(issue #7874, patch by stevens)
Joshua Colp [Fri, 9 Mar 2007 20:46:43 +0000 (20:46 +0000)]
If we are unable to lookup the host in a c line we have to abort, otherwise the previous data is gone and we will (potentially) have no data when all is said and done.
Russell Bryant [Wed, 7 Mar 2007 18:17:07 +0000 (18:17 +0000)]
Fix a problem where the Asterisk channel name could be that of the wrong IAX2
user for a call. This is because the first step of choosing this name is to
look for an IAX2 peer that happens to have the same IP/port number that this
call is coming from and assuming that is it. However, this is not always
correct. So, I have made it change this name after authentication happens
since at that point, we have an exact match.
Russell Bryant [Wed, 7 Mar 2007 00:20:13 +0000 (00:20 +0000)]
If the channels acquired using the manager Redirect action are not up, then
don't attempt to do anything with them. It could lead to weird behavior,
including crashes. (issue #8977)
Steve Murphy [Tue, 6 Mar 2007 22:52:52 +0000 (22:52 +0000)]
Fix for 9220: Eyebeam cannot renew subscriptions for presence info. Reason: re-SUBSCRIBE requests don't include Accept headers, which the rfc says are optional (to put it tersely), (it uses MAY), and luckily, the sip_pvt struct has the format info stored, so we simply leave it if the format is set, and the accept header null.
BJ Weschke [Tue, 6 Mar 2007 15:17:16 +0000 (15:17 +0000)]
Cleanup the Makefile so that we only attempt to include a file when we're building and not 'clean'ing so 'make clean' completes successfully. chan_h323 maintainer: please check to make sure I haven't broken your build target. From: jsmith in #asterisk-dev
Joshua Colp [Thu, 1 Mar 2007 22:19:32 +0000 (22:19 +0000)]
Don't even attempt to optimize things when a proxy channel is involved. It will just explode in weird and unexplaineable ways. (issue #9175 reported by clegall_proformatique)
Russell Bryant [Mon, 26 Feb 2007 00:34:31 +0000 (00:34 +0000)]
Ensure that lock.h is included in utils.c with AST_API_MODULE defined so that
the implementations will be properly included when the AST_INLINE_API functions
are not going to be inlined. (issue #9124, festr)
Russell Bryant [Fri, 23 Feb 2007 23:20:55 +0000 (23:20 +0000)]
Fix up a couple more signal handlers to not do bad things that could cause
various undesirable results. The other day, I made Asterisk deadlock by
hitting Control-C because of a bad signal handler. Now, signal handlers
just set a flag and write to an alert pipe for the flag to be handled. Then,
there is another thread that is monitoring for these flags. If being run in
console mode, it is just the main thread. If Asterisk is in the background,
a thread is created to do it.
Russell Bryant [Fri, 23 Feb 2007 20:17:56 +0000 (20:17 +0000)]
Don't destroy mutexes before unregistering all of the entry points from the core.
Also, fix a potential memory leak from not destroying the locks for all of the
possible call numbers (about 32k of them).
Joshua Colp [Wed, 21 Feb 2007 20:32:16 +0000 (20:32 +0000)]
Change naughty warning message to provide useful information. If a write now fails on a channel in meetme it will tell you the channel name instead of spitting out the wrong error message.