Commit Graph

24562 Commits

Author SHA1 Message Date
David M. Lee 87cf916cdb Fixed utils directory breakage from r398748, this time with extra hate.
........

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

Merged revisions 398753 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398754 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:50:13 +00:00
David M. Lee 6a1f3d626b Fixed utils directory breakage from r398648
........

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

Merged revisions 398749 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398750 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:26:19 +00:00
Richard Mudgett 35b5549df8 MALLOC_DEBUG: Change fence magic number to be completely different from the freed magic number.
Race conditions between freeing a nul terminated string and
ast_strdup()'ing it are more likely to be detected if the fence and freed
magic numbers are completely different.
........

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

Merged revisions 398721 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398726 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 23:29:44 +00:00
Mark Michelson 9fb34542d1 Add extra debugging to res_pjsip_endpoint_identifier_ip
........

Merged revisions 398694 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 22:00:44 +00:00
David M. Lee c2e6e1ef49 Fix DEBUG_THREADS when lock is acquired in __constructor__
This patch fixes some long-standing bugs in debug threads that were
exacerbated with recent Optional API work in Asterisk 12.

With debug threads enabled, on some systems, there's a lock ordering
problem between our mutex and glibc's mutex protecting its module list
(Ubuntu Lucid, glibc 2.11.1 in this instance). In one thread, the module
list will be locked before acquiring our mutex. In another thread, our
mutex will be locked before locking the module list (which happens in
the depths of calling backtrace()).

This patch fixes this issue by moving backtrace() calls outside of
critical sections that have the mutex acquired. The bigger change was to
reentrancy tracking for ast_cond_{timed,}wait, which wrongly assumed
that waiting on the mutex was equivalent to a single unlock (it actually
suspends all recursive locks on the mutex).

(closes issue ASTERISK-22455)
Review: https://reviewboard.asterisk.org/r/2824/
........

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

Merged revisions 398649 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398651 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 20:13:40 +00:00
David M. Lee 0bcc676d09 Multiple revisions 398638-398639
........
  r398638 | dlee | 2013-09-09 14:01:54 -0500 (Mon, 09 Sep 2013) | 1 line
  
  Added note about expected behavior of originate
........
  r398639 | dlee | 2013-09-09 14:02:27 -0500 (Mon, 09 Sep 2013) | 1 line
  
  Added note about expected behavior of originate (the rest of the commit)
........

Merged revisions 398638-398639 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 19:09:21 +00:00
David M. Lee 4015f05dce Blocked revisions 398559,398578
........
Multiple revisions 398559,398578

........
  r398559 | kmoore | 2013-09-06 14:32:03 -0500 (Fri, 06 Sep 2013) | 20 lines
  
  Blocked revisions 398558
  
  ........
  Fix Jabber/XMPP distributed MWI
  
  The mailbox and context are swapped on the receiving end for all users
  of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
  versions. This swaps those values to be correct when publishing to the
  internal event system from Jabber/XMPP distributed MWI state.
  
  (closes issue ASTERISK-22435)
  Reported by: abelbeck
  Tested by: Michael Keuter
  Patches:
      asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
      asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
  ........
  
  Merged revisions 398523 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r398578 | kmoore | 2013-09-06 16:03:45 -0500 (Fri, 06 Sep 2013) | 1 line
  
  Unblock r398558


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 19:08:15 +00:00
Matthew Jordan 361d308b21 Update CDR Unit tests to reflect container changes in r398579
When a channel joins a multi-party bridge, the ordering of the CDRs that is
created is determined by the ordering of the channels who happen to be in that
bridge. When r398579 changed the number of buckets in the container to
something sensible, it changed the ordering that the CDRs was created in,
causing one of the multiparty tests to fail. This fixes the test with the
now expected ordering.
........

Merged revisions 398628 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-08 23:30:39 +00:00
Kinsey Moore ad89dffb8a Prevent XMPP timeout on blank responses
Sometimes the Google Voice servers have a bad habit of sending out 1
byte replies to the xmpp resource. When a blank 1 byte reply is
received from the socket the buffer attempts to wait (endlessly) for
the rest of the reply from google which effectively blocks the socket
and google voice calls will no longer come into the server.

This patch allows the xmpp module to correctly detect empty packets and
send out ping replies to google. It also sets a socket timeout on the
default socket which prevents the xmpp socket from closing and
preventing future google voice calls from coming into the server.

