Commit Graph

22737 Commits

Author SHA1 Message Date
Matthew Jordan
299ef1b3dc Add check for openSUSE when detecting bfd library
In ASTERISK-17842, some additional library checks were added to the configure
script so that the bfd library could be found on CentOS and Fedora systems.

As it turns out, openSUSE requires an additional library. This patch adds
another check to the configure script for openSUSE that will add that library.

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

(closes issue AST-1169)
Reported by: Guenther Kelleter


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@400073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28 21:25:19 +00:00
Richard Mudgett
e51430e17e chan_sip: Increase some scratch buffer sizes dealing with caller id.
* Eliminated an unnecessary initialization in check_user_full().

(closes issue ASTERISK-22477)
Reported by: Michael Shepelev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@400013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27 21:31:22 +00:00
Jonathan Rose
cae74964d7 chan_sip: Reject calls on 200 OKs if no SDP has been received
When Asterisk receives a 200 OK in response to an invite, that peer should have
sent an SDP at some point by then. If the channel has never received an SDP,
media won't have been set and the remote address won't be known. Endpoints in
general should not be doing this. This patch makes it so that Asterisk will
simply hang up a call if it sends a 200 OK at this point. So far this odd
behavior for endpoints has only been observed in tests which involved manually
created SIP transactions in SIPp.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27 17:13:19 +00:00
Richard Mudgett
d371f21552 chan_dahdi: CLI "core stop gracefully" has needless delay for PRI and SS7.
The PRI and SS7 link control threads are not stopped correctly when the
chan_dahdi.so module is unloaded.  The link control threads pri_dchannel()
and ss7_linkset() are not awakened from a poll() to cancel the thread.

* Added a SIGURG signal after requesting the thread cancel to break the
link control thread poll() immediately.

For SS7 it was slightly worse, the link poll() timeout would always be
whatever was the last libss7 scheduled event time used.  If no libss7
scheduled event was pending, the thread could run more often than
necessary.

* Set nextms to 60 seconds for the ss7_linkset() poll() if there is no
other libss7 scheduled event.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25 20:23:07 +00:00
Michael L. Young
bd46e6f482 chan_sip: Fix Realtime Peer Update Problem When Un-registering And Expires Header In 200ok
1st Issue
When a realtime peer sends an un-REGISTER request, Asterisk
un-registers the peer but the database table record still has regseconds and
fullcontact for the peer.  This results in calls attempting to be routed to the
peer which is no longer registered.  The expected behavior is to get
busy/congested when attempting to call an un-registered peer through the
dialplan.

What was discovered is that we are clearing out the peer's registration in the
database in parse_register_contact() when calling expire_register() but then
upon returning from parse_register_contact(), update_peer() is run which stores
back in the database table regseconds and fullcontact.

2nd Issue
The reporter pointed out that the 200 ok being returned by Asterisk
after un-registering a peer contains a Contact header with ;expires= and the
Expires header is not set to 0.  This is actually a regression.

Tests were created for this second issue (ASTERISK-22548).  The tests have been
reviewed and a Ship It! was received on those tests.

This patch does the following:

* Do not ignore the Expires header value even when it is set to 0.  The patch
  sets the pvt->expiry earlier on in the function so that it is set properly and
  used.

* If pvt->expiry is 0, do not call update_peer since that means the peer has
  already been un-registered and there is no need to update the database record
  again since nothing has changed.

(closes issue ASTERISK-22428)
Reported by: Ben Smithurst
Tested by: Ben Smithurst, Michael L. Young
Patches:
  asterisk-22428-rt-peer-update-and-expires-header.diff
                                              by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25 19:25:57 +00:00
Richard Mudgett
de772e22b2 chan_iax2: Prevent some needless breaking of the native IAX2 bridge.
* Clean up some twisted code in the iax2_bridge() loop.

* Add AST_CONTROL_VIDUPDATE and AST_CONTROL_SRCCHANGE to a list of frames
to prevent the native bridge loop from breaking.

* Passing the AST_CONTROL_T38_PARAMETERS frame should also allow FAX over
a native IAX2 bridge.

(issue ABE-2912)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-24 20:03:30 +00:00
Jonathan Rose
2a2edececa chan_sip: Make direct media reinvites for T38 put Asterisk in the media path
Prior to this patch, Asterisk would incorrectly use the previous endpoint
addresses in SDP in spite of providing its own port. T38 is never meant to
be done through directmedia and Asterisk should always be in the media path
for these streams.

(closes issue ASTERISK-17273)
Reported by: Kevin Stewart

