summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-03Detect and use xsltCleanupGlobals when availableKinsey Moore
This introduces usage of an additional libxslt cleanup function, xsltCleanupGlobals, when the configure script detects that it is available. Early versions of the library did not include this function. (closes issue ASTERISK-22570) Reported by: Corey Farrell Patches: xsltCleanupGlobals.patch uploaded by Corey Farrell (License 5909) ........ Merged revisions 400384 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03chan_vpb: Make compile again.Richard Mudgett
........ Merged revisions 400373 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03Get rid of uses of stasis_topic_wait()Mark Michelson
........ Merged revisions 400362 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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-03Fix crashes in res_pjsip_sdp_rtp and res_pjsip_t38 when a stream is rejected ↵Joshua Colp
and external_media_address is set. The callback function for changing the media address in streams wrongly assumes that a connection line will always be present. This is false as no line is present if a stream has been rejected. (closes issue ASTERISK-22645) Reported by: Rusty Newton ........ Merged revisions 400360 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Multiple revisions 400318-400319Mark Michelson
........ r400318 | mmichelson | 2013-10-02 17:08:49 -0500 (Wed, 02 Oct 2013) | 12 lines Remove unnecessary waits from stasis. Since caches are updated on publisher threads, there is no need to wait for the cache updates to occur after a stasis message is published. In the case of chan_pjsip device state changes, this set of changes caused an improvement to performance. Review: https://reviewboard.asterisk.org/r/2890 ........ r400319 | mmichelson | 2013-10-02 17:10:54 -0500 (Wed, 02 Oct 2013) | 3 lines Remove svn:mergeinfo property. ........ Merged revisions 400318-400319 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Cast Integer Argument To Unsigned CharMichael L. Young
The member reg in the peercnt structure is an unsigned char and peercnt_modify() is expecting an unsigned char argument which gets assigned to peercnt->reg. This patch fixes that by casting the integer argument being passed to peercnt_modify to unsigned char. ........ Merged revisions 400314 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400315 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400316 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Only create Stasis subscriptions when enabledMatthew Jordan
Subscribing to Stasis isn't free. As such, this patch makes AMI, CDR, and CEL - the "big 3" - only subscribe when enabled. Toggling their availability via a .conf file will unsubscribe/subscribe as appropriate. Review: https://reviewboard.asterisk.org/r/2888/ ........ Merged revisions 400312 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Originate: Make setting caller id on outgoing call use either name or number.Richard Mudgett
Previous code was requiring both name and number to be available. Also restored a comment block on why caller id is also set on an outgoing call leg in addition to connected line from earlier versions of Asterisk. ........ Merged revisions 400303 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Correct allowable values for ARI general information filterKinsey Moore
........ Merged revisions 400291 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Fix the CDR CLI command 'cdr show active {channel}'Matthew Jordan
When the switch from channel names to channel unique IDs happened, the poor CLI command got left in the dust. This fixes the command so that users can once again see how Asterisk is messing up your billing information. ........ Merged revisions 400286 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Fix a crash in res_pjsip_t38 caused by the wrong assumption that a session ↵Joshua Colp
will always have a channel. When starting up or shutting down this assumption is false. ........ Merged revisions 400284 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02man pages for astdb2bdb and astdb2sqlite3Tzafrir Cohen
Review: https://reviewboard.asterisk.org/r/2898/ ........ Merged revisions 400279 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400281 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.Richard Mudgett
* There were several places in ARI where an external library was mallocing memory that must always be released with free(). When MALLOC_DEBUG is enabled, free() is redirected to the MALLOC_DEBUG version. Since the external library call still uses the normal malloc(), MALLOC_DEBUG complains that the freed memory block is not registered and will not free it. These cases must use ast_std_free(). * Changed calls to asprintf() and vasprintf() to the equivalent ast_asprintf() and ast_vasprintf() versions respectively. ........ Merged revisions 400270 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02sig_ss7: Fix compiler warnings.Richard Mudgett
........ Merged revisions 400268 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400269 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-10-02Fix a random one way audio issue in PJSIP.Joshua Colp
Due to the asynchronous design of the PJMEDIA SDP negotiator it was possible for the SDP to be negotiated *after* a channel was created and after it was being wait on by an application. It is only after negotiation occurs that the file descriptors for RTP are placed on the channel. Since the channel was already being waited on these file descriptors were not monitored, causing incoming media to never be read. This change wakes up any application waiting on the channel so that added file descriptors end up being monitored. (closes issue AST-1227) Reported by: John Bigelow ........ Merged revisions 400256 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Allow specifying a channel to dial an extension and context in an ARI dial ↵Joshua Colp
operation. (issue ASTERISK-22625) Reported by: Scott Griepentrog ........ Merged revisions 400254 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02Retrieve and store the hostname only once so multiple threads do not ↵Joshua Colp
potentially initialize it at the same time. ........ Merged revisions 400245 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-01chan_dahdi: Fix analog parking using flash-hook.Richard Mudgett
Transferring an analog call using a flash-hook to parking would fail to park the call and result in an invalid ao2 object unref. * Park the correct bridged channel. ........ Merged revisions 400236 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-01Features: Rearm the parking config options have moved warning for each reload.Richard Mudgett
........ Merged revisions 400227 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-01Filter out internal channels for bridge leave messages and parked call messagesMatthew Jordan
Granted, if you manage to park a Conference announcer channel, something has gone horrifically wrong. ........ Merged revisions 400217 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30configuration samples: Pull all parking related stuff out of features.confJonathan Rose
This patch also adds documentation for parking from features.conf to res_parking.conf ........ Merged revisions 400205 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30Parse arguments passed to the CDR_PROP function correctlyMatthew Jordan
I can only blame this on a bad merge, because this in no way worked properly the way it was written. Mea culpa. The function should now parse its arguments correctly and function properly. (Note that the API used by the CDR_PROP function has working unit tests... this was merely bad coding of the actual registered function) (closes issue ASTERISK-22613) Reported by: Private Name ........ Merged revisions 400196 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30Remove spurious event raised when CDRs are reloadedMatthew Jordan
The Reload event is now raised by the module loading core. As such, the Reload event in the CDR engine was a duplicate and not needed. ........ Merged revisions 400194 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400195 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-09-30Blocked revisions 399306David M. Lee
........ Blocked revisions 399305 ........ Fix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid When processing the lines under the [applicationmap] context in features.conf, a segfault occurs from attempting to process a line with an invalid syntax (basically missing most of the arguments). Example: [applicationmap] automon=*6 * This patch moves the checking for empty arguments to before they are accessed. * Also, checked the "todo" comment and removed it. Some applications do not require arguments. (closes issue ASTERISK-22416) Reported by: CGI.NET Tested by: CGI.NET Patches: asterisk-22416-check-syntax-first_v2.diff by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2803 ........ Merged revisions 399304 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-30chan_sip: Allow Asterisk to retry after 403 on registerKinsey Moore
This adds a global option in chan_sip to allow it to continue attempting registration if a 403 is received, clearing the cached nonce and treating it as a non-fatal response. Normally, this would cause registration attempts to that endpoint to stop. This also adds a similar per-outbound-registration option to chan_pjsip which allows the retry interval to be altered for 403 responses to REGISTER requests. (closes issue ASTERISK-17138) Review: https://reviewboard.asterisk.org/r/2874/ Reported by: Rudi ........ Merged revisions 400137 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400140 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400141 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28res_pjsip_notify: Add documentationMatthew Jordan
We forgot to add documentation for res_pjsip_notify, which would prevent it from being loaded. Whoops. This patch also updates res_pjsip_notify to use pjsip_notify.conf, which now has its own sample file in the configs directory as well. Review: https://reviewboard.asterisk.org/r/2835/ ........ Merged revisions 400121 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28res_rtp_asterisk: Correct erroneous lost packet information in RTCP reportsMatthew Jordan
RTCP's calculation of the number of lost packets in an RTP stream is based on that stream's sequence number count, the number of received packets, and how many packets we expect to receive. When the SSRC for an RTP stream changes, there can - and almost always will be - a large jump in the next packet's timestamp and sequence number. If we don't reset the number of received packets, sequence number count, and other metrics used by RTCP, the next RR/SR report will use the previous SSRC's values to calculate the lost packet count for the new SSRC - resulting in a very large number of lost packets. This patch modifies res_rtp_asterisk such that, if it detects a SSRC change, it will reset the various values used by the RTCP calculations. From the perspective of RTCP, this appears as a new media stream - which is what it is. Review: https://reviewboard.asterisk.org/r/2886/ (closes issue AST-1174) Reported by: Thomas Arimont ........ Merged revisions 400089 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400093 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400108 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28Add check for openSUSE when detecting bfd libraryMatthew Jordan
In ASTERISK-17842, some additional library checks were added to the configure script so that the bfd library could be found on CentOS and Fedora systems. As it turns out, openSUSE requires an additional library. This patch adds another check to the configure script for openSUSE that will add that library. Review: https://reviewboard.asterisk.org/r/2885/ (closes issue AST-1169) Reported by: Guenther Kelleter ........ Merged revisions 400073 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400075 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400077 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28CDR: Improve handling of parking; resolve assertion when originating into parkMatthew Jordan
This patch covers two problems: 1) Currently, when a call is transferred into a parking lot from a bridge (using either the blind transfer or one touch parking mechanisms), the application fails to be set to "Park" in the resulting CDR record for the parked channel. This is due to the ParkedCall message arriving before the BridgeEnter for the channel entering the parking bridge. The ParkedCall message isn't handled as the CDR for the channel has already been finalized (due to the channel having left its two party bridge), and the BridgeEnter - which creates the new CDR - doesn't have the parking information. This patch modifies the behavior so that reception of a ParkedCall message will - if not handled by a CDR chain - cause a new CDR to be created and put into the Parking state. 2) It fixes a FRACK that occurred when a channel is originated into a parking space. The DialedPending state - which occurs for both Dialed and Originated channels - assumed that it couldn't handle the parking transitions due to it having a Party B; however, Originated channels don't have a Party B. As such, the existing CDR needs to transition into the parking state - this patch does that. Review: https://reviewboard.asterisk.org/r/2877/ (closes issue ASTERISK-22482) Reported by: Richard Mudgett ........ Merged revisions 400062 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28app_queue: Make manager events tolerant of Local channel shenanigansMatthew Jordan
app_queue currently attempts to handle Local channel optimizations in an effort to provide accurate information in Stasis messages (and their corresponding AMI events) as well as the Queue log. Sometimes, however, things don't go as planned. Consider the following scenario: SIP/foo <-> L;1 <-> L;2 <-> SIP/agent SIP/agent answers, triggering a Local channel optimization. app_queue will normally do the following: * Listen for the Local optimization events and update our agent accordingly to SIP/agent in the queue log and messages * When we get a hangup, publish the AgentComplete event based on our information (SIP/foo and SIP/agent) However, as with all things that depend on sanity from something as capricious as Local channels, things can go wrong: (1) SIP/agent immediately hangs up upon answering. This triggers a race condition between termination messages coming from SIP/agent and the ongoing Local channel optimization messages. (Note that this can also occur with SIP/foo) (2) In a race condition, Asterisk can (rarely) deliver the hangup messages prior to the Local channel optimization. In that case, the messages *may* arrive to app_queue in the following order: * Hangup SIP/Agent * Hangup SIP/foo * Optimize L;1/L;2 * Hangup L;2 * Hangup L;1 When app_queue receives the hangup of the agent or the caller, it will attempt to publish the AgentComplete event. However, it now has a problem - it thinks its agent is the ;1 side of the Local channel, as it never received the optimization event. At the same time, that channel is already gone. This results in getting NULL from the Stasis cache. What's more, we can't really wait for the optimization message, as we are currently handling the hangup of the channel that the optimization event would tell us to use. This patch modifies the behavior in app_queue such that, since we still have a lot of pertinent queue information (interface, queue name, etc.), we now raise the event with what information we know. The channels involved now may or may not be present. Users will still at least get the "AgentComplete" event, which "completes" the known Agent information. Review: https://reviewboard.asterisk.org/r/2878/ (closes issue ASTERISK-22507) Reported by: Richard Mudgett ........ Merged revisions 400060 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-28manager: Fix crash when appending a manager channel variableMatthew Jordan
In r399887, a minor performance improvement was introduced by not allocating the manager variable struct if it wasn't used. Unfortunately, when directly accessing an ast_channel struct, manager assumed that the struct was always allocated. Since this was no longer the case, things got a bit crashy. This fixes that problem by simply bypassing appending variables if the manager channel variable struct isn't there. ........ Merged revisions 400058 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27app_cdr and res_parking: Fix some resource leaks.Richard Mudgett
* app_cdr left the ResetCDR application registered. * res_parking leaked a ref to config global. (closes issue ASTERISK-22566) Reported by: Corey Farrell Patches: ASTERISK-22566-r2.patch (license #5909) patch uploaded by Corey Farrell ........ Merged revisions 400020 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27chan_sip: Increase some scratch buffer sizes dealing with caller id.Richard Mudgett
* Eliminated an unnecessary initialization in check_user_full(). (closes issue ASTERISK-22477) Reported by: Michael Shepelev ........ Merged revisions 400013 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400014 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400015 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27Remove some trailing whitespace and steal revision 400000.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27res_pjsip: crash when using localnet and external_signaling_address optionsKevin Harwell
There was a collision of mod_data use on the transaction between using a nat hook and an session response callback. During state change it was assumed what was in the mod_data was nothing or the response callback. However, it was possible for it to also contain a nat hook thus resulting in a bad cast and a crash. Added the ability to store multiple data elements in mod_data via a hash table. In this instance, mod_data now stores a hash table of the two values that can be retrieved using an associated string key. (closes issue ASTERISK-22394) Reported by: Rusty Newton Review: https://reviewboard.asterisk.org/r/2843/ ........ Merged revisions 399990 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27chan_sip: Reject calls on 200 OKs if no SDP has been receivedJonathan Rose
When Asterisk receives a 200 OK in response to an invite, that peer should have sent an SDP at some point by then. If the channel has never received an SDP, media won't have been set and the remote address won't be known. Endpoints in general should not be doing this. This patch makes it so that Asterisk will simply hang up a call if it sends a 200 OK at this point. So far this odd behavior for endpoints has only been observed in tests which involved manually created SIP transactions in SIPp. (closes issue ASTERISK-22424) Reported by: Jonathan Rose Review: https://reviewboard.asterisk.org/r/2827/ ........ Merged revisions 399939 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 399962 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 399976 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27astobj2: Remove OBJ_CONTINUE support.Richard Mudgett
OBJ_CONTINUE was a strange feature that came into the world under suspicious circumstances to support an abuse of the ao2_container by chan_iax2. Since chan_iax2 no longer uses OBJ_CONTINUE, it is safe to remove it. The simplified code should help performance slightly and make understanding the code easier. Review: https://reviewboard.asterisk.org/r/2887/ ........ Merged revisions 399937 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27Fix refleaks of ast_rtp_instance structures.Mark Michelson
These refleaks were causing bridged calls not to close their RTP ports. Thus a call would leave open 4 ports (RTP for party A, RTCP for party A, RTP for party B, and RTCP for party B). This led to an eventual depletion of available RTP ports. ........ Merged revisions 399924 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27Restore usefulness of the CEL Peer fieldKinsey Moore
This change makes the CEL peer field useful again for BRIDGE_ENTER and BRIDGE_EXIT events and fills the field with a comma-separated list of all channels in the bridge other than the channel that is entering or exiting the bridge. Review: https://reviewboard.asterisk.org/r/2840/ (closes issue ASTERISK-22393) ........ Merged revisions 399912 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-26pjsip: race condition in registrarKevin Harwell
While handling a registration request a race condition could occur if/when two+ clients registered at the same time. This happened when one request obtained a copy of the current contacts for an AOR and another request did the same before the first request updated. Thus the second would update and overwrite the first (or vice-versa depending on which actually updated first). In the case of it being the same contact two "add" events would be raised. pjsip registration handling is now serialized to alleviate this issue. (closes issue AST-1213) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/2860/ ........ Merged revisions 399897 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-26Adding a few words to the Dial option 'r' help text to clarify its tone ↵Rusty Newton
argument description ........ Merged revisions 399874 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25chan_dahdi: CLI "core stop gracefully" has needless delay for PRI and SS7.Richard Mudgett
The PRI and SS7 link control threads are not stopped correctly when the chan_dahdi.so module is unloaded. The link control threads pri_dchannel() and ss7_linkset() are not awakened from a poll() to cancel the thread. * Added a SIGURG signal after requesting the thread cancel to break the link control thread poll() immediately. For SS7 it was slightly worse, the link poll() timeout would always be whatever was the last libss7 scheduled event time used. If no libss7 scheduled event was pending, the thread could run more often than necessary. * Set nextms to 60 seconds for the ss7_linkset() poll() if there is no other libss7 scheduled event. ........ Merged revisions 399818 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 399834 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 399842 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25Broke the build - Fixing XML DTD violation added in r399782, missing <para> ↵Rusty Newton
tags inside a <note> ........ Merged revisions 399798 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25chan_sip: Fix Realtime Peer Update Problem When Un-registering And Expires ↵Michael L. Young
Header In 200ok 1st Issue When a realtime peer sends an un-REGISTER request, Asterisk un-registers the peer but the database table record still has regseconds and fullcontact for the peer. This results in calls attempting to be routed to the peer which is no longer registered. The expected behavior is to get busy/congested when attempting to call an un-registered peer through the dialplan. What was discovered is that we are clearing out the peer's registration in the database in parse_register_contact() when calling expire_register() but then upon returning from parse_register_contact(), update_peer() is run which stores back in the database table regseconds and fullcontact. 2nd Issue The reporter pointed out that the 200 ok being returned by Asterisk after un-registering a peer contains a Contact header with ;expires= and the Expires header is not set to 0. This is actually a regression. Tests were created for this second issue (ASTERISK-22548). The tests have been reviewed and a Ship It! was received on those tests. This patch does the following: * Do not ignore the Expires header value even when it is set to 0. The patch sets the pvt->expiry earlier on in the function so that it is set properly and used. * If pvt->expiry is 0, do not call update_peer since that means the peer has already been un-registered and there is no need to update the database record again since nothing has changed. (closes issue ASTERISK-22428) Reported by: Ben Smithurst Tested by: Ben Smithurst, Michael L. Young Patches: asterisk-22428-rt-peer-update-and-expires-header.diff by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2869/ ........ Merged revisions 399794 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 399795 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 399796 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-25Fixing documentation for the configOption "external_media_address" of both ↵Rusty Newton
Endpoints and Transports Re-using some of Mark Michelson's text from an E-mail discussion for: * Modifying synopsis for both options * Adding description to both options * Changing name of "external_media_address" for Endpoint configuration to "media_address" in anticipation of the option name being changed. (As it is not really specific to external destinations) (issue ASTERISK-22405) (closes issue ASTERISK-22405) Reported by: Rusty Newton Review: https://reviewboard.asterisk.org/r/2850/ ........ Merged revisions 399781 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-24astobj2: Made use OBJ_SEARCH_xxx identifiers as field enum values internally.Richard Mudgett
* Made ao2_unlink to protect itself from stray OBJ_SEARCH_xxx values passed in. ........ Merged revisions 399749 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-24chan_iax2: Prevent some needless breaking of the native IAX2 bridge.Richard Mudgett
* Clean up some twisted code in the iax2_bridge() loop. * Add AST_CONTROL_VIDUPDATE and AST_CONTROL_SRCCHANGE to a list of frames to prevent the native bridge loop from breaking. * Passing the AST_CONTROL_T38_PARAMETERS frame should also allow FAX over a native IAX2 bridge. (issue ABE-2912) Review: https://reviewboard.asterisk.org/r/2870/ ........ Merged revisions 399697 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 399708 from http://svn.asterisk.org/svn/asterisk/branches/11 For v12 and above this is really just documentation until IAX2 native bridging is restored. ........ Merged revisions 399736 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399737 65c4cc65-6c06-0410-ace0-fbb531ad65f3