Furthermore instead of sending an empty reply back to google we send a
proper xmpp ping reply back. This also adds several more
socket messages.

(closes issue ASTERISK-22347)
Reported by: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/2771
Patches:
    xmpp_fix_1.diff uploaded by Andrew Nagy (License #6524)
........

Merged revisions 398618 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398619 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-07 01:03:07 +00:00
Kinsey Moore 0bed76989a Multiple revisions 398558,398577
........
  r398558 | kmoore | 2013-09-06 14:28:16 -0500 (Fri, 06 Sep 2013) | 17 lines
  
  Fix Jabber/XMPP distributed MWI
  
  The mailbox and context are swapped on the receiving end for all users
  of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
  versions. This swaps those values to be correct when publishing to the
  internal event system from Jabber/XMPP distributed MWI state.
  
  (closes issue ASTERISK-22435)
  Reported by: abelbeck
  Tested by: Michael Keuter
  Patches:
      asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
      asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
  ........
  
  Merged revisions 398523 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r398577 | kmoore | 2013-09-06 16:00:56 -0500 (Fri, 06 Sep 2013) | 10 lines
  
  Commit the remainder of r398523
  
  This is a missing part of the commit in revision 398523 that corrects
  the name of a variable.
  
  (issue ASTERISK-22435)
  ........
  
  Merged revisions 398576 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 398558,398577 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398580 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 21:23:02 +00:00
Richard Mudgett 5396198f16 cdr: Change the number of container buckets to be similar to the channels container.
* Fix the temporary cdr candidate containers to use a prime number of
buckets.
........

Merged revisions 398579 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 21:17:45 +00:00
Richard Mudgett a4c18f4e10 core_local: Fix LocalOptimizationBegin AMI event missing Source channel snapshot.
* Fix the LocalOptimizationBegin AMI event by eliminating an artificial
buffer size limitation that is too small anyway.
........

Merged revisions 398572 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 20:21:21 +00:00
Richard Mudgett 51bd4fe8fe cdr: Fix some ref leaks.
* Added missing unregister of the cdr container in cdr_engine_shutdown().

* Fixed ref leak in off nominal path of cdr_object_alloc().

* Removed some unnecessary NULL checks in cdr_object_dtor().
........

Merged revisions 398562 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 20:03:01 +00:00
Richard Mudgett f5ae5e27c8 astobj2: Add warn unused attribute to some functions.
* Fixed resulting warnings with improper use of ao2_global_obj_replace().

* Made a couple uses of ao2_global_obj_replace_unref(x, NULL) into the
equivalent and more appropriate ao2_global_obj_release() call.
........

Merged revisions 398533 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 19:26:48 +00:00
Kinsey Moore 53dbe10f5c Fix build warnings
When AST_DEVMODE is not defined, ast_asserts are not compiled into the
binary. In some cases, this means variables are not referenced or are
set but unused which causes warnings to show up.

(closes issue ASTERISK-22446)
Reported by: Jason Parker (qwell)
........

Merged revisions 398521 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 18:53:32 +00:00
Kinsey Moore 5a3c17f91f Fix chan_h323 compilation
This fixes the things in chan_h323 that were missed or ignored in the
great channel opaquification and gets chan_h323 back into a compiling
state.

(closes issue ASTERISK-22365)
Reported by: Dmitry Melekhov
Patches:
    chan_h323.patch uploaded by Dmitry Melekhov
........

Merged revisions 398510 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398511 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 16:01:05 +00:00
Richard Mudgett ccfad032e4 astobj2: Only define ao2_bt() once.
* Make ao2_bt() not use single char variable names.

* Fix ao2_bt() formatting.
........

Merged revisions 398498 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 21:48:02 +00:00
Richard Mudgett 778d174126 chan_iax2: Reduce indentation in __attempt_transmit().
* Reduce indentation in __attempt_transmit().

* Don't update the static last error time variable every time in
__schedule_action() and socket_read().
........

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

Merged revisions 398457 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398458 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 19:18:10 +00:00
Richard Mudgett 5954da694e chan_iax2: Fix stray reference to worker thread idle_list.
* Fix stray reference to idle_list in cleanup_thread_list().  This may be
the reason for the note in iax2_process_thread() about threads not being
removed from the task lists.

* Move cleanup_thread_list(&idle_list) to after the other lists are
cleaned up.
........

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

Merged revisions 398417 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398418 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 17:31:29 +00:00
Richard Mudgett bdb0121769 chan_iax2: Fix bridgecallno deadlock avoidance.
* Fix bridgecallno deadlock avoidance.  When doing deadlock avoidance, you
need to retest the status of values for each loop to see if you still need
the lock for bridgecallno.

* As a safety check, after acquiring the bridgecallno lock you should
check if iaxs[bridgecallno] is NULL just like the current callno checks.

* Move setting thread->iostate to IAX_IOSTATE_IDLE to after processing any
deferred frames to ensure that the iostate is IDLE when it is placed back
into the idle list.  defer_full_frame() tries to ensure
iax2_process_thread() wakes up to process the frame.
........

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

Merged revisions 398380 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398381 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 17:17:53 +00:00
Mark Michelson 23ed2ca57f Clarify server_uri and client_uri registration settings.
Used some of Rusty's suggested language plus also included
more SIPesque descriptions of where the URIs are actually
used in an outgoing REGISTER.

(closes issue ASTERISK-22390)
reported by Rusty Newton
........

Merged revisions 398368 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 14:10:45 +00:00
Richard Mudgett 586a825325 chan_iax2: Add missing control frame names to debug frame decode output.
........

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

Merged revisions 398302 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398303 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 23:07:41 +00:00
Mark Michelson 517389b1e7 Give more detail regarding failures to create request with auth credentials.
(issue ASTERISK-22386)
........

Merged revisions 398299 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 22:49:25 +00:00
Jonathan Rose 3e6923c3f6 unit tests: test_voicemail_api leaks stringfields from snapshots
(closes issue ASTERISK-22414)
Reported by: Corey Farrell
Patches:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 398285 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398286 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 21:37:01 +00:00
Jonathan Rose 64924d72bf app_voicemail: Fix leaking config objects when msg_id doesn't match
(issues ASTERISK-22414)
Reported by: Corey Farrell
Patch:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)
........