(closes issue ASTERISK-18706)
Reported by: Jeremy Kister

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-19 16:34:46 +00:00
Kinsey Moore
4626075eaf Fix jitter buffer log file creation
This adjusts '/'-to-'#' replacement to replace all instances of '/'
instead of just the first to ensure that the jitter buffer log file
gets the correct name as per Richard Kenner's suggestion.

(closes issue ASTERISK-21036)
Reported by: Richard Kenner


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 19:54:36 +00:00
Matthew Jordan
dc23d0a19e Update prep_tarball with new documentation files on the Asterisk wiki
This will now pull both a command reference for the version being prepared,
as well as an Admin Guide that applies to all versions of Asterisk.

(issue ASTERISK-22439)
Reported by: Olle Johansson


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 17:15:32 +00:00
Michael L. Young
da09847884 Fix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid
When processing the lines under the [applicationmap] context in features.conf, a
segfault occurs from attempting to process a line with an invalid syntax
(basically missing most of the arguments).

Example:
[applicationmap]
automon=*6

* This patch moves the checking for empty arguments to before they are accessed.

* Also, checked the "todo" comment and removed it.  Some applications do not
  require arguments.

(closes issue ASTERISK-22416)
Reported by: CGI.NET
Tested by: CGI.NET
Patches:
    asterisk-22416-check-syntax-first_v2.diff by Michael L. Young (license 5026)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18 01:32:36 +00:00
Richard Mudgett
d847fec0cc chan_iax2: Fix saving the wrong expiry time in astdb.
When a new IAX2 client registers, the astdb database is updated with the
value of minregexpire defined in iax.conf instead of using the expiry time
that is provided by the client.  The provided expiry time of the client is
updated after inserting the astdb entry.  As a consequence, restarting or
reloading asterisk creates clients whose registration may expire before
they reregister.  The clients are therefore unavailable after minregexpire
seconds until they reregister.

* Move updating of the expiry time to before inserting into the astdb.

