file:///srv/subversion/repos/asterisk/trunk
................
r378322 | mjordan | 2013-01-02 12:11:59 -0600 (Wed, 02 Jan 2013) | 33 lines
Prevent exhaustion of system resources through exploitation of event cache
Asterisk maintains an internal cache for devices in the event subsystem. The
device state cache holds the state of each device known to Asterisk, such that
consumers of device state information can query for the last known state for
a particular device, even if it is not part of an active call. The concept of
a device in Asterisk can include entities that do not have a physical
representation. One way that this occurred was when anonymous calls are allowed
in Asterisk. A device was automatically created and stored in the cache for
each anonymous call that occurred; this was possible in the SIP and IAX2
channel drivers and through channel drivers that utilized the
res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
are never removed from the system, allowing anonymous calls to potentially
exhaust a system's resources.
This patch changes the event cache subsystem and device state management to
no longer cache devices that are not associated with a physical entity.
(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore
patches:
event-cachability-3.diff uploaded by jcolp (license 5000)
........
Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
file:///srv/subversion/repos/asterisk/trunk
................
r378011 | wedhorn | 2012-12-13 19:55:43 -0600 (Thu, 13 Dec 2012) | 15 lines
Fix skinny to recognise vmexten in general section of conf
Fixup the vmexten so if globally set in general section will be honored by
chan_skinny. Also get rid of the 'global_' part of variable name to match
regexten.
(closes issue AST-20790)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
skinny-vm.diff uploaded by snuffy (license 5024)
........
Merged revisions 378010 from http://svn.asterisk.org/svn/asterisk/branches/11
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
file:///srv/subversion/repos/asterisk/trunk
................
r378000 | seanbright | 2012-12-13 15:20:32 -0600 (Thu, 13 Dec 2012) | 8 lines
Make generate_exchange_uuid() always return the passed ast_str pointer.
I changed this code earlier to return NULL if it wasn't able to generate a UUID,
whereas the earlier code would always return the ast_str that was passed in.
Switch back to returning the ast_str, only set it to the empty string instead if
UUID generation fails. We still do a validity check later which will catch this
and blow up if necessary.
................
r378001 | wedhorn | 2012-12-13 15:25:31 -0600 (Thu, 13 Dec 2012) | 9 lines
Minor fixes for chan_skinny
Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and
correct len of 2 strcmp in skinny_setdebug(). (see opticron's review
on https://reviewboard.asterisk.org/r/2240/)
........
Merged revisions 377991 from http://svn.asterisk.org/svn/asterisk/branches/11
................
r378002 | rmudgett | 2012-12-13 15:28:15 -0600 (Thu, 13 Dec 2012) | 35 lines
confbridge: Fix MOH on simultaneous user entry to a new conference.
When two users entered a new conference simultaneously, one of the callers
hears MOH. This happened if two unmarked users entered simultaneously and
also if a waitmarked and a marked user entered simultaneously.
* Created a confbridge internal MOH API to eliminate the inlined MOH
handling code. Note that the conference mixing bridge needs to be locked
when actually starting/stopping MOH because there is a small window
between the conference join unsuspend MOH and actually joining the mixing
bridge.
* Created the concept of suspended MOH so it can be interrupted while
conference join announcements to the user and DTMF features can operate.
* Suspend any MOH until the user is about to actually join the mixing
bridge of the conference. This way any pre-join file playback does not
need to worry about MOH.
* Made post-join actions only play deferred entry announcement files.
Changing the user/conference state during that time is not protected or
controlled by the state machine.
(closes issue ASTERISK-20606)
Reported by: Eugenia Belova
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/2232/
........
Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377993 from http://svn.asterisk.org/svn/asterisk/branches/11
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378003 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
Debugging messages and associated controls only compiled in if configured with --enable-dev-mode. Debug messages provide more detail (including thread id) and are grouped so the user/dev can limit the type of messages displayed. Functionally no real change to chan_skinny.
Review: https://reviewboard.asterisk.org/r/2040/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Added test to skinny_register to only allow device to register against
a device that is not already registered.
Addback l->device test for skinny_show_lines. Fixes segfault if a line
is configured but not configured to a device. Reverses part of r368680.
Removed redundant l->device tests in subsubstate and dumpsub. l->device
will always be valid if these routines are called. Reverses 368948 -
discussed with mjordan on irc.
Some indentation cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
AST-2012-008 (r367844) fixed a denial of service attack exploitable in the
Skinny channel driver that occurred when certain messages are sent after a
previously registered station sends an Off Hook message. Unresolved in that
patch is an issue in the Asterisk 10 releases, wherein, if a Station Key
Pad Button Message is processed after an Off Hook message, the channel driver
will inappropriately dereference a NULL pointer.
This patch fixes those places where the message handling or the channel
callback functions would attempt to dereference the line's pointer to the
device.
(issue ASTERISK-19905)
Reported by: Christoph Hebeisen
Tested by: mjordan, Christoph Hebeisen
Patches:
AST-2012-009-10.diff uploaded by mjordan (license 6283)
........
Merged revisions 368947 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Original was testing for d->session, setting and testing again (all nested).
Removed duplicate testing and restructured function to test/return and then
the main code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Removed d->registered which was mirroring d->session. Changed relevant
references to use d->session instead.
Moved setting and unsetting of l->device from session register to device
configuration. As such, l->device will always be valid unless it is has not
been configured to a device. Revised various test where checking if a device
is registered to use l->device->session.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Presence support has been added. This is accomplished by
allowing for presence hints in addition to device state
hints. A dialplan function called PRESENCE_STATE has been
added to allow for setting and reading presence. Presence
can be transmitted to Digium phones using custom XML
elements in a PIDF presence document.
Voicemail has new APIs that allow for moving, removing,
forwarding, and playing messages. Messages have had a new
unique message ID added to them so that the APIs will work
reliably. The state of a voicemail mailbox can be obtained
using an API that allows one to get a snapshot of the mailbox.
A voicemail Dialplan App called VoiceMailPlayMsg has been
added to be able to play back a specific message.
Configuration hooks have been added. Configuration hooks
allow for a piece of code to be executed when a specific
configuration file is loaded by a specific module. This is
useful for modules that are dependent on the configuration
of other modules.
chan_sip now has a public method that allows for a custom
SIP INFO request to be sent mid-dialog. Digium phones use
this in order to display progress bars when files are played.
Messaging support has been expanded a bit. The main
visible difference is the addition of an AMI action
MessageSend.
Finally, a ParkingLots manager action has been added in order
to get a list of parking lots.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When a skinny session is unregistered, the corresponding device pointer is set
to NULL in the channel private data. If the client was not in the on-hook state
at the time the connection was closed, the device pointer can later be
dereferened if a message or channel event attempts to use a line's pointer to
said device.
The patches prevent this from occurring by checking the line's pointer in
message handlers and channel callbacks that can fire after an unregistration
attempt.
(closes issue ASTERISK-19905)
Reported by: Christoph Hebeisen
Tested by: mjordan, Damien Wedhorn
Patches:
AST-2012-008-1.8.diff uploaded by mjordan (license 6283)
AST-2012-008-10.diff uploaded by mjordan (licesen 6283)
........
Merged revisions 367844 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This is the starting point for the Asterisk 11: Who Hung Up work and provides
a framework which will allow channel drivers to report the types of hangup
cause information available in SIP_CAUSE without incurring the overhead of the
MASTER_CHANNEL dialplan function. The initial implementation only includes
cause generation for chan_sip and does not include cause code translation
utilities.
This change deprecates SIP_CAUSE and replaces its method of reporting cause
codes with the new framework. This change also deprecates the 'storesipcause'
option in sip.conf.
Review: https://reviewboard.asterisk.org/r/1822/
(Closes issue SWP-4221)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When handling a keypad button message event, the received digit is placed into
a fixed length buffer that acts as a queue. When a new message event is
received, the length of that buffer is not checked before placing the new digit
on the end of the queue. The situation exists where sufficient keypad button
message events would occur that would cause the buffer to be overrun. This
patch explicitly checks that there is sufficient room in the buffer before
appending a new digit.
(closes issue ASTERISK-19592)
Reported by: Russell Bryant
........
Merged revisions 363100 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........
Merged revisions 363102 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 363103 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Fixes up softkey endcall. Previous code was a copy of onhook, now
allows for endcall softkey to be used while device is still onhook.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.
Review: https://reviewboard.asterisk.org/r/1661/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.
This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.
The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.
The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).
Review: https://reviewboard.asterisk.org/r/1655/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Fix a segfault if an attempt to answer a call is made between when
the inbound call gives up (and the channel is removed) and when the
device is notified and removes the call from the device.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
If a simple switch was started on a device and then a specific call
made (such as redial or speed dial), on timeout of the simple switch
the call would be attempted again. This patch only allows the simple
switch to make a call if the substate is still in the collecting
digits mode.
Also added small debug message to dialAndAactivate sub.
Tested by snuff and myself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Added some data to skinny packet structures to make compatible
with v17. Added protocolversion to device, set on registration
based on the version provided by device.
v17 includes some increased ip space for ip6. This patch increases
ip space in the packets but still only uses ip4. Some packet
structures duplicated (ip4 and ip6 types). ip4 type used unless
version is greater or equal to 17.
Tested by snuff and myself on 7961 with recent 8.5 firmware. Also
tested compatible with old 7960 and older 30VIPs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Increase SKINNY_MAX_PACKET to 2000 bytes to handle some messages
in v17 that are greater than the old 1000 bytes. Also add some
useful logging regarding packet and session handling.
A device (with protocol v17) was sending a packet with length
greater than 1000 which resulted in the TCP session being
destroyed and registration being retryed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/10
........
r340031 | wedhorn | 2011-10-10 09:18:27 +1100 (Mon, 10 Oct 2011) | 8 lines
Return -1 to skinny_session if register rejected.
If device registration is rejected, return -1 so that the session is
destroyed immediately. Previously, a segfault would occur on a
graceful shutdown if a register is rejected and the skinny_session
has not yet timed out.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/10
........
r339992 | wedhorn | 2011-10-10 08:09:12 +1100 (Mon, 10 Oct 2011) | 9 lines
Remove log message on traverse session list.
On destroying a session, a list of sessions is traversed to find the
matching session. For each session not matching, skinny erroneously
logged that the session was not matched. While technically correct
the message was misleading, and tended to indicate errors that
were not there.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
There was an issue that the cap and confcap pointers for each line and device
were being memcpy'd so they all pointed to the same ast_format_cap. On
destroying, a segfault occured on the second call to the same struct.
skinny reload now works again as well.
Tested by snuff and myself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
https://origsvn.digium.com/svn/asterisk/branches/10
................
r335078 | mjordan | 2011-09-09 11:27:01 -0500 (Fri, 09 Sep 2011) | 29 lines
Merged revisions 335064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r335064 | mjordan | 2011-09-09 11:09:09 -0500 (Fri, 09 Sep 2011) | 23 lines
Updated SIP 484 handling; added Incomplete control frame
When a SIP phone uses the dial application and receives a 484 Address
Incomplete response, if overlapped dialing is enabled for SIP, then
the 484 Address Incomplete is forwarded back to the SIP phone and the
HANGUPCAUSE channel variable is set to 28. Previously, the Incomplete
application dialplan logic was automatically triggered; now, explicit
dialplan usage of the application is required.
Additionally, this patch adds a new AST_CONTOL_FRAME type called
AST_CONTROL_INCOMPLETE. If a channel driver receives this control frame,
it is an indication that the dialplan expects more digits back from the
device. If the device supports overlap dialing it should attempt to
notify the device that the dialplan is waiting for more digits; otherwise,
it can handle the frame in a manner appropriate to the channel driver.
(closes issue ASTERISK-17288)
Reported by: Mikael Carlsson
Tested by: Matthew Jordan
Review: https://reviewboard.asterisk.org/r/1416/
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Autoanswer added to skinny based on incoming chan var SKINNY_AUTOANSWER.
Initial value must be the time to autoanswer in ms, then optionally :BEEP
to play a tone when answered and :MUTE to mute the mic when answering.
eg 3000:MUTE:BEEP will ring for 3 secs, then answer, mute the mic, and
play a beep. just 3000 would answer afer 3 secs of ringing with no
beep and full two way audio.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The do_monitor seemed to be there for task scheduling and network monitoring. However, the network monitoring has a dedicated thread so the ast_io_wait was basically just a usleep as it didn't actually seem to be monitoring anything.
Review: https://reviewboard.asterisk.org/r/1256/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Probably haven't been working for a couple of years. May still need
some more love, but they are now working, both as a hint device and
monitoring a hint. Changes centre around the long ago change
to remove the requirement for a device name in a skinny line, and
changes to the transmit_* functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
When called, activatesub first cleans up the active sub and then
handles the sub passed. dialandactivatesub first sets sub->exten
and then calls activatesub. Revise handle_offhook to utilise the
callid sent to chan_skinny. Some other minor fixes especially around
d->hookstate (which still needs some more work).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
There were some issues where if a simple switch was cancelled and a
new switch started before the first had timed out where the d->exten
would be used for both subchannels. This was bad leading to possible
invalid extensions if some digits had been entered in the abandoned
simple switch and the second one was completed before the first timed
out, or the second would be cancelled because d->exten would be set to
nothing on the time out of the first.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318833 65c4cc65-6c06-0410-ace0-fbb531ad65f3