]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
16 years agoSet the process group ID on the MOH process so that all children will get killed
Russell Bryant [Thu, 18 Dec 2008 18:52:18 +0000 (18:52 +0000)] 
Set the process group ID on the MOH process so that all children will get killed

(closes issue #14099)
Reported by: caspy
Patches:
      res_musiconhold.c.patch.killpg.try2 uploaded by caspy (license 645)

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

16 years agoOnly care about a compatible codec for early bridging if we are actually bridging...
Joshua Colp [Thu, 18 Dec 2008 17:11:42 +0000 (17:11 +0000)] 
Only care about a compatible codec for early bridging if we are actually bridging to another channel. If we are not we actually want to bring the audio back to us.
(closes issue #13545)
Reported by: davidw

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

16 years agoDo not crash if we are not passed in a followme id.
Joshua Colp [Thu, 18 Dec 2008 16:07:37 +0000 (16:07 +0000)] 
Do not crash if we are not passed in a followme id.
(closes issue #14106)
Reported by: ys
Patches:
      app_followme.c.2.diff uploaded by ys (license 281)

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

16 years agoReverse the fix from issue #6176 and add proper handling for that issue.
Tilghman Lesher [Wed, 17 Dec 2008 21:14:37 +0000 (21:14 +0000)] 
Reverse the fix from issue #6176 and add proper handling for that issue.
(Closes issue #13962, closes issue #13363)
Fixed by myself (license 14)

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

16 years agoFix some memory leaks found while looking at how realtime
Mark Michelson [Wed, 17 Dec 2008 20:51:38 +0000 (20:51 +0000)] 
Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing

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

16 years agoAfter looking through SIP registration code most of the day, this
Mark Michelson [Tue, 16 Dec 2008 23:04:27 +0000 (23:04 +0000)] 
After looking through SIP registration code most of the day, this
is one of the few things I could find that was just plain wrong.
Even though it probably isn't possible for it to happen, it seems weird
to have code that checks if a pointer is NULL and then immediately dereferences
that pointer if it was NULL.

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

16 years agoFix an issue where DEBUG_THREADS may erroneously report that a thread
Russell Bryant [Tue, 16 Dec 2008 21:38:29 +0000 (21:38 +0000)] 
Fix an issue where DEBUG_THREADS may erroneously report that a thread
is exiting while holding a lock.

If the last lock attempt was a trylock, and it failed, it will still be in the
list of locks so that it can be reported.

(closes issue #13219)
Reported by: pj

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

16 years agoDo not dereference the channel if AST_PBX_KEEPALIVE has been returned.
Russell Bryant [Tue, 16 Dec 2008 21:10:44 +0000 (21:10 +0000)] 
Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.

This is a bug I noticed while looking at the code for app_macro.  This return code
means that another thread has assumed ownership of the channel and it can no longer
be touched.  (I hate this return code with a passion, by the way.)

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

16 years agoAdd "restart gracefully" to the AMI blacklist of CLI commands.
Russell Bryant [Tue, 16 Dec 2008 20:35:25 +0000 (20:35 +0000)] 
Add "restart gracefully" to the AMI blacklist of CLI commands.

"module unload" was already identified as a command that can not be used
from the AMI.  "restart gracefully" effectively unloads all modules, and will
run in to the same problems.

(closes issue #13894)
Reported by: kernelsensei

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

16 years agoFix memory leak and invalid reporting issues with DEBUG_THREADLOCALS.
Russell Bryant [Tue, 16 Dec 2008 17:06:29 +0000 (17:06 +0000)] 
Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS.

One issue was that the ast_mutex_* API was being used within the context of the
thread local data destructors.  We would go off and allocate more thread local data
while the pthread lib was in the middle of destroying it all.  This led to a memory
leak.

Another issue was an invalid argument being provided to the the object_add
API call.

(closes issue #13678)
Reported by: ys
Tested by: russell

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

16 years agoFix a memory leak related to the use of the "setvar" configuration option.
Russell Bryant [Tue, 16 Dec 2008 15:56:37 +0000 (15:56 +0000)] 
Fix a memory leak related to the use of the "setvar" configuration option.

The problem was that these variables were being appended to the list of vars
on the sip_pvt every time a re-registration or re-subscription came in.
Since it's just a waste of memory to put them there unless the request was an
INVITE, then the fix is to check the request type before copying the vars.

(closes issue #14037)
Reported by: marvinek
Tested by: russell

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

16 years agoI added a sentence to clarify why - and ' ' are ignored in patterns
Steve Murphy [Tue, 16 Dec 2008 15:15:58 +0000 (15:15 +0000)] 
I added a sentence to clarify why - and ' ' are ignored in patterns
as per bug 14076. Leif says he'll put some stuff about it in the
extensions.conf sample, etc.

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

16 years agoDon't try to change working directory if a directory was not configured.
Russell Bryant [Tue, 16 Dec 2008 14:28:10 +0000 (14:28 +0000)] 
Don't try to change working directory if a directory was not configured.

(closes issue #14089)
Reported by: caspy

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

16 years agoAdd the deadlock note to ast_spawn_extension as well
Mark Michelson [Mon, 15 Dec 2008 19:53:08 +0000 (19:53 +0000)] 
Add the deadlock note to ast_spawn_extension as well

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

16 years agoAdd notes to autoservice and pbx doxygen regarding a potential
Mark Michelson [Mon, 15 Dec 2008 19:45:07 +0000 (19:45 +0000)] 
Add notes to autoservice and pbx doxygen regarding a potential
deadlock scenario so that it is avoided in the future

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

16 years agoDo not try to unlock a non-existant channel if the transfer fails.
Joshua Colp [Mon, 15 Dec 2008 18:11:21 +0000 (18:11 +0000)] 
Do not try to unlock a non-existant channel if the transfer fails.
(closes issue #13800)
Reported by: dwagner
Patches:
      asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608)

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

16 years agoUse autoconf logic to determine whether the system has timersub or not. Do not blindl...
Joshua Colp [Mon, 15 Dec 2008 17:43:59 +0000 (17:43 +0000)] 
Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.
(closes issue #13838)
Reported by: ano

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

16 years agoCan we try not to assign an unsigned int to -1?
Joshua Colp [Mon, 15 Dec 2008 15:05:08 +0000 (15:05 +0000)] 
Can we try not to assign an unsigned int to -1?
(closes issue #14074)
Reported by: wetwired

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

16 years agoHandle a case where a call can be bridged to a channel that is still ringing.
Russell Bryant [Mon, 15 Dec 2008 14:31:37 +0000 (14:31 +0000)] 
Handle a case where a call can be bridged to a channel that is still ringing.

The issue that was reported was about a case where a RINGING channel got
redirected to an extension to pick up a call from parking.  Once the parked
call got taken out of parking, it heard silence until the other side answered.
Ideally, the caller that was parked would get a ringing indication.  This patch
fixes this case so that the caller receives ringback once it comes out of
parking until the other side answers.

The fixes are:

 - Make sure we remember that a channel was an outgoing channel when doing
   a masquerade.  This prevents an erroneous ast_answer() call on the channel,
   which causes a bogus 200 OK to be sent in the case of SIP.

 - Add some additional comments to explain related parts of code.

 - Update the handling of the ast_channel visible_indication field.  Storing
   values that are not stateful is pointless.  Control frames that are events
   or commands should be ignored.

 - When a bridge first starts, check to see if the peer channel needs to be
   given ringing indication because the calling side is still ringing.

 - Rework ast_indicate_data() a bit for the sake of readability.

(closes issue #13747)
Reported by: davidw
Tested by: russell
Review: http://reviewboard.digium.com/r/90/

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

16 years agoChange the default calldurationlimit from the special value 0 to -1, so we
Tilghman Lesher [Sat, 13 Dec 2008 23:22:02 +0000 (23:22 +0000)] 
Change the default calldurationlimit from the special value 0 to -1, so we
can better detect an exceptional case.  This follows on to the changes made
in revision 156386.  Related to issue #13851.
(closes issue #13974)
 Reported by: paradise
 Patches:
       20081208__bug13974.diff.txt uploaded by Corydon76 (license 14)
 Tested by: file, blitzrage, ZX81

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

16 years agoSet the reviewboard:url property on 1.4, as well
Russell Bryant [Fri, 12 Dec 2008 22:20:26 +0000 (22:20 +0000)] 
Set the reviewboard:url property on 1.4, as well

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

16 years agoSimple fix for Ctrl-C not immediately exiting Asterisk, but also add a
Tilghman Lesher [Fri, 12 Dec 2008 22:03:10 +0000 (22:03 +0000)] 
Simple fix for Ctrl-C not immediately exiting Asterisk, but also add a
pointer inside editline to look back to asterisk.c, so others don't spend
as much time as I did looking (in the wrong place) for the appropriate
function.
Reported by: ZX81, via the #asterisk-users channel
Fixed by: me (license 14)

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

16 years agoSpecify uint32_t for variables storing a CRC32 so that it is actually 32 bits
Russell Bryant [Fri, 12 Dec 2008 14:40:31 +0000 (14:40 +0000)] 
Specify uint32_t for variables storing a CRC32 so that it is actually 32 bits
on 64-bit machines, as well.

(inspired by issue #13879)

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

16 years agoResolve issues that could cause DTMF to be processed out of order.
Russell Bryant [Fri, 12 Dec 2008 13:44:08 +0000 (13:44 +0000)] 
Resolve issues that could cause DTMF to be processed out of order.

These changes come from team/russell/issue_12658

1) Change autoservice to put digits on the head of the channel's frame readq
   instead of the tail.  If there were frames on the readq that autoservice
   had not yet read, the previous code would have resulted in out of order
   processing.  This required a new API call to queue a frame to the head
   of the queue instead of the tail.

2) Change up the processing of DTMF in ast_read().  Some of the problems
   were the result of having two sources of pending DTMF frames.  There
   was the dtmfq and the more generic readq.  Both were used for pending
   DTMF in various scenarios.  Simplifying things to only use the frame
   readq avoids some of the problems.

3) Fix a bug where a DTMF END frame could get passed through when it
   shouldn't have.  If code set END_DTMF_ONLY in the middle of digit emulation,
   and a digit arrived before emulation was complete, digits would get
   processed out of order.

(closes issue #12658)
Reported by: dimas
Tested by: russell, file
Review: http://reviewboard.digium.com/r/85/

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

16 years agoWhen a Ctrl-C or Ctrl-D ends a remote console, on certain shells, the terminal
Tilghman Lesher [Thu, 11 Dec 2008 23:35:55 +0000 (23:35 +0000)] 
When a Ctrl-C or Ctrl-D ends a remote console, on certain shells, the terminal
is messed up.  By intercepting those events with a signal handler in the remote
console, we can avoid those issues.
(closes issue #13464)
 Reported by: tzafrir
 Patches:
       20081110__bug13464.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage

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

16 years agoClean up the dundi cache every 5 minutes.
Matthew Nicholson [Thu, 11 Dec 2008 22:44:31 +0000 (22:44 +0000)] 
Clean up the dundi cache every 5 minutes.

(closes issue #13819)
Reported by: adomjan
Patches:
      pbx_dundi.c-clearcache.patch uploaded by adomjan (license 487)
      dundi_clearecache3.diff uploaded by mnicholson (license 96)
Tested by: adomjan

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

16 years agoFix some observed slowdowns in dialplan processing.
Russell Bryant [Thu, 11 Dec 2008 21:46:29 +0000 (21:46 +0000)] 
Fix some observed slowdowns in dialplan processing.

The change is to remove autoservice usage from dialplan functions that do not
need it because they do not perform operations that potentially block.

(closes issue #13940)
Reported by: tbelder

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

16 years agoFix an issue that made it so you could only have a single caller executing
Russell Bryant [Thu, 11 Dec 2008 16:54:51 +0000 (16:54 +0000)] 
Fix an issue that made it so you could only have a single caller executing
a custom feature at a time.  This was especially problematic when custom
features ran for any appreciable amount of time.

The fix turned out to be quite simple.  The dynamic features are now stored
in a read/write list instead of a list using a mutex.

(closes issue #13478)
Reported by: neutrino88
Fix suggested by file

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

16 years agoDon't wait forever, if there's a specified recording timeout.
Tilghman Lesher [Thu, 11 Dec 2008 16:51:27 +0000 (16:51 +0000)] 
Don't wait forever, if there's a specified recording timeout.
(closes issue #13885)
 Reported by: bamby
 Patches:
       res_agi.c.patch uploaded by bamby (license 430)

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

16 years agoRevert this cast to long. Using time_t here causes build failures on a
Mark Michelson [Thu, 11 Dec 2008 16:46:22 +0000 (16:46 +0000)] 
Revert this cast to long. Using time_t here causes build failures on a
FreeBSD 32-bit build.

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

16 years agoFix a potential crash due to unsafe datastore handling.
Mark Michelson [Thu, 11 Dec 2008 16:24:43 +0000 (16:24 +0000)] 
Fix a potential crash due to unsafe datastore handling.

This patch also contains a conversion from using long to time_t
for representing times for a queue, as well as some whitespace
fixes.

(closes issue #14060)
Reported by: nivek
Patches:
      datastore_fixup.patch.corrected uploaded by nivek (license 636)
  with slight modification from me
Tested by: nivek

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

16 years agoOops, inverted logic for a strcasecmp check. Pointed out by mmichelson, thanks!
Jeff Peeler [Wed, 10 Dec 2008 22:52:51 +0000 (22:52 +0000)] 
Oops, inverted logic for a strcasecmp check. Pointed out by mmichelson, thanks!

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

16 years ago(closes issue #13229)
Jeff Peeler [Wed, 10 Dec 2008 22:04:18 +0000 (22:04 +0000)] 
(closes issue #13229)
Reported by: clegall_proformatique

Ensure that moh_generate does not return prematurely before local_ast_moh_stop is called. Also, the sleep in mp3_spawn now only occurs for http locations since it seems to have been added originally only for failing media streams.

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

16 years agoFix subscription based MWI up a bit. We only want to put sip: at the beginning of...
Joshua Colp [Wed, 10 Dec 2008 19:01:17 +0000 (19:01 +0000)] 
Fix subscription based MWI up a bit. We only want to put sip: at the beginning of the URI if it is not already there and revert code to ignore destination check if subscribing for MWI.
(closes issue #12560)
Reported by: vsauer
Patches:
      patch001.diff uploaded by ramonpeek (license 266)

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

16 years agoWhen a SIP peer unregisters set the expiry time back to 0 so that the 200 OK contains...
Joshua Colp [Wed, 10 Dec 2008 17:50:43 +0000 (17:50 +0000)] 
When a SIP peer unregisters set the expiry time back to 0 so that the 200 OK contains an expires of 0.
(closes issue #13599)
Reported by: hjourdain
Patches:
      chan_sip.c.diff uploaded by hjourdain (license 583)

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

16 years ago(closes issue #14022)
Steve Murphy [Wed, 10 Dec 2008 16:45:01 +0000 (16:45 +0000)] 
(closes issue #14022)
Reported by: wetwired
Tested by: murf

I checked, and I added a mod to the trunk version
of Asterisk that would make it 8-bit transparent
on 27 Nov 2007, but I made no such updates to
1.4. My best guess is that 1.4 was released, and
it was not appropriate to commit an enhancement.

But I'm going to add the same fixes to 1.4 now,
for the following reasons:
1. wetwired is correct; 1.4 is **mostly** 8-bit
   transparent now. This is because the lexical
   token forming rules use . in most 'word'
   state continuances.  It's just the beginning
   of a 'word' that is picky.
2. Accepting 8-bit chars in some places and
   not others leads to bug reports like this.

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

16 years agoUpdate to stringfield handling so that side-effects on
Mark Michelson [Wed, 10 Dec 2008 16:44:37 +0000 (16:44 +0000)] 
Update to stringfield handling so that side-effects on
parameters are not evaluated multiple times.

An example where this caused a problem was in chan_sip.c, with
the line

  ast_string_field_set(p, fromdomain, ++fromdomain);

This patch was originally uploaded to issue #13783 by
jamessan. While the issue was closed for other reasons, this
patch is valid and fixes a separate problem, and is thus
being committed.

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

16 years agoRevert fix for issue 13570. It has caused more problems than
Mark Michelson [Wed, 10 Dec 2008 16:24:56 +0000 (16:24 +0000)] 
Revert fix for issue 13570. It has caused more problems than
it helped to fix.

(closes issue #13783)
Reported by: navkumar

(closes issue #14025)
Reported by: ffs

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

16 years agoAdd missing documentation to misdn.txt
Mark Michelson [Wed, 10 Dec 2008 16:10:25 +0000 (16:10 +0000)] 
Add missing documentation to misdn.txt

(closes issue #14052)
Reported by: festr
Patches:
      misdn.txt.patch uploaded by festr (license 443)

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

16 years agoIncrement the sequence number on the end packets for RFC2833. After reading the RFC...
Joshua Colp [Wed, 10 Dec 2008 16:05:29 +0000 (16:05 +0000)] 
Increment the sequence number on the end packets for RFC2833. After reading the RFC some more and doing some testing I agree with this change.
(closes issue #12983)
Reported by: vt
Patches:
      dtmf_inc_seqnum_on_end_pkts.diff uploaded by vt (license 520)

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

16 years agoOops, should be "tz", not "zonetag".
Tilghman Lesher [Tue, 9 Dec 2008 23:08:53 +0000 (23:08 +0000)] 
Oops, should be "tz", not "zonetag".

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

16 years agoRemove the test_for_thread_safety() function completely.
Russell Bryant [Tue, 9 Dec 2008 22:17:39 +0000 (22:17 +0000)] 
Remove the test_for_thread_safety() function completely.

The test is not valid.  Besides, if we actually suspected that recursive
mutexes were not working, we would get a ton of LOG_ERROR messages when
DEBUG_THREADS is turned on.

(inspired by a discussion on the asterisk-dev list)

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

16 years agoWe appear to have documented tz= in the [general] section of voicemail.conf,
Tilghman Lesher [Tue, 9 Dec 2008 21:53:25 +0000 (21:53 +0000)] 
We appear to have documented tz= in the [general] section of voicemail.conf,
without actually having implemented it.  Oops.
(Reported by Olivier on the -users list)

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

16 years agoAdd 'down' as a valid state for directed call pickup. This creeps up when we receive...
Joshua Colp [Tue, 9 Dec 2008 21:14:29 +0000 (21:14 +0000)] 
Add 'down' as a valid state for directed call pickup. This creeps up when we receive session progress when dialing a device and not ringing.
(closes issue #14005)
Reported by: ddl

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

16 years agoFix an issue where callers on an incoming call on an SLA trunk would not hear ringback.
Russell Bryant [Tue, 9 Dec 2008 20:57:35 +0000 (20:57 +0000)] 
Fix an issue where callers on an incoming call on an SLA trunk would not hear ringback.

We need to make sure that we don't start writing audio to the trunk channel until we're
actually ready to answer it.  Otherwise, the channel driver will treat it as inband
progress, even though all they are getting is silence.

(closes issue #12471)
Reported by: mthomasslo

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

16 years agoFix double declaration of 'x' on the PPC platform.
Joshua Colp [Tue, 9 Dec 2008 20:44:32 +0000 (20:44 +0000)] 
Fix double declaration of 'x' on the PPC platform.
(closes issue #14038)
Reported by: ffloimair

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

16 years agoIf we fail to start a thread for the pbx to run in, we need to
Mark Michelson [Tue, 9 Dec 2008 20:28:44 +0000 (20:28 +0000)] 
If we fail to start a thread for the pbx to run in, we need to
be sure to decrease the number of active calls on the system.

This fix may relate to ABE-1713, but it is not certain yet.

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

16 years agoIn discussion with seanbright on #asterisk-dev, I have added a default rule, and...
Steve Murphy [Tue, 9 Dec 2008 20:20:54 +0000 (20:20 +0000)] 
In discussion with seanbright on #asterisk-dev,  I have added a default rule, and an option to suppress the default rule from being generated in the flex output, for the sake of those OS's where they didn't tweak flex's ECHO macro, and the compiler doesn't like it. The regressions are OK with this.

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

16 years agoMake sure that the timestamp for DTMF is not the same as the previous voice frame...
Joshua Colp [Tue, 9 Dec 2008 19:47:07 +0000 (19:47 +0000)] 
Make sure that the timestamp for DTMF is not the same as the previous voice frame and do not send audio when transmitting DTMF as this confuses some equipment.
(closes issue #13209)
Reported by: ip-rob
Patches:
      13209.diff uploaded by file (license 11)
Tested by: ip-rob, bujones

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

16 years agoTake video into account when early bridging RTP.
Joshua Colp [Tue, 9 Dec 2008 19:06:14 +0000 (19:06 +0000)] 
Take video into account when early bridging RTP.
(closes issue #13535)
Reported by: davidw

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

16 years agoPrevious fix used ast_malloc and ast_copy_string and messed up the standalone stuff...
Steve Murphy [Tue, 9 Dec 2008 18:13:39 +0000 (18:13 +0000)] 
Previous fix used ast_malloc and ast_copy_string and messed up the standalone stuff. Fixed.

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

17 years agoFor some reason, after a distclean, gcc started returning
Tilghman Lesher [Tue, 9 Dec 2008 17:07:50 +0000 (17:07 +0000)] 
For some reason, after a distclean, gcc started returning
'value computed is not used'.  Fixing (for --enable-dev-mode).

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

17 years agoAllow DISA to handle extensions that start with #.
Russell Bryant [Tue, 9 Dec 2008 16:46:53 +0000 (16:46 +0000)] 
Allow DISA to handle extensions that start with #.

(closes issue #13330)
Reported by: jcovert

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

17 years ago(closes issue #14019)
Steve Murphy [Tue, 9 Dec 2008 16:31:55 +0000 (16:31 +0000)] 
(closes issue #14019)
Reported by: ckjohnsonme
Patches:
      14019.diff uploaded by murf (license 17)
Tested by: ckjohnsonme, murf

This crash was the result of a few small errors that
would combine in 64-bit land to result in a crash.

32-bit land might have seen these combine to mysteriously
drop the args to an application call, in certain
circumstances.

Also, in trying to find this bug, I spotted
a situation in the flex input, where, in passing
back a 'word' to the parser, it would allocate
a buffer larger than necessary. I changed the
usage in such situations, so that strdup was
not used, but rather, an ast_malloc, followed
by ast_copy_string.

I removed a field from the pval struct, in
u2, that was never getting used, and set in
one spot in the code. I believe it was an
artifact of a previous fix to make switch
cases work invisibly with extens.

And, for goto's I removed a '!' from
before a strcmp, that has been there
since the initial merging of AEL2, that
might prevent the proper target of a
goto from being found. This was pretty
harmless on its own, as it would just
louse up a consistency check for users.

Many thanks to ckjohnsonme for providing
a simplified and complete set of information
about the bug, that helped considerably in
finding and fixing the problem.

Now, to get aelparse up and running again
in trunk, and out of its "horribly broken" state,
so I can run the regression suite!

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

17 years agoFix a problem with GROUP() settings on a masquerade.
Russell Bryant [Tue, 9 Dec 2008 14:52:25 +0000 (14:52 +0000)] 
Fix a problem with GROUP() settings on a masquerade.

The previous code carried over group settings from the old channel to the new
one.  However, it did nothing with the group settings that were already on the
new channel.  This patch removes all group settings that already existed on the
new channel.

I have a more complicated version of this patch which addresses only the most
blatant problem with this, which is that a channel can end up with multiple
group settings in the same category.  However, I could not think of a use case
for keeping any of the group settings from the old channel, so I went this route
for now.

(closes AST-152)

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

17 years agoMake the usereqphone option work again.
Joshua Colp [Mon, 8 Dec 2008 17:52:10 +0000 (17:52 +0000)] 
Make the usereqphone option work again.
(closes issue #13474)
Reported by: mmaguire
Patches:
      20080912_bug13474.diff uploaded by mmaguire (license 571)

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

17 years agoMerged revisions 161421 via svnmerge from
Sean Bright [Fri, 5 Dec 2008 21:02:20 +0000 (21:02 +0000)] 
Merged revisions 161421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r161421 | seanbright | 2008-12-05 15:50:23 -0500 (Fri, 05 Dec 2008) | 8 lines

  Fix build errors on FreeBSD (uint -> unsigned int).

  (closes issue #14006)
  Reported by: alphaque
  Patches:
        astobj2.h-patch uploaded by alphaque (license 259)
        (Slightly modified by seanbright)
........

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

17 years agokill a warning
Dwayne M. Hubbard [Fri, 5 Dec 2008 16:51:17 +0000 (16:51 +0000)] 
kill a warning

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

17 years agoFix a NULL format string warning found by buildbot.
Russell Bryant [Fri, 5 Dec 2008 14:12:14 +0000 (14:12 +0000)] 
Fix a NULL format string warning found by buildbot.

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

17 years ago(closes issue #13835)
Jeff Peeler [Thu, 4 Dec 2008 18:30:41 +0000 (18:30 +0000)] 
(closes issue #13835)
Reported by: matt_b
Tested by: jpeeler

This mirrors a check that was present in ast_rtp_read to also be in ast_rtp_raw_write to not schedule sending the receiver report if the remote RTCP endpoint address isn't present in the RTCP structure.

Closes AST-142.

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

17 years agoFix a callerid parsing issue. If someone formatted callerid like the
Mark Michelson [Thu, 4 Dec 2008 16:44:18 +0000 (16:44 +0000)] 
Fix a callerid parsing issue. If someone formatted callerid like the
following: "name <number>" (including the quotation marks), then the parts
would be parsed as

name: "name
number: number

This is because the closing quotation mark was not discovered since the number
and everything after was parsed out of the string earlier. Now, there is a check
to see if the closing quote occurs after the number, so that we can know if we
should strip off the opening quote on the name.

Closes AST-158

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

17 years agoSome compilers warn on null format strings; some don't (caught by buildbot)
Tilghman Lesher [Wed, 3 Dec 2008 21:54:07 +0000 (21:54 +0000)] 
Some compilers warn on null format strings; some don't (caught by buildbot)

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

17 years agoOnly show this warning when we want to show it.
Jason Parker [Wed, 3 Dec 2008 21:38:07 +0000 (21:38 +0000)] 
Only show this warning when we want to show it.

(closes issue #13982)
Reported by: coolmig
Patches:
      chan_agent.c.patch uploaded by coolmig (license 621)

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

17 years ago(closes issue #13597)
Steve Murphy [Wed, 3 Dec 2008 20:41:42 +0000 (20:41 +0000)] 
(closes issue #13597)
Reported by: john8675309
Patches:
      patch.13597 uploaded by murf (license 17)
Tested by: murf, john8675309

This patch causes the setcid func to update the CDR
clid after setting the channel field.

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

17 years agoDuring bridge code, the channel bridge may return a retry code, if a transfer
Tilghman Lesher [Wed, 3 Dec 2008 17:55:12 +0000 (17:55 +0000)] 
During bridge code, the channel bridge may return a retry code, if a transfer
was initiated but not yet completed.  If the bridge is immediately retried,
then we may send a storm of TXREQ packets, even though the first set is sent
reliably (retransmitted).  Fixes AST-137.

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

17 years agoIf an entry is added to the directory during a scan when another entry expires,
Tilghman Lesher [Wed, 3 Dec 2008 17:34:34 +0000 (17:34 +0000)] 
If an entry is added to the directory during a scan when another entry expires,
then that new entry will not be processed promptly, but must wait for either a
future entry to start or a current entry's retry to occur.  If no other entries
exist in the directory (other than the new entries) when a bunch expire, then
the new entries must wait until another new entry is added to be processed.
This was a rather weird race condition, really.  Fixes AST-147.

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

17 years agoDon't start scanning the directory until all modules are loaded, because some
Tilghman Lesher [Wed, 3 Dec 2008 16:58:34 +0000 (16:58 +0000)] 
Don't start scanning the directory until all modules are loaded, because some
required modules (channels, apps, functions) may not yet be in memory yet.
Fixes AST-149.

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

17 years agoJon Bonilla (Manwe) pointed out on the -dev list:
Tilghman Lesher [Wed, 3 Dec 2008 14:09:35 +0000 (14:09 +0000)] 
Jon Bonilla (Manwe) pointed out on the -dev list:
"I guess that having only ip-phones in mind is not a good approach. Since it is
possible to have a sip proxy connected to asterisk we could receive a 407
(unauthorized) or 483 (too many hops) as response and dialog ending would not be
a good behavior."
So modified.

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

17 years agoChannel is masqueraded, don't keep alive
Terry Wilson [Tue, 2 Dec 2008 23:58:08 +0000 (23:58 +0000)] 
Channel is masqueraded, don't keep alive

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

17 years agoA situation like A calls B, A builtin_atxfers B to C, C parks B would lead to a crash...
Terry Wilson [Tue, 2 Dec 2008 23:04:23 +0000 (23:04 +0000)] 
A situation like A calls B, A builtin_atxfers B to C, C parks B would lead to a crash.  Thanks to file for telling me how to fix it!

(closes issue #13854)
Reported by: Adam Lee
Tested by: otherwiseguy

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

17 years agoWhen the text does not match exactly (e.g. RTP/SAVP), then the %n conversion
Tilghman Lesher [Tue, 2 Dec 2008 17:42:09 +0000 (17:42 +0000)] 
When the text does not match exactly (e.g. RTP/SAVP), then the %n conversion
fails, and the resulting integer is garbage.  Thus, we must initialize the
integer and check it afterwards for success.
(closes issue #14000)
 Reported by: folke
 Patches:
       asterisk-sipbg-sscanf-1.4.22.diff uploaded by folke (license 626)
       asterisk-sipbg-sscanf-1.6.0.1.diff uploaded by folke (license 626)
       asterisk-sipbg-sscanf-trunk-r159896.diff uploaded by folke (license 626)

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

17 years agomake compile with dev mode and malloc debug
Terry Wilson [Tue, 2 Dec 2008 01:16:30 +0000 (01:16 +0000)] 
make compile with dev mode and malloc debug

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

17 years agoEnsure that Asterisk builds with --enable-dev-mode, even on the latest gcc
Tilghman Lesher [Tue, 2 Dec 2008 00:25:16 +0000 (00:25 +0000)] 
Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
and glibc.

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

17 years agoApply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
Russell Bryant [Mon, 1 Dec 2008 17:27:30 +0000 (17:27 +0000)] 
Apply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
both have the potential to send control frames in the middle of call setup.  We
have to wait until we have received a message back from the remote end before
we try to send any more frames.  Otherwise, the remote end will consider it
invalid, and we'll get stuck in an INVAL/VNAK storm.

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

17 years agoGet rid of the useless format string and argument in the Bogus/ manager channelname.
Michiel van Baak [Mon, 1 Dec 2008 16:08:36 +0000 (16:08 +0000)] 
Get rid of the useless format string and argument in the Bogus/ manager channelname.
Noted by kpfleming and name Bogus/manager suggested by eliel

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

17 years agoForce a "make clean" to avoid a bizarre build issue ...
Russell Bryant [Mon, 1 Dec 2008 14:52:56 +0000 (14:52 +0000)] 
Force a "make clean" to avoid a bizarre build issue ...

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

17 years agomake manager compile on OpenBSD.
Michiel van Baak [Mon, 1 Dec 2008 14:05:41 +0000 (14:05 +0000)] 
make manager compile on OpenBSD.
The last (10th) argument to ast_channel_alloc here should be a pointer
and NULL is not really a pointer.

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

17 years agoupdate dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid...
Kevin P. Fleming [Sat, 29 Nov 2008 16:58:29 +0000 (16:58 +0000)] 
update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way

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

17 years agorename these files so as to avoid conflicts when users update their working copies...
Kevin P. Fleming [Wed, 26 Nov 2008 20:21:04 +0000 (20:21 +0000)] 
rename these files so as to avoid conflicts when users update their working copies and have unversioned files already in place

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

17 years agosimplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
Kevin P. Fleming [Wed, 26 Nov 2008 18:36:24 +0000 (18:36 +0000)] 
simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode

add channels/busy.h and channels/ringtone.h to the repository instead of generating them repeatedtly; most users do not change the settings to build them, but the Makefile rules are still there if they wish to do so

ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode

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

17 years ago(closes issue #12694)
Steve Murphy [Tue, 25 Nov 2008 22:41:10 +0000 (22:41 +0000)] 
(closes issue #12694)
Reported by: yraber
Patches:
      12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav

Thanks to file (Joshua Colp) for his IAX fix.

the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.

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

17 years agoDon't try to send a response on a NULL pvt.
Tilghman Lesher [Tue, 25 Nov 2008 21:56:48 +0000 (21:56 +0000)] 
Don't try to send a response on a NULL pvt.
(closes issue #13919)
 Reported by: barthpbx
 Patches:
       chan_iax2.c.patch uploaded by eliel (license 64)
 Tested by: barthpbx

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

17 years agoMerged revisions 159245 via svnmerge from
Tilghman Lesher [Tue, 25 Nov 2008 21:40:28 +0000 (21:40 +0000)] 
Merged revisions 159245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r159245 | tilghman | 2008-11-25 15:37:06 -0600 (Tue, 25 Nov 2008) | 7 lines

  Regression fix for last security fix.  Set the iseqno correctly.
  (closes issue #13918)
   Reported by: ffloimair
   Patches:
         20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
   Tested by: ffloimair
........

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

17 years agoAdd ao2_trylock() to go along with ao2_lock() and ao2_unlock()
Russell Bryant [Tue, 25 Nov 2008 17:34:50 +0000 (17:34 +0000)] 
Add ao2_trylock() to go along with ao2_lock() and ao2_unlock()

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

17 years agoAdd missing variable declaration in the PPC code
Terry Wilson [Tue, 25 Nov 2008 16:23:38 +0000 (16:23 +0000)] 
Add missing variable declaration in the PPC code

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

17 years agoSystem call ioperm is non-portable, so check for its existence in autoconf.
Tilghman Lesher [Tue, 25 Nov 2008 04:50:00 +0000 (04:50 +0000)] 
System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)

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

17 years ago(closes issue #13786)
Jeff Peeler [Sat, 22 Nov 2008 00:04:36 +0000 (00:04 +0000)] 
(closes issue #13786)
Reported by: tzafrir

When compiling against Zaptel dahdi_compat will now only define all the DAHDI defines if the Zaptel define is present. Also, there is no such thing as DAHDI_PRI.

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

17 years agoIn reference to the fix made for 13871, I was
Steve Murphy [Fri, 21 Nov 2008 23:14:50 +0000 (23:14 +0000)] 
In reference to the fix made for 13871, I was
merging the fix into 1.6.0 and realized I missed
the code in the h-exten block, and didn't catch it
because my test case had the h-exten commented out.

So, this corrects the code I missed, as a
preventative against another crash report.
Tested with the h-exten defined, all is well.

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

17 years agoThe passed extension may not be the same in the list as the current entry,
Tilghman Lesher [Fri, 21 Nov 2008 23:07:46 +0000 (23:07 +0000)] 
The passed extension may not be the same in the list as the current entry,
because we strip spaces when copying the extension into the structure.
Therefore, use the copied item to place the item into the list.
(found by lmadsen on -dev, fixed by me)

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

17 years agoWhen compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock
Russell Bryant [Fri, 21 Nov 2008 22:05:55 +0000 (22:05 +0000)] 
When compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock

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

17 years ago(closes issue #13871)
Steve Murphy [Fri, 21 Nov 2008 21:19:47 +0000 (21:19 +0000)] 
(closes issue #13871)
Reported by: mdu113

This one is totally my fault. The code doesn't even
create a bridge if the channel CDR has POST_DISABLED.
I didn't check for that at the end of the bridge.
Fixed with a few small insertions. Tested. Looks
good. No cdr generated, no crash, no unnecc. data
objects created either.

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

17 years agoThis change had somehow gotten reverted due to a
Mark Michelson [Fri, 21 Nov 2008 15:24:19 +0000 (15:24 +0000)] 
This change had somehow gotten reverted due to a
completely unrelated commit. Thanks to Theo Belder
on the Asterisk-dev list for pointing this out.

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

17 years agoThere was an issue when attempting to reference an embedded
Mark Michelson [Thu, 20 Nov 2008 18:06:48 +0000 (18:06 +0000)] 
There was an issue when attempting to reference an embedded
frame in a freed ast_filestream. This patch makes use of the
ao2 functions to make sure that we do not free an ast_filestream
structure until the embedded ast_frame has been "freed" as well.

(closes issue #13496)
Reported by: fst-onge
Patches:
      filestream_frame_1_4.diff uploaded by putnopvut (license 60)
Tested by: putnopvut

Closes AST-89

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

17 years agoWe don't handle 4XX responses to BYE well. According to
Mark Michelson [Thu, 20 Nov 2008 17:48:42 +0000 (17:48 +0000)] 
We don't handle 4XX responses to BYE well. According to
section 15 of RFC 3261, we should terminate a dialog if we
receive a 481 or 408 in response to our BYE. Since I am aware
of at least one phone manufacturer who may sometimes send a
404 as well, I am being liberal and saying that any 4XX response
to a BYE should result in a terminated dialog.

(closes issue #12994)
Reported by: pabelanger
Patches:
      12994.patch uploaded by putnopvut (license 60)

Closes AST-129

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

17 years agoMake sure to set the hangup cause on the calling channel in the case
Mark Michelson [Thu, 20 Nov 2008 17:33:06 +0000 (17:33 +0000)] 
Make sure to set the hangup cause on the calling channel in the case
that ast_call() fails. For incoming SIP channels, this was causing
us to send a 603 instead of a 486 when the call-limit was reached on
the destination channel.

(closes issue #13867)
Reported by: still_nsk
Patches:
      13867.diff uploaded by putnopvut (license 60)
Tested by: blitzrage

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

17 years agoMerged revision 157977 from
Richard Mudgett [Thu, 20 Nov 2008 01:46:09 +0000 (01:46 +0000)] 
Merged revision 157977 from
https://origsvn.digium.com/svn/asterisk/team/group/issue8824

........
Fixes JIRA ABE-1726

The dial extension could be empty if you are using MISDN_KEYPAD
to control ISDN provider features.

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

17 years agothe gcc optimizer frequently finds broken code (use of uninitalized variables, unreac...
Kevin P. Fleming [Wed, 19 Nov 2008 21:34:47 +0000 (21:34 +0000)] 
the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.

with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).

while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain

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

17 years agoAdd some missing invite state changes necessary in the sip_write
Mark Michelson [Tue, 18 Nov 2008 22:47:57 +0000 (22:47 +0000)] 
Add some missing invite state changes necessary in the sip_write
function. Not setting the invite state correctly on the call was
resulting in the Record application leaving empty files. I also
have updated the doxygen comment next to the declaration of the
INV_EARLY_MEDIA constant to reflect that we also use this state
when we *send* a 18X response to an INVITE.

(closes issue #13878)
Reported by: nahuelgreco
Patches:
      sip-early-media-recording-1.4.22.patch uploaded by nahuelgreco (license 162)
  Tested by: putnopvut

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

17 years ago(closes issue #13899)
Jeff Peeler [Tue, 18 Nov 2008 19:13:33 +0000 (19:13 +0000)] 
(closes issue #13899)
Reported by: akkornel

This fix is the result of a bug fix in ast_app_separate_args r124395. If an argument does not exist it should always be set to a null string rather than a null pointer.

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

17 years agoFix a crash in the end_bridge_callback of app_dial and
Mark Michelson [Tue, 18 Nov 2008 18:25:55 +0000 (18:25 +0000)] 
Fix a crash in the end_bridge_callback of app_dial and
app_followme which would occur at the end of an attended
transfer. The error occurred because we initially stored
a pointer to an ast_channel which then was hung up due
to a masquerade.

This commit adds a "fixup" callback to the bridge_config
structure to allow for end_bridge_callback_data to be
changed in the case that a new channel pointer is needed
for the end_bridge_callback.

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