summaryrefslogtreecommitdiff
path: root/channels/chan_skinny.c
AgeCommit message (Collapse)Author
2013-10-03Cache string values of formats on ast_format_cap() to save processing.Mark Michelson
Channel snapshots have string representations of the channel's native formats. Prior to this change, the format strings were re-created on ever channel snapshot creation. Since channel native formats rarely change, this was very wasteful. Now, string representations of formats may optionally be stored on the ast_format_cap for cases where string representations may be requested frequently. When formats are altered, the string cache is marked as invalid. When strings are requested, the cache validity is checked. If the cache is valid, then the cached strings are copied. If the cache is invalid, then the string cache is rebuilt and copied, and the cache is marked as being valid again. Review: https://reviewboard.asterisk.org/r/2879 ........ Merged revisions 400356 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Reduce channel snapshot creation and publishing by up to 50%.Joshua Colp
This change introduces the ability to stage channel snapshot creation and publishing by suppressing the implicit creation and publishing that some functions have. Once all operations are executed the staging is marked as done and a single snapshot is created and published. Review: https://reviewboard.asterisk.org/r/2889/ ........ Merged revisions 400265 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30Multiple revisions 399887,400138,400178,400180-400181David M. Lee
........ r399887 | dlee | 2013-09-26 10:41:47 -0500 (Thu, 26 Sep 2013) | 1 line Minor performance bump by not allocate manager variable struct if we don't need it ........ r400138 | dlee | 2013-09-30 10:24:00 -0500 (Mon, 30 Sep 2013) | 23 lines Stasis performance improvements This patch addresses several performance problems that were found in the initial performance testing of Asterisk 12. The Stasis dispatch object was allocated as an AO2 object, even though it has a very confined lifecycle. This was replaced with a straight ast_malloc(). The Stasis message router was spending an inordinate amount of time searching hash tables. In this case, most of our routers had 6 or fewer routes in them to begin with. This was replaced with an array that's searched linearly for the route. We more heavily rely on AO2 objects in Asterisk 12, and the memset() in ao2_ref() actually became noticeable on the profile. This was #ifdef'ed to only run when AO2_DEBUG was enabled. After being misled by an erroneous comment in taskprocessor.c during profiling, the wrong comment was removed. Review: https://reviewboard.asterisk.org/r/2873/ ........ r400178 | dlee | 2013-09-30 13:26:27 -0500 (Mon, 30 Sep 2013) | 24 lines Taskprocessor optimization; switch Stasis to use taskprocessors This patch optimizes taskprocessor to use a semaphore for signaling, which the OS can do a better job at managing contention and waiting that we can with a mutex and condition. The taskprocessor execution was also slightly optimized to reduce the number of locks taken. The only observable difference in the taskprocessor implementation is that when the final reference to the taskprocessor goes away, it will execute all tasks to completion instead of discarding the unexecuted tasks. For systems where unnamed semaphores are not supported, a really simple semaphore implementation is provided. (Which gives identical performance as the original taskprocessor implementation). The way we ended up implementing Stasis caused the threadpool to be a burden instead of a boost to performance. This was switched to just use taskprocessors directly for subscriptions. Review: https://reviewboard.asterisk.org/r/2881/ ........ r400180 | dlee | 2013-09-30 13:39:34 -0500 (Mon, 30 Sep 2013) | 28 lines Optimize how Stasis forwards are dispatched This patch optimizes how forwards are dispatched in Stasis. Originally, forwards were dispatched as subscriptions that are invoked on the publishing thread. This did not account for the vast number of forwards we would end up having in the system, and the amount of work it would take to walk though the forward subscriptions. This patch modifies Stasis so that rather than walking the tree of forwards on every dispatch, when forwards and subscriptions are changed, the subscriber list for every topic in the tree is changed. This has a couple of benefits. First, this reduces the workload of dispatching messages. It also reduces contention when dispatching to different topics that happen to forward to the same aggregation topic (as happens with all of the channel, bridge and endpoint topics). Since forwards are no longer subscriptions, the bulk of this patch is simply changing stasis_subscription objects to stasis_forward objects (which, admittedly, I should have done in the first place.) Since this required me to yet again put in a growing array, I finally abstracted that out into a set of ast_vector macros in asterisk/vector.h. Review: https://reviewboard.asterisk.org/r/2883/ ........ r400181 | dlee | 2013-09-30 13:48:57 -0500 (Mon, 30 Sep 2013) | 28 lines Remove dispatch object allocation from Stasis publishing While looking for areas for performance improvement, I realized that an unused feature in Stasis was negatively impacting performance. When a message is sent to a subscriber, a dispatch object is allocated for the dispatch, containing the topic the message was published to, the subscriber the message is being sent to, and the message itself. The topic is actually unused by any subscriber in Asterisk today. And the subscriber is associated with the taskprocessor the message is being dispatched to. First, this patch removes the unused topic parameter from Stasis subscription callbacks. Second, this patch introduces the concept of taskprocessor local data, data that may be set on a taskprocessor and provided along with the data pointer when a task is pushed using the ast_taskprocessor_push_local() call. This allows the task to have both data specific to that taskprocessor, in addition to data specific to that invocation. With those two changes, the dispatch object can be removed completely, and the message is simply refcounted and sent directly to the taskprocessor. Review: https://reviewboard.asterisk.org/r/2884/ ........ Merged revisions 399887,400138,400178,400180-400181 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17Allow res_parking to be unloadableKinsey Moore
This change protects accesses of res_parking such that it can unload safely once transient uses of its registered functions are complete. The parking API has been restructured such that its consumers do not have access to the vtable exposed by the parking provider, but instead route through stubs to prevent consumers from holding on to function pointers. This adds calls to all the parking unload functions and moves application loading and unloading into functions in parking_applications.c similar to the rest of the parts of res_parking. Review: https://reviewboard.asterisk.org/r/2763/ (closes issue ASTERISK-22142) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17Strip down the old event systemKinsey Moore
This removes unused code, event types, IE pltypes, and event IE types where possible and makes several functions private that were once public. This includes a renumbering of the remaining event and IE types which breaks binary compatibility with previous versions. The last remaining consumers of the old event system (or parts thereof) are main/security_events.c, res/res_security_log.c, tests/test_cel.c, tests/test_event.c, main/cel.c, and the CEL backends. Review: https://reviewboard.asterisk.org/r/2703/ (closes issue ASTERISK-22139) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Get rid of ast_bridged_channel() and the bridged_channel field on ast_channels.Mark Michelson
This commit is smaller than the initial review placed on review board. This is because a change to allow for channel drivers to access parking functionality externally was committed and invalidated quite a few of the changes initially made. (closes issue ASTERISK-22039) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2717 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02Remove dead code from features.c; refactor pickup code into pickup.cMatthew Jordan
This patch does the following: * It moves the pickup code out of features.c and into pickup.c * It removes the vast majority of dead code out of features.c. In particular, this includes the parking code. (issue ASTERISK-22134) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-01Support externally initiated parking requests; remove some dead codeMatthew Jordan
This patch does the following: * It adds support for externally initiated parking requests. In particular, chan_skinny has a protocol level message that initiates a call park. This patch now supports that option, as well as the protocol specific mechanisms in chan_dahdi/sig_analog and chan_mgcp. * A parking bridge features virtual table has been added that provides access to the parking functionality that the Bridging API needs. This includes requests to park an entire 'call' (with little or no additional information, thank you chan_skinny), perform a blind transfer to a parking extension, determine if an extension is a parking extension, as well as the actual "do the parking" request from the Bridging API. * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new functions * The removal of some - but not all - dead parking code from features.c This also fixed blind transferring a multi-party bridge to a parking lot (which was implemented, but had at least one code path where using the parking features kK might not have worked) Review: https://reviewboard.asterisk.org/r/2710 (closes issue ASTERISK-22134) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-25A great big renaming patchMatthew Jordan
This patch renames the bridging* files to bridge*. This may seem pedantic and silly, but it fits better in line with current Asterisk naming conventions: * channel is not "channeling" * monitor is not "monitoring" etc. A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is the act of using a bridge on a set of channels - and the API that fulfills that role is more than just the action. (closes issue ASTERISK-22130) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-12Fix a compiler warning.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11Fixed chan_skinny for systems were pthread_t isn't an int.David M. Lee
I'm looking at you, OS X. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-11Refactor and cleanup of skinny session handling.Damien Wedhorn
Major changes are to pull all packet reading functions into skinny_session and move timeout handling to scheduling arrangements. Thread cancelling is now undertaken directly rather than waiting for the read to timeout (cleanup is popped on thread cancel). Also added some keepalive timings in debugging messages. Keepalive timeout has been increased from 1.1 by keepalive to 3 times keepalive. This seems to align (after keepalives stabilise) with when devices reset after not receiving keepalives. Probably needs more work, especially around the first and/or second keepalives that vary significantly by device and firmware version. Review: https://reviewboard.asterisk.org/r/2611/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-05Refactor RTCP events over to Stasis; associate with channelsMatthew Jordan
This patch does the following: * It merges Jaco Kroon's patch from ASTERISK-20754, which provides channel information in the RTCP events. Because Stasis provides a cache, Jaco's patch was modified to pass the channel uniqueid to the RTP layer as opposed to a pointer to the channel. This has the following benefits: (1) It keeps the RTP engine 'clean' of references back to channels (2) It prevents circular dependencies and other potential ref counting issues * The RTP engine now allows any RTP implementation to raise RTCP messages. Potentially, other implementations (such as res_rtp_multicast) could also raise RTCP information. The engine provides structs to represent RTCP headers and RTCP SR/RR reports. * Some general refactoring in res_rtp_asterisk was done to try and tame the RTCP code. It isn't perfect - that's *way* beyond the scope of this work - but it does feel marginally better. * A few random bugs were fixed in the RTCP statistics. (Example: performing an assignment of a = a is probably not correct) * We now raise RTCP events for each SR/RR sent/received. Previously we wouldn't raise an event when we sent a RR report. Note that this work will be of use to others who want to monitor call quality or build modules that report call quality statistics. Since the events are now moving across the Stasis message bus, this is far easier to accomplish. It is also a first step (though by no means the last step) towards getting Olle's pinefrog work incorporated. Again: note that the patch by Jaco Kroon was modified slightly for this work; however, he did all of the hard work in finding the right places to set the channel in the RTP engine across the channel drivers. Much thanks goes to Jaco for his hard work here. Review: https://reviewboard.asterisk.org/r/2603/ (closes issue ASTERISK-20574) Reported by: Jaco Kroon patches: asterisk-rtcp-channel.patch uploaded by jkroon (License 5671) (closes issue ASTERISK-21471) Reported by: Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-28Add stasis publications for blind and attended transfers.Mark Michelson
This creates stasis messages that are sent during a blind or attended transfer. The stasis messages also are converted to AMI events. Review: https://reviewboard.asterisk.org/r/2619 (closes issue ASTERISK-21337) Reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-22Migrate PeerStatus events to stasis, add stasis endpoints, and add ↵Joshua Colp
chan_pjsip device state. (closes issue ASTERISK-21489) (closes issue ASTERISK-21503) Review: https://reviewboard.asterisk.org/r/2601/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17Update Asterisk's CDRs for the new bridging frameworkMatthew Jordan
This patch is the initial push to update Asterisk's CDR engine for the new bridging framework. This patch guts the existing CDR engine and builds the new on top of messages coming across Stasis. As changes in channel state and bridge state are detected, CDRs are built and dispatched accordingly. This fundamentally changes CDRs in a few ways. (1) CDRs are now *very* reflective of the actual state of channels and bridges. This means CDRs track well with what an actual channel is doing - which is useful in transfer scenarios (which were previously difficult to pin down). It does, however, mean that CDRs cannot be 'fooled'. Previous behavior in Asterisk allowed for CDR applications, channels, and other properties to be spoofed in parts of the code - this no longer works. (2) CDRs have defined behavior in multi-party scenarios. This behavior will not be what everyone wants, but it is a defined behavior and as such, it is predictable. (3) The CDR manipulation functions and applications have been overhauled. Major changes have been made to ResetCDR and ForkCDR in particular. Many of the options for these two applications no longer made any sense with the new framework and the (slightly) more immutable nature of CDRs. There are a plethora of other changes. For a full description of CDR behavior, see the CDR specification on the Asterisk wiki. (closes issue ASTERISK-21196) Review: https://reviewboard.asterisk.org/r/2486/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-10Change chan_skinny to use core transfer API.Damien Wedhorn
Changes for both attended and blind transfers in chan_skinny to use the new transfer API instead of masquerade. (closes issue ASTERISK-21526) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2557/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Split Hold event into Hold/Unhold, and move it into core.Jason Parker
(closes issue ASTERISK-21487) Review: https://reviewboard.asterisk.org/r/2565/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24Migrate a large number of AMI events over to Stasis-CoreMatthew Jordan
This patch moves a number of AMI events over to the Stasis-Core message bus. This includes: * ChanSpyStart/Stop * MonitorStart/Stop * MusicOnHoldStart/Stop * FullyBooted/Reload * All Voicemail/MWI related events In addition, it adds some Stasis-Core and AMI support for generic AMI messages, refactors the message router in AMI to use a single router with topic forwarding for the topics that AMI cares about, and refactors MWI message types and topics to be more name compliant. Review: https://reviewboard.asterisk.org/r/2532 (closes issue ASTERISK-21462) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Merge in the bridge_construction branch to make the system use the Bridging API.Richard Mudgett
Breaks many things until they can be reworked. A partial list: chan_agent chan_dahdi, chan_misdn, chan_iax2 native bridging app_queue COLP updates DTMF attended transfers Protocol attended transfers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-19Add transfer softkey to ringout state to enable blond transfers.Damien Wedhorn
(closes issue ASTERISK-21327) Reported by: wedhorn Tested by: myself Patches: skinny-blindxfer01.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-18Add call forward no answer to skinny and cleanup general callfwd handling.Damien Wedhorn
CallforwardNoAnswer uses a sched to determine when to forward the call. Defaults to 20secs but configurable in skinny.conf. Adds dialType to each subchannel structure to be used to differentiate between normal dials that result in a call being placed (default) and other uses for the skinny_dialer (such as cfwd digit collection). Restructured all cfwd handling to use this new arrangement. (closes issue ASTERISK-21292) Reported by: wedhorn Tested by: myself Patches: skinny-callfwdnoans03.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Remove some unnecessary calls to ast_bridged_channel() in chan_skinny.cRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27Convert MWI state message type to the new stasis naming conventionKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-27Fix skinny encall button to not blind xfer.Damien Wedhorn
The softbutton endcall should not turn a transfer into a blind transfer but hangup the exten being called and leave the original call on hold. This does that. (closes issue ASTERISK-21321) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-xferendcall01.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26Suppress compiler warning.Russell Bryant
This code caused a compiler warning when --enable-dev-mode was not used. The warning was that this variable was set but not used. That was indeed the case as the only place this is used is as an argument to SKINNY_DEBUG which is compiled out when not in dev mode. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Fix skinny voicemail indication issues.Damien Wedhorn
Unsubscribe from MWI stasis event on channel reload. (closes issue ASTERISK-21216) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-mwiind02.diff uploaded by snuffy (license 5024) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16Transition MWI to Stasis-coreKinsey Moore
Remove MWI's dependency on the event system by moving it to Stasis-core. This also introduces forwarding topic pools in Stasis-core which aggregate many dynamically allocated topics into a single primary topic. Review: https://reviewboard.asterisk.org/r/2368/ (closes issue ASTERISK-21097) Patch-by: Kinsey Moore git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27More places to eliminate the cast to argv but were not giving warnings.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-27Fix compiler warning by eliminating the need for a cast.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-25More called details fixup for skinny.Damien Wedhorn
Basically sets the callerid and callername to the first device talked to for the purposes of putting the the calls made log on the device. Does not affect the device displaying who the device is currently talking to. Also some minor changes to use sub->exten in lieu of l->lastnumberdialed. (closes issue ASTERISK-21095) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-calllogsoutbound03.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-25Add prinotify messages to skinny.Damien Wedhorn
Adds both fixed and variable prinotify messages and clearprinotify messages to skinny. Also adds cli function for pushing messages to devices. i Initial code by snuffy, expanded by myself to include fixed messages. (closes issue ASTERISK-21091) Reported by: snuffy Tested by: snuffy, myself Patches: skinny-prinotify02.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Add serviceURL stuff to skinny.Damien Wedhorn
Patch adds all the packet and structure stuff to skinny to enable setting service URLs in skinny, such as corporate directories. This stuff is only relevant during load/unload as when activated. Also some minor changes removing duplicated counting of addons and speedials in handle_skinny_show_devices. Review: https://reviewboard.asterisk.org/r/2321/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Fixup skinny CLI completion.Damien Wedhorn
Auto complete for skinny debug allows multiple options and negation, also add debug all option. Usage example: 'skinny debug all -packets' (each can be autocompleted including -packet). Change show device to use device name. Remove the duplicate ast_strdup's from place calling device complete return immediately from complete devicename and complete linename so that multiple options are displayed on the CLI if more than one option available. Review: https://reviewboard.asterisk.org/r/2333/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Remove extraneous stuff from r381470.Damien Wedhorn
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Add back sending dialnumber to skinny.Damien Wedhorn
Don't know why it seemed to work during testing, but it really is needed for protocol v17 (and probably above). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Respect callerid presentation in skinny.Damien Wedhorn
Fix chan_skinny so that it respects callerID presentation of inbound calls to device and a couple of other minor fixes: 145 packet (add OCTAL_FROM amd callerid), and dont send dialednumber message if protocol >= 17. (closes issue ASTERISK-21066) Reported by: snuffy Tested by: snuffy, myself Patches: skinny-respect-clid-restrictions-v2.diff uploaded by snuffy (license 5024) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11Fix some issues with skinny callid.Damien Wedhorn
Add extra string to transmit_callinfo_var, Only set string2 to tonum for outgoing calls and changes to send_callinfo and push_callinfo to not set callid name to last number. (closes issue ASTERISK-21063) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-callinfoupdate03.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-06Fix reload skinny with active devices.Damien Wedhorn
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-06Reset skinny vmexten and immeddial char on reload.Damien Wedhorn
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-02Add variable length displayprompt packet to skinny and use octals.Damien Wedhorn
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-01Adds variable length callinfo packets to skinny.Damien Wedhorn
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-01-25Add force dial keys to skinny.Damien Wedhorn
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-21Fix device call logging issues in skinnyDamien Wedhorn
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-20Fix issues with skinny sessionsDamien Wedhorn
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-06Skinny blob cleanupDamien Wedhorn
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-06Add group and namedgroup pickup to skinnyDamien Wedhorn
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-06Rewrite skinny dialing to remove threaded simpleswitchDamien Wedhorn
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-02Prevent exhaustion of system resources through exploitation of event cacheMatthew Jordan
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
2012-12-14Fix skinny to recognise vmexten in general section of confDamien Wedhorn
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