]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
17 years agoCorrectly allow chan_dahdi to compile against older versions of Zaptel.
Jason Parker [Fri, 17 Oct 2008 15:31:35 +0000 (15:31 +0000)] 
Correctly allow chan_dahdi to compile against older versions of Zaptel.
Don't always define HAVE_ZAPTEL_CHANALARMS (since we check if it's defined..)
Minor cleanup to make things clear.

(closes issue #13726)
Reported by: tzafrir
Patches:
      dahdi_def.diff uploaded by tzafrir (license 46)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150557 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoReverting changes from commits 150298 and 150301 since
Mark Michelson [Thu, 16 Oct 2008 23:40:54 +0000 (23:40 +0000)] 
Reverting changes from commits 150298 and 150301 since
I was mistakenly under the assumption that dialplan functions
*always* required that a channel be present. I need to go
home earlier, I think :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150304 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAnd don't forget to return on the error condition
Mark Michelson [Thu, 16 Oct 2008 23:35:07 +0000 (23:35 +0000)] 
And don't forget to return on the error condition

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150301 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDon't try to call a dialplan function's read callback from
Mark Michelson [Thu, 16 Oct 2008 23:34:37 +0000 (23:34 +0000)] 
Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has
been specified. Several dialplan functions, including
CHANNEL and SIP_HEADER, do not check for NULL-ness of
the channel being passed in.

(closes issue #13715)
Reported by: makoto

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150298 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix memory leak found by customer
Richard Mudgett [Thu, 16 Oct 2008 15:56:06 +0000 (15:56 +0000)] 
Fix memory leak found by customer

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150124 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoThis patch is relevant to:
Steve Murphy [Thu, 16 Oct 2008 15:26:10 +0000 (15:26 +0000)] 
This patch is relevant to:

ABE-1628 and RYM-150398 and AST-103 in internal Digium
bug trackers.

These fixes address a really subtle memory corruption
problem that would happen in machines heavily loaded
in production environments. The corruption would
always take the form of the STMT object getting
nulled out and one of the unixODBC calls would
crash trying to access statement->connection.

It isn't fully proven yet, but the server has
now been running 2.5 days without appreciable
memory growth, or any gain of %cpu, and no
crashes. Whether this is the problem or not
on that server, these fixes are still warranted.

As it turns out, **I** introduced these errors
unwittingly, when I corrected another crash earlier.
I had formed the build_query routine, and failed
to remove mutex_unlock calls in 3 places in the
transplanted code. These unlocks would only
happen in error situations, but unlocking the
mutex early set the code up for a catastrophic
failure, it appears. It would happen only once
every 100K-200K or more calls, under heavy load...
but that is enough.

If another crash occurs, with the same MO,
I'll come back and remove my confession from the log, and
we'll keep searching, but the fact that we
have Asterisk dying from an asynchronous
wiping of the STMT object, only on some connection
error, and that the server has lived for 2.5
days on this code without a crash, sure make
it look like this was the problem!

Also, in several points, Statement handles are
set to NULL after SQLFreeHandle. This was mainly
for insurance, to guarantee a crash. As it turns
out, the code does not appear to be attempting
to use these freed pointers.

Asterisk owes a debt of gratitude to Federico Alves
and Frediano Ziglio for their untiring efforts in
finding this bug, among others.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago Another documentation fix.
BJ Weschke [Wed, 15 Oct 2008 21:34:02 +0000 (21:34 +0000)] 
 Another documentation fix.
 (closes issue #13708)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149840 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago An update to the documentation/example of agents.conf.sample with the correct parame...
BJ Weschke [Wed, 15 Oct 2008 18:28:54 +0000 (18:28 +0000)] 
 An update to the documentation/example of agents.conf.sample with the correct parameter for this feature as defined in chan_agent.c
 (closes issue #13709)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149683 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix some problems when parsing SIP messages that have the maximum number of headers...
Kevin P. Fleming [Wed, 15 Oct 2008 10:30:40 +0000 (10:30 +0000)] 
fix some problems when parsing SIP messages that have the maximum number of headers or body lines that we support

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149452 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoChange this warning to an error message. Suggestion
Mark Michelson [Tue, 14 Oct 2008 23:43:58 +0000 (23:43 +0000)] 
Change this warning to an error message. Suggestion
comes from Sean Bright. Thanks Sean!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149266 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCall register_peer_exten even in the case that the peer's
Mark Michelson [Tue, 14 Oct 2008 23:10:26 +0000 (23:10 +0000)] 
Call register_peer_exten even in the case that the peer's
IP/port does not change.

(closes issue #13309)
Reported by: dimas
Patches:
      v2-13309.patch uploaded by dimas (license 88)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149207 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd a tolerance period for sync-triggered audiohooks
Mark Michelson [Tue, 14 Oct 2008 23:00:01 +0000 (23:00 +0000)] 
Add a tolerance period for sync-triggered audiohooks
so that if packetization of audio is close (but not equal)
we don't end up flushing the audiohooks over small
inconsistencies in synchronization.

Related to issue #13005, and solves the issue
for most people who were experiencing the problem.
However, a small number of people are still experiencing
the problem on long calls, so I am not closing
the issue yet

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149204 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUpdate the queue with the correct number of calls and
Mark Michelson [Tue, 14 Oct 2008 22:40:42 +0000 (22:40 +0000)] 
Update the queue with the correct number of calls and
whether the call was completed within the service level
when a transfer takes place. This way, we do not "break"
the leastrecent and fewestcalls strategies by not logging
a call until after the transferred call has ended.

(closes issue #13395)
Reported by: Marquis
Patches:
      app_queue.c.transfer.patch uploaded by Marquis (license 32)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149200 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDon't allow reserved characters to be used in register
Mark Michelson [Tue, 14 Oct 2008 20:49:02 +0000 (20:49 +0000)] 
Don't allow reserved characters to be used in register
lines in sip.conf.

(closes issue #13570)
Reported by: putnopvut

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149130 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCheck correct values in the return of ast_waitfor(); also, get rid of a
Tilghman Lesher [Tue, 14 Oct 2008 20:09:06 +0000 (20:09 +0000)] 
Check correct values in the return of ast_waitfor(); also, get rid of a
possible memory leak.
(closes issue #13658)
 Reported by: explidous
 Patch by: me

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@149061 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd in some missing updates to the CHANGES file for sip.conf
Leif Madsen [Tue, 14 Oct 2008 19:05:12 +0000 (19:05 +0000)] 
Add in some missing updates to the CHANGES file for sip.conf
(closes issue #13100)
Reported and patch by: gknispel_proformatique

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSome compilers warn, some don't. Fixing.
Tilghman Lesher [Tue, 14 Oct 2008 19:03:08 +0000 (19:03 +0000)] 
Some compilers warn, some don't.  Fixing.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148987 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoEnsure that mail headers are 7-bit clean, even when UTF-8 characters are used
Tilghman Lesher [Tue, 14 Oct 2008 17:41:08 +0000 (17:41 +0000)] 
Ensure that mail headers are 7-bit clean, even when UTF-8 characters are used
in headers like 'Subject' and 'To'.
Closes AST-107.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148916 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDeadlock prevention in chan_local.
Mark Michelson [Tue, 14 Oct 2008 17:33:38 +0000 (17:33 +0000)] 
Deadlock prevention in chan_local.

(closes issue #13676)
Reported by: tacvbo
Patches:
      13676.patch uploaded by putnopvut (license 60)
Tested by: tacvbo

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148912 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoon Ubuntu (at least), recent versions of ld in binutils delete all debugging symbols...
Kevin P. Fleming [Tue, 14 Oct 2008 10:30:54 +0000 (10:30 +0000)] 
on Ubuntu (at least), recent versions of ld in binutils delete all debugging symbols when -x is supplied; since the reasons why -x is being passed are lost in the mists of time, remove it so debugging will work properly

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148736 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoit would be nice if this message printing code had actually been tested before it...
Kevin P. Fleming [Tue, 14 Oct 2008 07:54:41 +0000 (07:54 +0000)] 
it would be nice if this message printing code had actually been tested before it was committed...

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148611 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUser not notified of temporary greeting, if ODBC storage is in use.
Tilghman Lesher [Fri, 10 Oct 2008 16:25:31 +0000 (16:25 +0000)] 
User not notified of temporary greeting, if ODBC storage is in use.
(closes issue #13659)
 Reported by: moliveras
 Patches:
       20081009__bug13659.diff.txt uploaded by Corydon76 (license 14)
 Tested by: moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@148257 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoWhen blank, callerid name and number should display "unknown caller" in voicemail
Tilghman Lesher [Thu, 9 Oct 2008 19:38:33 +0000 (19:38 +0000)] 
When blank, callerid name and number should display "unknown caller" in voicemail
emails.
(Closes issue #13643)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147997 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13139)
Jeff Peeler [Thu, 9 Oct 2008 18:56:00 +0000 (18:56 +0000)] 
(closes issue #13139)
Reported by: krisk84
Tested by: krisk84

This change prevents a call that is placed in the parkinglot to be picked up before the PBX is finished. If another extension dials the parking extension before the PBX thread has completed at minimum warnings will occur about the PBX not properly being terminated. At worst, a crash could occur.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147941 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agowhen parsing a text configuration option, ensure that the buffer on the stack is...
Kevin P. Fleming [Wed, 8 Oct 2008 22:22:09 +0000 (22:22 +0000)] 
when parsing a text configuration option, ensure that the buffer on the stack is actually large enough to hold the legal values of that option, and also ensure that sscanf() knows to stop parsing if it would overrun the buffer (without these changes, specifying "buffers=...,immediate" would overflow the buffer on the stack, and could not have worked as expected)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147681 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIf we receive DTMF make sure that the state of the speech structure goes back to...
Joshua Colp [Wed, 8 Oct 2008 14:51:42 +0000 (14:51 +0000)] 
If we receive DTMF make sure that the state of the speech structure goes back to being not ready. (issue #LUMENVOX-8)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147517 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agorevert this change until i can understand why it results in locking order changes
Kevin P. Fleming [Tue, 7 Oct 2008 23:14:57 +0000 (23:14 +0000)] 
revert this change until i can understand why it results in locking order changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agodon't start a PBX on incoming PRI call channels until after we're done setting channe...
Kevin P. Fleming [Tue, 7 Oct 2008 22:59:08 +0000 (22:59 +0000)] 
don't start a PBX on incoming PRI call channels until after we're done setting channel variables and other things on the channel, otherwise the channel might go away (if the dialplan hangs up quickly) before we are done, which results in a spectacular crash

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147429 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake 'imapsecret' an alias to 'imappassword' in voicemail.conf.
Sean Bright [Tue, 7 Oct 2008 16:48:30 +0000 (16:48 +0000)] 
Make 'imapsecret' an alias to 'imappassword' in voicemail.conf.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147193 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDialplan functions should not actually return 0, unless they have modified the
Tilghman Lesher [Mon, 6 Oct 2008 20:52:04 +0000 (20:52 +0000)] 
Dialplan functions should not actually return 0, unless they have modified the
workspace.  To signal an error (and no change to the workspace), -1 should be
returned instead.
(closes issue #13340)
 Reported by: kryptolus
 Patches:
       20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146799 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCheck whether an extension exists in the _call method, rather than the _alloc
Tilghman Lesher [Mon, 6 Oct 2008 16:51:21 +0000 (16:51 +0000)] 
Check whether an extension exists in the _call method, rather than the _alloc
method, because we need to evaluate the callerid (since that data affects
whether an extension exists).
(closes issue #13343)
 Reported by: efutch
 Patches:
       20080915__bug13343.diff.txt uploaded by Corydon76 (license 14)
 Tested by: efutch

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146711 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoensure that the private structure for pseudo channels is created without 'leaking...
Kevin P. Fleming [Mon, 6 Oct 2008 15:57:49 +0000 (15:57 +0000)] 
ensure that the private structure for pseudo channels is created without 'leaking' configuration data from other configured channels

(closes issue #13555)
Reported by: jeffg
Patches:
      issue_13555.patch uploaded by kpfleming (license 421)
Tested by: jeffg

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146643 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix silly formatting.
Jason Parker [Sun, 5 Oct 2008 21:17:44 +0000 (21:17 +0000)] 
Fix silly formatting.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146448 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoChange some preprocessor macros to struct definitions so that we get
Sean Bright [Fri, 3 Oct 2008 22:51:22 +0000 (22:51 +0000)] 
Change some preprocessor macros to struct definitions so that we get
app_rpt to build with DAHDI.

(closes issue #13576)
Reported by: blitzrage

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146244 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13425)
Jeff Peeler [Fri, 3 Oct 2008 20:44:22 +0000 (20:44 +0000)] 
(closes issue #13425)
Reported by: mdu113
Tested by: mdu113

Similar to r143204, masquerade the channel in the case of Park being called from AGI.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146129 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13579)
Steve Murphy [Fri, 3 Oct 2008 17:12:54 +0000 (17:12 +0000)] 
(closes issue #13579)
Reported by: dwagner

(closes issue #13584)
Reported by: dwagner
Tested by: murf, putnopvut

The thought occurred to me that the res= from the extension spawn
was ending up being returned from the bridge.

"Thou shalt not poison the return value". Made the change
and it appears to allow blind xfers to work as normal.

If I'm wrong, reopen the bugs. But it looks good to me!

Many thanks to putnopvut for helping me reproduce this!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@146026 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBackport support for some of the keyword modifications used in 1.6 (while warning...
Tilghman Lesher [Thu, 2 Oct 2008 16:39:56 +0000 (16:39 +0000)] 
Backport support for some of the keyword modifications used in 1.6 (while warning that
some options aren't really supported) and add some warning messages.  Some credit to
oej, who was complaining in #asterisk-dev.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@145839 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSome sanity checks that may have led to prior crashes, found by codefreeze-lap
Tilghman Lesher [Thu, 2 Oct 2008 15:13:21 +0000 (15:13 +0000)] 
Some sanity checks that may have led to prior crashes, found by codefreeze-lap
(murf) on IRC.  Also some cleanup of incorrectly-used constants.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@145751 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUpdate the realtime_pgsql.sql script to create the setinterfacevar column.
Leif Madsen [Wed, 1 Oct 2008 17:18:30 +0000 (17:18 +0000)] 
Update the realtime_pgsql.sql script to create the setinterfacevar column.

(closes issue #13549)
Reported by: fiddur

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@145479 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agochannels/chan_misdn.c
Richard Mudgett [Tue, 30 Sep 2008 23:55:24 +0000 (23:55 +0000)] 
channels/chan_misdn.c
channels/misdn/isdn_lib.c
*  Miscellaneous other fixes from trunk to make merging easier later.

........
r145200 | rmudgett | 2008-09-30 16:00:54 -0500 (Tue, 30 Sep 2008) | 7 lines

*  Miscellaneous formatting changes to make v1.4 and trunk
more merge compatible in the mISDN area.

channels/chan_misdn.c
*  Eliminated redundant code in cb_events() EVENT_SETUP

........
r144257 | crichter | 2008-09-24 03:42:55 -0500 (Wed, 24 Sep 2008) | 9 lines

improved helptext of misdn_set_opt.
........
r142181 | rmudgett | 2008-09-09 12:30:52 -0500 (Tue, 09 Sep 2008) | 1 line

Cleaned up comment

........
r138738 | rmudgett | 2008-08-18 16:07:28 -0500 (Mon, 18 Aug 2008) | 30 lines

channels/chan_misdn.c
*  Made bearer2str() use allowed_bearers_array[]
*  Made use the causes.h defines instead of hardcoded numbers.
*  Made use Asterisk presentation indicator values if either of the
mISDN presentation or screen options are negative.
*  Updated the misdn_set_opt application option descriptions.
*  Renamed the awkward Caller ID presentation misdn_set_opt
application option value not_screened to restricted.
Deprecated the not_screened option value.

channels/misdn/isdn_lib.c
*  Made use the causes.h defines instead of hardcoded numbers.
*  Fixed some spelling errors and typos.
*  Added all defined facility code strings to fac2str().

channels/misdn/isdn_lib.h
*  Added doxygen comments to struct misdn_bchannel.

channels/misdn/isdn_lib_intern.h
*  Added doxygen comments to struct misdn_stack.

channels/misdn_config.c
configs/misdn.conf.sample
*  Updated the mISDN presentation and screen parameter descriptions.

doc/misdn.txt (doc/tex/misdn.tex)
*  Updated the misdn_set_opt application option descriptions.
*  Fixed some spelling errors and typos.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@145293 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix some minor issues with rev 144924
Kevin P. Fleming [Sat, 27 Sep 2008 15:13:30 +0000 (15:13 +0000)] 
fix some minor issues with rev 144924

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144925 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoimprove header inclusion process in a few small ways:
Kevin P. Fleming [Sat, 27 Sep 2008 15:00:48 +0000 (15:00 +0000)] 
improve header inclusion process in a few small ways:

  - it is no longer necessary to forcibly include asterisk/autoconfig.h; every module already includes asterisk.h as its first header (even before system headers), which serves the same purpose
  - astmm.h is now included by asterisk.h when needed, instead of being forced by the Makefile; this means external modules will build properly against installed headers with MALLOC_DEBUG enabled
  - simplify the usage of some of these headers in the AEL-related stuff in the utils directory

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144924 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoThis patch was applied to 1.4 but it completely
Mark Michelson [Fri, 26 Sep 2008 22:14:59 +0000 (22:14 +0000)] 
This patch was applied to 1.4 but it completely
does not apply since the "found" pointer is not
passed in to this function. If this is going to
be backported, it needs to be done differently or
a deeper backport needs to be done.

Edit: This commit reverts commit number 144677.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13563)
Steve Murphy [Fri, 26 Sep 2008 17:47:13 +0000 (17:47 +0000)] 
(closes issue #13563)
Reported by: mnicholson
Patches:
      found1.diff uploaded by mnicholson (license 96)

This patch was mainly meant to apply to trunk and 1.6.x,
but I'm applying it to 1.4 also, which should be a perfectly
harmless fix to the vast majority of users who are not using
external switches, but the few who might be affected
will not have to go to the pain of filing a bug report.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144677 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #12101)
Steve Murphy [Thu, 25 Sep 2008 16:12:14 +0000 (16:12 +0000)] 
(closes issue #12101)
Reported by: MVF
Tested by: neutrino88, urzedo, murf, thiagofernandes

Many thanks to neutrino88 for this patch, which
solves a problem whereby channels get a CANCEL
request, respond to it properly, but end up
in a hung state, infinitely being rescheduled.
This fix is a bit crude, in that catches the
problem at a rather late phase, but it may
prevent infinite rescheduling problems that
might still arise.

It might have been better to find out why,
in the course of protocol handling, the channel
was not destroyed, but we leave that to
future generations.

Many thanks to urzedo and thiagofernandes for
their work in verifying that the patch code
indeed is being executing, and averting the
problem.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144420 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBackport Hebrew language to voicemail.
Tilghman Lesher [Thu, 25 Sep 2008 01:44:47 +0000 (01:44 +0000)] 
Backport Hebrew language to voicemail.
(closes issue #13155)
 Reported by: greenfieldtech
 Patches:
       voicemail-hebrew-patch-1.4-SVN.c.patch uploaded by greenfieldtech (license 369)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144356 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoimproved helptext of misdn_set_opt.
Christian Richter [Wed, 24 Sep 2008 08:20:52 +0000 (08:20 +0000)] 
improved helptext of misdn_set_opt.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144238 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13489)
Steve Murphy [Tue, 23 Sep 2008 16:41:49 +0000 (16:41 +0000)] 
(closes issue #13489)
Reported by: DougUDI
Tested by: murf

(closes issue #13490)
Reported by: seanbright
Tested by: murf

(closes issue #13467)
Reported by: edantie
Tested by: murf, edantie, DougUDI

This crash happens because we are unsafely handling old pointers.
The channel whose cdr is being handled, has been hung up and
destroyed already. I reorganized the code a bit, and tried not
to lose the fork-cdr-chain concepts of the previous code.
I now verify that the 'previous' channel (the channel we
had when the bridge was started), still exists, by looking it up
by name in the channel list. I also do not try to reset the
CDR's of channels involved in bridges.

Testing shows it solves the crash problem, and should not
negatively impact previous fixes involving CDR's generated
during/after blind transfers. (The reason we need to reset
the CDR's on the "beginning" channels in the first place).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@144066 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIn at least one machine, we noted that the timestr
Steve Murphy [Tue, 23 Sep 2008 14:22:10 +0000 (14:22 +0000)] 
In at least one machine, we noted that the timestr
was not getting set in the STMT; it was coming out,
usually, as binary garbage to an mssql server.
These changes fixed the problem. The only thing
I can venture forth as a guess, is that the pointer
is being stored in the interface, not a copy of the
string. Because we ripped the build process into a
subroutine, the timestr became a temp. stack variable,
and between the time the STMT got built and the
time it was executed on the server, the string being
pointed to was damaged. At any rate, even if this
theory is false, and some mechanism was at fault,
this fix worked reliably where it didn't before.

Why this bug didn't bite last week, I have no idea.
This change basically defines the timestr buffer
in the calling function, extending the life of the
buffer to cover both the STMT's building and
processing to the server.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143964 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUse the advertised header size in .au files instead of just assuming they
Sean Bright [Mon, 22 Sep 2008 22:49:00 +0000 (22:49 +0000)] 
Use the advertised header size in .au files instead of just assuming they
are 24 bytes (the minimum).

(closes issue #13450)
Reported by: jamessan
Patches:
      pcm-header.diff uploaded by jamessan (license 246)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143903 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake vmail.cgi work with mailboxes defined in users.conf, too.
Sean Bright [Sat, 20 Sep 2008 00:50:10 +0000 (00:50 +0000)] 
Make vmail.cgi work with mailboxes defined in users.conf, too.

(closes issue #13187)
Reported by: netvoice
Patches:
      20080911__bug13187.diff.txt uploaded by Corydon76 (license 14)
      (Slightly modified to take alchamist's comments on mantis into account)
Tested by: msales, alchamist, seanbright

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143736 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoThis fix comes from a debugging session on a test box that has been getting hung...
Steve Murphy [Fri, 19 Sep 2008 21:07:05 +0000 (21:07 +0000)] 
This fix comes from a debugging session on a test box that has been getting hung channels when the mssqlserver bounces. All the connections then become invalid, and must be reconnected. The cdr_odbc backend had code to do it, but depended on re-establishing the connection, but re-using the STMT that had been built. By trial and error, we determined that the STMT could not be re-used after the connection was re-established. and must be rebuilt. These changes accomplish this.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143674 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdjust for technology when generating user extension
Doug Bailey [Fri, 19 Sep 2008 16:17:14 +0000 (16:17 +0000)] 
Adjust for technology when generating user extension
(issue #13332)
Reported by: wizzy
Tested by: bkruse

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143612 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoA micro-fix, in sip_park_thread, where d is freed before the func is done using it.
Steve Murphy [Thu, 18 Sep 2008 22:11:51 +0000 (22:11 +0000)] 
A micro-fix, in sip_park_thread, where d is freed before the func is done using it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143534 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agocompare peer and chan instead of looking at the parked user (pu), which could have...
Jeff Peeler [Thu, 18 Sep 2008 21:01:23 +0000 (21:01 +0000)] 
compare peer and chan instead of looking at the parked user (pu), which could have possibly already have been freed by the parking thread

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143475 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoWhen callerid is blank, we want to use "unknown caller" in those cases, too.
Tilghman Lesher [Wed, 17 Sep 2008 20:55:47 +0000 (20:55 +0000)] 
When callerid is blank, we want to use "unknown caller" in those cases, too.
(closes issue #13486)
 Reported by: tomo1657
 Patches:
       20080917__bug13486.diff.txt uploaded by Corydon76 (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143404 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAllow for "G.729" if offered in an SDP even though
Mark Michelson [Wed, 17 Sep 2008 18:24:15 +0000 (18:24 +0000)] 
Allow for "G.729" if offered in an SDP even though
it is not RFC 3551 compliant. Some Cisco switches
will send this in an SDP, and it doesn't hurt to
be able to accept this.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143337 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13493)
Jeff Peeler [Tue, 16 Sep 2008 21:44:21 +0000 (21:44 +0000)] 
(closes issue #13493)
Reported by: mdu113
Patches:
      bug13493.diff uploaded by jpeeler (license 325)
Tested by: mdu113

Changed park_call_full to hold the parkinglot lock a little longer, which protects the parkeduser struct from being freed out from underneath. Made sure that the parking extension is added to the parking context while holding the lock thereby ensuring that there are no spurious warnings from removal attempts when a hangup occurs while the parking lot is being announced.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143270 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13465)
Jeff Peeler [Tue, 16 Sep 2008 16:14:25 +0000 (16:14 +0000)] 
(closes issue #13465)
(closes issue #13425)
Reported by: mdu113
Patches:
      bug13425.diff uploaded by jpeeler (license 325)
Tested by: mdu113

The main change here was to masquerade the channel if the channel that was to be parked was running a PBX on it. The PBX thread can then maintain full control of the channel (the zombie) as it expects to while allowing the parking thread full control of the real (parked) channel.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143204 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSet the raw formats at the same time as the other formats.
Tilghman Lesher [Mon, 15 Sep 2008 21:29:32 +0000 (21:29 +0000)] 
Set the raw formats at the same time as the other formats.
(closes issue #13240)
 Reported by: jvandal
 Patches:
       20080813__bug13240.diff.txt uploaded by Corydon76 (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@143140 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #12965)
Jeff Peeler [Fri, 12 Sep 2008 22:22:28 +0000 (22:22 +0000)] 
(closes issue #12965)
Reported by: rlsutton2

Prevents local channels from playing MOH at each other which was causing ast_generic_bridge to loop much faster.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142927 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCreate rules for disallowing contacts at certain addresses, which may
Tilghman Lesher [Fri, 12 Sep 2008 20:37:18 +0000 (20:37 +0000)] 
Create rules for disallowing contacts at certain addresses, which may
improve the security of various installations.  As this does not change
any default behavior, it is not classified as a direct security fix for
anything within Asterisk, but may help PBX admins better secure their
SIP servers.
(closes issue #11776)
 Reported by: ibc
 Patches:
       20080829__bug11776.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, blitzrage

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142865 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix copyright year range
Michiel van Baak [Fri, 12 Sep 2008 17:59:25 +0000 (17:59 +0000)] 
fix copyright year range

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142807 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMissing merge from 1.2 fixes errant exit on DTMF, only when language is Italian
Tilghman Lesher [Fri, 12 Sep 2008 16:38:02 +0000 (16:38 +0000)] 
Missing merge from 1.2 fixes errant exit on DTMF, only when language is Italian
(cf commit 34242)
(Closes issue #7353)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142744 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDon't return a free'd pointer, when a file cannot be opened.
Tilghman Lesher [Fri, 12 Sep 2008 16:27:32 +0000 (16:27 +0000)] 
Don't return a free'd pointer, when a file cannot be opened.
(closes issue #13462)
 Reported by: wackysalut

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoTested by: sergee, murf, chris-mac, andrew, KNK
Steve Murphy [Fri, 12 Sep 2008 04:29:34 +0000 (04:29 +0000)] 
Tested by: sergee, murf, chris-mac, andrew, KNK

This is a "second attempt" to restore the previous "endbeforeh" behavior
in 1.4 and up. In order to capture information concerning all the
legs of transfers in all their infinite combinations, I was forced
to this particular solution by a chain of logical necessities, the
first being that I was not allowed to rewrite the CDR mechanism from
the ground up!

This change basically leaves the original machinery alone, which allows
IVR and local channel type situations to generate CDR's as normal, but
a channel flag can be set to suppress the normal running of the h exten.
That flag would be set by the code that runs the h exten from the
ast_bridge_call routine, to prevent the h exten from being run twice.
Also, a flag in the ast_bridge_config struct passed into ast_bridge_call
can be used to suppress the running of the h exten in that routine. This
would happen, for instance, if you use the 'g' option in the Dial app.

Running this routine 'early' allows not only the CDR() func to be used
in the h extension for reading CDR variables, but also allows them to
be modified before the CDR is posted to the backends.

While I dearly hope that this patch overcomes all problems, and
introduces no new problems, reality suggests that surely someone
will have problems. In this case, please re-open 13251 (or 13289),
and we'll see if we can't fix any remaining issues.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142675 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13364)
Steve Murphy [Thu, 11 Sep 2008 22:55:49 +0000 (22:55 +0000)] 
(closes issue #13364)
Reported by: mdu113

Well, fundamentally, the problems revealed in 13364 are
because of the ForkCDR call that is done before the dial.
When the bridge is in place, it's dealing with the first
(and wrong) cdr in the list.

So, I wrote a little func to zip down to the first non-locked
cdr in the chain, and thru-out the ast_bridge_call, these
results are used instead of raw chan->cdr and peer->cdr pointers.
This shouldn't affect anyone who isn't forking cdrs before a
dial, and should correct the cdr's of those that do.

So, this change ends up correcting the dstchannel
and userfield; the disposition was fixed by a previous
patch, it was OK coming into this problem.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142575 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #12318)
Steve Murphy [Wed, 10 Sep 2008 21:58:17 +0000 (21:58 +0000)] 
(closes issue #12318)
Reported by: krtorio

I made a small change to the code that handles local channel situations.
In that code, I copy the answer time from the peer cdr, to the bridge_cdr,
but I wasn't also copying the disposition from the peer cdr.

So, Now I copy the disposition, and I've tested against
these cases:

1. phone 1 never answers the phone; no cdr is generated at all.
   this should show up as a manager command failure or something.

2. phone 2 never answers. CDR is generated, says NO ANSWER

3. phone 2 is busy. CDR is generated, says BUSY

4. phone 2 answers: CDR is generated, times are correct; disposition
   is ANSWERED, which is correct. The start time is the time that
   the manager dialed the first phone. The answer time is the time
   the second phone picks up.

I purposely left the cid and src fields blank; since this call really
originates from the manager, there is no 'easy' data to put in these
fields. If you feel strongly that these fields should be filled in,
re-open this bug and I'll dig further.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142474 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix detection of PWLIB and OpenH323 version when spacing in the headers
Sean Bright [Wed, 10 Sep 2008 19:05:46 +0000 (19:05 +0000)] 
Fix detection of PWLIB and OpenH323 version when spacing in the headers
isn't consistent.

(closes issue #13426)
Reported by: bamby
Patches:
      detect_openh323.diff uploaded by bamby (license 430)
      (Modified by me to use sed instead of tr)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142416 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoPublish new extra sounds version.
Tilghman Lesher [Wed, 10 Sep 2008 16:54:29 +0000 (16:54 +0000)] 
Publish new extra sounds version.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142358 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIt is a normal situation that a task gets put in the scheduler that should run
Russell Bryant [Wed, 10 Sep 2008 16:39:53 +0000 (16:39 +0000)] 
It is a normal situation that a task gets put in the scheduler that should run
as soon as possible.  Accept "0" as an acceptable time to run, and also treat
negative as "run now", and don't print a debug message about it.

(inspired by a message asking about the "request to schedule in the past"
 debug message on the -dev list)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142354 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake sure that the branch sent in CANCEL requests
Mark Michelson [Tue, 9 Sep 2008 19:15:28 +0000 (19:15 +0000)] 
Make sure that the branch sent in CANCEL requests
matches the branch of the INVITE it is cancelling.

(closes issue #13381)
Reported by: atca_pres
Patches:
      13381v2.patch uploaded by putnopvut (license 60)
Tested by: atca_pres

(closes issue #13198)
Reported by: rickead2000
Tested by: rickead2000

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142218 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoWhen determining if codecs used by SIP peers allow
Mark Michelson [Tue, 9 Sep 2008 16:19:17 +0000 (16:19 +0000)] 
When determining if codecs used by SIP peers allow
the media to be natively bridged, use the jointcapability
instead of the peercapability.

It seems that the intent of using the peercapability was to
expand the choice of codecs for the call to increase the
chances of being able to native bridge the channels. The
problem is that if a codec were settled on for the native
bridge and that wasn't a codec that was configured to be used
by Asterisk for that peer, then Asterisk would send a
REINVITE with no codecs in the SDP which is a bug no matter
how you slice it.

(closes issue #13076)
Reported by: ramonpeek
Patches:
      13076.patch uploaded by putnopvut (license 60)
Tested by: tbelder

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142079 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoEnsure that the stored CDR reference is still valid after the bridge before
Russell Bryant [Tue, 9 Sep 2008 15:40:24 +0000 (15:40 +0000)] 
Ensure that the stored CDR reference is still valid after the bridge before
poking at it.  Also, keep the channel locked while messing with this CDR.

(fixes crashes reported in issue #13409)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@142063 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix pedantic mode of chan_sip to only check the
Mark Michelson [Mon, 8 Sep 2008 21:10:10 +0000 (21:10 +0000)] 
Fix pedantic mode of chan_sip to only check the
remote tag of an endpoint once a dialog has
been confirmed. Up until that point, it is possible
and legal for the far-end to send provisional
responses with a different To: tag each time. With
this patch applied, these provisional messages
will not cause a matching problem.

(closes issue #11536)
Reported by: ibc
Patches:
      11536v2.patch uploaded by putnopvut (license 60)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141809 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoWhen doing an async goto, detect if the channel is already in the middle of a
Russell Bryant [Mon, 8 Sep 2008 21:02:36 +0000 (21:02 +0000)] 
When doing an async goto, detect if the channel is already in the middle of a
masquerade.  This can happen when chan_local is trying to optimize itself out.
If this happens, fail the async goto instead of bursting into flames.

(closes issue #13435)
Reported by: geoff2010

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141806 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRemove RPM package targets from Makefile (and all associated parts).
Jason Parker [Mon, 8 Sep 2008 20:15:42 +0000 (20:15 +0000)] 
Remove RPM package targets from Makefile (and all associated parts).
This has never worked in 1.4, and we decided that it makes no sense to be done here.
There are many distros out there that already have "proper" spec files that can be (re)used.

Closes issue #13113
Closes issue #10950
Closes issue #10952

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141741 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoActually use Zaptel CFLAGS if using Zaptel instead of DAHDI
Russell Bryant [Mon, 8 Sep 2008 16:26:00 +0000 (16:26 +0000)] 
Actually use Zaptel CFLAGS if using Zaptel instead of DAHDI

This fixes building against Zaptel when using a custom path

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141678 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoThis fix comes from Joshua Colp The Brilliant, who, given the trace, came up with...
Steve Murphy [Sat, 6 Sep 2008 20:13:16 +0000 (20:13 +0000)] 
This fix comes from Joshua Colp The Brilliant, who, given the trace, came up with a solution. This will most likely will close 13235 and 13409. I'll wait till Monday to verify, and then close these bugs.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141565 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoReverting behavior change (AGI should not exit non-zero on SUCCESS)
Tilghman Lesher [Sat, 6 Sep 2008 15:23:42 +0000 (15:23 +0000)] 
Reverting behavior change (AGI should not exit non-zero on SUCCESS)
(closes issue #13434)
 Reported by: francesco_r

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141503 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAgent's should not try to call a channel's indicate callback
Mark Michelson [Fri, 5 Sep 2008 21:10:32 +0000 (21:10 +0000)] 
Agent's should not try to call a channel's indicate callback
if the channel has been hung up. It will likely crash
otherwise

ABE-1159

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141366 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSince greetings are not stored in IMAP, we should
Mark Michelson [Fri, 5 Sep 2008 16:35:54 +0000 (16:35 +0000)] 
Since greetings are not stored in IMAP, we should
not be DISPOSE'ing of them the same way we do with
other messages.

(closes issue #13414)
Reported by: mthomasslo
Patches:
      13414v2.patch uploaded by putnopvut (license 60)
Tested by: mthomasslo

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141267 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCommit 140417 had a logic flaw in it which
Mark Michelson [Fri, 5 Sep 2008 16:00:24 +0000 (16:00 +0000)] 
Commit 140417 had a logic flaw in it which
caused port 5060 to always be used when dialing
a peer if no explicit port was specified. This
broke the behavior of implicitly using the port
from which the peer registered if no port is
specified. This commit fixes the logic flaw.

(closes issue #13424)
Reported by: mdu113
Patches:
      13424.patch uploaded by putnopvut (license 60)
Tested by: mdu113

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141217 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoA small change to prevent double-posting of CDR's; thanks to Daniel Ferrer for bringi...
Steve Murphy [Fri, 5 Sep 2008 14:15:43 +0000 (14:15 +0000)] 
A small change to prevent double-posting of CDR's; thanks to Daniel Ferrer for bringing it to our attention

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141156 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13357)
Steve Murphy [Thu, 4 Sep 2008 23:15:07 +0000 (23:15 +0000)] 
(closes issue #13357)
Reported by: pj
Tested by: murf

(closes issue #13416)
Reported by: yarns
Tested by: murf

If you find this message overly verbose, relax, it's probably
not meant for you. This message is meant for probably only
two people in the whole world: me, or the poor schnook that
has to maintain this code because I'm either dead or unavailable
at the moment.

This fix solves two reports, both having to do with embedding
a function call in a ${} construct. It was tricky because the
funccall syntax has parenthesis () in it. And up till now,
the 'word' token in the flex stuff didn't allow that, because
it would tend to steal the LP and RP tokens. To be truthful,
the "word" token was the trickiest, most unstable thing in
the whole lexer. I was lucky it made this long without complaints.
I had to choose every character in the pattern with extreme
care, and I knew that someday I'd have to revisit it. Well,
the day has come.

So, my brilliant idea (and I'm being modest), was to use the
surrounding ${} construct to make a state machine and capture
everything in it, no matter what it contains. But, I have to now
treat the word token like I did with comments, in that I turn
the whole thing into a state-machine sort of spec, with new
contexts "curlystate", "wordstate", and "brackstate".

Wait a minute, "brackstate"? Yes, well, it didn't take very many
regression tests to point out if I do this for ${} constructs,
I also have to do it with the $[] constructs, too.

I had to create a separate pcbstack2 and pcbstack3 because
these constructs can occur inside macro argument lists, and
when we have two state machines operating on the same structures
we'd get problems otherwise. I guess I could have stopped at
pcbstack2 and had the brackstate stuff share it, but it doesn't
hurt to be safe. So, the pcbpush and pcbpop routines also now
have versions for "2" and "3".

I had to add the {KEYWORD} construct to the initial pattern for
"word", because previously word would match stuff like "default7",
because it was a longer match than the keyword "default". But,
not any more, because the word pattern only matches only one or
two characters now, and it will always lose. So, I made it the
winner again by making an optional match on any of the keywords
before it's normal pattern.

I added another regression test to make sure we don't
lose this in future edits, and had to fix just one regression,
where it no longer reports a 'cascaded' error, which I guess
is a plus.

I've given some thought as to whether to apply these fixes to
1.4 and the 1.6.x releases, vs trunk; I decided to put it in
1.4 because one of the bug reports was against 1.4; and it
is unexpected that AEL cannot handle this situation. It actually
reduced the amount of useless "cascade" error messages that
appeared in the regressions (by one line, ehhem). There is
a possible side-effect in that it does now do more careful
checking of what's in those ${} constructs, as far as matching
parens, and brackets are concerned. Some users may find a an
insidious problem and correct it this way. This should be
exceedingly rare, I hope.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141094 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #11979)
Jeff Peeler [Thu, 4 Sep 2008 17:00:29 +0000 (17:00 +0000)] 
(closes issue #11979)
Fixes multiple parking problems:
Crash when executing a park on an extension dialed by AGI due to not returning the proper return code.
Crash when using a builtin feature that was a subset of a enabled dynamic feature.
Crash due to always hanging up the peer despite the fact that the peer was supposed to be parked.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141028 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix voicemail forwarding when using ODBC storage.
Mark Michelson [Wed, 3 Sep 2008 14:29:15 +0000 (14:29 +0000)] 
Fix voicemail forwarding when using ODBC storage.

(closes issue #13387)
Reported by: moliveras
Patches:
      13387.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDon't freak out if the poll emulation receives NULL for the pollfds array
Russell Bryant [Wed, 3 Sep 2008 13:24:35 +0000 (13:24 +0000)] 
Don't freak out if the poll emulation receives NULL for the pollfds array
(closes issue #13307)
Reported by: jcovert

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140816 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAfter adding the context checking to app_voicemail
Mark Michelson [Tue, 2 Sep 2008 23:47:49 +0000 (23:47 +0000)] 
After adding the context checking to app_voicemail
for IMAP storage, I left out a crucial place to
copy the context to the vm_state structure. This
is the correction.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140751 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoI am turning the warnings generated in ast_cdr_free and post_cdr into verbose level...
Steve Murphy [Tue, 2 Sep 2008 23:36:56 +0000 (23:36 +0000)] 
I am turning the warnings generated in ast_cdr_free and post_cdr into verbose level 2 messages. Really, they matter little to end users. You either get the CDR's you wanted, or you don't, and it is a bug.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140747 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAfter reconsidering, with respect to 13409, ast_cdr_detach should be OK, better in...
Steve Murphy [Tue, 2 Sep 2008 22:40:13 +0000 (22:40 +0000)] 
After reconsidering, with respect to 13409, ast_cdr_detach should be OK, better in fact, than ast_cdr_free, which generates lots of useless warnings that will undoubtably generate complaints.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140690 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13409)
Steve Murphy [Tue, 2 Sep 2008 22:15:57 +0000 (22:15 +0000)] 
(closes issue #13409)
Reported by: tomaso
Patches:
      asterisk-1.6.0-rc2-cdrmemleak.patch uploaded by tomaso (license 564)

I basically spent the day, verifying that this patch
solves the problem, and doesn't hurt in non-problem
cases. Why valgrind did not plainly reveal this leak
absolutely mystifies and stuns me.

Many, many thanks to tomaso for finding and providing the fix.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140670 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake sure to use the correct length of the mohinterpret and mohsuggest
Sean Bright [Tue, 2 Sep 2008 18:14:57 +0000 (18:14 +0000)] 
Make sure to use the correct length of the mohinterpret and mohsuggest
buffers when copying configuration values.

(closes issue #13336)
Reported by: decryptus_proformatique
Patches:
      chan_iax2_mohinterpret_mohsuggest_general_settings.patch uploaded by decryptus (license 555)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140605 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAfter working on the ao2_containers branch, I noticed
Mark Michelson [Fri, 29 Aug 2008 17:34:17 +0000 (17:34 +0000)] 
After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd context checking when retrieving a vm_state.
Mark Michelson [Fri, 29 Aug 2008 16:01:07 +0000 (16:01 +0000)] 
Add context checking when retrieving a vm_state.
This was causing a problem for people who had identically
named mailboxes in separate voicemail contexts.
This commit affects IMAP storage only.

(closes issue #13194)
Reported by: moliveras
Patches:
      13194.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140421 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix SIP's parsing so that if a port is specified
Mark Michelson [Fri, 29 Aug 2008 15:26:52 +0000 (15:26 +0000)] 
Fix SIP's parsing so that if a port is specified
in a string to Dial(), it is not ignored.

(closes issue #13355)
Reported by: acunningham
Patches:
      13355v2.patch uploaded by putnopvut (license 60)
Tested by: acunningham

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140417 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix tag checking in get_sip_pvt_byid_locked when
Mark Michelson [Wed, 27 Aug 2008 19:49:20 +0000 (19:49 +0000)] 
Fix tag checking in get_sip_pvt_byid_locked when
in pedantic mode. The problem was that the wrong
tags would be compared depending on the direction
of the call.

(closes issue #13353)
Reported by: flefoll
Patches:
      chan_sip.c.br14.139015.patch-refer-pedantic uploaded by flefoll (license 244)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140299 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd HAVE_PRI if define around dahdi_close_pri_fd
Jeff Peeler [Tue, 26 Aug 2008 16:49:57 +0000 (16:49 +0000)] 
add HAVE_PRI if define around dahdi_close_pri_fd

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140115 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix some bogus scheduler usage in chan_sip. This code used the return value
Russell Bryant [Tue, 26 Aug 2008 16:07:58 +0000 (16:07 +0000)] 
Fix some bogus scheduler usage in chan_sip.  This code used the return value
of a completely unrelated function to determine whether the scheduler should
be run or not.  This would have caused the scheduler to not run in cases where
it should have.  Also, leave a note about another scheduler issue that needs
to be addressed at some point.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140060 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #12071)
Jeff Peeler [Tue, 26 Aug 2008 15:57:02 +0000 (15:57 +0000)] 
(closes issue #12071)
Reported by: tzafrir
Patches:
      dahdi_close.diff uploaded by tzafrir (license 46)
Tested by: tzafrir, jpeeler

This patch fixes closing open file descriptors in the case of an error.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140056 65c4cc65-6c06-0410-ace0-fbb531ad65f3