Manager's tcp/tls objects have a periodic function that purge old manager
sessions periodically. During shutdown, the underlying container holding
those sessions can be disposed of and set to NULL before the tcp/tls periodic
function is stopped. If the periodic function fires, it will attempt to
iterate over a NULL container.
This patch checks for whether or not the sessions container exists before
attempting to purge sessions out of it. If the sessions container is NULL,
we simply return.
Note that this error was also caught by the Asterisk Test Suite.
........
Merged revisions 375800 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375801 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375802 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The AstDB uses prepared SQLite3 statements to retrieve data from the SQLite3
database. These statements should be finalized during Asterisk shutdown so
that the SQLite3 database can be properly closed. Failure to finalize the
statements results in a memory leak and a failure when closing the database.
This patch fixes those issues by ensuring that all prepared statements are
properly finalized at shutdown.
(closes issue ASTERISK-20647)
Reported by: Corey Farrell
patches:
astdb-sqlite3_close.patch uploaded by Corey Farrell (license 5909)
........
Merged revisions 375761 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375763 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch fixes two memory leaks:
1) When building XML documentation items, the 'name' attribute was extracted
from XML elements but not properly freed after being copied into the item
being built.
2) When unloading XML documentation, the doctree container objects were not
properly freed.
This patch corrects these memory leaks. Note that this patch was modified
slightly for this commmit, as the case where the 'name' attribute doesn't
exist also wasn't handled in the item construction. This patch also checks
for that attribute not existing.
(closes issue ASTERISK-20648)
Reported by: Corey Farrell
Tested by: mjordan
patches:
xmldoc-memory_leak.patch uploaded by Corey Farrell (license 5909)
........
Merged revisions 375756 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The Asterisk Test Suite caught an error condition where a scheduled CDR batch
write can be deleted twice if two channels attempt to post their CDRs at the
same time. The batch CDR mutex is locked while the CDRs are appended to the
current batch list; however, it is unlocked prior to actually scheduling the
CDR write. As such, two threads can attempt to remove the currently scheduled
batch write at the same time, resulting in an assertion error.
This patch extends the time that the mutex is locked to encompass actually
scheduling the write. This prevents two threads from unscheduling the
currently scheduled write at the same time.
........
Merged revisions 375727 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375728 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375729 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
........
r375519 | rmudgett | 2012-10-30 16:06:15 -0500 (Tue, 30 Oct 2012) | 11 lines
chan_misdn: Timer primitives must be handled first.
The frm->addr is a different "address space" than the stack/instance
address of other Lx primitives. The test for B channel instance address
could fail.
Patches:
patch01_timers.diff (license #6372) patch uploaded by Guenther Kelleter
JIRA ABE-2888
........
r375520 | rmudgett | 2012-10-30 16:14:58 -0500 (Tue, 30 Oct 2012) | 10 lines
chan_misdn: Free memory in error paths and other memory leaks.
The one line commented with BUG is not easily fixable because there is no
de-init function one can call.
Patches:
patch02_memory.diff (license #6372) patch uploaded by Guenther Kelleter
JIRA ABE-2888
........
r375521 | rmudgett | 2012-10-30 16:38:41 -0500 (Tue, 30 Oct 2012) | 14 lines
chan_misdn: ISDN NT L2 de-establish/establish
* An NT-PTMP cannot de/establish L2 since it doesn't know the TEIs.
* On NT-PTP L2 is started when L1 is finally active in handle_l1.
* L2 deactivation logging cleanup.
* L2 aggregate link status is unknown for NT-PTMP, show as "UNKN".
* Removed unused functions and code for L2 handling.
Patches:
patch03_L2estab.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
JIRA ABE-2888
........
r375522 | rmudgett | 2012-10-30 16:56:14 -0500 (Tue, 30 Oct 2012) | 22 lines
chan_misdn: Fix broken upper_id/lower_id usage.
Sending PH prim via lower_id layer (3 or 1) simply does not work. For TE
(3) it returns an error (len=-6) which is not evaluated by handle_l1(), so
the L1 layer status ends up wrong. Instead PH must be sent via L4, only
then does it reach L1 without an error message.
And NT PH prims only reach L1 when they are sent to layer 2 id.
--> use upper_id to send PH primitives.
* Check for errors in PH_(DE)ACTIVATE | CONFIRM.
* Debug messages are improved.
* The lower_id is now not used for anything, except: Why is lower_id layer
deleted when it wasn't created? I removed this code since it looks very
wrong.
Patches:
patch04_l1activation.diff (license #6372) patch uploaded by Guenther Kelleter
JIRA ABE-2888
........
r375523 | rmudgett | 2012-10-30 17:29:15 -0500 (Tue, 30 Oct 2012) | 31 lines
chan_misdn: Fix loss of B channels if L1 is down.
If you make 2 calls out an NT PTMP port which is not connected to any
phone, the B channel associated with that call becomes unusable until
Asterisk is restarted.
The problem is the EVENT_SETUP is queued when L1 is not up in
misdn_lib_send_event(). If L1 cannot be activated the event won't be
dequeued. It gets even worse when the call is hung up. The queued
EVENT_SETUP will be overwritten by an EVENT_DISCONNECT. The reserved B
channel then will never be freed. If later someone connects a phone to
the port, L1 will eventually activate and the queued EVENT_DISCONNECT is
sent down the stack. However, it is ignored because it is the wrong call
state.
The real fix would be that activation and queueing for a new SETUP is done
by the NT stack. But since it doesn't, the workaround must be removed
because it doesn't always work.
Fix: The event is no longer queued but immediately sent to the stack. If
L1 cannot be activated, the L3 state machine that was started by the
EVENT_SETUP will do its work, i.e. a timeout will release the B channel
properly. The SETUP possibly cannot be sent the first time but is resent
by T303 in case L1 could be activated.
Patches:
patch05_bchan-loss.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
JIRA ABE-2888
........
r375524 | rmudgett | 2012-10-30 18:26:05 -0500 (Tue, 30 Oct 2012) | 13 lines
chan_misdn: Remove some calls to exit().
Try proper cleanup when something goes wrong in misdn_lib_init().
Especially do not call exit()!
* Fix memory leak because stack_destroy() does not free the stack struct.
Patches:
patch06_cleanup-init.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
JIRA ABE-2888
........
Merged revisions 375519-375524 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........
Merged revisions 375625 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375626 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375627 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
While looking at some debug logs, I noticed that it was being reported that the
SDP origin line was unsupported or failed. Upon looking into this on my local
machine, I found that I too was getting this debug message yet everything seemed
to be getting processed properly. What was discovered is, that, the variable to
determine what is displayed in the debug message for the SDP line that was
processed, was not being set for the origin line when the result was successful.
This patch fixes this and was tested on local machine.
........
Merged revisions 375594 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375601 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375613 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
A regression was introduced in chan_sip by changes to sip reload introduced by
r349097. That patch moved peer purging from the beginning of the reload to
after the general configuration was finished. This patch fixes that by undoing
the repositioning of the original peer purging code and using a similar
function after performing general configuration that purges only autocreated
peers that were created when persist mode isn't enabled.
(closes issue ASTERISK-20611)
Reported by: Alisher
Review: https://reviewboard.asterisk.org/r/2171/
........
Merged revisions 375575 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
On some systems the optional API support uses the GCC compiler attribute "weakref" to provide its
functionality. This code changes the function names and prefixes "__" to the front. The
res_http_websocket exports file did not take this into account, thereby not allowing those functions
to be global and ultimately found.
(closes issue ASTERISK-20631)
Reported by: danjenkins
........
Merged revisions 375559 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Unlike all other calendar modules, res_calendar_ews fails to extract the Body
information for a calendar item. This is due, in part, to a quirk in the
schema in the XML - not only does a CalendarItem contain a Body element, but
the CalendarItem exists as a descendant of a different Body element. The neon
parser was erroneously skipping all Body elements.
This patch fixes that by bypassing Body elements that are not a child of
CalendarItem, and parsing the Body element out if it is a child.
Note that the original patch by Terry Wilson only needed slight modifications
to make it properly pull the Body information out; as such, while I've linked
to the patch that I uploaded for Dmitry, I've attributed the patch to Terry.
(closes issue ASTERISK-19738)
Reported by: Dmitry Burilov
Tested by: Dmitry Burilov
patches:
calendar_ews_body_2012_10_29.diff uploaded by Terry Wilson (license 6283)
........
Merged revisions 375528 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375531 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375532 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When confbridge was changed to handle conference status with a state machine in
r374658. The function responsible for starting recording for a conference was
refactored with the function actually responsible for launching the recording
thread being split into a function with another name. The old function name was
still used for manually started recordings through AMI or CLI. This patch fixes
that by switching which function is used to start recording the conference.
(closes issue ASTERISK-20601)
Reported by: Vilius
Patches:
confbridge_mixmonitor.diff uploaded by Jonathan Rose (license 6182)
........
Merged revisions 375470 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375471 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
If a "sip reload" is issued for a SIP peer, then his
IP address will be cleared, thus resulting in forgetting the
public IP address. Asterisk will then attempt to route SIP
traffic to the private IP address.
The fix here is to make "sip reload" ignore realtime peers
when "host = dynamic" is spotted. Realtime peers can now only
have their IP address reset if they have gone from being not
dynamic to being dynamic.
(closes issue ASTERISK-18203)
reported by daren ferreira
(closes issue ASTERISK-20572)
reported by JoshE
Patches:
fix_nat_realtime.diff uploaded by JoshE (license #6075)
........
Merged revisions 375415 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375417 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375437 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When a caller enters a queue and no queue member answers the call, the current
behaviour can be a little odd depending on the paused status of the queue
members. If any queue member is paused, but not all, the CDR disposition
will be BUSY. If all queue members are paused, then the CDR disposition is
based instead on the disposition of the call prior to entering the Queue.
This patch modifies the behaviour in the following ways:
* If no queue members are paused, the CDR disposition is whatever the
disposition was prior to going into Queue. If the call was answered this
will be ANSWERED; otherwise, it is NO ANSWER.
* If some queue members are pused, the CDR result is NO ANSWER. (This is a
change in behaviour, as the result would previously have been BUSY)
* If all queue members are paused, the CDR result is whatever the result was
prior to going into Queue. This is the same as the behaviour prior to this
patch.
* If the caller hangs up, times out, or presses '*' with the 'h' option, the
CDR disposition is again not set and is dependent on whether or not the
caller was Answered prior to entering Queue.
This patch was based on one provided by Thomas Arimont, but has been modified
to accomodate findings by the reviewers.
Review: https://reviewboard.asterisk.org/r/2064/
(closes issue AST-906)
Reported by: Thomas Arimont
(closes issue ASTERISK-17776)
Reported by: Attila Megyeri
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Fix documentation error when validating the xml in trunk caused by r375150.
Moved the description end tag down to below the variablelist element end tag.
Found when compiling with --dev-mode-enabled.
(issue ASTERISK-20289)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Make git more attractive for managing work-in-progress. Especially
convenient when a potential patch set needs to be tested on multiple
platforms since one can use git to keep all the test environments in sync
independent of a subversion server.
Now the Asterisk version will show the exact git SHA5 that was used when
building (still appended by "M" if there are local modifications) from a
git clone of the Asterisk repository so the developer can more easily know
what is actually under test.
You will now get this:
$ asterisk -V
Asterisk GIT-1698298
Instead of this:
$ asterisk -V
Asterisk UNKNOWN__and_probably_unsupported
This has zero impact for those not using git with the exception of an
extra test in the configure script to gather git's path. This is
necessary to prevent "sudo make install" from failing since git may not be
in the path in make's shell environment.
(closes issue ASTERISK-20483)
Reported by: Shaun Ruffell
Patches:
0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch (license #5417) patch uploaded by Shaun Ruffell
Modified
........
Merged revisions 375189 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375190 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375191 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing. Update title that was left behind many years ago.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Upon further examination, this code was causing compliation problems on
CentOS at the least (possibly on any machine without curses) and also
the local value of COLS is used even with a remote console, so it is
less than ideal.
(issue ASTERISK-20396)
Reported by: Johan Wilfer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Commiting this on behalf of Kaloyan Kovachev (license 5506).
AlarmReceiver now supports the following DTMF signaling types:
- ContactId
- 4x1
- 4x2
- High Speed
- Super Fast
We are also auto-detecting which signaling is being received. So support for
those protocols should work out-the-box. Correctly identify ALAW / ULAW calls.
Some enhanced protection for broken panels and malicious callers where added.
(closes issue ASTERISK-20289)
Reported by: Kaloyan Kovachev
Review: https://reviewboard.asterisk.org/r/2088/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Remove the "RTP Read too short" warning for RTP keepalives. Remove the
the warning about the application delimiter switch from pipe to comma.
(You should've done this by now.) Make cdr_odbc report more when an
insert fails. Make chan_sip warn less when the peer wants SRTP (and we
don't) or sends a zero port to disable a media type.
Review: https://reviewboard.asterisk.org/r/2167
(closes issue ASTERISK-20538)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
In many cases (for peers behind NAT or for TCP sockets) we do not need
to look up any hostname in the Contact (or Route) when sending an
in-dialog request. This should reduce netsock2.c: getaddrinfo errors in
certain scenarios.
Review: https://reviewboard.asterisk.org/r/2156
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
manager show commands now shows the full name of the command being displayed
regardless of size. The privilege column has also been removed from this
display. It will also now use the full length of the terminal if curses is
available. Manager show command will now always display the privilege of
the manager command within the CLI.
(closes ASTERISK-20396)
Reported by: Johan Wilfer
Review: https://reviewboard.asterisk.org/r/2143/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
- receive_dtmf_digits had the wrong buffer length
- app_alarmreceiver should wait 100ms before sending the second part of handshake
(closes issue ASTERISK-20484)
Reported by: Jean-Philippe Lord
Tested by: Jean-Philippe Lord, Pedro Kiefer
Patches:
ASTERISK-20484_v2.diff uploaded by Kaloyan Kovachev (license 5506)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Passing an ast_str pointer by value that then calls
ast_str_set(), ast_str_set_va(), ast_str_append(), or
ast_str_append_va() can result in the pointer originally
passed by value being invalidated if the ast_str had
to be reallocated.
This fixes places in the code that do this. Only the
example in ccss.c could result in pointer invalidation
though since the other cases use a stack-allocated ast_str
and cannot be reallocated.
I've also updated the doxygen in strings.h to include
notes about potential misuse of the functions mentioned
previously.
Review: https://reviewboard.asterisk.org/r/2161
........
Merged revisions 375025 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375026 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375027 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Update title that was left behind many years ago. Used revision 6596 as my guide for what it should be.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Update and extend the configuration_file group and enable linking. Update title that was left behind many years ago.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Update and extend the configuration_file group and enable linking. Update title that was left behind many years ago.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Update and extend the configuration_file group and enable linking to the application. Update title that was left behind many years ago.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375004 65c4cc65-6c06-0410-ace0-fbb531ad65f3