Merged revisions 398281 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398283 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 21:20:02 +00:00
Richard Mudgett 2ce0c9f4a0 chan_misdn: Fix misdn debug output printed with arbitrary verbose levels.
Fix the misdn debug output to remote consoles.  chan_misdn uses
ast_console_puts() which doesn't know about verbose levels.  Better to use
ast_verbose() instead.  Without this patch the misdn debug messages are
appended to the verbose level which ever was set by the message sent to
the console before, i.e.  any undefined level.

(closes issue AST-1218)
Reported by: Guenther Kelleter
Patches:
      misdnlog.patch (license #6372) patch uploaded by Guenther Kelleter
........

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

Merged revisions 398236 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398237 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 16:03:14 +00:00
Kevin Harwell 1be7514a59 Debug messages for pjsip outbound registration
Added debug messages indicating that an outbound registration attempt was made
and it was successful in pjsip.

(closes issue ASTERISK-22388)
Reported by: Rusty Newton
........

Merged revisions 398226 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 14:32:25 +00:00
Alexandr Anikin b8f6f8ebe1 Fix remote tcs sequence handling on empty tcs received
........

Merged revisions 398214 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398215 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-03 20:28:01 +00:00
Kinsey Moore e5542ab1e7 Prevent a crash in res_pjsip_dtmf_info.c
This change makes sure that a content type header exists before
checking the contents of the header against known SIP INFO DTMF content
types.
........

Merged revisions 398206 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-03 18:09:02 +00:00
David M. Lee 32d325439f Fixed 'make clean' for wiki docs
........

Merged revisions 398198 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-03 17:19:30 +00:00
Walter Doekes 8b5d178c36 Be a little more verbose when loading cel_custom.conf.
Review: https://reviewboard.asterisk.org/r/2805/
........

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

Merged revisions 398168 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398196 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-03 14:29:52 +00:00
David M. Lee 2d1d5a98d5 Fix graceful shutdown crash.
The cleanup code for optional_api needs to happen after all of the optional
API users and providers have unused/unprovided. Unfortunately, regsitering the
atexit() handler at the beginning of main() isn't soon enough, since module
destructors run after that.
........

Merged revisions 398149 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 20:58:59 +00:00
Rusty Newton be219c9ec9 New pjsip.conf.sample
(issue ASTERISK-22145)
(closes issue ASTERISK-22145)
Reported By: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2811/
........

Merged revisions 398147 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 20:37:54 +00:00
Kevin Harwell 9bad1dabcf Add a reloadable option for sorcery type objects
Some configuration objects currently won't place nice if reloaded.
Specifically, in this case the pjsip transport objects.  Now when
registering an object in sorcery one may specify that the object is
allowed to be reloaded or not.  If the object is set to not reload
then upon reloading of the configuration the objects of that type
will not be reloaded.  The initially loaded objects of that type
however will remain.

While the transport objects will not longer be reloaded it is still
possible for a user to configure an endpoint to an invalid transport.
A couple of log messages were added to help diagnose this problem if
it occurs.

(closes issue ASTERISK-22382)
Reported by: Rusty Newton
(closes issue ASTERISK-22384)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2807/
........

Merged revisions 398139 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 19:55:56 +00:00
Kevin Harwell 16b8d0cb5a Fix various memory leaks
main/config.c - cleanup cache fie includes
res/res_security_log.c - unregister logger level
channesl/chan_sip.c - cleanup io context and notify_types
main/translator.c - cleanup at shutdown
main/named_acl.c - cleanup cli commands
main/indications.c - ast_get_indication_tone() unref default_tone_zone if used

(closes issues ASTERISK-22378)
Reported by: Corey Farrell
Patches:
     config_shutdown.patch uploaded by coreyfarrell (license 5909)
     res_security_log.patch uploaded by coreyfarrell (license 5909)
     chan_sip-11.patch uploaded by coreyfarrell (license 5909)
     indications_refleak.patch uploaded by coreyfarrell (license 5909)
     named_acl-cli_unreg-trunk.patch uploaded by coreyfarrell (license 5909)
     translate_shutdown.patch uploaded by coreyfarrell (license 5909)

........

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

Merged revisions 398103 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398116 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 19:22:59 +00:00
Matthew Jordan dbbb674be0 Update UPGRADE.txt file for Asterisk 12
This simply pulls in the changes that were breaking from the CHANGES file
and updates a few other areas accordingly. It also removes the 10 => 11
notes, which are traditionally removed from each major version and stored
in the appropriate UPGRADE-X.txt file.
........

Merged revisions 398100 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 18:38:00 +00:00
Jonathan Rose 0dfe658a5c features_config: Ignore parkinglots in features.conf instead of failing to load
Parkinglots are defined in res_features.conf now, but this patch fixes
features_config so that features don't fail to load when parkinglots
are present in features.conf

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

Merged revisions 398068 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 18:30:01 +00:00
Jonathan Rose dcaa0cf659 features_config: Don't require features.conf to be present for Asterisk to load
(closes issue ASTERISK-22426)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2806/
........

Merged revisions 398020 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 18:04:41 +00:00
Kevin Harwell af1747ee6c Memory leak fix
ast_xmldoc_printable returns an allocated block that must be freed by the
caller.  Fixed manager.c and res_agi.c to stop leaking these results.

(closes issue ASTERISK-22395)
Reported by: Corey Farrell
Patches:
     manager-leaks-12.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)
