]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
14 years agoChanges sound file for prepend "then-press-pound" to "vm-then-pound" which is the...
Jonathan Rose [Tue, 26 Jul 2011 14:04:55 +0000 (14:04 +0000)] 
Changes sound file for prepend "then-press-pound" to "vm-then-pound" which is the same
prompt, only it turned out "then-press-pound" was part of extra sounds. Also, vm is more
appropriate anyway.

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

14 years agoFixes some voicemail forwarding behavior based around prepend mode.
Jonathan Rose [Tue, 26 Jul 2011 13:25:35 +0000 (13:25 +0000)] 
Fixes some voicemail forwarding behavior based around prepend mode.

Formerly, prepend forwarding would have the user record a message with no useful prompt
and an expectation for the user to push a button on the phone when finished recording.
If a length of silence was detected instead, the recording would be canceled and the user
would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording
would also bug out in the sense that they would write over the original message and get
sent to the recipient regardless of whether they timed out or were accepted. This patch
fixes this issue and adds a prompt which will be played after a timeout informing the
user that they needed to press a button. Currently, the sound files that we have are
somewhat inadquate for this, so after the call we simply have Allison say "Please try
again. Then press pound." which actually relies on two separate sound files. Just one
would be more appropriate.

reporter: Vlad Povorozniuc
Review: https://reviewboard.asterisk.org/r/1327/

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

14 years agoDecrease verbose messages to debug, to help clean up CLI.
Paul Belanger [Mon, 25 Jul 2011 19:49:40 +0000 (19:49 +0000)] 
Decrease verbose messages to debug, to help clean up CLI.

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

14 years agoFix memory leak in an allocation error path of handle_statechange().
Richard Mudgett [Fri, 22 Jul 2011 21:10:40 +0000 (21:10 +0000)] 
Fix memory leak in an allocation error path of handle_statechange().

* Make use buffer accessor function in handle_statechange() rather than
directly accessing the struct member.

* Make use less redundant loop construct for iterating over hints.

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

14 years agoDeadlocks dealing with dialplan hints during reload.
Richard Mudgett [Fri, 22 Jul 2011 15:44:58 +0000 (15:44 +0000)] 
Deadlocks dealing with dialplan hints during reload.

There are two remaining different deadlocks reported dealing with dialplan
hints.

The deadlock in ASTERISK-17666 is caused by invalid locking order in
ast_remove_hint().  The hints container must be locked before the hint
object.

The deadlock in ASTERISK-17760 is caused by a catch-22 situation in
handle_statechange().  The deadlock is caused by not having the conlock
before calling the watcher callbacks.  Unfortunately, having that lock
causes a different deadlock as reported in ASTERISK-16961.

* Fixed ast_remove_hint() locking order.

* Made handle_statechange() no longer call the watcher callbacks holding
any locks that matter.

* Made hint ao2 destructor do the watcher callbacks for extension
deactivation to guarantee that they get called.

* Fixed hint reference leak in ast_add_hint() if the callback container
constructor failed.

* Fixed hint reference leak in complete_core_show_hint() for every hint it
found for CLI tab completion.

* Adjusted locking in ast_merge_contexts_and_delete() for safety.

* Added context_merge_lock to prevent ast_merge_contexts_and_delete() and
handle_statechange() from interfering with each other.

* Fixed ast_change_hint() not taking into account that the extension is
used for the hash key.

(closes issue ASTERISK-17666)
Reported by: irroot
Tested by: irroot
JIRA SWP-3318

(closes issue ASTERISK-17760)
Reported by: Byron Clark
Tested by: irroot
JIRA SWP-3393

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

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

14 years agoDocument parkinglot in chan_dahdi.conf.sample.
Richard Mudgett [Thu, 21 Jul 2011 18:04:09 +0000 (18:04 +0000)] 
Document parkinglot in chan_dahdi.conf.sample.

* Document existing feature in chan_dahdi.conf.sample.

* Remove some dead code related to the parkinglot option.

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

14 years agoUpdate PickupChan documentation.
Richard Mudgett [Thu, 21 Jul 2011 17:30:57 +0000 (17:30 +0000)] 
Update PickupChan documentation.

The PickupChan uses the ampersand as the argument separator.
Was documented as:
PickupChan(channel[,channel2[,...][,options]])

Fixed documentation to:
PickupChan(Technology/Resource[&Technology2/Resource2[&...]][,options])

This is a continuation of ASTERISK-17494 for v1.8 and later.

