]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
12 years agoFix valgrind found memcpy issues in codec_ilbc.
Richard Mudgett [Tue, 25 Sep 2012 17:21:08 +0000 (17:21 +0000)] 
Fix valgrind found memcpy issues in codec_ilbc.

Valgrind found codec_ilbc using memcpy instead of memmove for overlapping
memory blocks.

(issue ASTERISK-19890)
(closes issue ASTERISK-20231)
Reported by: Walter Doekes
Patches:
      ASTERISK-20231.patch (license #5674) patch uploaded by Walter Doekes
........

Merged revisions 373640 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373645 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoMake rebuild GSM, ilbc, or lpc10 codecs if the respective sources change.
Richard Mudgett [Tue, 25 Sep 2012 16:56:54 +0000 (16:56 +0000)] 
Make rebuild GSM, ilbc, or lpc10 codecs if the respective sources change.
........

Merged revisions 373618 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373633 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agochan_sip: Set Quality of Service for video rtp instance
Jonathan Rose [Tue, 25 Sep 2012 16:31:41 +0000 (16:31 +0000)] 
chan_sip: Set Quality of Service for video rtp instance

(closes issue ASTERISK-20201)
Reported by: ddkprog
Patches:
    chan_sip.c.diff uploaded by ddkprog (license 6008)
........

Merged revisions 373617 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373631 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years ago"He who go through turnstile sideways is going to Bangkok"
Mark Michelson [Tue, 25 Sep 2012 14:12:05 +0000 (14:12 +0000)] 
"He who go through turnstile sideways is going to Bangkok"

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

12 years agoFix documentation for default username in res_odbc
Kinsey Moore [Tue, 25 Sep 2012 13:29:02 +0000 (13:29 +0000)] 
Fix documentation for default username in res_odbc

This was previously stated to be "root", but is actually the name of
the context if unspecified.

(closes issue ASTERISK-20258)
Reported by: Stefan x
........

Merged revisions 373578 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373579 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix an issue where a caller to ast_write on a MulticastRTP channel would determine...
Joshua Colp [Tue, 25 Sep 2012 12:07:14 +0000 (12:07 +0000)] 
Fix an issue where a caller to ast_write on a MulticastRTP channel would determine it failed when in reality it did not.

When sending RTP packets via multicast the amount of data sent is stored in a variable and returned
from the write function. This is incorrect as any non-zero value returned is considered a failure while
a return value of 0 is success. For callers (such as ast_streamfile) that checked the return value
they would have considered it a failure when in reality nothing went wrong and it was actually a success.

The write function for the multicast RTP engine now returns -1 on failure and 0 on success, as it should.

(closes issue ASTERISK-17254)
Reported by: wybecom
........

Merged revisions 373550 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373551 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRevert change to res_rtp_asterisk committed in r373236 (1.8)
Matthew Jordan [Mon, 24 Sep 2012 22:17:58 +0000 (22:17 +0000)] 
Revert change to res_rtp_asterisk committed in r373236 (1.8)

The change committed in r373236 attempted to account for endpoints that
increased their RTP timestamp in DTMF end of event re-transmissions.  This
change attempted to make Asterisk continue to work with endpoints that
failed to follow the RFC while maintaining the fix that allowed for out of
order DTMF to be handled.  Unfortunately, there is no free lunch, and this
patch broke any system that sent DTMF immediately after an RTP session was
established or when an SSRC is updated.  As such, that patch is being
reverted for the previous behavior.

Endpoints that erroneously increase the RTP timestamp in DTMF end of event
packets will not work properly with Asterisk.

(issue ASTERISK-20424)
........

Merged revisions 373504 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373505 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoBe consistent, send From: "Anonymous" <sip:anonymous@anonymous.invalid>
Richard Mudgett [Mon, 24 Sep 2012 22:12:39 +0000 (22:12 +0000)] 
Be consistent, send From: "Anonymous" <sip:anonymous@anonymous.invalid>

When setting CALLERID(pres)=unavailable in the dialplan, the From header
in the SIP message contains "Anonymous" <sip:Anonymous@anonymous.invalid>.
For consistency, Asterisk should use a lowercase a in the userpart of the
URI.

* Make the From header use a lowercase A in the userpart of the anonymous
URI.

(closes issue ASTERISK-19838)
Reported by: Antti Yrjola
Patches:
      chan_sip_patch_ASTERISK-19838.patch (license #6383) patch uploaded by Antti Yrjola
........

Merged revisions 373500 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373501 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agofunc_audiohookinherit: Document some missed sources.
Jonathan Rose [Mon, 24 Sep 2012 21:12:28 +0000 (21:12 +0000)] 
func_audiohookinherit: Document some missed sources.

This patch also mentions that AUDIOHOOK_INHERIT can be used to
transfer MixMonitor audiohooks. There is also wiki that addresses
audiohooks and the use of AUDIOHOOK_INHERIT at the following link:
https://wiki.asterisk.org/wiki/display/AST/Audiohooks

(closes issue ASTERISK-18220)
Reported by: Ishfaq Malik
........

Merged revisions 373467 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373468 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix potential reentrancy problems in chan_sip.
Richard Mudgett [Mon, 24 Sep 2012 21:08:16 +0000 (21:08 +0000)] 
Fix potential reentrancy problems in chan_sip.

Asterisk v1.8 and later was not as vulnerable to this issue.

* Made find_call() lock each private as it processes the found dialogs.
(Primary cause of ABE-2876)

* Made the other functions that traverse the dialogs container lock each
private as it examines them.

* Fix race condition in sip_call() if the thread that sent the INVITE is
held up long enough for a response to be processed.  The p->initid for the
INVITE retransmission could be added after it was canceled by the response
processing.

* Made __sip_destroy() clean up resource pointers after freeing.  This is
primarily defensive in case someone has a stale private pointer.

* Removed redundant memset() in reqprep().  The call to init_req() already
does the memset() and is the first reference to req in reqprep().

* Removed useless set of req.method in transmit_invite().  The calls to
initreqprep() and reqprep() have to do this because they memset() the req.

JIRA ABE-2876

..........

Merged -r373423 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

Merged revisions 373424 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373466 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix a deadlock caused by a race condition between removing a hint and reloading the...
Joshua Colp [Mon, 24 Sep 2012 19:21:57 +0000 (19:21 +0000)] 
Fix a deadlock caused by a race condition between removing a hint and reloading the dialplan and subscribing to the removed hint.

If conditions were right it was possible for both the PBX core and chan_sip to deadlock by both having a lock that the other
wants. In the case of the PBX core it had the contexts lock and wanted a SIP dialog lock, while in the case of chan_sip it
had the SIP dialog lock and wanted the contexts lock.

This fix unlocks the SIP dialog before getting the extension state so that the other thread will not block on trying to lock
it. Once the extension state is retrieved the SIP dialog is locked again and life carries on.

As the SIP dialog is reference counted it is not possible for it to go away after unlocking.

(closes issue ASTERISK-20437)
Reported by: jhutchins
........

Merged revisions 373438 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373440 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix an issue with H.264 format attribute comparison and fix an issue with improper...
Joshua Colp [Mon, 24 Sep 2012 14:25:43 +0000 (14:25 +0000)] 
Fix an issue with H.264 format attribute comparison and fix an issue with improper SDP being produced.

The H.264 format attribute module compares two format attribute structures to determine if they are
compatible or not. In some instances it was possible for this check to determine that both structures
were incompatible when they actually should be considered compatible. This check has now been made even
more permissive by assuming that if no attribute information is available the two structures are compatible.
If both structures contain attribute information a base level comparison of the H.264 IDC value is done to
see if they are compatible or not.

The above issue uncovered a secondary issue in chan_sip where the SDP being produced would be incorrect if
the formats were considered incompatible. This has now been fixed by checking that all information required
to produce the SDP is available instead of assuming it is.

(closes issue ASTERISK-20464)
Reported by: Leif Madsen

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

12 years agores_rtp_asterisk: Make TURN and STUN server configurations consistent.
Brent Eagles [Mon, 24 Sep 2012 12:33:10 +0000 (12:33 +0000)] 
res_rtp_asterisk: Make TURN and STUN server configurations consistent.

This patch removes the turnport configuration property and changes the
turnaddr property to be a combined host[:port] configuration string. The
patch also modifies the documentation in the example configuration to
reflect the property changes and adds some additional text indicating how
the STUN port is configured.

(closes issue ASTERISK-20344)
Reported by: beagles
Tested by: beagles
Review: https://reviewboard.asterisk.org/r/2111/

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

12 years agoiax2-provision: Fix improper return on failed cache retrieval
Jonathan Rose [Fri, 21 Sep 2012 19:29:12 +0000 (19:29 +0000)] 
iax2-provision: Fix improper return on failed cache retrieval

(closes issue ASTERISK-20337)
reported by: John Covert
Patches:
    iax2-provision.c.patch uploaded by John Covert (license 5512)
........

Merged revisions 373342 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373343 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoapp_queue: Make queue reload members and variants of that work
Jonathan Rose [Fri, 21 Sep 2012 15:31:06 +0000 (15:31 +0000)] 
app_queue: Make queue reload members and variants of that work

Prior to this patch, 'queue reload members' cli command did not
work at all. This also affects the manager function 'QueueReload'
when supplied with the 'members: yes' field.

(closes issue AST-956)
Reported by: John Bigelow
........

Merged revisions 373298 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373300 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix incorrect MeetME conference bridge reference count decrementing and sometimes...
Joshua Colp [Thu, 20 Sep 2012 19:16:02 +0000 (19:16 +0000)] 
Fix incorrect MeetME conference bridge reference count decrementing and sometimes premature destruction.

When using the 'e' or 'E' option to MeetMe the configured conference bridges are loaded and examined to see
if any are empty. If no conference bridges are empty the caller is prompted to enter the number of one.
This operation left around a pointer to the last created conference bridge still containing participants.
When the caller that was not able to find any empty conference bridge hung up this pointer was disposed of
and the reference count of the conference bridge decremented. If there was only a single participant in the
conference bridge it was ultimately destroyed prematurely.

(closes issue AST-994)
Reported by: John Bigelow
........

Merged revisions 373242 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373245 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoapp_queue: Support an 'agent available' hint
Matthew Jordan [Thu, 20 Sep 2012 18:59:05 +0000 (18:59 +0000)] 
app_queue: Support an 'agent available' hint

Sets INUSE when no free agents, NOT_INUSE when an agent is free.

modifes handle_statechange() scan members loop to scan for a free agent
and updates the Queue:queuename_avial devstate.

Previously exited early if the member was found in the queue.

Now Exits later when both a member was found, and a free agent was found.

alecdavis (license 585)
Reported by: Alec Davis
Tested by: alecdavis

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

~~~~

Support all ways a member can be available for 'agent available' hints

Alec's patch in r373188 added the ability to subscribe to a hint for when
Queue members are available.  This patch modifies the check that determines
when a Queue member is available by refactoring the availability checks in
num_available_members into a shared function is_member_available.  This
should now handle the ringinuse option, as well as device state values
other than AST_DEVICE_NOT_INUSE.

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

12 years agoWhen processing RFC 2833 DTMF, accomodate increasing timestamps in End events
Matthew Jordan [Thu, 20 Sep 2012 18:44:11 +0000 (18:44 +0000)] 
When processing RFC 2833 DTMF, accomodate increasing timestamps in End events

While endpoints should not be changing the source timestamp between DTMF event
packets, the fact is there exists those endpoints that do exactly that.  To
work around this, we absorb timestamps within the expected re-transmit period.
Note that this period only affects End of Event packets, so it should not
prevent the detection of new DTMF digits that happen to arrive right on top
of each other.

(closes issue ASTERISK-20424)
Reported by: Vladimir Mikhelson
Tested by: mjordan, Vladimir Mikhelson

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

Merged revisions 373236 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373237 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAdd queue monitoring hints
Matthew Jordan [Thu, 20 Sep 2012 18:36:11 +0000 (18:36 +0000)] 
Add queue monitoring hints

This patch adds support for hints on a queue.  Hints can be added using
the nomenclature 'Queue:name', where name is the name of the queue being
monitored.

This nifty feature was done by Alec Davis.

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

Reported by: Alec Davis
Tested by: alecdavis
patches:
  review1619.diff2 by alecdavis (license 585)

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

12 years agoAdd support for DTLS-SRTP to res_rtp_asterisk and chan_sip.
Joshua Colp [Thu, 20 Sep 2012 18:18:47 +0000 (18:18 +0000)] 
Add support for DTLS-SRTP to res_rtp_asterisk and chan_sip.

As mentioned on the review for this, WebRTC has moved towards choosing
DTLS-SRTP as the mechanism for key exchange for SRTP. This commit adds
support for this but makes it available for normal SIP clients as well.

Testing has been done to ensure that this introduces no regressions with
existing behavior and also that it functions as expected.

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

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

12 years agoNamed call pickup groups. Fixes, missing functionality, and improvements.
Richard Mudgett [Thu, 20 Sep 2012 17:15:05 +0000 (17:15 +0000)] 
Named call pickup groups. Fixes, missing functionality, and improvements.

* ASTERISK-20383
Missing named call pickup group features:

CHANNEL(callgroup) - Need CHANNEL(namedcallgroup)
CHANNEL(pickupgroup) - Need CHANNEL(namedpickupgroup)
Pickup() - Needs to also select from named pickup groups.

* ASTERISK-20384
Using the pickupexten, the pickup channel selection could fail even though
there was a call it could have picked up.  In a call pickup race when
there are multiple calls to pickup and two extensions try to pickup a
call, it is conceivable that the loser will not pick up any call even
though it could have picked up the next oldest matching call.

Regression because of the named call pickup group feature.

* See ASTERISK-20386 for the implementation improvements.  These are the
changes in channel.c and channel.h.

* Fixed some locking issues in CHANNEL().

(closes issue ASTERISK-20383)
Reported by: rmudgett
(closes issue ASTERISK-20384)
Reported by: rmudgett
(closes issue ASTERISK-20386)
Reported by: rmudgett
Tested by: rmudgett

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

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

12 years agoCorrect handling of unknown SDP stream types
Kinsey Moore [Thu, 20 Sep 2012 13:00:09 +0000 (13:00 +0000)] 
Correct handling of unknown SDP stream types

When the patch to handle arbitrary SDP stream arrangements went into
Asterisk, it also included an ability to transparently decline unknown
stream types. The scanf calls used were not checked properly causing
this part of the functionality to be broken.

(closes issue ASTERISK-20203)

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

12 years agoBlocked revisions 373196
Matthew Jordan [Thu, 20 Sep 2012 02:40:22 +0000 (02:40 +0000)] 
Blocked revisions 373196

........
Ensure that all ConfBridge sounds can be set using CONFBRIDGE function

The CONFBRIDGE function can be used to set the sounds in a ConfBridge
bridge profile.  Unfortunately, three sounds were missed in the portion
of the code that applies the settings passed in from the function:
sound_only_one, join, and leave.  This patch makes sure that the sounds
passed from the function are applied to the bridge profile.

(closes issue ASTERISK-20404)
Reported by: univ
Tested by: mjordan

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

12 years agoDon't crash when passing a NULL message to __astman_get_header.
Sean Bright [Tue, 18 Sep 2012 20:14:01 +0000 (20:14 +0000)] 
Don't crash when passing a NULL message to __astman_get_header.

Before this commit, __astman_get_header would blindly dereference the passed in
'struct message *' to traverse the header list.  There are cases, however, such
as '*CLI> sip qualify peer foo' where the message pointer is NULL, so we need
to check for that.
........

Merged revisions 373131 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373132 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAdd -fnested-functions compile flag, if needed.
David M. Lee [Tue, 18 Sep 2012 15:47:01 +0000 (15:47 +0000)] 
Add -fnested-functions compile flag, if needed.

In order to use nested functions on some versions of GCC (e.g. GCC on OS X),
the -fnested-functions flag must be passed to the compiler. This patch adds
detection logic to ./configure to add the flag if necessary. It also adds
a comment to utils.h as to why the nested function needs a prototype.

(closes issue ASTERISK-20399)
Reported by: David M. Lee
Review: https://reviewboard.asterisk.org/r/2102/

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

12 years agoMade companding law for SS7 calls only determined by SS7 signaling type.
Richard Mudgett [Sat, 15 Sep 2012 00:27:06 +0000 (00:27 +0000)] 
Made companding law for SS7 calls only determined by SS7 signaling type.

For SS7, the companding law for a call was chosen inconsistently depending
upon ss7type (ITU vs ANSI) and the DAHDI companding default (T1 vs E1).
For incoming calls, the companding law was determined by ss7type.  For
outgoing calls, the companding law was determined by the DAHDI default.
With the wrong combination you would get A-law/u-law conflicts.  An
A-law/u-law conflict sounds like bad static on the line.

SS7 ITU  signaling with E1 line: ok
SS7 ITU  signaling with T1 line: noise
SS7 ANSI signaling with E1 line: noise
SS7 ANSI signaling with T1 line: ok

* Fix the companding law used to be determined by the SS7 signaling type
only.
........

Merged revisions 373090 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373101 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoResolve memory leaks in TLS initialization and TLS client connections
Matthew Jordan [Fri, 14 Sep 2012 19:50:40 +0000 (19:50 +0000)] 
Resolve memory leaks in TLS initialization and TLS client connections

This patch resolves two sources of memory leaks when using TLS in Asterisk:
1) It removes improper initialization (and multiple re-initializations) of
   portions of the SSL library.  Asterisk calls SSL_library_init and
   SSL_load_error_strings during SSL initialization; collectively this
   obviates the need for calling any of the following during initialization
   or client connection handling:
   * ERR_load_crypto_strings (handled by SSL_load_error_strings)
   * OpenSSL_add_all_algorithms (synonym for SSL_library_init)
   * SSLeay_add_ssl_algorithms (synonym for SSL_library_init)
2) Failure to completely clean up all memory allocated by Asterisk and by
   the SSL library for TLS clients.  This included not freeing the SSL_CTX
   object in the SIP channel driver, as well as not clearing the error
   stack when the TLS client exited.