........

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

Merged revisions 398061 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398062 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:59:06 +00:00
Richard Mudgett 9f1379686f test_substitution: Fix failing test.
Revert the -r392190 change.  The original test was correct.  The CDR code
was actually returning an unititialized buffer.
........

Merged revisions 398025 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:11:06 +00:00
Richard Mudgett b27160406c test_substituition: Fix failed test reporting to actually report failure.
You cannot put the "Testing <blah> pass/fail" on a single line before
actually performing the test.  Now any additional failure information is
logged before the test pass/fail announcement.

* Added an additional CDR(answer,u) test.
........

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

Merged revisions 398019 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398023 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:03:09 +00:00
Kevin Harwell 87bedd0695 Fix memory leaks
(closes issue ASTERISK-22368)
Reported by: Corey Farrell
Patches:
     issueA22368_mixmonitor_free_filename.patch uploaded by wdoekes (license 5674)
........

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

Merged revisions 398011 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398016 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 16:27:57 +00:00
Kevin Harwell 1d3d6e0661 Check return value on fwrite
........

Merged revisions 398000 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398002 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 15:39:09 +00:00
David M. Lee 9bed50db41 optional_api: Fix linking problems between modules that export global symbols
With the new work in Asterisk 12, there are some uses of the
optional_api that are prone to failure. The details are rather involved,
and captured on [the wiki][1].