(closes issue ASTERISK-18144)
Reported by: Erik Smith
Patches:
      pickupchan_ducumentation-v2.patch (License #6263) patch uploaded by Erik Smith
Tested by: Erik Smith

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

14 years agoDialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!
Richard Mudgett [Thu, 21 Jul 2011 16:46:21 +0000 (16:46 +0000)] 
Dialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!

This appears to be a leftover from when ast_channel was converted to ao2
objects.

Simply removed the extraneous unlock.

(closes issue ASTERISK-17772)

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

14 years agoAsterisk now requires libpri 1.4.11+ for PRI support.
Paul Belanger [Wed, 20 Jul 2011 21:20:36 +0000 (21:20 +0000)] 
Asterisk now requires libpri 1.4.11+ for PRI support.

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

14 years agoBackport useful CLI "pri show channels" command to v1.8.
Richard Mudgett [Wed, 20 Jul 2011 20:52:33 +0000 (20:52 +0000)] 
Backport useful CLI "pri show channels" command to v1.8.

The "pri show channels" command is useful for debuging to see if there are
any stuck B channels.

..........
  r307964 | rmudgett | 2011-02-15 15:42:55 -0600 (Tue, 15 Feb 2011) | 9 lines

  Add CLI "pri show channels" command.

  List the current mapping of DAHDI B channels to Asterisk channel names and
  which calls are on hold or call-waiting.  Calls on hold or call-waiting
  are not associated with any B channel.

  JIRA LIBPRI-27
  JIRA SWP-2547

..........
  r308205 | rmudgett | 2011-02-17 14:21:56 -0600 (Thu, 17 Feb 2011) | 1 line

  Add more verbage to CLI command 'pri show channels' usage.

..........
  r312579 | rmudgett | 2011-04-04 11:17:58 -0500 (Mon, 04 Apr 2011) | 59 lines

  Change also updates 'pri show channels' command with the "chan idle"
  column to report if a channel is available for use.

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

14 years agoWe can't guarantee an eth0 is present
Terry Wilson [Wed, 20 Jul 2011 20:16:58 +0000 (20:16 +0000)] 
We can't guarantee an eth0 is present

FreeBSD test fails on this case presumably because there is no eth0 on the test
machine. Better to just remove this test for now.

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

14 years agoInband DTMF regression
Kinsey Moore [Wed, 20 Jul 2011 19:00:23 +0000 (19:00 +0000)] 
Inband DTMF regression

The functionality of inband DTMF in chan_sip relied upon
ast_rtp_instance_dtmf_mode_get/set not working properly to avoid calling
ast_rtp_instance_dtmf_begin/end on RTP streams with inband DTMF. According to
documentation, ast_rtp_instance_dtmf_begin/end is meant only for RFC2833 DTMF,
never inband.  This fixes the regression introduced in revision 328823.

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

14 years agoRevert partial attempt at handling pathnames with spaces.
Kevin P. Fleming [Tue, 19 Jul 2011 21:29:07 +0000 (21:29 +0000)] 
Revert partial attempt at handling pathnames with spaces.

Revision 299794 attempted to improve the build system to be able to handle
pathnames (primarily DESTDIR) with spaces in them, since this is common on
some platforms (including Mac OSX). Unfortunately, the changes were incomplete
and did not actually provide the desired behavior, and as a side effect the
functionality that ensured that stale headers in the Asterisk 'include' directory
were removed got broken. In addition, the check for stale (and possibly
incompatible) modules in the Asterisk 'modules' directory also got broken, and
would never report any stale modules. Users upgrading to this version or later
versions would then see unexpected module load errors.

Since there are few users who actually want to install Asterisk into paths
that contain spaces, and a proper fix for the build system would take many hours,
the best solution for now is to just revert the partial solution.

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

14 years agoRTP bridge away with inband DTMF and feature detection
Kinsey Moore [Tue, 19 Jul 2011 17:57:18 +0000 (17:57 +0000)] 
RTP bridge away with inband DTMF and feature detection

When deciding whether Asterisk was allowed to bridge the call away from the
core, chan_sip did not take into account the usage of features on dialed
channels that require monitoring of DTMF on channels utilizing inband DTMF.
This would cause Asterisk to allow the call to be locally or remotely bridged,
preventing access to the data required to detect activations of such features.

(closes 17237)
Review: https://reviewboard.asterisk.org/r/1302/

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

14 years agoMeetMe requests a PIN twice in some circumstances
Kinsey Moore [Tue, 19 Jul 2011 15:43:32 +0000 (15:43 +0000)] 
MeetMe requests a PIN twice in some circumstances

If a call to MeetMe includes both the dynamic(D) and always request PIN(P)
options, MeetMe will ask for the PIN two times: once for creating the
conference and once for entering the conference.  This behavior was introduced
in rev 311616 when adding the CONFFLAG_ALWAYSPROMPT option to the logic branch
controlling PIN entry for joining a conference.

(closes AST-601)
Review: https://reviewboard.asterisk.org/r/1305/

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

14 years agoMake AST_LIST_REMOVE safer
Terry Wilson [Tue, 19 Jul 2011 01:35:53 +0000 (01:35 +0000)] 
Make AST_LIST_REMOVE safer

AST_LIST_REMOVE shouldn't modify the element passed in if it isn't found. This
commit also adds linked list unit tests.

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

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

14 years agoapp_dial may double free a channel datastore
Mark Murawki [Mon, 18 Jul 2011 20:47:04 +0000 (20:47 +0000)] 
app_dial may double free a channel datastore

When starting a call with originate, and having the callee channel run Bridge() on pickup, we will double free the dialed_interface_info datastore, causing a crash.  Make sure to check if the datastore still exists before trying to free it.

(closes issue ASTERISK-17917)
Reported by: Mark Murawski
Tested by: Mark Murawski

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

14 years agoIf the sip private structure is null, sip_setoption() will defref the null pointer...
Mark Murawki [Mon, 18 Jul 2011 12:35:57 +0000 (12:35 +0000)] 
If the sip private structure is null, sip_setoption() will defref the null pointer and crash.

Ideally, sip_setoption shouldn't be called if there is a lack of a sip private structure.  But this will fix a crash.

(closes issue ASTERISK-17909)
Reported by: Mark Murawski
Tested by: Mark Murawski

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

14 years agoFixed invalid read and null pointer deref on asterisk shutdown.
Mark Murawki [Mon, 18 Jul 2011 12:06:50 +0000 (12:06 +0000)] 
Fixed invalid read and null pointer deref on asterisk shutdown.

In some cases when starting asterisk with -c and hitting control-c to shutdown, there will be an invalid read and null pointer deref causing a crash.

(closes issue ASTERISK-17927)
Reported by: Mark Murawski
Tested by: Mark Murawski, Kinsey Moore, Tilghman Lesher

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

14 years agoTypo
Tilghman Lesher [Mon, 18 Jul 2011 07:10:15 +0000 (07:10 +0000)] 
Typo

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

14 years agoRevert changes to defaultenabled state for modules in Asterisk 1.8
Leif Madsen [Fri, 15 Jul 2011 20:41:12 +0000 (20:41 +0000)] 
Revert changes to defaultenabled state for modules in Asterisk 1.8

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

14 years agosmall gk processing fixes:
Alexandr Anikin [Fri, 15 Jul 2011 19:22:24 +0000 (19:22 +0000)] 
small gk processing fixes:
- decrease for 1 second registration ttl for very low expirations (some
  providers expire few earlier than TTL)
- delete rrq and registration expire timers on URQ received as we make
  new registration.

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

14 years agoMissing SIP pvt and channel unlock in sip_set_rtp_peer().
Richard Mudgett [Thu, 14 Jul 2011 23:12:06 +0000 (23:12 +0000)] 
Missing SIP pvt and channel unlock in sip_set_rtp_peer().

Regression introduced by -r326144.

Add missing SIP pvt and channel unlock in sip_set_rtp_peer().

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

14 years agoIntroduce <support_level> tags in MODULEINFO.
Leif Madsen [Thu, 14 Jul 2011 20:13:06 +0000 (20:13 +0000)] 
Introduce <support_level> tags in MODULEINFO.
This change introduces MODULEINFO into many modules in Asterisk in order to show
the community support level for those modules. This is used by changes committed
to menuselect by Russell Bryant recently (r917 in menuselect). More information about
the support level types and what they mean is available on the wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States

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

14 years agoMonitor application arguments requirements fixed.
Jonathan Rose [Thu, 14 Jul 2011 19:21:02 +0000 (19:21 +0000)] 
Monitor application arguments requirements fixed.

Monitor was requiring options in spite of no individual option on Monitor being required.

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

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

14 years agoAdd ATXFER_NULL_TECH note in features.conf.sample.
Richard Mudgett [Wed, 13 Jul 2011 18:46:38 +0000 (18:46 +0000)] 
Add ATXFER_NULL_TECH note in features.conf.sample.

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

14 years agoCorrect double-free situation in manager output processing.
Kevin P. Fleming [Tue, 12 Jul 2011 22:53:53 +0000 (22:53 +0000)] 
Correct double-free situation in manager output processing.

The process_output() function calls ast_str_append() and xml_translate() on its
'out' parameter, which is a pointer to an ast_str buffer. If either of these
functions need to reallocate the ast_str so it will have more space, they will
free the existing buffer and allocate a new one, returning the address of the
new one. However, because process_output only receives a pointer to the ast_str,
not a pointer to its caller's variable holding the pointer, if the original
ast_str is freed, the caller will not know, and will continue to use it (and
later attempt to free it).

(reported by jkroon on #asterisk-dev)

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

14 years agosearch in the current context for 'a' and 'o' instead of 'default'
Matthew Nicholson [Tue, 12 Jul 2011 20:07:20 +0000 (20:07 +0000)] 
search in the current context for 'a' and 'o' instead of 'default'

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

14 years agoFix uninstall target, so that modules dir gets cleared again.
Jason Parker [Tue, 12 Jul 2011 19:38:44 +0000 (19:38 +0000)] 
Fix uninstall target, so that modules dir gets cleared again.

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

14 years agoAdded additional checks for mailbox / password beginning with '*' character
Matthew Jordan [Tue, 12 Jul 2011 19:10:34 +0000 (19:10 +0000)] 
Added additional checks for mailbox / password beginning with '*' character

A bug existed such that if a user entered a password with '*', and the extension 'a' did not exist, an invalid mailbox would be created and the user authenticated.  The code was changed to prevent this from occurring, and to prevent users from having mailboxes or passwords defined that begin with the '*' character.

(closes issue ASTERISK-17443)
Reported by: Kevin Scott Adams
Tested by: Matt Jordan

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

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

14 years agoUse 'printf' (POSIX issue 4) instead of 'echo -n', for portability.
Tilghman Lesher [Tue, 12 Jul 2011 15:35:46 +0000 (15:35 +0000)] 
Use 'printf' (POSIX issue 4) instead of 'echo -n', for portability.

The problem with using 'echo -n' is that it is not portable.  While BSD systems
required that the '-n' option be removed and interpreted, System V required
that all strings should be echoed with no interpretation of options.  This
fundamental difference of behavior means that it is never possible to use the
'-n' flag to echo in tests which are meant to be portable.

In this case, on Mac OS X 10.6, the /bin/sh shell builtin 'echo' uses the
System V semantics of the command, and thus the SHELL test failed on that
platform.

http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html#tag_04_41_16

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

14 years agoUpdate chan_gtalk to work with changed GMail-based calls
Terry Wilson [Mon, 11 Jul 2011 19:41:59 +0000 (19:41 +0000)] 
Update chan_gtalk to work with changed GMail-based calls

The messages sent by the GMail client have changed, but include the
old-style messages as well. This patch checks for this case and
uses the old-style offer.

(closes issue ASTERISK-18084)
Review: https://reviewboard.asterisk.org/r/1312/

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

14 years agoreset our buffer each iteration when doing variable substitution
Matthew Nicholson [Mon, 11 Jul 2011 13:53:59 +0000 (13:53 +0000)] 
reset our buffer each iteration when doing variable substitution

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

14 years agoProperly building the Debian armhf (HardFloat) port.
Tzafrir Cohen [Mon, 11 Jul 2011 10:56:23 +0000 (10:56 +0000)] 
Properly building the Debian armhf (HardFloat) port.

Remove the line that should have been removed in r327411.

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

14 years agofix building the Debian armhf (HardFloat) port
Tzafrir Cohen [Mon, 11 Jul 2011 10:46:34 +0000 (10:46 +0000)] 
fix building the Debian armhf (HardFloat) port

Fixes http://buildd.debian-ports.org/status/fetch.php?pkg=asterisk&arch=armhf&ver=1%3A1.8.4.4~dfsg-2&stamp=1309935385
(Missing pthreads)

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

14 years agoAdd .o files to svn:ignore property, since it's only ignored if locally configured...
Jason Parker [Fri, 8 Jul 2011 22:27:14 +0000 (22:27 +0000)] 
Add .o files to svn:ignore property, since it's only ignored if locally configured to do so.

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

14 years agoINVITE 403 Forbidden response always retransmits the maximum times.
Richard Mudgett [Fri, 8 Jul 2011 21:41:58 +0000 (21:41 +0000)] 
INVITE 403 Forbidden response always retransmits the maximum times.

Asterisk sends a 403 Forbidden response if authentication fails for an
INVITE as required.  However, it ignores the ACK and keeps retransmitting
the response.

* Made not delete the to-tag in the dialog so the expected ACK can be
matched with the dialog and stop the retransmissions.

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

14 years agoReset our ast_str before passing it on to dialplan function backends.
Matthew Nicholson [Fri, 8 Jul 2011 19:52:51 +0000 (19:52 +0000)] 
Reset our ast_str before passing it on to dialplan function backends.

It is possible for a dialplan backend to not modify the given buffer or ast_str
and still return success. This causes any previous value stored in the buffer
to be used as if the new function call provided it. Some functions also append
to the given buffer assuming it is empty.

The test_substitution unit test has also been modified to detect this problem.

(closes issue ASTERISK-17878)

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

14 years agoFix an error and add more log message info to help see why this fails on FreeBSD.
Russell Bryant [Fri, 8 Jul 2011 16:00:05 +0000 (16:00 +0000)] 
Fix an error and add more log message info to help see why this fails on FreeBSD.

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

14 years agoResolve some set-but-unused-variable warnings.
Russell Bryant [Fri, 8 Jul 2011 15:28:44 +0000 (15:28 +0000)] 
Resolve some set-but-unused-variable warnings.

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

14 years agoSome code cleanup in pbx.c
Richard Mudgett [Fri, 8 Jul 2011 01:08:05 +0000 (01:08 +0000)] 
Some code cleanup in pbx.c

* Mostly comment and format changes.

* ast_context_remove_extension_callerid() and ast_add_extension_nolock()
will write lock the found specific context.

* ast_context_find() will now tolerate a NULL name.

* Eliminated some inlined versions of find_context() and
find_context_locked().

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

14 years agolibgen.h is also needed on Darwin for basename(3)
Tilghman Lesher [Thu, 7 Jul 2011 19:17:19 +0000 (19:17 +0000)] 
libgen.h is also needed on Darwin for basename(3)

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

14 years agores_odbc patch by tilghman to fix integers with null values
Jonathan Rose [Thu, 7 Jul 2011 16:04:51 +0000 (16:04 +0000)] 
res_odbc patch by tilghman to fix integers with null values

Addresses some improper sql statements in res_odbc that would cause an update to fail on
realtime peers due to trying to set as "(NULL)" rather than an actual NULL.

(closes issue #1922STERISK-17791)
Reported by: marcelloceschia
Patches:
      20110505__issue19223.diff.txt uploaded by tilghman (license 14)

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

14 years agouse sips: or sip: depending on the transport in use when building reply digest
Matthew Nicholson [Thu, 7 Jul 2011 15:28:25 +0000 (15:28 +0000)] 
use sips: or sip: depending on the transport in use when building reply digest
URIs

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

14 years agomake the uri parameter used in reply digests more standards compliant in
Matthew Nicholson [Thu, 7 Jul 2011 15:25:49 +0000 (15:25 +0000)] 
make the uri parameter used in reply digests more standards compliant in
certain cases by prepending "sip:" or "sips:" to it

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

14 years agoReverts fix for timerfd locking issue.
David Vossel [Wed, 6 Jul 2011 15:26:49 +0000 (15:26 +0000)] 
Reverts fix for timerfd locking issue.

jrose discovered a performance issue with this
fix that prevents his analog phones from working
when using timerfd as a timing source.  Until
it is understood what is causing this performance
problem, this patch is being reverted.

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

14 years agoRemoving type attributes, as a change to menuselect makes them no longer necessary.
Tilghman Lesher [Wed, 6 Jul 2011 14:35:01 +0000 (14:35 +0000)] 
Removing type attributes, as a change to menuselect makes them no longer necessary.

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

14 years agoAdd the attribute "type" to each "<use>" for menuselect.
Tilghman Lesher [Tue, 5 Jul 2011 22:08:29 +0000 (22:08 +0000)] 
Add the attribute "type" to each "<use>" for menuselect.

This matters only when autoconf fails to detect that weak linking is supported.
External optional dependencies will become optional in both cases, as they are
removed at compile time when not detected.  However, runtime-optional modules
are made mandatory when weak linking is not found.  This change affects only
the external optional dependencies; previously, they were incorrectly required
when weak linking support was not detected.

Patches:
20110702__issue18062__asterisk_trunk.diff.txt by tilghman (License #5003)

Tested by: iasgoscouk

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

14 years agoUsed auth= parameter freed during "sip reload" causes crash.
Richard Mudgett [Tue, 5 Jul 2011 17:22:59 +0000 (17:22 +0000)] 
Used auth= parameter freed during "sip reload" causes crash.

If you use the auth= parameter and do a "sip reload" while there is an
ongoing call.  The peer->auth data points to free'd memory.

The patch does several things:

1) Puts the authentication list into an ao2 object for reference counting
to fix the reported crash during a SIP reload.

2) Converts the authentication list from open coding to AST list macros.

3) Adds display of the global authentication list in "sip show settings".

(closes issue ASTERISK-17939)
Reported by: wdoekes
Patches:
      jira_asterisk_17939_v1.8.patch (license #5621) patch uploaded by rmudgett

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

JIRA SWP-3526

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

14 years agoUpdated filestream destructor to block until move is complete when cache is used
Matthew Jordan [Tue, 5 Jul 2011 13:23:57 +0000 (13:23 +0000)] 
Updated filestream destructor to block until move is complete when cache is used

When a cache directory is used, the process is forked and a mv command is executed to move the temporary file to the permanent location.  This caused issues with voicemail, where a race condition occurred when the parent expected the file to be in the permanent location prior to the mv command completing.  The parent process is now blocked until the mv command completes.

(closes issue ASTERISK-17724)
Reported by: Adiren P.
Tested by: mjordan

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

14 years agoBetter way to get chan and pvt lock for issue ASTERISK-17431.
Richard Mudgett [Fri, 1 Jul 2011 21:07:22 +0000 (21:07 +0000)] 
Better way to get chan and pvt lock for issue ASTERISK-17431.

Redoes -r308945 for issue ASTERISK-17431 deadlock fix for
sip_set_udptl_peer() and sip_set_rtp_peer().

* Lock the channels in the defined order and avoid the need for a deadlock
avoidance loop.

* Lock the channel before getting the pointer to the private structure to
be sure that the pointer will not change due to a masquerade or channel
hangup.

* To preserve sanity, check that chan and p->owner are the same.  (Pointer
rearangements should not happen without the protection of locks because
bad things tend to happen otherwise.)

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

14 years agoMisc minor changes in chan_sip.
Richard Mudgett [Thu, 30 Jun 2011 20:39:45 +0000 (20:39 +0000)] 
Misc minor changes in chan_sip.

* Add load failure exit if primary SIP container(s) could not get created
in chan_sip.c:load_module().

* Removed a redundant static prototype.

* Some typos.

* Some whitespace.

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

14 years agoPatched voicemail user option for emailbody / emailsubject
Matthew Jordan [Thu, 30 Jun 2011 20:09:48 +0000 (20:09 +0000)] 
Patched voicemail user option for emailbody / emailsubject

Incorporated changes per ASTERISK-16795; updated unit tests to check for vmu->emailbody / vmu->emailsubject

(closes issue ASTERISK-16795)
Reported by: mdeneen
Tested by: mjordan

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

14 years agoFixes an issue with Music on Hold classes losing files in playlist when realtime...
Jonathan Rose [Thu, 30 Jun 2011 19:17:32 +0000 (19:17 +0000)] 
Fixes an issue with Music on Hold classes losing files in playlist when realtime is used.

The bug occurs rather intermittently and I relied on the reporters to test the patch.
After a sanity check and some testing, I'm giving it an OK.

(closes issue ASTERISK-17875)
Reported by: David Cunningham
Patches:
      res_musiconhold.c.mohrt17875_v1 uploaded by Igor Goncharovsky (license #5009)

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

14 years agochan_sip: cleanup from the introduction of ast_str
Kinsey Moore [Wed, 29 Jun 2011 21:49:21 +0000 (21:49 +0000)] 
chan_sip: cleanup from the introduction of ast_str

Remove the length field from sip_req and sip_pkt in chan_sip since they are
redundant (ast_str holds its own length) and refactor the necessary functions.

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

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

14 years agoFixes timerfd locking issue.
David Vossel [Wed, 29 Jun 2011 18:59:33 +0000 (18:59 +0000)] 
Fixes timerfd locking issue.

(closes ASTERISK-17867, ASTERISK-17415)
Patches:
     fix uploaded by kobaz
https://reviewboard.asterisk.org/r/1255/

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

14 years agoFixed some error exit cleanup in app_queue.c.
Richard Mudgett [Wed, 29 Jun 2011 18:16:45 +0000 (18:16 +0000)] 
Fixed some error exit cleanup in app_queue.c.

* Fixed error exit cleanup in app_queue.c copy_rules() and
reload_queue_rules().

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

14 years agoResponse to QueueRule manager command does not contain ActionID if it was specified.
Richard Mudgett [Wed, 29 Jun 2011 18:05:15 +0000 (18:05 +0000)] 
Response to QueueRule manager command does not contain ActionID if it was specified.

* Add ActionID support as documented for the QueueRule AMI action.

* Remove documentation for ActionID with the Queues AMI action.  The
output does not follow normal AMI response output and there is no place to
put an ActionID header.

(closes issue AST-602)
Reported by: Vlad Povorozniuc
Patches:
      jira_ast_602_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Vlad Povorozniuc, rmudgett

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

JIRA SWP-3575

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

14 years agomake framehooks prevent native bridging (for real this time)
Matthew Nicholson [Wed, 29 Jun 2011 16:18:39 +0000 (16:18 +0000)] 
make framehooks prevent native bridging (for real this time)

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

14 years agodon't do native/remote bridging if a framehook is active on the channel
Matthew Nicholson [Wed, 29 Jun 2011 15:34:47 +0000 (15:34 +0000)] 
don't do native/remote bridging if a framehook is active on the channel

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

14 years agoFix random misspelling noticed on asterisk-users.
Kevin P. Fleming [Tue, 28 Jun 2011 21:50:43 +0000 (21:50 +0000)] 
Fix random misspelling noticed on asterisk-users.

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

14 years agoFixes locking inversion caused by holding sip pvt lock during async_goto.
David Vossel [Tue, 28 Jun 2011 20:31:00 +0000 (20:31 +0000)] 
Fixes locking inversion caused by holding sip pvt lock during async_goto.

(closes ASTERISK-17352)

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

14 years agoMerged revisions 325277 via svnmerge from
Terry Wilson [Tue, 28 Jun 2011 20:07:51 +0000 (20:07 +0000)] 
Merged revisions 325277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r325277 | twilson | 2011-06-28 15:06:16 -0500 (Tue, 28 Jun 2011) | 9 lines

  Merged revisions 325275 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r325275 | twilson | 2011-06-28 15:03:19 -0500 (Tue, 28 Jun 2011) | 2 lines

    Don't leak SIP username information
  ........
................

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

14 years agoUse the device name and not the channel name to initialize the device state.
Richard Mudgett [Tue, 28 Jun 2011 17:30:16 +0000 (17:30 +0000)] 
Use the device name and not the channel name to initialize the device state.

Correct ASTERISK-11323 implementation as I don't see how it ever worked as
claimed when it used the channel name and not the device name.

(issue ASTERISK-11323)

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

14 years agoFixes moh reload breaking custom mode moh classes when the config file is untouched
Jonathan Rose [Tue, 28 Jun 2011 15:46:29 +0000 (15:46 +0000)] 
Fixes moh reload breaking custom mode moh classes when the config file is untouched

(closes issue ASTERISK-17730)
Reported by: sdolloff

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

14 years agoRemove line from prep_tarball that kills mkrelease.
Leif Madsen [Tue, 28 Jun 2011 15:12:00 +0000 (15:12 +0000)] 
Remove line from prep_tarball that kills mkrelease.

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

14 years agoSave and restore errno from within signal handlers.
Tilghman Lesher [Mon, 27 Jun 2011 16:30:50 +0000 (16:30 +0000)] 
Save and restore errno from within signal handlers.

This is recommended by the POSIX standard, as well as by the sigaction(2) manpage
for various platforms that we support (e.g. Mac OS X).

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

14 years agoWhen subscribing MWI to an unsolicited mailbox the first notification is incorrect.
Richard Mudgett [Mon, 27 Jun 2011 15:37:19 +0000 (15:37 +0000)] 
When subscribing MWI to an unsolicited mailbox the first notification is incorrect.

A remote peer subscribed to MWI with the unsolicited option and a local
phone subscribed to the remote mailbox.  The notify message-summary events
are sent correctly except for the first one when subscribing, which will
always be 0.  This means the phone MWI indicator will be wrong until the
mailbox read/unread count changes and the event is fired.

Looks like this is a regression from ASTERISK-16149.

* Fix the logic to check the cache and if allowed then fallback to
manually counting mailbox messages.

(closes issue ASTERISK-17997)
Reported by: rsw686
Patches:
      jira_asterisk_17997_v1.8.patch (license #5621) uploaded by rmudgett
Tested by: rsw686

JIRA SWP-3551

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

14 years agoSyntax errors in dialplan do not display the file name.
Richard Mudgett [Fri, 24 Jun 2011 20:46:01 +0000 (20:46 +0000)] 
Syntax errors in dialplan do not display the file name.

When issuing the CLI command "dialplan reload" syntax errors and warnings
are displayed on the console.  The offending line number is displayed on
the console, but the file name is not displayed.  Errors caught in
main/config.c do display the file name.

(closes issue ASTERISK-17985)
Reported by: ulogic
Patches:
      pbx_config.patch uploaded by ulogic (License #5685) modified format
Tested by: rmudgett

JIRA SWP-3554

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

14 years agoDTMF wasn't being logged on connected consoles when enabled in logger.conf
Jonathan Rose [Fri, 24 Jun 2011 16:48:06 +0000 (16:48 +0000)] 
DTMF wasn't being logged on connected consoles when enabled in logger.conf

Previously in order for DTMF to be logged in a connected console session, the user would
have to do logger set channel DTMF on.  This corrects that so that it is on by default.
This issue was caused by an off by one error incurred by a logger level count of 6 in
logger.h where it should have been 7.

(closes issue: ASTERISK-17974)
Reported by: Luke H

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

14 years agoFixes sip crash when calling remove_uri_parameters with NULL
David Vossel [Thu, 23 Jun 2011 18:31:00 +0000 (18:31 +0000)] 
Fixes sip crash when calling remove_uri_parameters with NULL

AST-2011-009

(closes issue ASTERISK-18017)
Reported by: jaredmauch

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

14 years agoMerged revisions 324643 via svnmerge from
Kinsey Moore [Thu, 23 Jun 2011 18:29:17 +0000 (18:29 +0000)] 
Merged revisions 324643 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r324643 | kmoore | 2011-06-23 13:21:12 -0500 (Thu, 23 Jun 2011) | 4 lines

  Addresses AST-2011-008, memory corruption and remote crash in SIP driver.

  AST-2011-008
........

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

14 years agoMerged revisions 324634 via svnmerge from
David Vossel [Thu, 23 Jun 2011 18:23:21 +0000 (18:23 +0000)] 
Merged revisions 324634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines

  Merged revisions 324627 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines

    Addresses AST-2011-010, remote crash in IAX2 driver

    Thanks to twilson for identifying the issue and providing the patches.

    AST-2011-010
  ........
................

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

14 years agoRemove tests for parsing address with invalid port
Terry Wilson [Thu, 23 Jun 2011 03:10:38 +0000 (03:10 +0000)] 
Remove tests for parsing address with invalid port

getaddrinfo on OS X returns with EAI_NONAME error when passed a port
greater than 65535. Linux throws no error, so remove the tests for now.

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

14 years agoUse correct variable for text SRTP media.
Richard Mudgett [Wed, 22 Jun 2011 19:16:29 +0000 (19:16 +0000)] 
Use correct variable for text SRTP media.

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

14 years agoStop sending IPv6 link-local scope-ids in SIP messages
Terry Wilson [Wed, 22 Jun 2011 18:52:04 +0000 (18:52 +0000)] 
Stop sending IPv6 link-local scope-ids in SIP messages

The idea behind the patch listed below was used, but in a more targeted manner.
There are now address stringification functions for addresses that are meant to
be sent to a remote party. Link-local scope-ids only make sense on the machine
from which they originate and so are stripped in the new functions.

There is also a host sanitization function added to chan_sip which is used
for when peer and dialog tohost fields or sip_registry hostnames are used to
craft a SIP message.

Also added are some basic unit tests for netsock2 address parsing.

(closes issue ASTERISK-17711)
Reported by: ch_djalel
Patches:
      asterisk-1.8.3.2-ipv6_ll_scope.patch uploaded by ch_djalel (license 1251)

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

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

14 years agoTimout or error on INFO or MESSAGE transaction causes call to be lost.
Richard Mudgett [Wed, 22 Jun 2011 18:41:20 +0000 (18:41 +0000)] 
Timout or error on INFO or MESSAGE transaction causes call to be lost.

When exchanging INFO messages within a call, 4xx error causes the call to
be disconnected although RFC 2976 explicitly states that such transactions
do not modify the state of the dialog.

When exchanging MESSAGE messages within a call, 4xx error causes the call
to be disconnected.  To provide least surprise, we should not disconnect
the call since a MESSAGE is like INFO in this case.  (Implied by RFC 3428
Section 2)

(closes issue ASTERISK-17901)
Reported by: neutrino88

Review: https://reviewboard.asterisk.org/r/1257/
Review: https://reviewboard.asterisk.org/r/1258/

JIRA SWP-3486

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

14 years agoComments and whitespace in chan_sip.c
Richard Mudgett [Wed, 22 Jun 2011 18:26:55 +0000 (18:26 +0000)] 
Comments and whitespace in chan_sip.c

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

14 years agoFixes locking inversion issue in ast_async_goto()
David Vossel [Tue, 21 Jun 2011 20:11:52 +0000 (20:11 +0000)] 
Fixes locking inversion issue in ast_async_goto()

During this function we can not hold the "chan" lock while
doing the masquerade, the explicit goto on the tmp chan, or
the channel alloc.  Instead we need to get the channel lock,
store off information about the channel that we need, and
then let the channel lock go for the remainder of the function.

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

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

14 years agoConfBridge does not handle hangup properly
Kinsey Moore [Tue, 21 Jun 2011 16:09:14 +0000 (16:09 +0000)] 
ConfBridge does not handle hangup properly

When playing back a prompt to a channel, confbridge neglects to check for
hangup events causing lockup condititions for hangups that occur before
actually joining the conference.  This change ensures that the user is removed
from the conference in the event of a premature hangup.

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

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

14 years agoRemove extra 'the'.
Leif Madsen [Mon, 20 Jun 2011 18:12:32 +0000 (18:12 +0000)] 
Remove extra 'the'.
Reported by Vlad Povorozniuc

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

14 years agoRevert previous merge which had extra changes.
Leif Madsen [Mon, 20 Jun 2011 18:11:09 +0000 (18:11 +0000)] 
Revert previous merge which had extra changes.

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

14 years agoRemove extra 'the'.
Leif Madsen [Mon, 20 Jun 2011 18:07:44 +0000 (18:07 +0000)] 
Remove extra 'the'.
Reported by Vlad Povorozniuc

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

14 years agoIgnore media offers with a port of 0
Terry Wilson [Mon, 20 Jun 2011 17:33:07 +0000 (17:33 +0000)] 
Ignore media offers with a port of 0

Section 5.1 of RFC3264 states:
  A port number of zero in the offer indicates that the stream is offered
  but MUST NOT be used.

(closes issue ASTERISK-17845)
Reported by: jacco
Patches:
      issue19281_2.patch uploaded by jacco (license 1277)
Tested by: jacco, twilson

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

14 years agoAdd Username and Secret fields to manager Login action.
Leif Madsen [Fri, 17 Jun 2011 18:51:16 +0000 (18:51 +0000)] 
Add Username and Secret fields to manager Login action.
Pointed out by Vlad Povorozniuc

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

14 years agoFix typo in documentation.
Leif Madsen [Fri, 17 Jun 2011 18:38:40 +0000 (18:38 +0000)] 
Fix typo in documentation.
Pointed out by Vlad Povorozniuc

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

14 years agoAdd header string to libpri debug output.
Richard Mudgett [Fri, 17 Jun 2011 18:23:19 +0000 (18:23 +0000)] 
Add header string to libpri debug output.

Add header string to libpri debug output so the libpri output can be
found/extracted easier from huge debug trace files.

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

14 years agoFix grammar in documentation for Goto() and GotoIf()
Leif Madsen [Fri, 17 Jun 2011 15:14:54 +0000 (15:14 +0000)] 
Fix grammar in documentation for Goto() and GotoIf()
(closes issue ASTERISK-18023)
Reported by: Tim Osman

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

14 years agoShame on me
Terry Wilson [Thu, 16 Jun 2011 22:41:01 +0000 (22:41 +0000)] 
Shame on me

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

14 years agoLock the channel before calling the setoption callback
Terry Wilson [Thu, 16 Jun 2011 22:35:41 +0000 (22:35 +0000)] 
Lock the channel before calling the setoption callback

The channel needs to be locked before calling these callback functions. Also,
sip_setoption needs to lock the pvt and a check p->rtp is non-null before using
it.

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

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

14 years agoThe test_event unit test is occasionally failing.
Richard Mudgett [Thu, 16 Jun 2011 18:12:32 +0000 (18:12 +0000)] 
The test_event unit test is occasionally failing.

Wait for the special posted event to process before adding a new
subscription.

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

14 years agoDon't assume ASTDBDIR exists
Terry Wilson [Thu, 16 Jun 2011 15:58:22 +0000 (15:58 +0000)] 
Don't assume ASTDBDIR exists

It most likely doesn't on FreeBSD

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

14 years agoRemove now-useless cast of ARRAY_LEN
Terry Wilson [Wed, 15 Jun 2011 20:03:58 +0000 (20:03 +0000)] 
Remove now-useless cast of ARRAY_LEN

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

14 years agoMake ARRAY_LEN() return the same type on x86 and x86_64 systems
Terry Wilson [Wed, 15 Jun 2011 19:58:18 +0000 (19:58 +0000)] 
Make ARRAY_LEN() return the same type on x86 and x86_64 systems

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

14 years agoFix more ARRAY_LEN format string issues
Terry Wilson [Wed, 15 Jun 2011 19:45:20 +0000 (19:45 +0000)] 
Fix more ARRAY_LEN format string issues

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

14 years agoMerged revisions 323733 via svnmerge from
Terry Wilson [Wed, 15 Jun 2011 18:21:52 +0000 (18:21 +0000)] 
Merged revisions 323733 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r323733 | twilson | 2011-06-15 13:13:00 -0500 (Wed, 15 Jun 2011) | 16 lines

  Merged revisions 323732 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r323732 | twilson | 2011-06-15 13:06:24 -0500 (Wed, 15 Jun 2011) | 9 lines

    Fix DYNAMIC_FEATURES

    DYNAMIC_FEATURES were broken by a recent DTMF change. This patch makes
    sure that dynamic features are also checked when deciding whether or not
    to pass DTMF through or store it for interpreting.

    (closes issue ASTERISK-17914)
    Reported by: vrban
  ........
................

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

14 years agoAdds locking to find_table in res_configure_pgsql to prevent a crash.
Jonathan Rose [Wed, 15 Jun 2011 17:42:42 +0000 (17:42 +0000)] 
Adds locking to find_table in res_configure_pgsql to prevent a crash.

Bryonclark described the problem as occuring during this function because of multiple
simultaneous database operations causing corruption against a pgsqlConn object.

(closes issue ASTERISK-17811)
Reported by: byronclark
Patches:
      pgsql_find_table_locking.patch uploaded by byronclark (license 1200)

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

14 years agoCast ARRAY_LEN to size_t for ast_logging
Terry Wilson [Wed, 15 Jun 2011 17:09:51 +0000 (17:09 +0000)] 
Cast ARRAY_LEN to size_t for ast_logging

32-bit and 64-bit machines return different types for ARRAY_LEN(), so cast
it before using in a format string.

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

14 years agoAdd a test to the event unit tests to catch ASTERISK-18002.
Richard Mudgett [Wed, 15 Jun 2011 16:43:31 +0000 (16:43 +0000)] 
Add a test to the event unit tests to catch ASTERISK-18002.

The new tests check to see if there are ANY subscribers to the event type
when ast_event_check_subscriber() is not passed any specific ie values.

(issue ASTERISK-18002)

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

14 years ago[regression] Voicemail MWI is no longer sent.
Richard Mudgett [Wed, 15 Jun 2011 16:43:18 +0000 (16:43 +0000)] 
[regression] Voicemail MWI is no longer sent.

When leaving a voicemail, the MWI message is never sent.  The same thing
happens when checking a voicemail and marking it as read.

If you restart Asterisk, everything comes up at that state correctly, but
changes to the messages in voicemail causes the light to not be set
appropriately.  Very easy to reproduce.

* Made ast_event_check_subscriber() return TRUE if there are ANY
subscribers to an event type when there are no restricting ie values
passed.  This allows an event being queued to be queued.

(closes issue ASTERISK-18002)
Reported by: lmadsen
Tested by: lmadsen, irroot
Patches:
     jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621)

(closes issue ASTERISK-18019)

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