(closes issue ASTERISK-22504)
Reported by: Stefan Wachtler
Patches:
      chan_iax2.c.patch (license #6533) patch uploaded by Stefan Wachtler


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-16 16:37:56 +00:00
David M. Lee
d867a3f062 Don't write to /tmp/refs when REF_DEBUG is not defined.
If MALLOC_DEBUG is enabled, then the debug destructor for the container
is used, which would erroneously write to /tmp/refs. This patch only
uses the debug destructor if ref_debug is used.

(closes issue ASTERISK-22536)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-13 20:47:54 +00:00
Kinsey Moore
c7b56581a9 Fix several crashes in MeetMeAdmin
This change ensures that MeetMeAdmin commands requiring a user actually
get a user and fixes another issue where an extra dereference could
occur for a last-entered user being ejected if a user identifier was
also provided.

(closes issue ASTERISK-21907)
Reported by: Alex Epshteyn
Review: https://reviewboard.asterisk.org/r/2844/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@399033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-13 13:31:24 +00:00
Jonathan Rose
89a99670fc chan_sip: Revert r398835 due to failing tests involving originate
(issue ASTERISK-22424)
Reported by: Jonathan Rose


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-12 20:09:32 +00:00
Jonathan Rose
be50098c82 res_musiconhold: Fix reference leaks caused when reloading with REF_DEBUG set
Due to a faulty function for debugging reference decrementing, it was possible
to reduce the refcount on the wrong object if two moh classes of the same name
were in the moh class container.

(closes issue ASTERISK-22252)
Reported by: Walter Doekes
Patches:
    18_moh_debug_ref_patch.diff Uploaded by Jonathan Rose (license 6182)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-12 16:35:37 +00:00
Rusty Newton
75f0bf2d99 'queue add member' help text correction
You are adding dial strings to the queue, not channels. An aribitrary string
could be used, but you are typically referencing a channel. Correcting the
command help text.

(issue ASTERISK-22263)
(closes issue ASTERISK-22263)
Reported By: Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-12 00:00:51 +00:00
Rusty Newton
14344fb803 Documentation fix - waitfordialtone is not boolean, it's time in milliseconds
Changing text in chan_dahdi.conf sample to be accurate.

(issue ASTERISK-22308)
(closes issue ASTERISK-22308)
Reported By: Malcolm Davenport


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 23:47:53 +00:00
Jonathan Rose
79e1ec6fc1 chan_sip: Reject calls without prior SDP on 200 OK
If we receive a 200 OK without SDP, we will now check to see if
the remote address has been established for that channel's RTP
session and if the to tag for that channel has changed from
the most recent to tag in a response less than 200.
If either a change has been made since the last to-tag was
received or the remote address is unset, then we will drop
the call.

(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/diff/#index_header


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-11 19:39:36 +00:00
Richard Mudgett
303d6c56f9 Fix incorrect usages of ast_realloc().
There are several locations in the code base where this is done:
buf = ast_realloc(buf, new_size);

This is going to leak the original buf contents if the realloc fails.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:53:58 +00:00
David M. Lee
ac043540cc Fixed utils directory breakage from r398748, this time with extra hate.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:47:59 +00:00
David M. Lee
81f1dc6cf6 Fixed utils directory breakage from r398648
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 17:22:23 +00:00
Richard Mudgett
d5cfb62d89 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 23:15:38 +00:00
David M. Lee
ade59844ab 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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-09 19:56:02 +00:00
Kinsey Moore
f09236541e 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 20:56:31 +00:00
Kinsey Moore
05a7d1998d 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-06 19:16:14 +00:00
Richard Mudgett
d2935a3106 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().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 19:00:20 +00:00
Richard Mudgett
87cae88196 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 17:28:14 +00:00
Richard Mudgett
fedfa20fb7 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-05 17:07:44 +00:00
Richard Mudgett
7713917527 chan_iax2: Add missing control frame names to debug frame decode output. (Part 2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 23:32:15 +00:00
Richard Mudgett
5838f50b84 chan_iax2: Add missing control frame names to debug frame decode output.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 22:52:18 +00:00
Richard Mudgett
73b3b6a2de 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-04 15:54:37 +00:00
Walter Doekes
3108ab66e0 Be a little more verbose when loading cel_custom.conf.
Review: https://reviewboard.asterisk.org/r/2805/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-02 07:24:11 +00:00
Kevin Harwell
e179b6e56e 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

(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-1.8.patch uploaded by coreyfarrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 18:55:39 +00:00
Kevin Harwell
3c840c1224 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-1.8.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 17:50:03 +00:00
Kevin Harwell
cd825560a4 Fix memory leak
Fixed a features.c test that leaked a reference to a parked call.  This caused
chancount to never reach 0, so graceful shutdown stops.  Also added an
unregister test.

(closes issue ASTERISK-22413)
Reported by: Corey Farrell
Patches:
     features-TEST_FRAMEWORK.patch uploaded by coreyfarrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 16:58:34 +00:00
Richard Mudgett
287689849c 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@398018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 16:46:52 +00:00
Matthew Jordan
a706750d9a AST-2013-005: Fix crash caused by invalid SDP
If the SIP channel driver processes an invalid SDP that defines media
descriptions before connection information, it may attempt to reference
the socket address information even though that information has not yet
been set. This will cause a crash.

This patch adds checks when handling the various media descriptions that
ensures the media descriptions are handled only if we have connection
information suitable for that media.

Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing
the solution to this problem.

(closes issue ASTERISK-22007)
Reported by: wdoekes
Tested by: wdoekes
patches:
  issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27 17:55:59 +00:00
Matthew Jordan
6b05c47646 AST-2013-004: Fix crash when handling ACK on dialog that has no channel
A remote exploitable crash vulnerability exists in the SIP channel driver if an
ACK with SDP is received after the channel has been terminated. The handling
code incorrectly assumed that the channel would always be present.

This patch adds a check such that the SDP will only be parsed and applied if
Asterisk has a channel present that is associated with the dialog.

Note that the patch being applied was modified only slightly from the patch
provided by Walter Doekes of OSSO B.V.

(closes issue ASTERISK-21064)
Reported by: Colin Cuthbertson
Tested by: wdoekes, Colin Cutherbertson
patches:
  issueA21064_fix.patch uploaded by wdoekes (License 5674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-27 15:49:14 +00:00
Richard Mudgett
f49ffa9d4c Fix memory corruption when trying to get "core show locks".
Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch
in memory pools but had a math error determining the buffer size and
didn't address other similar memory pool mismatches.

* Effectively reverted the previous patch to go in the same direction as
trunk for the returned memory pool of ast_bt_get_symbols().

* Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is
defined.

* Fixed some formatting in ast_bt_get_symbols().

* Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is
enabled.

* Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when
MALLOC_DEBUG is enabled.

* Moved __dump_backtrace() because of compile issues with the utils
directory.

(closes issue ASTERISK-22221)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 15:34:27 +00:00
Walter Doekes
5b05ef1446 Add _IO_stdin_used in version-script to fix SIGBUSes on Sparc.
The --version-script,asterisk.exports linker flag (and the module
exports) didn't provide _IO_stdin_used in the list of exported symbols.
That causes some kind of libc compatibility mode to kick in, where
stdio file structures (stdout/stderr) land somewhere else. In the
case of the Sparc, they landed on misaligned memory.

This became apparent first after r376428 (Reorder startup sequence)
when a lot of ast_log's were replaced with fprintf's. Writing to
stderr triggered a SIGBUS. (Compared to x86 and amd64 architectures,
the Sparc is very picky about memory alignment.)

(issue ASTERISK-21763)
(issue ASTERISK-21665)

Reported by: Jeremy Kister
Review: https://reviewboard.asterisk.org/r/2760/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 08:19:02 +00:00
David M. Lee
0fcd6d1937 Complete http_shutdown.
This patch frees up some resources allocated in http.c.
 * tcp listeners stopped
 * tls settings freed
 * uri redirects freed
 * unregister internal http.c uri's

(closes issue ASTERISK-22237)
Reported by: Corey Farrell

Patches:
    http.patch uploaded by Corey Farrell (license 5909)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 17:00:07 +00:00
Matthew Jordan
527b7c06d0 Set 14400 as the default max bit rate if T38MaxBitRate is not specified
If an endpoint fails to include the T38MaxBitRate attribute during negotiation,
Asterisk will negotiate a bit rate of 2400 instead of the ITU recommended
bit rate of 14400. This patch fixes this by making AST_T38_RATE_14400 the
'default' value of the enum by assigning it a value of 0, such that if an
endpoint fails to include the attribute, the default will be 14400.

Note that Walter Doekes included the nice comment in frame.h about why we are
purposefully assigning AST_T38_RATE_14400 a value of 0.

(closes issue ASTERISK-22275)
Reported by: Andreas Steinmetz
patches:
  fax-fix.patch uploaded by anstein (License 6523)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 14:56:09 +00:00
Michael L. Young
8223968351 Fix Not Storing Current Incoming Recv Address
In 1.8, r384779 introduced a regression by retrieving an old dialog and keeping
the old recv address since recv was already set.  This has caused a problem when
a proxy is involved since responses to incoming requests from the proxy server,
after an outbound call is established, are never sent to the correct recv
address.

In 11, r382322 introduced this regression.

The fix is to revert that change and always store the recv address on incoming
requests.

Thank you Walter Doekes for helping to point out this error and Mark Michelson
for your input/review of the fix.

(closes issue ASTERISK-22071)
Reported by: Alex Zarubin
Tested by: Alex Zarubin, Karsten Wemheuer
Patches:
    asterisk-22071-store-recvd-address.diff by Michael L. Young (license 5026)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-21 02:09:21 +00:00
Mark Michelson
2c796bd884 Remove REF_DEBUG definition.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 17:40:51 +00:00
Mark Michelson
e34e46c457 Fix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of pvts.
(closes issue ASTERISK-22248)
reported by Corey Farrell
patches:
	test_sip_rtpqos.patch uploaded by Corey Farrell (license #5909)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 16:13:01 +00:00
Kinsey Moore
ec2f140b3d Unregister CLI commands on exit
This patch ensures that CLI commands enabled by DEBUG_FD_LEAKS and
DEBUG_THREADLOCALS are cleaned up properly on exit.

(closes issue ASTERISK-22238)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    debug_cli_unregister.patch uploaded by Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 15:26:24 +00:00
Kinsey Moore
4b007c059f Fix xmldoc memory leak
This fixes a single-attribute memory leak that was occurring when the
"required" attribute was not true.

(closes issue ASTERISK-22249)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    xmldoc-free_attr_required.patch uploaded by Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 14:24:52 +00:00
Kinsey Moore
3422dd98a5 Protect CEL from an invalid config on reload
This patch fixes CEL to properly handle an invalid config on reload.

(closes issue ASTERISK-22259)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    cel-config.patch uploaded by Corey Farrell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 13:51:41 +00:00
Walter Doekes
803adef97e Add "autoframing" option to sip.conf.sample and h323.conf.sample.
The autoframing option was added to chan_sip.c in r43243 (mogorman,
2006-09-19 01:32:57), but never made its way into the sample configs.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 11:46:08 +00:00
Matthew Jordan
402e78da63 Fix invalid access to disposed memory in main/data unit test
It is not safe to iterate over a macro'd list of ao2 objects, deref them such
that the item's destructor is called, and leave them in the list. The list
macro to iterate over items requires the item to be a valid allocated object
in order to proceed to the next item; with MALLOC_DEBUG on the corruption of
the linked list is caught in the crash.

This patch fixes the invalid access to free'd memory by removing the ao2 item
from the list before de-refing it.

Note that this is a backport of r396915 from Asterisk trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-20 01:17:31 +00:00