Note that these memory leaks were found by Thomas Arimont, and this patch
was essentially written by him with some minor tweaks.

(closes issue AST-889)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
patches:
  (bugAST-889.patch) by Thomas Arimont (license 5525)

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

Merged revisions 373061 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373062 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoBlocked revisions 373059
Matthew Jordan [Fri, 14 Sep 2012 18:33:06 +0000 (18:33 +0000)] 
Blocked revisions 373059

........
Constify __ao2_ref_debug in astobj2

When REF_DEBUG is enabled in certain files - most notably ccss.c - the 'tag'
parameter passed to __ao2_ref_debug will be a const char *.  The function
currently expects that parameter to not be const.  This causes a warning
when compiling, as the const qualifier is being discarded.  With dev-mode
enabled, this prevents compiling Asterisk.

This patch makes __ao2_ref_debug's tag and file parameters const.

(closes issue ASTERISK-20408)
Reported by: mjordan
........

Merged revisions 372959 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

12 years agoFixed make clean when configured --disable-asteriskssl
David M. Lee [Thu, 13 Sep 2012 20:04:51 +0000 (20:04 +0000)] 
Fixed make clean when configured --disable-asteriskssl

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

12 years agoFix timeouts for ast_waitfordigit[_full].
David M. Lee [Thu, 13 Sep 2012 18:49:45 +0000 (18:49 +0000)] 
Fix timeouts for ast_waitfordigit[_full].

