]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
16 years agoMake sure that the debug line is not printed on debug level 0
Olle Johansson [Sun, 15 Feb 2009 19:48:38 +0000 (19:48 +0000)] 
Make sure that the debug line is not printed on debug level 0

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

16 years agoZaptel is not DAHDI. Rather, Zaptel is actually Zaptel. (in case you're confused...
Jason Parker [Fri, 13 Feb 2009 21:53:16 +0000 (21:53 +0000)] 
Zaptel is not DAHDI.  Rather, Zaptel is actually Zaptel.  (in case you're confused, DAHDI is still DAHDI)

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

16 years agoFix a potential crash situation when using IMAP voicemail
Mark Michelson [Fri, 13 Feb 2009 19:47:48 +0000 (19:47 +0000)] 
Fix a potential crash situation when using IMAP voicemail

If calling into VoiceMailMain when using IMAP storage, it was
possible to crash Asterisk by hanging up the phone when prompted
for a voicemail mailbox. This patch fixes the issue.

While it may appear that this patch is superficial, it allows code
execution to continue to the failure case just below the IMAP_STORAGE
code block where this patch has been applied

(closes issue #14473)
Reported by: dwpaul
Patches:
      voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689)

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

16 years agoFix a place where filestreams were not refcounted properly
Mark Michelson [Thu, 12 Feb 2009 23:22:44 +0000 (23:22 +0000)] 
Fix a place where filestreams were not refcounted properly

This section was already present in trunk and other branches,
but did not exist in 1.4.

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

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

16 years agoFix crashes when receiving certain T.38 packets. Also, increase the maximum
Tilghman Lesher [Thu, 12 Feb 2009 21:19:40 +0000 (21:19 +0000)] 
Fix crashes when receiving certain T.38 packets.  Also, increase the maximum
size of T.38 packets and warn users when they try to set the limits above those
maximums.
(closes issue #13050)
 Reported by: schern
 Patches:
       20090212__bug13050.diff.txt uploaded by Corydon76 (license 14)
 Tested by: schern

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

16 years agoFix ParkedCall event information for From field in the case of a blind transfer
Jeff Peeler [Thu, 12 Feb 2009 20:34:36 +0000 (20:34 +0000)] 
Fix ParkedCall event information for From field in the case of a blind transfer

If the parker information can not be obtained from the peer, try and see if
the BLINDTRANSFER channel variable has been set. Previously, a blind transfer
to the ParkAndAnnounce app would return nothing for the From.

Closes AST-189

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

16 years agoFix crash in event of failed attempt to transfer to parking
Jeff Peeler [Thu, 12 Feb 2009 17:57:10 +0000 (17:57 +0000)] 
Fix crash in event of failed attempt to transfer to parking

The peer may not necessarily exist, such as in the case of a transfer to
ParkAndAnnounce. In this case don't try to play a sound to it.

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

16 years agoDon't send DTMF for infinite time if we do not receive an END event.
Russell Bryant [Thu, 12 Feb 2009 16:51:13 +0000 (16:51 +0000)] 
Don't send DTMF for infinite time if we do not receive an END event.

I thought that this was going to end up being a pretty gnarly fix, but it turns
out that there was actually already a configuration option in rtp.conf,
dtmftimeout, that was intended to handle this situation.  However, in between
Asterisk 1.2 and Asterisk 1.4, the code that processed the option got lost.
So, this commit brings it back to life.

The default timeout is 3 seconds.  However, it is worth noting that having
this be configurable at all is not really the recommended behavior in RFC 2833.
From Section 3.5 of RFC 2833:

      Limiting the time period of extending the tone is necessary
      to avoid that a tone "gets stuck". Regardless of the
      algorithm used, the tone SHOULD NOT be extended by more than
      three packet interarrival times. A slight extension of tone
      durations and shortening of pauses is generally harmless.

Three seconds will pretty much _always_ be far more than three packet
interarrival times.  However, that behavior is not required, so I'm going to
leave it with our legacy behavior for now.

Code from svn/asterisk/team/russell/issue_14460

(closes issue #14460)
Reported by: moliveras

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

16 years agoSet the initiator attribute to lowercase in our replies when receiving calls.
Philippe Sultan [Thu, 12 Feb 2009 10:16:21 +0000 (10:16 +0000)] 
Set the initiator attribute to lowercase in our replies when receiving calls.

This attribute contains a JID that identifies the initiator of the GoogleTalk
voice session. The GoogleTalk client discards Asterisk's replies if the
initiator attribute contains uppercase characters.

(closes issue #13984)
Reported by: jcovert
Patches:
      chan_gtalk.2.patch uploaded by jcovert (license 551)
Tested by: jcovert

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

16 years agoRevert RTP changes for continuation of DTMF. Proxy commit by russell via SMS.
Joshua Colp [Thu, 12 Feb 2009 00:19:30 +0000 (00:19 +0000)] 
Revert RTP changes for continuation of DTMF. Proxy commit by russell via SMS.

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

16 years agoClear out the current event after forcing the end of a digit
Russell Bryant [Thu, 12 Feb 2009 00:01:02 +0000 (00:01 +0000)] 
Clear out the current event after forcing the end of a digit

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

16 years agoFixify infinite DTMF in the case that no RFC2833 END event is ever received
Russell Bryant [Wed, 11 Feb 2009 23:56:37 +0000 (23:56 +0000)] 
Fixify infinite DTMF in the case that no RFC2833 END event is ever received

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

16 years agoRestore a behavior that was recently changed, when we fixed issue #13962 and
Tilghman Lesher [Wed, 11 Feb 2009 20:54:18 +0000 (20:54 +0000)] 
Restore a behavior that was recently changed, when we fixed issue #13962 and
issue #13363 (related to issue #6176).  When a hangup occurs during a Macro
execution in earlier 1.4, the h extension would execute within the Macro
context, whereas it was always supposed to execute only within the main context
(where Macro was called).  So this fix checks for an "h" extension in the
deepest macro context where a hangup occurred; if it exists, that "h" extension
executes, otherwise the main context "h" is executed.
(closes issue #14122)
 Reported by: wetwired
 Patches:
       20090210__bug14122.diff.txt uploaded by Corydon76 (license 14)
 Tested by: andrew

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

16 years agoGo off hold when we get an empty reinvite telling us to.
Joshua Colp [Tue, 10 Feb 2009 18:50:50 +0000 (18:50 +0000)] 
Go off hold when we get an empty reinvite telling us to.
(closes issue #14448)
Reported by: frawd
Patches:
      hold_invite_nosdp.patch uploaded by frawd (license 610)

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

16 years agoImprove behavior of jitterbuffer when maxjitterbuffer is set.
Matthew Nicholson [Tue, 10 Feb 2009 17:52:42 +0000 (17:52 +0000)] 
Improve behavior of jitterbuffer when maxjitterbuffer is set.

This change improves the way the jitterbuffer handles maxjitterbuffer and
dramatically reduces the number of frames dropped when maxjitterbuffer is
exceeded.  In the previous jitterbuffer, when maxjitterbuffer was exceeded, all
new frames were dropped until the jitterbuffer is empty.  This change modifies
the code to only drop frames until maxjitterbuffer is no longer exceeded.

Also, previously when maxjitterbuffer was exceeded, dropped frames were not
tracked causing stats for dropped frames to be incorrect, this change also
addresses that problem.

(closes issue #14044)
Patches:
      bug14044-1.diff uploaded by mnicholson (license 96)
Tested by: mnicholson
Review: http://reviewboard.digium.com/r/144/

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

16 years agoThis patch solves some compiler complaints
Steve Murphy [Tue, 10 Feb 2009 02:27:40 +0000 (02:27 +0000)] 
This patch solves some compiler complaints
in both 32 and 64-bit environments.

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

16 years agoDon't do an SRV lookup if a port is specified
Mark Michelson [Mon, 9 Feb 2009 17:11:05 +0000 (17:11 +0000)] 
Don't do an SRV lookup if a port is specified

RFC 3263 says to do A record lookups on a hostname
if a port has been specified, so that's what we're
going to do. See section 4.2.

(closes issue #14419)
Reported by: klaus3000
Patches:
      patch_chan_sip_nosrvifport_1.4.23.txt uploaded by klaus3000 (license 65)

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

16 years agoDon't overwrite our pointer to the music class when music on hold stops. We will...
Joshua Colp [Mon, 9 Feb 2009 14:48:21 +0000 (14:48 +0000)] 
Don't overwrite our pointer to the music class when music on hold stops. We will use this if it starts again to see if we can resume the music where it left off.
(closes issue #14407)
Reported by: mostyn

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

16 years agoFix a race condition that could cause a crash.
Russell Bryant [Sat, 7 Feb 2009 16:15:07 +0000 (16:15 +0000)] 
Fix a race condition that could cause a crash.

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

16 years agocheck ast_strlen_zero() before calling ast_strdupa() in sip_uri_headers_cmp()
Dwayne M. Hubbard [Fri, 6 Feb 2009 23:36:03 +0000 (23:36 +0000)] 
check ast_strlen_zero() before calling ast_strdupa() in sip_uri_headers_cmp()
and sip_uri_params_cmp()

The reporter didn't actually upload a properly-formed patch, instead a
modified chan_sip.c file was uploaded.  I created a patch to determine the
changes, then modified the suggested changes to create a proper fix.  The
summary above is a complete description of the changes.

(closes issue #13547)
Reported by: tecnoxarxa
Patches:
      chan_sip.c.gz uploaded by tecnoxarxa (license 258)
Tested by: tecnoxarxa

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

16 years agoRemove a debug message I put in by accident.
Joshua Colp [Fri, 6 Feb 2009 17:15:01 +0000 (17:15 +0000)] 
Remove a debug message I put in by accident.

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

16 years agoSome clients do not put the call-id for replaces at the beginning, so support it...
Joshua Colp [Fri, 6 Feb 2009 17:14:15 +0000 (17:14 +0000)] 
Some clients do not put the call-id for replaces at the beginning, so support it being anywhere in the string.
(closes issue #14350)
Reported by: fhackenberger

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

16 years agoLimit the addition of the Contact header in SIP responses according to various
Matthew Nicholson [Fri, 6 Feb 2009 16:20:23 +0000 (16:20 +0000)] 
Limit the addition of the Contact header in SIP responses according to various
SIP RFCs.

(closes issue #13602)
Reported by: hjourdain
Tested by: mnicholson

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

16 years agoBackport OS X fix from trunk
Tilghman Lesher [Fri, 6 Feb 2009 15:43:32 +0000 (15:43 +0000)] 
Backport OS X fix from trunk
(AGAIN, closes issue #14360)

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

16 years agoFix logic regarding when to perform an SRV lookup for outgoing REGISTER requests
Mark Michelson [Thu, 5 Feb 2009 23:19:16 +0000 (23:19 +0000)] 
Fix logic regarding when to perform an SRV lookup for outgoing REGISTER requests

With this fix, we only will perform an SRV lookup at the following times:

* The first time we register with a remote registrar
* If we send a REGISTER but do not receive a response
* If the sendto() function returns an error

While I wrote the patch that fixes this issue, a huge amount of credit is due
to Brett Bryant, who wrote the initial patch on which I based this one.

(closes issue #12312)
Reported by: jrast
Patches:
      12312.patch uploaded by putnopvut (license 60)
Tested by: blitzrage

Review: http://reviewboard.digium.com/r/132/

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

16 years agoAdd new configuration option to make shared IMAP mailboxes function as expected.
Jeff Peeler [Thu, 5 Feb 2009 20:47:51 +0000 (20:47 +0000)] 
Add new configuration option to make shared IMAP mailboxes function as expected.

The new option is "imapvmshareid" which is an ID to tag multiple mailboxes
using the same IMAP storage location to function as one mailbox. This allows
all messages to be retrieved for any user in the group. The patch alters the
'X-Asterisk-VM-Extension' header that is responsible for matching voicemails
for a given user.

(closes issue #13673)
Reported by: howardwilkinson

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

16 years agoFix situations where queue members could be autopaused unexpectedly
Mark Michelson [Thu, 5 Feb 2009 20:29:09 +0000 (20:29 +0000)] 
Fix situations where queue members could be autopaused unexpectedly

Specifically, this patch prevents us from autopausing members when
we receive a busy or congestion frame from them.

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

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

16 years agoAdd some missing cleanup to app_mixmonitor
Mark Michelson [Thu, 5 Feb 2009 18:47:24 +0000 (18:47 +0000)] 
Add some missing cleanup to app_mixmonitor

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

16 years agoFix a problem where a channel pointer becomes invalid due to masquerading or hanging up.
Mark Michelson [Thu, 5 Feb 2009 17:34:33 +0000 (17:34 +0000)] 
Fix a problem where a channel pointer becomes invalid due to masquerading or hanging up.

app_mixmonitor runs its own thread to monitor the channel's activity and write the mixed
audio to a file. Since this thread runs independently of the channel, it is possible that
the mixmonitor thread's channel pointer will point to freed memory when the channel either
is masqueraded or hangs up (technically, both cases are hangups, but we need to handle the
cases slightly differently).

The solution for this is to employ a datastore, which has the nice benefit of allowing us
to hook into channel masquerades and hangups and update our pointer as necessary. If this
looks familiar, this same technique is employed in app_chanspy. app_chanspy is a bit more
involved since it does a lot more operations on the channel that is being spied upon.

app_mixmonitor does have an extra touch that app_chanspy doesn't have, though. Since there
is a thread race between the channel's thread and the mixmonitor thread on a hangup, we em-
ploy a condition-and-boolean combination to ensure that the channel thread finishes with
our structure before the mixmonitor thread attempts to free it. No crashes!

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

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

16 years agoRevert my previous change because it was stupid
Mark Michelson [Wed, 4 Feb 2009 17:44:48 +0000 (17:44 +0000)] 
Revert my previous change because it was stupid

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

16 years agoAdd a missing unlock. Extremely unlikely to ever matter, but it's needed.
Mark Michelson [Wed, 4 Feb 2009 17:40:29 +0000 (17:40 +0000)] 
Add a missing unlock. Extremely unlikely to ever matter, but it's needed.

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

16 years agoFixes issue with IAX2 transfer not handing off calls.
David Vossel [Tue, 3 Feb 2009 23:35:55 +0000 (23:35 +0000)] 
Fixes issue with IAX2 transfer not handing off calls.

Fixes issue with IAX2 transfers not taking place.  As it was, a call that was being transfered would never be handed off correctly to the call ends because of how call numbers were stored in a hash table.  The hash table, "iax_peercallno_pvt", storing all the current call numbers did not take into account the complications associated with transferring a call, so a separate hash table was required.  This second hash table "iax_transfercallno_pvt" handles calls being transfered, once the call transfer is complete the call is removed from the transfer hash table and added to the peer hash table resuming normal operations. Addition functions were created to handle storing, removing, and comparing items in the iax_transfercallno_pvt table.

(issue #13468)
Review: http://reviewboard.digium.com/r/140/

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

16 years agoParking attempts made to one end of a bridge no longer will hang up due to a
Jeff Peeler [Tue, 3 Feb 2009 21:57:01 +0000 (21:57 +0000)] 
Parking attempts made to one end of a bridge no longer will hang up due to a
parking failure.

Parking attempts made using either one-touch, or doing either a blind or
assisted transfer to the parking extension now keep up the bridge instead of
hanging up the attempted parked party. Normal causes for the parking attempt
to fail includes the specific specified extension (via PARKINGEXTEN) not being
available or if all the parking spaces are currently in use. To avoid having
to reverse a masquerade park_space_reserve was made to provide foresight if
a parking attempt will succeed and if so reserve the parking space.

(closes issue #13494)
Reported by: mdu113

Reviewed by Russell: http://reviewboard.digium.com/r/133/

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

16 years agoAdd warning to standard config, that globals may be overridden by other
Tilghman Lesher [Tue, 3 Feb 2009 00:15:59 +0000 (00:15 +0000)] 
Add warning to standard config, that globals may be overridden by other
dialplan configuration files.
(closes issue #14388)
 Reported by: macli

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

16 years agoFix a feature inheritance bug I added after code review
Terry Wilson [Mon, 2 Feb 2009 23:48:06 +0000 (23:48 +0000)] 
Fix a feature inheritance bug I added after code review

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

16 years agochannels/chan_dahdi.c
Richard Mudgett [Mon, 2 Feb 2009 20:28:54 +0000 (20:28 +0000)] 
channels/chan_dahdi.c
*  Added doxygen comments to the major dahdi structures.
*  Fixed PRI using an incorrect string value if the extension
delimiter is not present in the Dial() function.
*  Fixed some uninitialized string variables on FXS ports.

configs/chan_dahdi.conf.sample
*  Updated some documentation.

These changes are already in trunk -r172400

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

16 years agoRename new parkedcallparking option to parkedcallreparking
Terry Wilson [Sat, 31 Jan 2009 00:15:09 +0000 (00:15 +0000)] 
Rename new parkedcallparking option to parkedcallreparking

Since this option actually already existed in 1.6.0+, use the same name so as
not to confuse people when they upgrade

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

16 years agoFix feature inheritance with builtin features
Terry Wilson [Fri, 30 Jan 2009 17:47:41 +0000 (17:47 +0000)] 
Fix feature inheritance with builtin features

When using builtin features like parking and transfers, the AST_FEATURE_* flags
would not be set correctly for all instances when either performing a builtin
attended transfer, or parking a call and getting the timeout callback.  Also,
there was no way on a per-call basis to specify what features someone should
have on picking up a parked call (since that doesn't involve the Dial() command).
There was a global option for setting whether or not all users who pickup a
parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT,
AUTOMON, or PARKCALL.

This patch:
1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the
dialplan or with setvar in channels that support it.  This variable can be set
to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the
equivalent dial options), to set what features should be activated on this
channel.  The patch moves the setting of the features datastores into the
bridging code instead of app_dial to help facilitate this.

2) adds global options parkedcallparking, parkedcallhangup, and
parkedcallrecording to be similar to the parkedcalltransfers option for
globally setting features.

3) has builtin_atxfer call builtin_parkcall if being transfered to the parking
extension since tracking everything through multiple masquerades, etc. is
difficult and error-prone

4) attempts to fix all cases of return calls from parking and completed builtin
transfers not having the correct permissions
(closes issue #14274)
Reported by: aragon
Patches:
      fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396)
Tested by: aragon, otherwiseguy

Review http://reviewboard.digium.com/r/138/

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

16 years agoLose the CAP_NET_ADMIN at every fork, instead of at startup. Otherwise, if
Tilghman Lesher [Thu, 29 Jan 2009 22:54:29 +0000 (22:54 +0000)] 
Lose the CAP_NET_ADMIN at every fork, instead of at startup.  Otherwise, if
Asterisk runs as a non-root user and the administrator does a 'restart now',
Asterisk loses the ability to set QOS on packets.
(closes issue #14004)
 Reported by: nemo
 Patches:
       20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76

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

16 years agoMake sure that we always add the hangupcause headers. In some cases, the owner was...
Olle Johansson [Thu, 29 Jan 2009 08:48:18 +0000 (08:48 +0000)] 
Make sure that we always add the hangupcause headers. In some cases, the owner was disconnected before we checked for the cause.
This patch implements a temporary storage in the pvt and use that instead.

The code is based on ideas from code from Adomjan in issue #13385 (Add support for Reason: header)
Thanks to Klaus Darillion for testing!

(closes issue #14294)
related to issue #13385

Reported by: klaus3000 and adomjan
Patches:
      bug14294b.diff uploaded by oej (license 306)
      Based on 20080829_chan_sip.c-q850reason_header.patch uploaded by adomjan (license 487)
Tested by: oej, klaus3000

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

16 years agoThis patch fixes h-exten running misbehavior in manager-redirected
Steve Murphy [Wed, 28 Jan 2009 18:51:16 +0000 (18:51 +0000)] 
This patch fixes h-exten running misbehavior in manager-redirected
situations.

What it does:
1. A new Flag value is defined in include/asterisk/channel.h,
 AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the
 bridge hangup exten code not to run the h-exten there (nor
 publish the bridge cdr there). It will done at the pbx-loop
 level instead.
2. In the manager Redirect code, I set this flag on the channel
 if the channel has a non-null pbx pointer. I did the same for the
 second (chan2) channel, which gets run if name2 is set...
 and the first succeeds.
3. I restored the ending of the cdr for the pbx loop h-exten
 running code. Don't know why it was removed in the first place.
4. The first attempt at the fix for this bug was to place code
   directly in the async_goto routine, which was called from a
   large number of places, and could affect a large number of
   cases, so I tested that fix against a fair number of transfer
   scenarios, both with and without the patch. In the process,
   I saw that putting the fix in async_goto seemed not to affect
   any of the blind or attended scenarios, but still, I was
   was highly concerned that some other scenarios I had not tested
   might be negatively impacted, so I refined the patch to
   its current scope, and jmls tested both. In the process, tho,
   I saw that blind xfers in one situation, when the one-touch
   blind-xfer feature is used by the peer, we got strange
   h-exten behavior.  So, I  inserted code to swap CDRs and
   to set the HANGUP_DONT field, to get uniform behavior.
5. I added code to the bridge to obey the HANGUP_DONT flag,
   skipping both publishing the bridge CDR, and running
   the h-exten; they will be done at the pbx-loop (higher)
   level instead.
6. I removed all the debug logs from the patch before committing.
7. I moved the AUTOLOOP set/reset in the h-exten code in res_features
   so it's only done if the h-exten is going to be run. A very
   minor performance improvement, but technically correct.

(closes issue #14241)
Reported by: jmls
Patches:
      14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17)
Tested by: murf, jmls

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

16 years agoClarify log message (suggested by manxpower on #asterisk-dev)
Tilghman Lesher [Wed, 28 Jan 2009 17:25:18 +0000 (17:25 +0000)] 
Clarify log message (suggested by manxpower on #asterisk-dev)

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

16 years agoAdd a better explanation of the difference between the device namespace and the dialp...
Olle Johansson [Wed, 28 Jan 2009 13:07:27 +0000 (13:07 +0000)] 
Add a better explanation of the difference between the device namespace and the dialplan for newbies.

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

16 years agoFix devicestate problems for "always-on" agent channels
Mark Michelson [Tue, 27 Jan 2009 21:55:08 +0000 (21:55 +0000)] 
Fix devicestate problems for "always-on" agent channels

A revision to chan_agent attempted to "inherit" the device
state of the underlying channel in order to report the
device state of an agent channel more accurately.

The problem with the logic here is that it makes no sense to
use this for always-on agents. If the agent is logged in, then
to the underlying channel, the agent will always appear to be
"in use," no matter if the agent is on a call or not. The reason
is that to the underlying channel, the channel is currently in use
on a call to the AgentLogin application.

The most common cause that I found for this issue to occur was for
a SIP channel to be the underlying channel type for an Agent channel.
If the SIP phone re-registers, then the registration will cause the
device state core to query the device state of the SIP channel. Since the
SIP channel is in use, the Agent channel would also inherit this status.
Once the agent channel was set to "in use" there was no way that the device
state could change on that channel unless the agent logged out.

The solution for this problem is a bit different in 1.4 than it is in the
other branches. In 1.4, there will be a one-line fix to make sure that only
callback agents will inherit device state from their underlying channel type.
For the other branches of Asterisk, since callback support has been removed, there
is also no need for device state inheritance in chan_agent, so I will simply be
removing it from the code.

In addition, the 1.4 source is getting a new comment to help the next person who
edits chan_agent.c. I'm adding a comment that a agent_pvt's loginchan field may be
used to determine if the agent is a callback agent or not.

(closes issue #14173)
Reported by: nathan
Patches:
      14173.patch uploaded by putnopvut (license 60)
Tested by: nathan, aramirez

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

16 years agoPrevent a crash from occurring when a jitter buffer interpolated frame is
Mark Michelson [Tue, 27 Jan 2009 20:06:01 +0000 (20:06 +0000)] 
Prevent a crash from occurring when a jitter buffer interpolated frame is
removed from a slinfactory

slinfactory used the "samples" field of an ast_frame in order to determine
the amount of data contained within the frame. In certain cases, such as
jitter buffer interpolated frames, the frame would have a non-zero value for
"samples" but have NULL "data"

This caused a problem when a memcpy call in ast_slinfactory_read would attempt
to access invalid memory. The solution in use here is to never feed frames into
the slinfactory if they have NULL "data"

(closes issue #13116)
Reported by: aragon
Patches:
      13116.diff uploaded by putnopvut (license 60)

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

16 years agoUse the same branch tag in CANCEL as in INVITE
Olle Johansson [Tue, 27 Jan 2009 14:33:20 +0000 (14:33 +0000)] 
Use the same branch tag in CANCEL as in INVITE

Originally putnopvut implemented some changes in revision 142079 that according to the bug report seemed to have worked then, but somehow fails now.
I guess code, as humans, get old and forget stuff. Anyway, this bug caused CANCEL not to work with picky systems.

Thanks Fredrik for pointing out where the bug in the SIP messaging was.

(closes issue #14346)
Reported by: oej
Patches:
      bug14346.diff uploaded by oej (license 306)
Tested by: oej

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

16 years agoResolve some synchronization issues in chan_iax2 scheduler handling.
Russell Bryant [Mon, 26 Jan 2009 21:31:59 +0000 (21:31 +0000)] 
Resolve some synchronization issues in chan_iax2 scheduler handling.

The important changes here are related to the synchronization between threads
adding items into the scheduler and the scheduler handling thread.  By adjusting
the lock and condition handling, we ensure that the scheduler thread sleeps no
longer and no less than it is supposed to.  We also ensure that it does not
wake up more often than it has to.

There is no bug report associated with this.  It is just something that I found
while putting scheduler thread handling into a reusable form (review 129).

Review: http://reviewboard.digium.com/r/131/

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

16 years agoDon't retransmit 401 on REGISTER requests when alwaysauthreject=yes
Olle Johansson [Mon, 26 Jan 2009 12:51:53 +0000 (12:51 +0000)] 
Don't retransmit 401 on REGISTER requests when alwaysauthreject=yes

(closes issue #14284)
Reported by: klaus3000
Patches:
      patch_chan_sip_unreliable_1.4.23_14284.txt uploaded by klaus3000 (license 65)
Tested by: klaus3000

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

16 years agoCorrectly track the hookstate
Tilghman Lesher [Sun, 25 Jan 2009 23:44:01 +0000 (23:44 +0000)] 
Correctly track the hookstate
(closes issue #13686)
 Reported by: itiliti
 Patches:
       20081013__bug13686.diff.txt uploaded by Corydon76 (license 14)

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

16 years agoErr, yeah.
Tilghman Lesher [Sun, 25 Jan 2009 20:40:44 +0000 (20:40 +0000)] 
Err, yeah.

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

16 years agoAdd thread to kill zombies, when child processes don't die immediately on
Tilghman Lesher [Sun, 25 Jan 2009 20:30:41 +0000 (20:30 +0000)] 
Add thread to kill zombies, when child processes don't die immediately on
SIGHUP.
(closes issue #13968)
 Reported by: eldadran
 Patches:
       20090114__bug13968.diff.txt uploaded by Corydon76 (license 14)
 Tested by: eldadran

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

16 years agoResolve a logic error that was causing Page() to crash when more than one
Sean Bright [Sun, 25 Jan 2009 13:33:20 +0000 (13:33 +0000)] 
Resolve a logic error that was causing Page() to crash when more than one
channel was specified.

(closes issue #14308)
Reported by: bluefox
Patches:
      20090124__bug14308.diff.txt uploaded by seanbright (license 71)
Tested by: kc0bvu

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

16 years agoRemove superfluous implementation note (closes issue #14319)
Tilghman Lesher [Sat, 24 Jan 2009 13:55:02 +0000 (13:55 +0000)] 
Remove superfluous implementation note (closes issue #14319)

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

16 years agoAdd notes to the idlecheck explanation in res_odbc.conf.sample
Mark Michelson [Fri, 23 Jan 2009 20:55:26 +0000 (20:55 +0000)] 
Add notes to the idlecheck explanation in res_odbc.conf.sample

(closes issue #14319)
Reported by: klaus3000
Patches:
      patch_idlecheck_res_odbc.conf.sample.txt uploaded by klaus3000 (license 65)

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

16 years agoUpdate contrib/i18n.testsuite.conf to not use deprecated syntax
Mark Michelson [Fri, 23 Jan 2009 20:21:51 +0000 (20:21 +0000)] 
Update contrib/i18n.testsuite.conf to not use deprecated syntax

* Convert Wait,1 to Wait(1)
* Convert SetLanguage to Set(CHANNEL(language))
* Use 'n' for all priorities beyond the first

Also added test for Chinese numbers, too.

(closes issue #14320)
Reported by: dant
Patches:
      i18n.testsuite.conf.issue14320.v2.diff uploaded by dant (license 670)

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

16 years agoWhen a channel is answered make sure any indications currently playing stop. Usually...
Joshua Colp [Fri, 23 Jan 2009 20:16:39 +0000 (20:16 +0000)] 
When a channel is answered make sure any indications currently playing stop. Usually the phone would do this but if the channel was already answered then they are being generated by Asterisk and we darn well need to stop them.
(closes issue #14249)
Reported by: RadicAlish

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

16 years agoAdditions to AST-2009-001
Tilghman Lesher [Fri, 23 Jan 2009 19:20:44 +0000 (19:20 +0000)] 
Additions to AST-2009-001

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

16 years agoWhen a call is forwarded stop any active indications. The new channel will provide...
Joshua Colp [Fri, 23 Jan 2009 19:06:54 +0000 (19:06 +0000)] 
When a call is forwarded stop any active indications. The new channel will provide an indication, if need be, itself.
(closes issue #14310)
Reported by: RadicAlish

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

16 years agoUse the on hold flag to see if the call is on hold or not. It is possible that our...
Joshua Colp [Fri, 23 Jan 2009 18:04:08 +0000 (18:04 +0000)] 
Use the on hold flag to see if the call is on hold or not. It is possible that our address for them will still be valid even though they are on hold.
(closes issue #14295)
Reported by: klaus3000

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

16 years agoFix broken call pickup
Mark Michelson [Fri, 23 Jan 2009 15:40:39 +0000 (15:40 +0000)] 
Fix broken call pickup

There was a subtle change in ast_do_masquerade which
resulted in failed attempts to pickup calls. The problem
was that the value of the AST_FLAG_OUTGOING flag was
copied from the clone to the original channel. In the case
of call pickup, this meant that the AST_FLAG_OUTGOING flag
ended up being cleared on the channel that was attempting
to execute the pickup.

Because this flag was not set, when ast_read came across
an answer frame, it ignored it. The result of this was that
the calling channel was never properly answered.

This fix changes the behavior in ast_do_masquerade to set
the flags on the original channel to the union of the flags
on the clone channel. This way, if the AST_FLAG_OUTGOING
flag is set on either of the two channels involved in the
masquerade, the resulting channel will have the flag set
as well.

(closes issue #14206)
Reported by: francesco_r
Patches:
      14206.patch uploaded by putnopvut (license 60)
Tested by: francesco_r, aragon, putnopvut

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

16 years agoDon't crash if RTCP is not enabled on an RTP structure but statistics are output.
Joshua Colp [Thu, 22 Jan 2009 20:02:35 +0000 (20:02 +0000)] 
Don't crash if RTCP is not enabled on an RTP structure but statistics are output.
(closes issue #14234)
Reported by: jcovert
Patches:
      rtp.c.patch-1.6.0.3 uploaded by jcovert (license 551)
      rtp.c.patch-svn-165599 uploaded by jcovert (license 551)

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

16 years agoAllow global variables after substitution to be as long as other variables.
Tilghman Lesher [Thu, 22 Jan 2009 17:18:07 +0000 (17:18 +0000)] 
Allow global variables after substitution to be as long as other variables.
(closes issue #14263)
 Reported by: markd
 Patches:
       20090120__bug14263.diff.txt uploaded by Corydon76 (license 14)

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

16 years agoIf we are unable to request a DAHDI pseudo channel and we are using the user introduc...
Joshua Colp [Thu, 22 Jan 2009 16:50:54 +0000 (16:50 +0000)] 
If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
(closes issue #14282)
Reported by: cheesegrits

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

16 years agoDo a string comparison instead of pointer comparison since some people specify the...
Joshua Colp [Thu, 22 Jan 2009 15:13:56 +0000 (15:13 +0000)] 
Do a string comparison instead of pointer comparison since some people specify the context they are actually in as an argument to get around some funkiness.
(closes issue #14011)
Reported by: dveiga
Patches:
      pbx.c.patch uploaded by dveiga (license 665)

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

16 years agoAST_RWLOCK_INIT_VALUE is always defined. What we really wanted to ask is
Tilghman Lesher [Thu, 22 Jan 2009 00:43:31 +0000 (00:43 +0000)] 
AST_RWLOCK_INIT_VALUE is always defined.  What we really wanted to ask is
whether autoconf detected a static initializer value.  This fixes rwlocks
on all such platforms (mainly, Mac OS X).
(closes issue #13767)
 Reported by: jcovert
 Patches:
       20090121__bug13767.diff.txt uploaded by Corydon76 (license 14)
 Tested by: jcovert, Corydon76

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

16 years agoFix builtin_blindtransfer calling back the wrong channel
Terry Wilson [Wed, 21 Jan 2009 23:23:59 +0000 (23:23 +0000)] 
Fix builtin_blindtransfer calling back the wrong channel

Blindtransfer also was calling back the wrong channel when a timeout occurred.
This should be the last of these, as there are no more masq_park_announce calls
that aren't passing orig_chan_name

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

16 years agoRead lock the contexts to maintain the locking order when we are notified that the...
Joshua Colp [Wed, 21 Jan 2009 23:20:47 +0000 (23:20 +0000)] 
Read lock the contexts to maintain the locking order when we are notified that the state of a device has changed.
(closes issue #13839)
Reported by: mcallist

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

16 years agoAdding revision 169794 to 1.4 since 1.4 is also affected by the issue
Mark Michelson [Wed, 21 Jan 2009 22:14:52 +0000 (22:14 +0000)] 
Adding revision 169794 to 1.4 since 1.4 is also affected by the issue

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

16 years agoExtra NULLs in the output cause some terminal types to abort in the middle of
Tilghman Lesher [Wed, 21 Jan 2009 21:02:32 +0000 (21:02 +0000)] 
Extra NULLs in the output cause some terminal types to abort in the middle of
a color code, causing terminal weirdness.
(closes issue #14130)
 Reported by: coolmig
 Patches:
       20090121__bug14130.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, coolmig

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

16 years agoOne-touch parking was calling back the wrong channel on timeout
Terry Wilson [Tue, 20 Jan 2009 23:49:34 +0000 (23:49 +0000)] 
One-touch parking was calling back the wrong channel on timeout

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

16 years agoDon't play audio to the channel if we've masqueraded
Terry Wilson [Tue, 20 Jan 2009 18:40:56 +0000 (18:40 +0000)] 
Don't play audio to the channel if we've masqueraded

(closes issue #14066)
Reported by: bluefox
Tested by: otherwiseguy, bluefox

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

16 years agoTruncate userevents at the end of a line, when the command exceeds the buffer.
Tilghman Lesher [Mon, 19 Jan 2009 19:49:25 +0000 (19:49 +0000)] 
Truncate userevents at the end of a line, when the command exceeds the buffer.
(closes issue #14278)
 Reported by: fnordian

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

16 years agoPrevent a crash in chan_local due to a potential NULL pointer dereference
Mark Michelson [Mon, 19 Jan 2009 15:52:15 +0000 (15:52 +0000)] 
Prevent a crash in chan_local due to a potential NULL pointer dereference

Move the check for if both channels on a local_pvt have generators to below
where p->chan is checked for NULLity (NULLness?). This prevents a crash from
occurring if p->chan is NULL.

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

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

16 years agoAccount for possible NULL pointer when we receive a 408 in response to a REGISTER
Mark Michelson [Fri, 16 Jan 2009 22:42:13 +0000 (22:42 +0000)] 
Account for possible NULL pointer when we receive a 408 in response to a REGISTER

It may be that by the time we receive a reply to a REGISTER request, the attempt has
timed out and thus the registry structure pointed to by the corresponding sip_pvt has
gone away. This situation was handled properly for a 200 OK response, but the 408
case assumed that the sip_registry struct was non-NULL, thus potentially causing a crash

This commit fixes this assumption and prints out a message to the console if we should
receive a late 408 response to a REGISTER

(closes issue #14211)
Reported by: aborghi
Patches:
      14211.diff uploaded by putnopvut (license 60)
Tested by: aborghi

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

16 years agoFix the conjugation of Russian and Ukrainian languages.
Tilghman Lesher [Fri, 16 Jan 2009 18:41:35 +0000 (18:41 +0000)] 
Fix the conjugation of Russian and Ukrainian languages.
(related to issue #12475)
 Reported by: chappell
 Patches:
       vm_multilang.patch uploaded by chappell (license 8)

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

16 years agoThis patch fixes a problem where a goto (or jump, in this case)
Steve Murphy [Fri, 16 Jan 2009 00:19:12 +0000 (00:19 +0000)] 
This patch fixes a problem where a goto (or jump, in this case)
fails a consistency check because it can't find a matching
extension. The problem was a missing instruction to end
the range notation in the code where it converts the pattern
into a regex and uses the regex code to determine the match.

I tested using the AEL code the user supplied, and now,
the consistency check passes.

(closes issue #14141)
Reported by: dimas

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

16 years agoMeetme actually has realtime but wasn't documented
Olle Johansson [Thu, 15 Jan 2009 18:43:43 +0000 (18:43 +0000)] 
Meetme actually has realtime but wasn't documented

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

16 years agoConvert call to park_call_full to masq_park_call_announce
Terry Wilson [Thu, 15 Jan 2009 18:22:49 +0000 (18:22 +0000)] 
Convert call to park_call_full to masq_park_call_announce

Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
do_parking_thread() and then promptly crash.
(closes issue #14215)
Reported by: waverly360
Tested by: otherwiseguy
(closes issue #14228)
Reported by: kobaz
Tested by: otherwiseguy

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

16 years agoBlocked revision 168632 from /branches/1.2:
Tilghman Lesher [Thu, 15 Jan 2009 01:20:20 +0000 (01:20 +0000)] 
Blocked revision 168632 from /branches/1.2:

1.2 regression on security fix AST-2009-001
(Closes issue #14238)

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

16 years agoFix some crashes from bad datastore handling in app_queue.c
Mark Michelson [Thu, 15 Jan 2009 00:11:01 +0000 (00:11 +0000)] 
Fix some crashes from bad datastore handling in app_queue.c

* The queue_transfer_fixup function was searching for and removing
  the datastore from the incorrect channel, so this was fixed.

* Most datastore operations regarding the queue_transfer datastore
  were being done without the channel locked, so proper channel locking
  was added, too.

(closes issue #14086)
Reported by: ZX81
Patches:
      14086v2.patch uploaded by putnopvut (license 60)
Tested by: ZX81, festr

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

16 years ago* Fixed create_process() allocation of process ID values.
Richard Mudgett [Wed, 14 Jan 2009 21:48:22 +0000 (21:48 +0000)] 
*  Fixed create_process() allocation of process ID values.
The allocated process IDs could overflow their respective
NT and TE fields.  Affects outgoing calls.

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

16 years agoUpdate autosupport script to supply info for both Zaptel and DAHDI in 1.4 and
Sean Bright [Wed, 14 Jan 2009 20:52:00 +0000 (20:52 +0000)] 
Update autosupport script to supply info for both Zaptel and DAHDI in 1.4 and
be sure to run dahdi_test in 1.6.x and trunk instead of zttest.

(closes issue #14132)
Reported by: dsedivec
Patches:
      asterisk-1.4-autosupport.patch uploaded by dsedivec (license 638)
      asterisk-trunk-autosupport.patch uploaded by dsedivec (license 638)

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

16 years agoapp_page was failing to compile in dev-mode on my gcc-4.2.4 system. This change gets...
Steve Murphy [Wed, 14 Jan 2009 19:34:35 +0000 (19:34 +0000)] 
app_page was failing to compile in dev-mode on my gcc-4.2.4 system. This change gets rid of the warning.

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

16 years agoDon't read into a buffer without first checking if a value is beyond the end.
Tilghman Lesher [Wed, 14 Jan 2009 19:02:55 +0000 (19:02 +0000)] 
Don't read into a buffer without first checking if a value is beyond the end.
(closes issue #13600)
 Reported by: atis
 Patches:
       20090106__bug13600.diff.txt uploaded by Corydon76 (license 14)
 Tested by: atis

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

16 years agoFix a logic error I found while searching through chan_agent.c
Mark Michelson [Wed, 14 Jan 2009 16:19:26 +0000 (16:19 +0000)] 
Fix a logic error I found while searching through chan_agent.c

I found that the allow_multiple_logins function would never return
0 due to an incorrect comparison being used when traversing the
list of agents. While I was modifying this function, I also did
a little bit of coding guidelines cleanup, too.

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

16 years agoDon't overflow when paging more than 128 extensions
Terry Wilson [Wed, 14 Jan 2009 01:27:18 +0000 (01:27 +0000)] 
Don't overflow when paging more than 128 extensions

The number of available slots for calls in app_page was hardcoded to 128.
Proper bounds checking was not in place to enforce this limit, so if more than
128 extensions were passed to the Page() app, Asterisk would crash.  This patch
instead dynamically allocates memory for the ast_dial structures and removes
the (non-functional) arbitrary limit.

This issue would have special importance to anyone who is dynamically creating
the argument passed to the Page application and allowing more than 128
extensions to be added by an outside user via some external interface.

The patch posted by a_villacis was slightly modified for some coding guidelines
and other cleanups.  Thanks, a_villacis!
(closes issue #14217)
Reported by: a_villacis
Patches:
      20080912-asterisk-app_page-fix-buffer-overflow.patch uploaded by a (license 660)
Tested by: otherwiseguy

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

16 years agoRevert unnecessary indications API change from rev 122314
Russell Bryant [Tue, 13 Jan 2009 19:13:05 +0000 (19:13 +0000)] 
Revert unnecessary indications API change from rev 122314

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

16 years agoDon't pass a value with a side effect to a macro
Terry Wilson [Tue, 13 Jan 2009 18:34:14 +0000 (18:34 +0000)] 
Don't pass a value with a side effect to a macro

(closes issue #14176)
Reported by: paraeco
Patches:
      chan_sip.c.diff uploaded by paraeco (license 658)

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

16 years agoIf either conditional is NULL, don't try copying it.
Tilghman Lesher [Tue, 13 Jan 2009 17:48:00 +0000 (17:48 +0000)] 
If either conditional is NULL, don't try copying it.
(closes issue #14226)
 Reported by: caspy
 Patches:
       20090113__bug14226.diff.txt uploaded by Corydon76 (license 14)

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

16 years ago(closes issue #13881)
Jeff Peeler [Mon, 12 Jan 2009 21:42:34 +0000 (21:42 +0000)] 
(closes issue #13881)
Reported by: hoowa

Update the app CDR field for AGI commands that are not executing an application via "exec".

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

16 years ago(closes issue #12269)
Jeff Peeler [Mon, 12 Jan 2009 20:26:22 +0000 (20:26 +0000)] 
(closes issue #12269)
Reported by: IgorG
Tested by: denisgalvao

This gits rid of the notion of an owning_app allowing the request and hangup to be initiated by different threads. Originating from an active agent channel requires this. The implementation primarily changes __login_exec to wait on a condition variable rather than a lock.

Review: http://reviewboard.digium.com/r/35/

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

16 years agoI am reverting the fix made in revision 168128 (and its upward merges)
Mark Michelson [Mon, 12 Jan 2009 14:58:25 +0000 (14:58 +0000)] 
I am reverting the fix made in revision 168128 (and its upward merges)
after being contacted by Olle Johansson and being shown how this fix is
incorrect. Thanks to Olle for clearing this up for me.

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

16 years agos/ringdance/ringcadence/ for Bulgaria
Russell Bryant [Mon, 12 Jan 2009 14:57:27 +0000 (14:57 +0000)] 
s/ringdance/ringcadence/ for Bulgaria

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

16 years agosmall commit to test new server
Kevin P. Fleming [Sat, 10 Jan 2009 20:47:31 +0000 (20:47 +0000)] 
small commit to test new server

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

16 years agosmall commit to test new server
Kevin P. Fleming [Sat, 10 Jan 2009 20:38:38 +0000 (20:38 +0000)] 
small commit to test new server

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

16 years agoupdate to use new sound file packages that include license files
Kevin P. Fleming [Fri, 9 Jan 2009 23:12:29 +0000 (23:12 +0000)] 
update to use new sound file packages that include license files

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

16 years agoMake this compile for mvanbaak
Russell Bryant [Fri, 9 Jan 2009 22:14:38 +0000 (22:14 +0000)] 
Make this compile for mvanbaak

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

16 years ago* Fix for JIRA AST-175/ABE-1757
Richard Mudgett [Fri, 9 Jan 2009 21:28:42 +0000 (21:28 +0000)] 
*  Fix for JIRA AST-175/ABE-1757
*  Miscellaneous doxygen comments added.

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

16 years agoAdd check_via calls to more request handlers
Mark Michelson [Fri, 9 Jan 2009 20:08:04 +0000 (20:08 +0000)] 
Add check_via calls to more request handlers

INFO, NOTIFY, OPTIONS, REFER, and MESSAGE requests
were not checking the topmost Via to determine where
to send the response. Adding check_via calls to those
request handlers solves this.

(closes issue #13071)
Reported by: baron
Patches:
      check_via.patch uploaded by baron (license 531)
Tested by: baron

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

16 years agoDon't truncate database results at 255 chars.
Tilghman Lesher [Thu, 8 Jan 2009 22:08:56 +0000 (22:08 +0000)] 
Don't truncate database results at 255 chars.
(closes issue #14069)
 Reported by: evandro
 Patches:
       20081214__bug14069.diff.txt uploaded by Corydon76 (license 14)

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