Commit Graph

425 Commits

Author SHA1 Message Date
Damien Wedhorn c0832b4765 Fix reload skinny with active devices.
Patch ensures that d->activeline and l->activesub are moved over to the
new device and line so that on callend the appropriate subs can be found
to complete hangup before device resets.

(closes issue ASTERISK-16610)
Reported by: wedhorn
Tested by: snuffy, myself
Patches: 
    skinny-reloadactive01.diff uploaded by wedhorn (license 5019)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 08:44:32 +00:00
Damien Wedhorn 44872e797c Reset skinny vmexten and immeddial char on reload.
Make skinny reset vmexten and immeddial to '\0' on reload to ensure that
it is set to '\0' if the appropriate item is removed/commented in 
skinny.conf. Also small fix re immeddial char in skinny.conf and add
immedial setting to skinny show settings.

(closes issue ASTERISK-21037)
Reported by: snuffy
Tested by: snuffy, myself
Patches: 
    immed_dial_fix.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06 06:55:02 +00:00
Damien Wedhorn 8bb9aa2f6d Add variable length displayprompt packet to skinny and use octals.
Add new variable length displayprompt packet (0x0145) to skinny. Uses the new 
packet if the device is reporting protocol versions >= 17.

Add the use of octal codes for sending prompts to both the new and old 
displayprompt messages (also cleaned up soft_key_template_default to use the 
defined octal codes).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-02 01:52:21 +00:00
Damien Wedhorn 523e472e1a Adds variable length callinfo packets to skinny.
Add packet 0x014A (variable length call info messages) to skinny for newer 
firmware. Plenty of unknown information but includes the equivalent functionality 
as the fixed size callinfo packet already included.
Only send this packet if protocol reported is >= 17.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-01 06:37:22 +00:00
Damien Wedhorn e9446501c9 Add force dial keys to skinny.
Adds a dial softkey when the device is in DAFD. The softkey is greyed (unusable) 
until a possible dialplan match is entered. Code includes updating 
transmit_selectsoftkeys to allow the use of a button mask. Also add option
to use # or * as a dial now button. Original patch by snuffy cleaned up by myself.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-25 05:49:54 +00:00
Damien Wedhorn ff32e094e5 Fix device call logging issues in skinny
Skinny device call logging (ie missed, place and received calls) has issues 
because the incorrect sequence of callstates is/can be sent to the device.
This patch removes some extra callstate updates driven by forces external
to skinny and ensures the needed intermediary callstate messages are sent.

(closes issue ASTERISK-20964)
Reported by: wedhorn
Tested by: snuffy, myself
Patches: 
    ast11-skinny-calllog01.diff uploaded by wedhorn (license 5019)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-21 07:26:04 +00:00
Damien Wedhorn 822f5f5ff1 Fix issues with skinny sessions
Fixes a couple of issues with the way skinny handles sessions by ensuring
sessions aren't used after being freed. Some other minor changes.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-20 03:06:28 +00:00
Damien Wedhorn 7d5345c9c0 Skinny blob cleanup
Cleanup of red blobs in chan_skinny and possible other small formatting issues.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06 21:37:59 +00:00
Damien Wedhorn f795062662 Add group and namedgroup pickup to skinny
Above says it all. Code by snuff, cleaned up by me. 

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06 21:09:43 +00:00
Damien Wedhorn bacc5e6604 Rewrite skinny dialing to remove threaded simpleswitch
This rewrite changes skinny dialing from the threaded simpleswitch
to a scheduled timeout approach. There were some underlying issues
with the threaded simple switch with occasional corruption and
possible segfaults.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06 20:45:12 +00:00
Matthew Jordan 8fb5bdce9a 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/trunk@378322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 18:11:59 +00:00
Damien Wedhorn cb6e00b408 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 ASTERISK-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/trunk@378011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 01:55:43 +00:00
Damien Wedhorn b514659d1c Add g722 codec support to skinny
(closes issue ASTERISK-20788)
Reported by: snuffy
Tested by: snuffy, myself
Patches: 
    skinny-g722.diff uploaded by snuffy (license 5024)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 01:02:15 +00:00
Damien Wedhorn 5cf8a1f2e5 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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 21:25:31 +00:00
Damien Wedhorn 758cad0984 Fix skinny debug tab completion
Review the syntax of the 'skinny debug' command to show more than
just 'show' for options to 'skinny debug' command.

(closes issue ASTERISK-20789)
Reported by: snuffy
Tested by: snuffy, myself
Patches:
    skinny-debug.diff uploaded by snuffy (license 5024)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 18:28:41 +00:00