ast_waitfordigit_full would simply pass its timeout to ast_waitfor_nandfds,
expecting it to decrement the timeout by however many milliseconds were
waited. This is a problem if it consistently waits less than 1ms. The timeout
will never be decremented, and we wait... FOREVER!

This patch makes ast_waitfordigit_full manage the timeout itself. It maintains
the previously undocumented behavior that negative timeouts wait forever.

(closes issue ASTERISK-20375)
Reported by: Mark Michelson
Tested by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/2109/
........

Merged revisions 373024 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373025 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoSkip any non-content information when looking for and handling content.
Joshua Colp [Wed, 12 Sep 2012 20:53:20 +0000 (20:53 +0000)] 
Skip any non-content information when looking for and handling content.

This fixes a bug with Jitsi and conference calling. Jitsi implements XEP-0298
which places some conference-info information in the session-initiate request
which chan_motif did not expect to occur.

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

12 years agores_xmpp: Fix a segfault caused by bodyless messages
Jonathan Rose [Wed, 12 Sep 2012 18:23:04 +0000 (18:23 +0000)] 
res_xmpp: Fix a segfault caused by bodyless messages

(closes issue ASTERISK-20361)
Reported by: Noah Engelberth
Review: https://reviewboard.asterisk.org/r/2108/

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

12 years agoAdd channel name to a warning to make debugging easier.
Mark Michelson [Wed, 12 Sep 2012 15:19:01 +0000 (15:19 +0000)] 
Add channel name to a warning to make debugging easier.

The "autodestruct with owner in place" message is typically
indicative of a channel reference leak. Printing out the name
of the channel in the message may be helpful when trying to
debug the issue.
........

Merged revisions 372932 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372933 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFixed r372696 when configured --disable-asteriskssl; properly install libasteriskssl...
David M. Lee [Wed, 12 Sep 2012 14:18:07 +0000 (14:18 +0000)] 
Fixed r372696 when configured --disable-asteriskssl; properly install libasteriskssl.dylib on OS X.

I didn't realize that libasteriskssl.c was still compiled, even when you
disable asteriskssl; it simple gets statically linked into asterisk.

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

12 years agochan_local: Switch from using a random 4 digit hex identifier to unique id
Jonathan Rose [Tue, 11 Sep 2012 22:32:52 +0000 (22:32 +0000)] 
chan_local: Switch from using a random 4 digit hex identifier to unique id

Changes chan_local channels to use an 8 digit hex identifier generated
atomically and sequentially in order to eliminate the chance of having
multiple channels with the same name during high call volume situations.

(issue ASTERISK-20318)
Reported by: Dan Cropp
Review: https://reviewboard.asterisk.org/r/2104/
........

Merged revisions 372902 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372916 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix inability to shutdown gracefully due to an unending channel reference.
Mark Michelson [Tue, 11 Sep 2012 21:15:50 +0000 (21:15 +0000)] 
Fix inability to shutdown gracefully due to an unending channel reference.

message.c makes use of a special message queue channel that exists
in thread storage. This channel never goes away due to the fact that
the taskprocessor used by message.c does not get shut down, meaning
that it never ends the thread that stores the channel.

This patch fixes the problem by shutting down the taskprocessor when
Asterisk is shut down. In addition, the thread storage has a destructor
that will release the channel reference when the taskprocessor is destroyed.