This patch addresses the issue by removing almost all of the magic from
the optional API implementation. Instead of relying on weak symbol
resolution, a new optional_api.c module was added to Asterisk core.

For modules providing an optional API, the pointer to the implementation
function is registered with the core. For modules that use an optional
API, a pointer to a stub function, along with a optional_ref function
pointer are registered with the core. The optional_ref function pointers
is set to the implementation function when it's provided, or the stub
function when it's now.

Since the implementation no longer relies on magic, it is now supported
on all platforms. In the spirit of choice, an OPTIONAL_API flag was
added, so we can disable the optional_api if needed (maybe it's buggy on
some bizarre platform I haven't tested on)

The AST_OPTIONAL_API*() macros themselves remained unchanged, so
existing code could remain unchanged. But to help with debugging the
optional_api, the patch limits the #include of optional API's to just
the modules using the API. This also reduces resource waste maintaining
optional_ref pointers that aren't used.

Other changes made as a part of this patch:
 * The stubs for http_websocket that wrap system calls set errno to
   ENOSYS.

 * res_http_websocket now properly increments module use count.

 * In loader.c, the while() wrappers around dlclose() were removed. The
   while(!dlclose()) is actually an anti-pattern, which can lead to
   infinite loops if the module you're attempting to unload exports a
   symbol that was directly linked to.

 * The special handling of nonoptreq on systems without weak symbol
   support was removed, since we no longer rely on weak symbols for
   optional_api.

 [1]: https://wiki.asterisk.org/wiki/x/wACUAQ

(closes issue ASTERISK-22296)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2797/
........

Merged revisions 397989 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:40:27 +00:00
David M. Lee 7f547872e4 ARI: Implement /recordings/stored API's
his patch implements the ARI API's for stored recordings. While the
original task only specified deleting a recording, it was simple
enough to implement the GET for all recordings, and for an individual
recording.

The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.

There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
'wishful thinking' fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.

The GET /recordings/live operation was removed, since it's not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we'd probably want to
also list all of the current playbacks. Which seems weird.)

(closes issue ASTERISK-21582)
Review: https://reviewboard.asterisk.org/r/2693/
........

Merged revisions 397985 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:28:50 +00:00
David M. Lee 51cd0ea28b Multiple revisions 397975-397976
........
  r397975 | rmudgett | 2013-08-29 20:00:00 -0500 (Thu, 29 Aug 2013) | 1 line
  
  pbx.c: Make ast_str_substitute_variables_full() not mask variables.
........
  r397976 | rmudgett | 2013-08-29 20:00:41 -0500 (Thu, 29 Aug 2013) | 1 line
  
  Revert last commit.
........

Merged revisions 397975-397976 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:27:52 +00:00
Richard Mudgett bac9a478eb pbx.c: Make pbx_substitute_variables_helper_full() not mask variables.
........

Merged revisions 397977 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 01:20:05 +00:00
Mark Michelson eb955dad9a Sanitize XML output for PIDF bodies.
PJSIP's PIDF API does not replace angle brackets with
their appropriate counterparts for XML. So we have to
do it ourself. In this particular case, the problem had
to do with attempting to place an unsanitized SIP URI
into an XML node. Now we don't get a 488 from recipients
of our PIDF NOTIFYs.
........

Merged revisions 397968 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 00:11:22 +00:00
Mark Michelson b5f61b5608 Fix method for creating activities string in PIDF bodies.
The previous method did not allocate enough space to create
the entire string, but adjusted the string's slen value to
be larger than the actual allocation. This resulted in garbled
text in NOTIFY requests from Asterisk.

This method allocates the proper amount of space first and then
writes the content into the buffer.
........

Merged revisions 397960 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 22:54:05 +00:00
Kevin Harwell d7b9a702d8 Verbose logging discrepancies
Refactored cases where a combination of ast_verbose/options_verbose were
present.  Also in general tried to eliminate, in as many places as possible,
where the options_verbose global variable was being used.  Refactored the way
local and remote consoles handle verbose message logging in an attempt to
solve the various discrepancies that sometimes would show between the two.

(closes issue AST-1193)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2798/
........

Merged revisions 397948 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 397958 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 22:49:24 +00:00