summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-08Don't perform a realtime lookup with a NULL keywordMatthew Jordan
Previously, a call to ast_load_realtime_multientry could get away with passing a NULL parameter to the function, even though it really isn't supposed to do that. After the change over to using ast_variable instead of variadic arguments, the realtime engine gets unhappy if you do this. This was always an unintended function call in app_directory anyway - now, we just don't call into the realtime function calls if we don't have anything to query on. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08Remove required type field from channel blobsDavid M. Lee
When we first introduced the channel blob types, the JSON blobs were self identifying by a required "type" field in the JSON object itself. This, as it turns out, was a bad idea. When we introduced the message router, it was useless for routing based on the JSON type. And messages had two type fields to check: the stasis_message_type() of the message itself, plus the type field in the JSON blob (but only if it was a blob message). This patch corrects that mistake by removing the required type field from JSON blobs, and introducing first class stasis_message_type objects for the actual message type. Since we now will have a proliferation of message types, I introduced a few macros to help reduce the amount of boilerplate necessary to set them up. Review: https://reviewboard.asterisk.org/r/2509 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08Add version.c to list of ignored files in the utils directory.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08Initial support for endpoints.David M. Lee
An endpoint is an external device/system that may offer/accept channels to/from Asterisk. While this is a very useful concept for end users, it is surprisingly not a core concept within Asterisk itself. This patch defines ast_endpoint as a separate object, which channel drivers may use to expose their concept of an endpoint. As the channel driver creates channels, it can use ast_endpoint_add_channel() to associate channels to the endpoint. This updated the endpoint appropriately, and forwards all of the channel's events to the endpoint's topic. In order to avoid excessive locking on the endpoint object itself, the mutable state is not accessible via getters. Instead, you can create a snapshot using ast_endpoint_snapshot_create() to get a consistent snapshot of the internal state. This patch also includes a set of topics and messages associated with endpoints, and implementations of the endpoint-related RESTful API. chan_sip was updated to create endpoints with SIP peers, but the state of the endpoints is not updated with the state of the peer. Along for the ride in this patch is a Stasis test API. This is a stasis_message_sink object, which can be subscribed to a Stasis topic. It has functions for blocking while waiting for conditions in the message sink to be fulfilled. (closes issue ASTERISK-21421) Review: https://reviewboard.asterisk.org/r/2492/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08chan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after ↵Alec L Davis
retries fail RFC6665 4.2.2: ... after a failed State NOTIFY transaction remove the subscription The problem is that the State Notify requests rely on the 200OK reponse for pacing control and to not confuse the notify susbsystem. The issue is, the pendinginvite isn't cleared if a response isn't received, thus further notify's are never sent. The solution, follow RFC 6665 4.2.2's 'SHOULD' and remove the subscription after failure. (closes issue ASTERISK-21677) Reported by: Dan Martens Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2475/ ........ Merged revisions 387875 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387880 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07Fixed up \example marker in lock.h Doxygen comment.David M. Lee
The \example tags marks an entire file as an example, not a code snippet. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07Minor fixups to Doxygen comments.David M. Lee
The \example tags marks an entire file as an example, not a code snippet. ........ Merged revisions 387823 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07Better explained the depths of reference stealing.David M. Lee
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-07Fix build breakage, from LOW_MEMORY fix.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Update ao2_destructor_fn doxygen.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Make a log NOTICE more explicit that the event comes from DAHDI and not PRI.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Fix building with LOW_MEMORY defined.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Make SLA reload more paranoid.Russell Bryant
Reload support was originally not included for SLA. It was added later, but in a fairly non-traditional way. It basically sets a flag indicating that a reload is pending, and then waits for a time where it thinks everything SLA related is idle and unused, and *then* executes the reload. It does this because the reload process is destructive. It starts by throwing everything away and starting over. There are a number of problems with this approach. One of them is that the check to see if anything in use was incomplete. This patch makes it more complete and thus less likely for a crash to occur during reload processing. However, this approach still has problems so some much more significant reworking of this code will need to come in as a next step. Patch credit and testing by CoreDial, LLC. ........ Merged revisions 387688 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387689 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Add support for observers and JSON objectset creation to sorcery.Joshua Colp
This change adds the ability for modules to add themselves as observers to sorcery object types. Observers can be notified when objects are created, updated, or deleted as well as when the object type is loaded or reloaded. Observer notifications are done using a thread pool in a serialized fashion so the caller of the sorcery API calls is minimally impacted. This also adds the ability to create JSON changesets of a sorcery object. Tests are also present to confirm all of the above functionality. Review: https://reviewboard.asterisk.org/r/2477/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-04Clean up documentation; prevent ref leak on exitMatthew Jordan
This patch: * Cleans up some doxygen * Prevents leaking the system level Stasis topics and messages on exit (users of valgrind will be happier) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-04Migrate SHARED's use of the VarSet AMI event to Stasis-CoreMatthew Jordan
This patch removes the direct call to AMI from the SHARED function and instead call Stasis-Core. Stasis-Core delivers the notification that a shared variable has changed on a channel to all interested consumers. (issue ASTERISK-21462) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-03Stasis: Convert network change events into network change stasis messagesJonathan Rose
(issue ASTERISK-21103) Review: https://reviewboard.asterisk.org/r/2490/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-03Use the configured formats for Gulp sessions if there are no joint formats ↵Joshua Colp
between requested formats and configured formats. (closes issue ASTERISK-21756) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Migrate AMI VarSet events raised by GoSub local variablesMatthew Jordan
This patch moves VarSet events for local variables raised by GoSub over to Stasis-Core. It also tweaks up the post-processing documentation scripts to not combine parameters if both parameters are already documented. (issue ASTERISK-21462) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Remove the ABI compatability ast_channel_alloc(). It is no longer needed.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Update utils Makefile to handle r387294Matthew Jordan
Alec's patch that added the Asterisk version to 'core show locks' angered the items in utils, as they exist somewhat outside of the Asterisk build system. Some day, this Makefile should get nuked from high orbit, but for now, include version.c in its list of stuff to pile in. ........ Merged revisions 387421 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387422 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Putting all event defs and names back for now due to res_corosync dependencyJonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02chan_sip: Session-Expires: Set timer to correctly expire at (~2/3) of the ↵Alec L Davis
interval when not the refresher RFC 4028 Section 10 if the side not performing refreshes does not receive a session refresh request before the session expiration, it SHOULD send a BYE to terminate the session, slightly before the session expiration. The minimum of 32 seconds and one third of the session interval is RECOMMENDED. Prior to this asterisk would refresh at 1/2 the Session-Expires interval, or if the remote device was the refresher, asterisk would timeout at interval end. Now, when not refresher, timeout as per RFC noted above. (closes issue ASTERISK-21742) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2488/ ........ Merged revisions 387344 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387345 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02chan_sip: Honor Session-Expires in 200OK response when it's a RE-INVITE when ↵Alec L Davis
asterisk is the refresher. RFC 4028 Section 7.2 "UACs MUST be prepared to receive a Session-Expires header field in a response, even if none were present in the request." What changed After ASTERISK-20787, inbound calls to asterisk with no Session-Expires in the INVITE are now are offered a Session-Expires (1800 asterisk default) in the response, with asterisk as the refresher. Symptom: After 900 seconds (asterisk default refresher period 1800), asterisk RE-INVITEs the device, the device may respond with a much lower Session-Expires (180 in our case) value that it is now using. Asterisk ignores this response, as it's deemed both an INBOUND CALL, and a RE-INVITE. After 180 seconds the device times out and sends BYE (hangs up), asterisk is still working with the refresher period of 1800 as it ignored the 'Session Expires: 180' in the previous 200OK response. Fix: handle_response_invite() when 200OK, remove check for outbound and reinvite. (closes issue ASTERISK-21664) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) Review https://reviewboard.asterisk.org/r/2463/ ........ Merged revisions 387312 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387319 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02chan_dahdi: fix lower bound check with -ve integer conversion from a float Alec L Davis
Lower bound of a 16bit signed int is -32768 not -32767 (closes issue ASTERISK-21744) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) ........ Merged revisions 387297 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387298 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Add Asterisk Version to core show locksAlec L Davis
Assist with reporting 'core show locks' when submitting bug reports. Example below: =========================== == SVN-branch-1.8-... == Currently Held Locks =========================== (closes issue ASTERISK-21743) Reported by: alecdavis Tested by: alecdavis alecdavis (license 585) ........ Merged revisions 387294 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387295 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Simplify chan_local.c:manager_optimize_away() using ao2_find().Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Cleanup chan_local.c:local_new().Richard Mudgett
* Remove t and ama local variables. There is no way they could be anything other than default because p->owner can only be NULL at this point. * Rename tmp and tmp2 to owner and chan respectively. * Remove redundant initialization of channel context, exten, priority. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Clear the DTMF sending digit tracking on off nominal pathsMatthew Jordan
In certain situations, when the RTP engine goes to send a DTMF end digit it may be in a situation where the remote address is no longer available, or the digit that was supposed to be sent is invalid. In such cases, we need to clear the RTP counters appropriately. Otherwise, when the RTP source is set again, we'll continue to think that we're in the middle of sending a DTMF digit, which can confuse the remote party (signficantly). (closes issue ASTERISK-21522) Reported by: Corey Farrell patches: rtp_dtmf_process_end.patch uploaded by Corey Farrell (License 5909) ........ Merged revisions 387213 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387216 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Trivial changes. Comments, parentheses, spelling, wording.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Make chan_local locals container an explicit list container.Richard Mudgett
Pretending that chan_local locals container can have more than one bucket is silly. The container has no key to help search. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Whitespace changes.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Make mod_load_cmp() not as klunky.Richard Mudgett
There is a reason the heap comparison functions like qsort(), and other comparison functions specify <0, >0, and =0 for the return values. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Remove some unnecessary calls to ast_bridged_channel() in chan_unistim.cRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Remove some unnecessary calls to ast_bridged_channel() in chan_mgcp.cRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387184 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-05-01Remove some unnecessary calls to ast_bridged_channel() in chan_iax2.cRichard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Remove some unnecessary calls to ast_bridged_channel() in ↵Richard Mudgett
chan_dahdi.c/sig_analog.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Prevent crash in 'sip show peers' when the number of peers on a system is largeMatthew Jordan
When you have lots of SIP peers (according to the issue reporter, around 3500), the 'sip show peers' CLI command or AMI action can crash due to a poorly placed string duplication that occurs on the stack. This patch refactors the command to not allocate the string on the stack, and handles the formatting of a single peer in a separate function call. (closes issue ASTERISK-21466) Reported by: Guillaume Knispel patches: fix_sip_show_peers_stack_overflow_asterisk_11.3.0-v2.patch uploaded by gknispel (License 6492) ........ Merged revisions 387134 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-01Move some annoying chan_dahdi debug messages to level 5.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Fix CDR not being created during an externally initiated blind transferMatthew Jordan
Way back when in the dark days of Asterisk 1.8.9, blind transferring a call in a context that included the 'h' extension would inadvertently execute the hangup code logic on the transferred channel. This was a "bad thing". The fix was to properly check for the softhangup flags on the channel and only execute the 'h' extension logic (and, in later versions, hangup handler logic) if the channel was well and truly dead (Jim). Unfortunately, CDRs are fickle. Setting the softhangup flag when we detected that the channel was leaving the bridge (but not to die) caused some crucial snippet of CDR code, lying in ambush in the middle of the bridging code, to not get executed. This had the effect of blowing away one of the CDRs that is typically created during a blind transfer. While we live and die by the adage "don't touch CDRs in release branches", this was our bad. The attached patch restores the CDR behavior, and still manages to not run the 'h' extension during a blind transfer (at least not when it's supposed to). Thanks to Steve Davies for diagnosing this and providing a fix. Review: https://reviewboard.asterisk.org/r/2476 (closes issue ASTERISK-21394) Reported by: Ishfaq Malik Tested by: Ishfaq Malik, mjordan patches: fix_missing_blindXfer_cdr2 uploaded by one47 (License 5012) ........ Merged revisions 387036 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387038 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Stasis Core: Refactor ACL Change events to go out over the stasis core msg busJonathan Rose
(issue ASTERISK-21103) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2481/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Add forgotten event types to event_names arrayJonathan Rose
........ Merged revisions 387030 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Fix a log message.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Use the proper lower bound when doing saturation arithmetic.Sean Bright
16 bit signed integers have a range of [-32768, 32768). The existing code was using the interval (-32768, 32768) instead. This patch fixes that. Review: https://reviewboard.asterisk.org/r/2479/ ........ Merged revisions 386929 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 386930 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-30Just a couple of Stasis-HTTP nitpick fixes.David M. Lee
* Fixed crash when res_stasis_http is unloaded before the implementation modules. * Cleaned up test initialization for test_stasis_http.so. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29Modifying sounds/Makefile to pull down 1.4.24 core soundsRusty Newton
1.4.24 core sounds includes a full set of Italian prompts for core sounds and a fix for the missing voicemail prompts in the Russian language. (closes issue ASTERISK-19431) (closes issue ASTERISK-19721) ........ Merged revisions 386877 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 386878 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29Play periodic prompts for first call in a call queueOlle Johansson
Review: https://reviewboard.asterisk.org/r/2263/ ........ Merged revisions 386792 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 386794 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29Change pointer to existing wiki page instead of non-existing pageOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-28Fix spelling error in python docKinsey Moore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386774 65c4cc65-6c06-0410-ace0-fbb531ad65f3