(closes issue AST-937)
Reported by Jason Parker
Patches:
AST-937.patch uploaded by Mark Michelson (License #5049)
Tested by Jason Parker
........

Merged revisions 372885 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix bad channel application data reference.
Mark Michelson [Tue, 11 Sep 2012 21:08:55 +0000 (21:08 +0000)] 
Fix bad channel application data reference.

When channels get bridged due to an AMI bridge action
or a DTMF attended transfer, the two channels that
get bridged have their application data pointing to
the other channel's name. This means that if one channel
is hung up but the other moves on, it means that the
channel that moves on will have its application data
pointing at freed memory.

(issue ASTERISK-20335)
Reported by: aragon
........

Merged revisions 372840 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372841 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCorrects the astsbindir setting when installing the sample asterisk.conf.
David M. Lee [Tue, 11 Sep 2012 17:16:01 +0000 (17:16 +0000)] 
Corrects the astsbindir setting when installing the sample asterisk.conf.

(closes issue ASTERISK-20406)
........

Merged revisions 372863 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoEnsure iax2 debug output is displayed when expected
Kinsey Moore [Mon, 10 Sep 2012 20:59:09 +0000 (20:59 +0000)] 
Ensure iax2 debug output is displayed when expected

When IAX2 debug was changed from iax_showframe to iax_outputframe,
some instances were missed (or added afterward). This was causing
debug output to not be displayed when expected.

(closes issue ASTERISK-20338)
Reported-by: John Covert
Patch-by: John Covert
........

Merged revisions 372804 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372805 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoDeprecate chan_gtalk, chan_jingle, and res_jabber
Kinsey Moore [Mon, 10 Sep 2012 19:48:22 +0000 (19:48 +0000)] 
Deprecate chan_gtalk, chan_jingle, and res_jabber

chan_gtalk, chan_jingle, and res_jabber are now deprecated in favor of
using chan_motif and res_xmpp. They are a feature-equivalent
replacement and are written to be more easily maintainable.

(closes issue ASTERISK-20298)
Review: https://reviewboard.asterisk.org/r/2082/
Reported-by: Leif Madsen
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372795 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agores_rtp_asterisk: Eliminate "type-punned pointer" build warning.
David M. Lee [Mon, 10 Sep 2012 19:19:50 +0000 (19:19 +0000)] 
res_rtp_asterisk: Eliminate "type-punned pointer" build  warning.

Removes "res_rtp_asterisk.c:706: warning: dereferencing type-punned pointer
will break strict-aliasing rules" warning from the build on 32-bit platforms.

The problem is that 'size' was referenced aliased to both (pj_size_t *) and
(pj_ssize_t *). Now just make a copy of size that is the right type so there
isn't any pointer aliasing happening.

It also adds comments and asserts regarding what looks like an inappropriate
use of pj_sock_sendto, but is actually totally fine.

(closes issue ASTERISK-20368)
Reported by: Shaun Ruffell
Tested by: Michael L. Young
Patches:
  0001-res_rtp_asterisk-Eliminate-type-punned-pointer-build.patch uploaded by Shaun Ruffell (license 5417)
    slightly modified by David M. Lee.

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

12 years agoapp_meetme: Document that 'p' option will continue in dialplan.
Jonathan Rose [Mon, 10 Sep 2012 18:50:27 +0000 (18:50 +0000)] 
app_meetme: Document that 'p' option will continue in dialplan.

(closes issue AST-991)
Reported by John Bigelow
........

Merged revisions 372765 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372767 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRecorded merge of revisions 372764 from http://svn.asterisk.org/svn/asterisk/branches/10
Kinsey Moore [Mon, 10 Sep 2012 18:37:41 +0000 (18:37 +0000)] 
Recorded merge of revisions 372764 from http://svn.asterisk.org/svn/asterisk/branches/10

........
Warn on CLI when UDPTL init fails

This adds a CLI warning when a SDP offer is rejected due to UDPTL
initialization failure. Previously, there was no indication of the
reason for offer rejection in this case.

(closes issue ASTERISK-20357)
Reported-by: Francesco Usseglio Gaudi
........

Merged revisions 372763 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

12 years agoMasquerade: Retain parkinglot settings made by CHANNEL function.
Jonathan Rose [Mon, 10 Sep 2012 17:33:22 +0000 (17:33 +0000)] 
Masquerade: Retain parkinglot settings made by CHANNEL function.

Prior to this patch, the user would have a parkinglot set on a channel that
was parked and when the channel was retrieved, any attempt by that channel
to park would simply use the default. This patch makes parkinglot values
set in this way be retained through the masquerade.

(closes issue AST-990)
Reported by: Nick Huskinson
Patches:
    masquerade_parkinglot_patch.diff Uploaded by Jonathan Rose (license 6182)
........

Merged revisions 372736 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372737 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoOnly re-create an SRTP session when needed
Matthew Jordan [Sun, 9 Sep 2012 01:25:18 +0000 (01:25 +0000)] 
Only re-create an SRTP session when needed

In r356604, SRTP handling was fixed to accomodate multiple crypto keys in an
SDP offer and the ability to re-create an SRTP session when the crypto keys
changed.  In certain circumstances - most notably when a phone is put on
hold after having been bridged for a significant amount of time - the act
of re-creating the SRTP session causes problems for certain models of phones.
The patch committed in r356604 always re-created the SRTP session regardless
of whether or not the cryptographic keys changed.  Since this is technically
not necessary, this patch modifies the behavior to only re-create the SRTP
session if Asterisk detects that the remote key has changed.  This allows
models of phones that do not handle the SRTP session changing to continue
to work, while also providing the behavior needed for those phones that do
re-negotiate cryptographic keys.

(issue ASTERISK-20194)
Reported by: Nicolo Mazzon
Tested by: Nicolo Mazzon

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

Merged revisions 372709 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372710 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRecorded merge of revisions 372695 from http://svn.asterisk.org/svn/asterisk/branches/10
David M. Lee [Sat, 8 Sep 2012 05:51:48 +0000 (05:51 +0000)] 
Recorded merge of revisions 372695 from http://svn.asterisk.org/svn/asterisk/branches/10

........
Add OPENSSL_INCLUDE to the CFLAGS for ssl.c and tcptls.c.

Without this flag, those files will compile with the system installed
OpenSSL headers (if they exist). This is a real bummer if a different
path was specified using --with-ssl=

(closes issue ASTERISK-20392)
........
Merged revisions 372682 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

12 years agoFix MALLOC_DEBUG version of ast_strndup().
Richard Mudgett [Fri, 7 Sep 2012 23:07:49 +0000 (23:07 +0000)] 
Fix MALLOC_DEBUG version of ast_strndup().

(closes issue ASTERISK-20349)
Reported by: Brent Eagles
........

Merged revisions 372655 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372656 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRemove annoying unconditional debug message from INC/DEC functions.
Richard Mudgett [Fri, 7 Sep 2012 22:09:32 +0000 (22:09 +0000)] 
Remove annoying unconditional debug message from INC/DEC functions.

(closes issue AST-1001)
Reported by: Guenther Kelleter
........

Merged revisions 372628 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372629 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix exception path typo in app_queue.c try_calling().
Richard Mudgett [Fri, 7 Sep 2012 21:50:30 +0000 (21:50 +0000)] 
Fix exception path typo in app_queue.c try_calling().

(closes issue ASTERISK-20380)
Reported by: Jeremy Pepper
Patches:
      fix-local-channel-locking.patch (license #6350) patch uploaded by Jeremy Pepper
........

Merged revisions 372624 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372625 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix VoicemailUserEntry event headers ServerEmail and MailCommand reported values.
Richard Mudgett [Fri, 7 Sep 2012 21:27:56 +0000 (21:27 +0000)] 
Fix VoicemailUserEntry event headers ServerEmail and MailCommand reported values.

The AMI action VoicemailUsersList VoicemailUserEntry event headers
ServerEmail and MailCommand did not report the global values if they were
not overridden.  The VoicemailUserEntry event header ServerEmail was not
populated with the global value if the voicemail user did not override it.
The VoicemailUserEntry event header MailCommand was never populated with a
value.

* Removed unused struct ast_vm_user member mailcmd[].

(closes issue AST-973)
Reported by: John Bigelow
Tested by: rmudgett
........

Merged revisions 372620 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372621 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agosvn:ignore cleanup.
David M. Lee [Fri, 7 Sep 2012 21:04:08 +0000 (21:04 +0000)] 
svn:ignore cleanup.

* pjproject bin and lib directories should pretty much ignore everything
* Ignore *.o in codecs/ilbc

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

12 years agoFix parallel make for res_asterisk_rtp.
David M. Lee [Fri, 7 Sep 2012 20:36:08 +0000 (20:36 +0000)] 
Fix parallel make for res_asterisk_rtp.

Fixes a build regression introduced in r369517 "Add support for ICE/STUN/TURN
in res_rtp_asterisk and chan_sip." [1].

[1] http://svnview.digium.com/svn/asterisk?view=revision&revision=369517

When compiling asterisk in parallel like:
    $ make -j 10

It's possible to get errors like the following:

    .pjlib-util-test-x86_64-unknown-linux-gnu.depend:120: *** missing separator.  Stop.
    make[4]: *** [depend] Error 2
    make[3]: *** [dep] Error 1
    make[2]: *** [/home/sruffell/asterisk-working/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a] Error 2
    make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

This is because the build system is trying to build each of the libraries in
pjproject in parallel. Now the build will build pjproject in a single job and
link the results into res_asterisk_rtp.

Parallel builds, on one test system, saves ~1.5 minutes from a default Asterisk
build:

Single job:
    $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make >/dev/null 2>&1 )

    real    2m34.529s
    user    1m41.810s
    sys     0m15.970s

Parallel make:
    $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make -j10 >/dev/null 2>&1 )

    real    1m2.353s
    user    2m39.120s
    sys     0m18.850s