Damien Wedhorn 732767f230 Fix for chan_skinny leaving RTP ports open
Skinny wasn't closing RTP sockets. This patch includes ast_rtp_instance_stop before 
ast_rtp_instance_destroy which fixes the problem. Also add destroy for VRTP (which 
I believe is unused, but exists).

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 21:03:56 +00:00
Mark Michelson da85f8489f Make evaluation of channel variables consistently case-sensitive.
Due to inconsistencies in how variable names were evaluated, the
decision was made to make all evaluations case-sensitive. See the
UPGRADE.txt file or https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity
for more details.

(closes issue ASTERISK-20163)
reported by Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29 21:27:09 +00:00
Andrew Latham 3820f1586e Doxygen Updates - Title update
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
2012-10-14 21:47:40 +00:00
Andrew Latham 99e1174bfa Doxygen Cleanup
Start adding configuration file linking and pages.  Add module loading doxygen block.

Breaking up commits to keep it easy to track

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01 23:24:35 +00:00
Damien Wedhorn f4d1b7ab12 Rewrite of skinny debugging.
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
2012-08-07 21:58:01 +00:00
Damien Wedhorn 3d38998b70 Various small chan_skinny fixes and cleanup
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
2012-06-15 21:18:56 +00:00
Matthew Jordan 1efe727ed8 AST-2012-009: Fix crash in chan_skinny due to Key Pad Button Message handling
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
2012-06-14 17:34:10 +00:00
Damien Wedhorn d979399071 Skinny cleanup (mwi_event_cb).
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
2012-06-07 21:44:15 +00:00
Damien Wedhorn 0271734f2e Skinny cleanup.
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
2012-06-07 21:23:42 +00:00
Mark Michelson 14a985560e Merge changes dealing with support for Digium phones.
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
2012-06-04 20:26:12 +00:00
Matthew Jordan 94187aafc0 AST-2012-008: Fix remote crash vulnerability in chan_skinny
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
2012-05-29 18:40:26 +00:00
Kinsey Moore b5a6de76fc Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE)
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
2012-05-14 19:44:27 +00:00
Matthew Jordan c37c7b4a2c AST-2012-005: Fix remotely exploitable heap overflow in keypad button handling
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
2012-04-23 13:53:24 +00:00
Sean Bright 99bd5b1e2e Eliminate a bunch of shadow warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 17:02:52 +00:00
Terry Wilson 0e5c761c28 Opaquify ast_channel typedefs, fd arrays, and softhangup flag
Review: https://reviewboard.asterisk.org/r/1784/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01 22:09:18 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 16:52:47 +00:00
Sean Bright 51c24c88a1 Prefer ast_set_qos() over ast_netsock_set_qos()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 14:13:58 +00:00
Terry Wilson ebaf59a656 Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 00:32:20 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Walter Doekes db24fc2523 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: Clod Patry
Review: https://reviewboard.asterisk.org/r/1651


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-08 20:49:48 +00:00
Richard Mudgett 23bc964e1c Constify some more channel driver technology callback parameters.
Review: https://reviewboard.asterisk.org/r/1707/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 19:53:38 +00:00
Damien Wedhorn 843c7ef088 Allow softkey reject while device onhook.
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
2012-01-29 22:33:08 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
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
2012-01-24 20:12:09 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
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
2012-01-09 22:15:50 +00:00
Damien Wedhorn 48f9a8f668 Fix segfault on answer.
Only update/change RTP source if RTP has already been started and 
connected to the subchannel.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-22 21:12:57 +00:00
Damien Wedhorn 5952117559 Fix segfault on answer.
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
2011-12-08 06:59:01 +00:00
Tilghman Lesher 77b670c4ab Allow each logging destination and console to have its own notion of the verbosity level.
Review: https://reviewboard.asterisk.org/r/1599


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 18:43:16 +00:00
Richard Mudgett 7d9ba4875b Fix calls to ast_get_ip() not initializing the address family.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 23:03:32 +00:00
Damien Wedhorn 899df042f5 Fix simple switch to not progress a call when call already progressed.
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
2011-10-14 21:15:33 +00:00
Damien Wedhorn 7cb2ac8664 Add skinny version 17 protocol support.
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
2011-10-10 00:57:06 +00:00
Damien Wedhorn c5546e2bd7 Increase SKINNY_MAX_PACKET and add some logging.
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
2011-10-10 00:36:02 +00:00
Damien Wedhorn 0ac40dc255 Merged revisions 340031 via svnmerge from
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
2011-10-09 22:21:42 +00:00
Damien Wedhorn b90964eda5 Merged revisions 339992 via svnmerge from
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
2011-10-09 21:15:09 +00:00
Damien Wedhorn d59bb319fc Fixed segfault on core stop gracefully.
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
2011-10-06 20:18:45 +00:00