Commit Graph

13623 Commits

Author SHA1 Message Date
Tilghman Lesher
1ea4af21ca Permit DEBUG_FD_LEAKS to be used with C++ source files.
(closes issue #15698)
 Reported by: slavon
 Patches: 
       20090817__issue15698.diff.txt uploaded by tilghman (license 14)
 Tested by: slavon, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 16:52:53 +00:00
Jason Parker
3300ac5b40 Clarify queues.conf comments to specify that variables should be set in the dialplan.
(closes issue #15755)
Reported by: trendboy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 16:03:21 +00:00
Matthew Nicholson
4fa5fa014f Fix a crash by checking the proper pointer for validity before deferencing it.
(closes issue #15751)
Reported by: atis
Patches:
      ast_bridge_call_peer_cdr.patch uploaded by atis (license 242)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-20 20:33:07 +00:00
Jeff Peeler
d581b4216a Make all the symbols for the C-client callbacks global
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-20 19:53:34 +00:00
David Vossel
941ed1b2fe Fixes memory leak caused by incorrectly freeing mixmonitor
(closes issue #15699)
Reported by: edantie
Patches:
      mixmonitor.patch uploaded by edantie (license 862)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-19 21:18:37 +00:00
Kevin P. Fleming
f5bc668276 Convert this branch to Opsound music-on-hold.
For more details:
http://blogs.digium.com/2009/08/18/asterisk-music-on-hold-changes/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@212913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 20:26:53 +00:00
Sean Bright
a4d1e6120f Delay the creation of temporary files until we have a valid manager command to handle.
Without this patch, asterisk creates a temporary file before determining if the
specified command is valid.  If invalid, we weren't properly cleaning up the file.

(closes issue #15730)
Reported by: zmehmood
Patches:
      M15730.diff uploaded by junky (license 177)
Tested by: zmehmood


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@212763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 16:36:00 +00:00
Richard Mudgett
309898993f Removed some deadwood and added some doxygen comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@212727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 16:00:56 +00:00
Jeff Peeler
d924b5349e Fix segfault when reloading chan_misdn.
If more ports were specified than configured in misdn.conf a reload would crash
asterisk. The problem was the unconfigured port was using data from the
previously configured port. When the data for an unconfigured port was freed a
crash would result from the double free.

(closes issue #12113)
Reported by: agupta
Patches:
      bug12113.patch uploaded by jpeeler (license 325)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@212498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 16:34:56 +00:00
Richard Mudgett
00de2431be Fix uninitialized variable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@212430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 15:36:28 +00:00
Matthew Nicholson
b35312b15b This patch adds additional checking when generating queue log TRANSFER events.
The additional checks prevent generation of false TRANSFER events in certain situations.

(closes issue #14536)
Reported by: aragon
Patches:
      queue-log-xfer-fix1.diff uploaded by mnicholson (license 96)
Tested by: aragon, mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 23:04:02 +00:00
Mark Michelson
ad76c40551 Backport fix so that outbound CANCEL requests have same branch as challenged INVITEs.
There already was code present to be sure that a CANCEL will contain the same branch-id
as the INVITE it is cancelling. However, for INVITES which are challenged downstream,
this mechanism did not work properly. Now this is taken care of.

This is a backport of a fix already present in all 1.6.X branches and in trunk. It also
fixes ABE-1907.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 18:46:09 +00:00
Tilghman Lesher
90f3605f6f Conversion specifiers, not format specifiers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:48:48 +00:00
Tilghman Lesher
63cc189747 AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:15:57 +00:00
Tilghman Lesher
541976843e Small oops. Clear the flags which have been checked.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-09 15:41:01 +00:00
Russell Bryant
a56006702e Resolve a deadlock involving app_chanspy and masquerades.
(ABE-1936)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07 20:11:31 +00:00
Tilghman Lesher
17656694c3 QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.
This is a partial revert of revision 82590, which was an attempted cleanup,
but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
as a method by which component interfaces could be queried from the queue.
Membername isn't useful here, because that field cannot be used to obtain
further information about the member.  See the documentation on
QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
AMI commands which take a member argument for further justification.
(closes issue #15664)
 Reported by: rain
 Patches: 
       app_queue-queue_member_list.diff uploaded by rain (license 327)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07 18:16:28 +00:00
Tilghman Lesher
e87d76cb94 Because channel information can be accessed outside of the channel thread, we must lock the channel prior to modifying it.
(closes issue #15397)
 Reported by: caspy
 Patches: 
       20090714__issue15397.diff.txt uploaded by tilghman (license 14)
 Tested by: caspy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 21:45:01 +00:00
Richard Mudgett
20d63bd1c0 Dialplan starts execution before the channel setup is complete.
*  Issue 15655: For the case where dialing is complete for an incoming
call, dahdi_new() was asked to start the PBX and then the code set more
channel variables.  If the dialplan hungup before these channel variables
got set, asterisk would likely crash.
*  Fixed potential for overlap incoming call to erroneously set channel
variables as global dialplan variables if the ast_channel structure failed
to get allocated.
*  Added missing set of CALLINGSUBADDR in the dialing is complete case.

(closes issue #15655)
Reported by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-05 19:18:56 +00:00
Leif Madsen
01416248d5 Update imapstorage.txt documentation.
Updated the imapstorage.txt documentation to reflect that issues with
c-client versions older than 2007 seem to cause crashing issues that
are not seen with more recent versions. Documentation has been updated
to reflect this.

(closes issue #14496)
Reported by: vbcrlfuser
Patches:
      __20090727-imap-documentation-patch.txt uploaded by lmadsen (license 10)
Tested by: lmadsen, mmichelson, dbrooks

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-05 18:46:21 +00:00
Kevin P. Fleming
22140c486f Eliminate spurious compiler warnings from system headers on *BSD platforms.
Ensure that system headers located in /usr/local/include are actually treated
as system headers by the compiler, and not as local headers which are subject
to warnings from the -Wundef compiler option and others.

(closes issue #15606)
Reported by: mvanbaak



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-04 14:51:39 +00:00
David Brooks
29f865ad17 Fixes dialplan wildcard extension taking precedence over call pickup code.
Prior to this patch, a wildcard extension in the dialplan (for example, _*.) would take
precedence over picking up a call in the channel's pickup group. This patch simply moves
the block of code handling pickup group matching to above the extension matching code.

(closes issue #14735)
Reported by: stevedavies

Review: https://reviewboard.asterisk.org/r/319/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 16:15:20 +00:00
Tilghman Lesher
ca0f026f41 Reverting index() fix, applying a different methodology, based upon developer discussions.
(related to issue #15639)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 16:11:29 +00:00
Tilghman Lesher
f5a5763ee9 Helps if we export the index() function.
(Related to issue #15639)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 15:42:10 +00:00
Tilghman Lesher
a70128e190 Apparently, some platforms don't have the index() function.
(closes issue #15639)
 Reported by: nmav


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-03 15:39:41 +00:00
Russell Bryant
ffe395f410 Resolve a valgrind warning about a read from uninitialized memory.
(issue #15396)
Reported by: aragon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@209879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 11:27:25 +00:00
Russell Bryant
a687e8c53f Modify how Playtones() is used in Milliwatt() to resolve gain issue.
When Milliwatt() was changed internally to use Playtones() so that the proper
tone was used, it introduced a drop in gain in the output signal.  So, use
the playtones API directly and specify a volume argument such that the output
matches the gain of the original Milliwatt() code.

(closes issue #15386)
Reported by: rue_mohr
Patches:
      issue_15386.rev2.diff uploaded by russell (license 2)
Tested by: rue_mohr


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@209838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 10:59:05 +00:00
Kevin P. Fleming
b5bea3704c Minor changes inspired by testing with latest GCC.
The latest GCC (what will become 4.5.x) has a few new warnings, that in these
cases found some either downright buggy code, or at least seriously poorly
designed code that could be improved.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@209759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 00:52:00 +00:00
Tilghman Lesher
e1226e2411 Publish French extra sounds
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@209315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-28 00:12:03 +00:00
Mark Michelson
361c9a99e1 Allow for UDPTL to use only even-numbered ports if desired.
There are some VoIP providers out there that will not accept SDP
offers with odd numbered UDPTL ports. While it is my personal opinion
that these VoIP providers are misinterpreting RFC 2327, it really is
not a big deal to play along with their silly little games. Of course,
since restricting UDPTL ports to only even numbers reduces the range
of available ports by half, so the option to use only even port numbers
is off by default. A user can enable the behavior by setting
use_even_ports=yes in udptl.conf.

(closes issue #15182)
Reported by: CGMChris
Patches:
      15182.patch uploaded by mmichelson (license 60)
Tested by: CGMChris



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@209131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 17:44:06 +00:00
Michiel van Baak
0f05b9b9de backport rev 205532 from trunk:
pthread_self returns a pthread_t which is not an unsigned int on all
pthread implementations. Casting it to an unsigned int fixes compiler warnings.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 09:56:13 +00:00
Jeff Peeler
f622e06bbe Fix logic errors from 208746
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 01:18:31 +00:00
Jeff Peeler
fc5db2b241 Fix compiling under dev-mode with gcc 4.4.0.
Mostly trivial changes, but I did not know of any other way to fix the
"dereferencing type-punned pointer will break strict-aliasing rules" error
without creating a tmp variable in chan_skinny.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-25 06:19:50 +00:00
Mark Michelson
0660bfbe74 Don't impose an arbitrary limit on member lines in queues.conf
I know what some of you are thinking: "UGH! Mark, why are you using
ast_strdup and ast_free for the string when you can just use ast_strdupa
and let the memory free itself?! Have the bats been chewing on your brain
again?"

Based on past experiences, I don't like using ast_strdupa inside a loop.
It's a good way to potentially exhaust stack space. Also, since this only
happens when reloading queues, I don't think that heap allocations and
frees are going to be a huge problem.

(closes issue #15559)
Reported by: amorsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24 19:24:28 +00:00
Russell Bryant
55d9c2ecaf Do not log an ERROR if autoservice_stop() returns -1.
This does not indicate an error.  A return of -1 just means that the channel
has been hung up.

(reported in #asterisk-dev)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24 18:38:24 +00:00
Mark Michelson
38e98f42bc Only send a BYE when hanging up a channel that is up.
For cases where Asterisk sends an INVITE and receives a non 2XX final
response, Asterisk would follow the INVITE transaction by immediately
sending a BYE, which was unnecessary.

(closes issue #14575)
Reported by: chris-mac



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24 18:26:50 +00:00
Mark Michelson
1c46ba9635 Fix a problem where a 491 response could be sent out of dialog.
This generalizes the fix for issue 13849. The initial fix corrected the
problem that Asterisk would reply with a 491 if a reinvite were received
from an endpoint and we had not yet received an ACK from that endpoint
for the initial INVITE it had sent us. This expansion also allows Asterisk
to appropriately handle an INVITE with authorization credentials if Asterisk
had not received an ACK from the previous transaction in which Asterisk had
responded to an unauthorized INVITE with a 407.

(closes issue #14239)
Reported by: klaus3000
Patches:
      14239.patch uploaded by mmichelson (license 60)
Tested by: klaus3000
	  


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 19:24:21 +00:00
Jeff Peeler
594a236e12 Only set the priindication setting when not performing a reload
(closes issue #14696)
Reported by: fdecher



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 19:19:53 +00:00
Mark Michelson
94bc859e81 Remove inaccurate XXX comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 16:29:18 +00:00
Mark Michelson
eb5f3170fc Properly handle 183 responses which do not contain an SDP.
(closes issue #15442)
Reported by: ffloimair
Patches:
      15442.patch uploaded by mmichelson (license 60)
Tested by: tkarl, ffloimair


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 15:43:07 +00:00
Tilghman Lesher
98dcd8946e Export symbols for functions included in our compatibility headers.
(closes issue #15556)
 Reported by: smw1218


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-22 20:23:53 +00:00
Tilghman Lesher
5dbbf21212 Force an error if a blank is passed to QUOTE (because the documentation states the argument is not optional).
This change makes URIENCODE and QUOTE behave similarly, since the documentation
states that the argument is not optional, for both.
(closes issue #15439)
 Reported by: pkempgen
 Patches: 
       20090706__issue15439.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 22:38:54 +00:00
Jeff Peeler
e07afa4876 Wait for wink before dialing when using E&M wink signaling
There was already code for other signaling types in dahdi_handle_event to
handle dialing if a dial operation dial string was present. Simply add
SIG_EMWINK to the list.

(closes issue #14434)
Reported by: araasch


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 20:16:55 +00:00
Jeff Peeler
dca651b85d Revert r207573, this approach could potentially block for an unacceptable
amount of time.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 17:15:48 +00:00
Mark Michelson
e0827ae778 Document default timeout for AMI originations.
AST-224



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 14:26:00 +00:00
Kevin P. Fleming
75f1eaf2a1 Ensure that user-provided CFLAGS and LDFLAGS are honored.
This commit changes the build system so that user-provided flags (in ASTCFLAGS
and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
by the build system itself, so that the user can effectively override the
build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
be provided *either* in the environment before running 'make', or as variable
assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
is no longer necessary, so they are no longer documented, but are still supported
so as not to break existing build systems that supply them when building Asterisk.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:04:44 +00:00
Jeff Peeler
8b940dbeb7 Wait for wink before dialing when using E&M wink signaling
This patch adds a new dahdi_wait function to specifically wait for the wink
event. If the wink is not eventually received the channel is hung up. 

(closes issue #14434)
Reported by: araasch
Patches:
      emwinkmod uploaded by araasch (license 693)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-20 23:23:18 +00:00
Mark Michelson
423a444c0b Answer video SDP offers properly when videosupport is not enabled.
Copied from Review board:

In issue 12434, the reporter describes a situation in which audio and video 
is offered on the call, but because videosupport is disabled in sip.conf, 
Asterisk gives no response at all to the video offer. According to RFC 3264, 
all media offers should have a corresponding answer. For offers we do not 
intend to actually reply to with meaningful values, we should still reply 
with the port for the media stream set to 0.

In this patch, we take note of what types of media have been offered and 
save the information on the sip_pvt. The SDP in the response will take into 
account whether media was offered. If we are not otherwise going to answer 
a media offer, we will insert an appropriate m= line with the port set to 0.

It is important to note that this patch is pretty much a bandage being 
applied to a broken bone. The patch *only* helps for situations where video 
is offered but videosupport is disabled and when udptl_pt is disabled but 
T.38 is offered. Asterisk is not guaranteed to respond to every media offer. 
Notable cases are when multiple streams of the same type are offered. 
The 2 media stream limit is still present with this patch, too.

In trunk and the 1.6.X branches, things will be a bit different since Asterisk 
also supports text in SDPs as well.

(closes issue #12434)
Reported by: mnnojd

Review: https://reviewboard.asterisk.org/r/311
Review: https://reviewboard.asterisk.org/r/313



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-20 19:39:59 +00:00
Russell Bryant
8b67a33369 Only do the chan->fdno check in ast_read() in a developer build.
I changed this check to only happen in a dev-mode build.  I also added a
comment explaining what is going on.  I also made it so that detection of
this situation does not affect ast_read() operation.

(closes issue #14723)
Reported by: seadweller


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-20 16:26:24 +00:00
Jeff Peeler
d162e4b055 Fix format specifier to print out an unsigned long long.
Yep, it's even ifdefed out code. But it made it to the RR list...

(closes issue #14726)
Reported by: lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@207155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-17 19:36:19 +00:00