(closes issue ASTERISK-20362)
Reported by: Shaun Ruffel
Patches:
    0001-res_asterisk_rtp-Fix-build-error-when-using-parallel.patch uploaded by Shaun Ruffel (License #5417)

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

12 years agoFree ast_str objects when temp file fails to be created in MiniVM
Matthew Jordan [Fri, 7 Sep 2012 02:26:40 +0000 (02:26 +0000)] 
Free ast_str objects when temp file fails to be created in MiniVM

The previous commit (r372554) was from a patch that was written before
r366880, which ensured that ast_str objects allocated in the sendmail
routine were free'd in off nominal paths.  This commit frees the
string objects in the off nominal path introduced in r372554.

(issue ASTERISK-17133)
Reported by: Tzafrir Cohen
........

Merged revisions 372581 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372582 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix file descriptor leak and pointer scope issue in MiniVM when sending mail
Matthew Jordan [Fri, 7 Sep 2012 02:14:24 +0000 (02:14 +0000)] 
Fix file descriptor leak and pointer scope issue in MiniVM when sending mail

When MiniVM sends an e-mail and it has the volgain option set, it will spawn
sox in a separate process to handle the manipulation of the sound file.  In
doing so, it creates a temporary file.  There are two problems here:
  1) The file descriptor returned from mkstemp is leaked
  2) The finalfilename character pointer points to a buffer that loses scope
     once volgain processing is finished.

Note that in r316265, Russell fixed some gcc warnings by using the return
value of the mkstemp call.  A warning was placed in minivm that the file
descriptor was going to be leaked.  This patch reverts that change, as it
handles the leak and 'uses' the file descriptor returned from mkstemp.

(closes issue ASTERISK-17133)
Reported by: Tzafrir Cohen
patches:
  minivm_18501_demo.diff uploaded by Tzafrir Cohen (license #5035)
........

Merged revisions 372554 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372555 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoUpdate QueueMemberStatus event documentation to include member status values
Matthew Jordan [Thu, 6 Sep 2012 22:19:22 +0000 (22:19 +0000)] 
Update QueueMemberStatus event documentation to include member status values

The Status: header in a QueueMemberStatus event (and other QueueMember* events)
is the numeric value of the device state corresponding to that Queue Member.
As those values are not exactly obvious, listing them in the documentation is
useful.

Matt Riddell reported this indirectly through the wiki page.

(closes issue ASTERISK-20243)
Reported by: Matt Riddell

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

12 years agoFix loss of MOH on an ISDN channel when parking a call for the second time.
Richard Mudgett [Thu, 6 Sep 2012 22:12:46 +0000 (22:12 +0000)] 
Fix loss of MOH on an ISDN channel when parking a call for the second time.

Using the AMI redirect action to take an ISDN call out of a parking lot
causes the MOH state to get confused.  The redirect action does not take
the call off of hold.  When the call is subsequently parked again, the
call no longer hears MOH.

* Make chan_dahdi/sig_pri restart MOH on repeated AST_CONTROL_HOLD frames
if it is already in a state where it is supposed to be sending MOH.  The
MOH may have been stopped by other means.  (Such as killing the generator.)

This simple fix is done rather than making the AMI redirect action post an
AST_CONTROL_UNHOLD unconditionally when it redirects a channel and thus
potentially breaking something with an unexpected AST_CONTROL_UNHOLD.

(closes issue ABE-2873)
Patches:
      jira_abe_2873_c.3_bier.patch (license #5621) patch uploaded by rmudgett
........

Merged revisions 372521 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

Merged revisions 372522 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoEnsure listed queues are not offered for completion
Kinsey Moore [Thu, 6 Sep 2012 21:42:35 +0000 (21:42 +0000)] 
Ensure listed queues are not offered for completion

When using tab-completion for the list of queues on "queue reset stats"
or "queue reload {all|members|parameters|rules}", the tab-completion
listing for further queues erroneously listed queues that had already
been added to the list. The tab-completion listing now only displays
queues that are not already in the list.

(closes issue AST-963)
Reported-by: John Bigelow
........

Merged revisions 372517 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372518 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoLDAP Realtime Peers Cannot Register
Darren Sessions [Thu, 6 Sep 2012 18:55:09 +0000 (18:55 +0000)] 
LDAP Realtime Peers Cannot Register

Prior to 1.8, it was not necessary for an explicit "type" to be set for an
asterisk LDAP realtime peer. Now the routine find_peer actually checks the
type field during registration and fails to find the peer if it is not set.

The attached patches make the realtime type equal whatever type is being
searched for if the type is 0 upon return from routine build_peer.

(closes issue ASTERISK-17222)
Reported by: John Covert
Patch by: David Vossel
Tested by: Darren Sessions

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

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

12 years agochan_sip: Note change in behavior to how directmediapermit/deny ACL works
Jonathan Rose [Thu, 6 Sep 2012 15:56:10 +0000 (15:56 +0000)] 
chan_sip: Note change in behavior to how directmediapermit/deny ACL works

r366547 introduced a change to the directmedia ACL for chan_sip which
modified the behavior significantly. Prior to the patch, this option would
bridge peers with directmedia if a peer's IP address matched its own
directmedia ACL. After that patch, the peer would check the bridged peer's
ACL instead. This change has been present since 1.8.14.0. That patched failed
to document the change in Upgrade.txt, so this patch adds mention of that
change to UPGRADE.txt (UPGRADE-1.8.txt in newer branches)

(issue AST-876)
........

Merged revisions 372471 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372472 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoEnsure "rules" is tab-completable for "queue show"
Kinsey Moore [Thu, 6 Sep 2012 14:30:32 +0000 (14:30 +0000)] 
Ensure "rules" is tab-completable for "queue show"

Previously, tabbing at the end of "queue show" produced a list of
available queues about which information could be shown, but did not
include an alternative command, "rules", to access information about
queue rules. The "rules" item should now be shown in the list of
tab-completable items.

(closes issue AST-958)
Reported-by: John Bigelow
........

Merged revisions 372444 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372445 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix DUNDi message routing bug when neighboring peer is unreachable
Matthew Jordan [Thu, 6 Sep 2012 02:50:34 +0000 (02:50 +0000)] 
Fix DUNDi message routing bug when neighboring peer is unreachable

Consider a scenario where DUNDi peer PBX1 has two peers that are its neighbors,
PBX2 and PBX3, and where PBX2 and PBX3 are also neighbors.  If the connection
is temporarily broken between PBX1 and PBX3, PBX1 should not include PBX3 in
the list of peers it sends to PBX2 in a DPDISCOVER message, as it cannot send
messages to PBX3.  If it does, PBX2 will assume that PBX3 already received the
message and fail to forward the message on to PBX3 itself.  This patch fixes
this by only including peers in a DPDISCOVER message that are reachable by the
sending node.  This includes all peers with an empty address
(00:00:00:00:00:00) and that are have been reached by a qualify message.

This patch also prevents attempting to qualify a dynamic peer with an empty
address until that peer registers.

The patch uploaded by Peter was modified slightly for this commit.

(closes issue ASTERISK-19309)
Reported by: Peter Racz
patches:
  dundi_routing.patch uploaded by Peter Racz (license 6290)

........

Merged revisions 372417 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372418 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAllow configured numbers for FollowMe to be greater than 90 characters
Matthew Jordan [Thu, 6 Sep 2012 00:59:23 +0000 (00:59 +0000)] 
Allow configured numbers for FollowMe to be greater than 90 characters

When parsing a 'number' defined in followme.conf, FollowMe previously parsed
the number in the configuration file into a buffer with a length of 90
characters.  This can artificially limit some parallel dial scenarios.  This
patch allows for numbers of any length to be defined in the configuration
file.

Note that Clod Patry originally wrote a patch to fix this problem and received
a Ship It! on the JIRA issue.  The patch originally expanded the buffer to 256
characters.  Instead, the patch being committed duplicates the string in the
config file on the stack before parsing it for consumption by the application.

(closes issue ASTERISK-16879)
Reported by: Clod Patry
Tested by: mjordan
patches:
  followme_no_limit.diff uploaded by Clod Patry (license #5138)

Slightly modified for this commit.
........

Merged revisions 372390 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372391 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix compile error.
Richard Mudgett [Wed, 5 Sep 2012 19:43:45 +0000 (19:43 +0000)] 
Fix compile error.
........

Merged revisions 372372 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoCorrect documentation for ModuleLoad AMI action
Kinsey Moore [Wed, 5 Sep 2012 19:24:13 +0000 (19:24 +0000)] 
Correct documentation for ModuleLoad AMI action

The documentation incorrectly listed 'rtp' as a reloadable subsystem
and left out many other reloadable subsystems. It is now also
documented that subsystems may only be reloaded, not loaded or
unloaded.

(closes issue AST-977)
Reported-by: John Bigelow
........

Merged revisions 372354 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372358 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agodsp.c: in ast_mf_detect_init incorrectly sets goertzel samples to 160, should be...
Alec L Davis [Wed, 5 Sep 2012 18:46:07 +0000 (18:46 +0000)] 
dsp.c: in ast_mf_detect_init incorrectly sets goertzel samples to 160, should be MF_GSIZE

Related https://reviewboard.asterisk.org/r/2097/
........

Merged revisions 372339 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372341 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoEnsure counts generated in manager_show_dialplan_helper are correct
Kinsey Moore [Wed, 5 Sep 2012 18:36:44 +0000 (18:36 +0000)] 
Ensure counts generated in manager_show_dialplan_helper are correct

When manager_show_dialplan_helper was written, the counter increment
for the total number of contexts was placed with the extensions
increment instead of in the enclosing loop.  This function should
now generate correct context counts.

(closes issue AST-970)
Reported-by: John Bigelow
........

Merged revisions 372337 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372338 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix coding guidelines issue with a recent commit.
Richard Mudgett [Wed, 5 Sep 2012 17:35:20 +0000 (17:35 +0000)] 
Fix coding guidelines issue with a recent commit.

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

12 years agoFix RTP/RTCP read error message confusion.
Richard Mudgett [Wed, 5 Sep 2012 17:33:11 +0000 (17:33 +0000)] 
Fix RTP/RTCP read error message confusion.

The RTP/RTCP read error message can report "fail: success" when the
read failure is because of an ICE failure.

* Changed __rtp_recvfrom() to generate a PJ ICE message when ICE fails.

* Changed RTP/RTCP read error message to indicate an unspecified error
when errno is zero.

(closes issue ASTERISK-20288)
Reported by: Joern Krebs
Patches:
      jira_asterisk_20288_err_msg.patch (license #5621) patch uploaded by rmudgett (modified)

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

12 years agoRe-fix sending unnegotiated payloads during a P2P RTP bridge.
Mark Michelson [Wed, 5 Sep 2012 16:04:40 +0000 (16:04 +0000)] 
Re-fix sending unnegotiated payloads during a P2P RTP bridge.

The previous fix still would look in the static_RTP_PT table, which
is inappropriate since we specifically want to find a codec that has
been negotiated.

(closes issue ASTERISK-20296)
reported by NITESH BANSAL
Patches:
codec_negotiation.patch Uploaded by NITESH BANSAL (License #6418)

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

12 years agoFix memory leaks in app_voicemail when using IMAP storage or realtime config
Matthew Jordan [Wed, 5 Sep 2012 13:47:31 +0000 (13:47 +0000)] 
Fix memory leaks in app_voicemail when using IMAP storage or realtime config

This patch fixes two memory leaks:

1. When find_user is called with NULL as its first parameter, the voicemail
   user returned is allocated on the heap.  The inboxcount2 function uses
   find_user in such a fashion when counting new messages, and fails to free
   the resulting voicemail user object.

2. When populate_defaults is called on a voicemail user, it wipes whatever
   flags have been set on the object by copying over the global flags object.
   If the VM_ALLOCED flag was ste on the voicemail user prior to doing so,
   that flag is removed.  This leaks the voicemail user when free_user is later
   called.

(closes issue ASTERISK-19155)
Reported by: Filip Jenicek
patches:
  asterisk.patch2 uploaded by Filip Jenicek (license 6277)

Patch slightly modified for this commit.

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

Merged revisions 372268 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372288 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix breakage caused by last merge. Missing a variable for 11 and trunk.
Michael L. Young [Wed, 5 Sep 2012 12:17:48 +0000 (12:17 +0000)] 
Fix breakage caused by last merge.  Missing a variable for 11 and trunk.

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

12 years agodsp.c: Fix multiple issues when no-interdigit delay is present, and fast DTMF 50ms...
Alec L Davis [Wed, 5 Sep 2012 07:41:10 +0000 (07:41 +0000)] 
dsp.c: Fix multiple issues when no-interdigit delay is present, and fast DTMF 50ms/50ms

Revert DTMF hit/miss detector to original -r349249 method with some changes, remove unnecessary;
  1. reseting of hits=0, when no signal, only need to set it once.
  2. incrementing of hits, when the hit is the same as the current hit.
  3. setting of lasthit, when it's the same as before.

Change HITS_TO_BEGIN to 2, MISSES_TO_END to 3

& 3 spelling mistakes

(closes issue ASTERISK-19610)
alecdavis (license 585)
Reported by: Jean-Philippe Lord
Tested by: alecdavis

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

Merged revisions 372239 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372240 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agodsp.c: optimize goerztzel sample loops, in dtmf_detect, mf_detect and tone_detect
Alec L Davis [Wed, 5 Sep 2012 06:50:15 +0000 (06:50 +0000)] 
dsp.c: optimize goerztzel sample loops, in dtmf_detect, mf_detect and tone_detect

use a temporary short int when repeatedly used to call goertzel_sample.

alecdavis (license 585)
Reported by: alecdavis
Tested by: alecdavis

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

Merged revisions 372212 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372213 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix Incrementing Sequence Number For Retransmitted DTMF End Packets
Michael L. Young [Wed, 5 Sep 2012 04:52:10 +0000 (04:52 +0000)] 
Fix Incrementing Sequence Number For Retransmitted DTMF End Packets

In Asterisk 1.4+, a fix was put in place to increment the sequence number for
retransmitted DTMF end packets.  With the introduction of the RTP engine API in
1.8, the sequence number was no longer being incremented.  This patch fixes this
regression as well as cleans up a few lines that were not doing anything.

(closes issue ASTERISK-20295)
Reported by: Nitesh Bansal
Tested by: Michael L. Young
Patches:
01_rtp_event_seq_num.patch uploaded by Nitesh Bansal (license 6418)
asterisk-20295-dtmf-fix-cleanup.diff uploaded by Michael L. Young (license 5026)

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

Merged revisions 372185 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372198 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix memory leak when CEL is successfully written to PostgreSQL database
Matthew Jordan [Wed, 5 Sep 2012 02:25:22 +0000 (02:25 +0000)] 
Fix memory leak when CEL is successfully written to PostgreSQL database

PQClear is not called when the result object of a call to PQExec has a
status of PGRES_COMMAND_OK.  Interestingly enough, the off nominal case was
handled properly, so this memory leak only occurred when CEL records were
successfully written.

This patch properly clears the result in the nominal code path.

(closes issue ASTERISK-19991)
Reported by: Etienne Lessard
Tested by: Etienne Lessard
patches:
  mem_leak_cel_pgsql.patch uploaded by Etienne Lessard (license #6394)
........

Merged revisions 372158 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372165 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix issue where SIP devices were not notified when custom devices changed to "ringing".
Mark Michelson [Tue, 4 Sep 2012 15:48:28 +0000 (15:48 +0000)] 
Fix issue where SIP devices were not notified when custom devices changed to "ringing".

The problem had to do with logic used when checking for what the oldest ringing channel
was. The problem was that if no channel was found, then no notification would be sent.
For custom device states, there is no associated channel, so no notification would get
sent. This fixes the issue by still sending the notification even if no associated
channel can be found for a ringing device state change.

(closes issue ASTERISK-20297)
Reported by Noah Engelberth

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

12 years agoPrevent crash from using app_page with no confbridge.conf file provided.
Mark Michelson [Tue, 4 Sep 2012 15:26:07 +0000 (15:26 +0000)] 
Prevent crash from using app_page with no confbridge.conf file provided.

Also prevents other potential crashes when using aco API
with uninitialized aco_info structs.

(closes issue ASTERISK-20305)
reported by Noah Engelberth
Tested by Noah Engelberth

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

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

12 years agoPrevent local RTP bridges from sending inappropriate formats to participants.
Mark Michelson [Fri, 31 Aug 2012 21:14:30 +0000 (21:14 +0000)] 
Prevent local RTP bridges from sending inappropriate formats to participants.

A change for Asterisk 11 caused a check for failure to incorrectly check the return
value. This resulted in the possibility of transmitting media that a party had not
negotiated. If this media happened to be G.729, then this could potentially result
in one-way audio if no G.729 translators are installed.

(closes issue ASTERISK-20296)
reported by NITESH BANSAL

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

12 years agoPrevent crash on shutdown due to refcount error on queues container.
Mark Michelson [Thu, 30 Aug 2012 20:54:06 +0000 (20:54 +0000)] 
Prevent crash on shutdown due to refcount error on queues container.

When app_queue is unloaded, the queues container has its refcount
decremented, potentially to 0. Then the taskprocessor responsible
for handling device state changes is unreferenced. If the
taskprocessor happens to be just about to run its task, then it
will create and destroy an iterator on the queues container.
This can cause the refcount on the queues container to increase to
1 and then back to 0. Going back to 0 a second time results in
double frees.

This failure was seen periodically in the testsuite when Asterisk
would shut down.
........

Merged revisions 372089 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372090 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoHelp prevent ringing queue members from being rung when ringinuse set to no.
Mark Michelson [Thu, 30 Aug 2012 18:37:29 +0000 (18:37 +0000)] 
Help prevent ringing queue members from being rung when ringinuse set to no.

Queue member status would not always get updated properly when the member
was called, thus resulting in the member getting multiple calls. With this
change, we update the member's status at the time of calling, and we also
check to make sure the member is still available to take the call before
placing an outbound call.

(closes issue ASTERISK-16115)
reported by nik600
Patches:
app_queue.c-svn-r370418.patch uploaded by Italo Rossi (license #6409)
........

Merged revisions 372048 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372049 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAST-2012-013: Resolve ACL rules being ignored during calls by some IAX2 peers
Matthew Jordan [Thu, 30 Aug 2012 16:24:43 +0000 (16:24 +0000)] 
AST-2012-013: Resolve ACL rules being ignored during calls by some IAX2 peers

When an IAX2 call is made using the credentials of a peer defined in a dynamic
Asterisk Realtime Architecture (ARA) backend, the ACL rules for that peer are
not applied to the call attempt. This allows for a remote attacker who is aware
of a peer's credentials to bypass the ACL rules set for that peer.

This patch ensures that the ACLs are applied for all peers, regardless of their
storage mechanism.

(closes issue ASTERISK-20186)
Reported by: Alan Frisch
Tested by: mjordan, Alan Frisch

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

12 years agoBlock r372020
Matthew Jordan [Thu, 30 Aug 2012 16:23:33 +0000 (16:23 +0000)] 
Block r372020

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

12 years agoAST-2012-012: Resolve AMI User Unauthorized Shell Access through ExternalIVR
Matthew Jordan [Thu, 30 Aug 2012 16:07:43 +0000 (16:07 +0000)] 
AST-2012-012: Resolve AMI User Unauthorized Shell Access through ExternalIVR

The AMI Originate action can allow a remote user to specify information that can
be used to execute shell commands on the system hosting Asterisk. This can
result in an unwanted escalation of permissions, as the Originate action, which
requires the "originate" class authorization, can be used to perform actions
that would typically require the "system" class authorization. Previous attempts
to prevent this permission escalation (AST-2011-006, AST-2012-004) have sought
to do so by inspecting the names of applications and functions passed in with
the Originate action and, if those applications/functions matched a predefined
set of values, rejecting the command if the user lacked the "system" class
authorization. As noted by IBM X-Force Research, the "ExternalIVR"
application is not listed in the predefined set of values. The solution for
this particular vulnerability is to include the "ExternalIVR" application in the
set of defined applications/functions that require "system" class authorization.

Unfortunately, the approach of inspecting fields in the Originate action against
known applications/functions has a significant flaw. The predefined set of
values can be bypassed by creative use of the Originate action or by certain
dialplan configurations, which is beyond the ability of Asterisk to analyze at
run-time. Attempting to work around these scenarios would result in severely
restricting the applications or functions and prevent their usage for legitimate
means. As such, any additional security vulnerabilities, where an
application/function that would normally require the "system" class
authorization can be executed by users with the "originate" class authorization,
will not be addressed. Instead, the README-SERIOUSLY.bestpractices.txt file has
been updated to reflect that the AMI Originate action can result in commands
requiring the "system" class authorization to be executed. Proper system
configuration can limit the impact of such scenarios.

(closes issue ASTERISK-20132)
Reported by: Zubair Ashraf of IBM X-Force Research
........

Merged revisions 371998 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371999 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRestore CODING-GUIDELINES to doc folder
Matthew Jordan [Thu, 30 Aug 2012 12:49:17 +0000 (12:49 +0000)] 
Restore CODING-GUIDELINES to doc folder

In r294740, the CODING-GUIDELINES was removed from the doc folder in favor
of the content on the Asterisk wiki.  Some folks still look in the doc folder
initially for coding guideline suggestions; as such, this patch adds a
CODING-GUIDELINES file back into the doc folder.  The content of the file
merely points to the correct page on the Asterisk wiki where the coding
guidelines currently live.

(closes issue ASTERISK-20279)
Reported by: Andrew Latham
Patches:
  CODING-GUIDELINES.diff uploaded by Andrew Latham (license 5985)
........

Merged revisions 371961 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371962 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix compile errors.
Richard Mudgett [Wed, 29 Aug 2012 22:38:54 +0000 (22:38 +0000)] 
Fix compile errors.

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

12 years agoapp_meetme: Adding test events for following activity in MeetMe.
Jonathan Rose [Wed, 29 Aug 2012 21:07:42 +0000 (21:07 +0000)] 
app_meetme: Adding test events for following activity in MeetMe.
........

Merged revisions 371919 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371920 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix theoretical compile error with HAVE_EPOLL.
Richard Mudgett [Wed, 29 Aug 2012 19:56:14 +0000 (19:56 +0000)] 
Fix theoretical compile error with HAVE_EPOLL.

Really shows how much epoll is used since it had not been reported yet.

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

12 years agoInitialize file descriptors for dummy channels to -1.
Richard Mudgett [Wed, 29 Aug 2012 19:45:38 +0000 (19:45 +0000)] 
Initialize file descriptors for dummy channels to -1.

Dummy channels usually aren't read from, but functions like SHELL and CURL
use autoservice on the channel.

(closes issue ASTERISK-20283)
Reported by: Gareth Palmer
Patches:
      svn-371580.patch (license #5169) patch uploaded by Gareth Palmer (modified)
........

Merged revisions 371888 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371890 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix hangup cause passthrough regression.
Richard Mudgett [Wed, 29 Aug 2012 18:32:35 +0000 (18:32 +0000)] 
Fix hangup cause passthrough regression.

The v1.8 -r369258 change to fix the F and F(x) action logic introduced a
regression in passing the hangup cause from the called channel to the
caller channel.

(closes issue ASTERISK-20287)
Reported by: Konstantin Suvorov
Patches:
      app_dial_hangupcause.patch (license #6421) patch uploaded by Konstantin Suvorov (modified)
Tested by: rmudgett
........

Merged revisions 371860 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371861 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agochan_sip: Send 408 on retransmit timeout instead of 603
Jonathan Rose [Wed, 29 Aug 2012 17:25:19 +0000 (17:25 +0000)] 
chan_sip: Send 408 on retransmit timeout instead of 603

(closes issue ASTERISK-20124)
Reported by: Walter Doekes
........

Merged revisions 371824 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371825 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix misleading documentation in agents.conf.sample regarding ackcall usage.
Mark Michelson [Mon, 27 Aug 2012 21:50:42 +0000 (21:50 +0000)] 
Fix misleading documentation in agents.conf.sample regarding ackcall usage.

The documentation made it sound as if the DTMF acknowledgment was needed
at the time the agent logs in, rather than when the agent is called. This
is likely a relic from the days when there were multiple ways of logging
in agents.

(closes issue AST-962)
reported by Steve Pitts
........

Merged revisions 371787 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371789 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix incorrect documentation of the MailboxStatus manager command.
Mark Michelson [Mon, 27 Aug 2012 21:31:37 +0000 (21:31 +0000)] 
Fix incorrect documentation of the MailboxStatus manager command.

The "Waiting" field was misdocumented as reporting the number of
messages waiting. In reality, it simply indicated the presence or
absence of waiting messages.
........

Merged revisions 371782 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371783 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agosvn:ignore pjproject bin & output for all platforms.
David M. Lee [Mon, 27 Aug 2012 18:14:50 +0000 (18:14 +0000)] 
svn:ignore pjproject bin & output for all platforms.

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

12 years agoFix incorrectly documented option in queues.conf
Mark Michelson [Mon, 27 Aug 2012 17:51:25 +0000 (17:51 +0000)] 
Fix incorrectly documented option in queues.conf

sharedlastcall defaults to "no" not "yes"

(closes issue AST-979)
reported by Steve Pitts
........

Merged revisions 371747 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371748 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoRe-add merge and block properties.
Mark Michelson [Mon, 27 Aug 2012 17:49:57 +0000 (17:49 +0000)] 
Re-add merge and block properties.

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

12 years agoFixes ast_rwlock_timed[rd|wr]lock for BSD and variants.
David M. Lee [Mon, 27 Aug 2012 16:55:39 +0000 (16:55 +0000)] 
Fixes ast_rwlock_timed[rd|wr]lock for BSD and variants.

The original implementations simply wrap pthread functions, which take
absolute time as an argument. The spinlock version for systems without
those functions treated the argument as a delta. This patch fixes the
spinlock version to be consistent with the pthread version.

(closes issue ASTERISK-20240)
Reported by: Egor Gorlin
Patches:
lock.c.patch uploaded by Egor Gorlin (license 6416)
........

Merged revisions 371718 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

12 years agoImplement workaround for BETTER_BACKTRACES crash
Kinsey Moore [Mon, 27 Aug 2012 14:07:12 +0000 (14:07 +0000)] 
Implement workaround for BETTER_BACKTRACES crash

When compiling with BETTER_BACKTRACES enabled, Asterisk will sometimes
crash when "core show locks" is run. This happens regularly in the
testsuite since several tests run "core show locks" to help with
debugging. This seems to be a fault with libraries on certain operating
systems (notably CentOS 6.2/6.3) running on virtual machines and
utilizing gcc 4.4.6.

(closes issue ASTERISK-20090)
........

Merged revisions 371690 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371691 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agomf_detect: incorrectly used DTMF_GSIZE instead of MF_GSIZE
Alec L Davis [Sun, 26 Aug 2012 23:07:57 +0000 (23:07 +0000)] 
mf_detect: incorrectly used DTMF_GSIZE instead of MF_GSIZE
........

Merged revisions 371662 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371663 from http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoAdd support for call-id logging to chan_motif.
Joshua Colp [Wed, 22 Aug 2012 15:54:18 +0000 (15:54 +0000)] 
Add support for call-id logging to chan_motif.

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

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

12 years agoFix misuses of asprintf throughout the code.
Mark Michelson [Tue, 21 Aug 2012 20:54:19 +0000 (20:54 +0000)] 
Fix misuses of asprintf throughout the code.

This fixes three main issues

* Change asprintf() uses to ast_asprintf() so that it
pairs properly with ast_free() and no longer causes
MALLOC_DEBUG to freak out.

* When ast_asprintf() fails, set the pointer NULL if
it will be referenced later.

* Fix some memory leaks that were spotted while taking
care of the first two points.

(Closes issue ASTERISK-20135)
reported by Richard Mudgett

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

Merged revisions 371590 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 371591 from http://svn.asterisk.org/svn/asterisk/branches/10

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