[asterisk-commits] file: branch group/pimp_my_sip r389196 - in /team/group/pimp_my_sip: ./ addon...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 20 07:52:02 CDT 2013


Author: file
Date: Mon May 20 07:51:41 2013
New Revision: 389196

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389196
Log:
Multiple revisions 388526,388531,388579,388598,388602,388617,388668,388701,388729,388751,388770,388818,388840,388896,388975-388976,389009,389011,389053,389085,389097,389116,389132,389148,389164,389180

........
  r388526 | jrose | 2013-05-13 14:20:33 -0300 (Mon, 13 May 2013) | 9 lines
  
  chan_gulp: Minor readability Improvements to chan_gulp
  
  (closes issue ASTERISK-21670)
  Reported by: Snuffy
  Review: https://reviewboard.asterisk.org/r/2473/
  Patches:
      gulp-coding-guide.diff uploaded by snuffy (license 5024)
........
  r388531 | kmoore | 2013-05-13 15:10:22 -0300 (Mon, 13 May 2013) | 15 lines
  
  Close libsrtp properly
  
  Ensure that libsrtp is shutdown properly when res_srtp is unloaded.
  
  (closes issue ASTERISK-21719)
  Reported by: Corey Farrell
  Patches:
      res_srtp-library-shutdown.patch uploaded by Corey Farrell
  ........
  
  Merged revisions 388529 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 388530 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388579 | jrose | 2013-05-13 16:29:56 -0300 (Mon, 13 May 2013) | 13 lines
  
  pbx: Fix lack of cleanup on macrolock and context_table
  
  (closes issue ASTERISK-21723)
  Reported by: Corey Farrell
  Patches:
      core-pbx-cleanup.patch uploaded by Correy Farrell (license 5909)
  ........
  
  Merged revisions 388532 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 388578 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388598 | kmoore | 2013-05-13 17:37:11 -0300 (Mon, 13 May 2013) | 11 lines
  
  Revert r388529 for now
  
  Adding the cleanup function needs some deeper thought since it
  apparently doesn't exist for all variants of libsrtp.
  ........
  
  Merged revisions 388596 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 388597 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388602 | elguero | 2013-05-13 18:07:02 -0300 (Mon, 13 May 2013) | 26 lines
  
  Fix Crash Caused By One-way Audio With auto_* NAT Settings Fix
  
  The prior code committed, r385473, failed to take into consideration that not
  all outgoing calls will be to a peer.  My fault.
  
  This patch does the following:
  
  * Check if there is a related peer involved.  If there is, check and set NAT 
    settings according to the peer's settings.
  
  * Fix a problem with realtime peers.  If the global setting has auto_force_rport
    set and we issued a "sip reload" while a peer is still registered, the peer's
    flags for NAT are reset to off.  When this happens, we were always setting the
    contact address of the peer to that of the full contact info that we had.
  
  (closes issue ASTERISK-21374)
  Reported by: jmls
  Tested by: Michael L. Young
  Patches:
     asterisk-21374-fix-crash-and-rt-peers.diff by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2524/
  ........
  
  Merged revisions 388601 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388617 | elguero | 2013-05-13 18:21:03 -0300 (Mon, 13 May 2013) | 18 lines
  
  Fix Missing CALL-ID When Logging Through Syslog
  
  The CALL-ID (ie [C-00000074]) is missing when logging to syslog.  This was just
  an oversight when this feature was added.
  
  * Add CALL-IDs when using syslog
  
  (closes issue ASTERISK-21430)
  Reported by: Nikola Ciprich
  Tested by: Nikola Ciprich, Michael L. Young
  Patches:
      asterisk-21430-syslog-callid_trunk.diff by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2526/
  ........
  
  Merged revisions 388605 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388668 | kmoore | 2013-05-14 09:47:52 -0300 (Tue, 14 May 2013) | 10 lines
  
  Move JSON event generators into separate modules
  
  This moves the JSON event generators out of the Stasis-HTTP modules and
  into standalone JSON-related counterparts so that Stasis-HTTP and
  res_stasis can depend on them without creating dependency cycles. This
  also provides a future location for Swagger Model validator functions
  once the generators for that code are written.
  
  Review: https://reviewboard.asterisk.org/r/2534/
........
  r388701 | rmudgett | 2013-05-14 16:03:26 -0300 (Tue, 14 May 2013) | 14 lines
  
  Make ao2 global objects not always use the debug version of the ao2_ref() calls.
  
  The debug versions of ao2_ref() should only be used if REF_DEBUG is
  enabled so nothing is written to /tmp/refs unexpectedly.
  
  (closes issue ASTERISK-21785)
  Reported by: abelbeck
  Patches:
        jira_asterisk_21785_v11.patch (license #5621) patch uploaded by rmudgett
  Tested by: abelbeck
  ........
  
  Merged revisions 388700 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388729 | dlee | 2013-05-14 18:45:08 -0300 (Tue, 14 May 2013) | 20 lines
  
  Break res_stasis into smaller files.
  
  When implementing playback for stasis-http, the monolithicedness of
  res_stasis really started to get in my way.
  
  This patch breaks the major components of res_stasis.c into individual
  files.
  
   * res/stasis/app.c - Stasis application tracking
   * res/stasis/control.c - Channel control objects
   * res/stasis/command.c - Channel command object
  
  This refactoring also allows res_stasis applications to be loaded as
  independent modules, such as the new res_stasis_answer module.
  
  The bulk of this patch is simply moving code from one file to another,
  adjusting names and adding accessors as necessary.
  
  Review: https://reviewboard.asterisk.org/r/2530/
........
  r388751 | dlee | 2013-05-14 23:37:22 -0300 (Tue, 14 May 2013) | 3 lines
  
  Refactored the rest of the message types to use the STASIS_MESSAGE_TYPE_*
  macros.
........
  r388770 | kmoore | 2013-05-15 09:42:04 -0300 (Wed, 15 May 2013) | 14 lines
  
  Use srtp_shutdown when available
  
  This allows the SRTP library to be shut down properly when the
  functionality is offered by libsrtp.
  
  Review: https://reviewboard.asterisk.org/r/2538/
  (closes issue ASTERISK-21719)
  ........
  
  Merged revisions 388768 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 388769 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388818 | qwell | 2013-05-15 12:03:40 -0300 (Wed, 15 May 2013) | 18 lines
  
  Fix VM snapshot handling for combined INBOX.
  
  The snapshot API contains an option that allow for combining of new 
  and old messages within a single snapshot. New messages, however, 
  include options beyond just 'INBOX' - it also includes the Urgent 
  folder. A previous patch that combined INBOX and Urgent accidentally 
  impacted snapshots that attempted to gain messages from just the Old 
  folder. This patch fixes the snapshot gathering such that the API 
  returns the appropriate messages for the folder selected, with and 
  without the combine option.
  
  This should make it more clear about what's happening.
  
  Review: https://reviewboard.asterisk.org/r/2539/
  ........
  
  Merged revisions 388816 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388840 | kharwell | 2013-05-15 12:58:56 -0300 (Wed, 15 May 2013) | 18 lines
  
  Fix for segfault in __ast_rwlock_destroy with DEBUG_THREADS
  
  If DEBUG_THREADS is enabled __ast_rwlock_destroy causes a segfault while trying
  to access a possible NULL t->track object.  A NULL check has been added before
  trying to access the memory.
  
  (closes issue ASTERISK-21724)
  Reported by: Corey Farrell
  Fixed by: Corey Farrell
  Patches:
  	ast_rwlock_destroy-segv.patch uploaded by Corey Farrell (license 5909)
  ........
  
  Merged revisions 388838 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 388839 from http://svn.asterisk.org/svn/asterisk/branches/11
........
  r388896 | dlee | 2013-05-15 18:13:29 -0300 (Wed, 15 May 2013) | 4 lines
  
  Fixed inverted logic in app_add_channel().
  
  Also added some missing doc comments for stasis/app.h.
........
  r388975 | jrose | 2013-05-17 14:36:10 -0300 (Fri, 17 May 2013) | 10 lines
  
  Stasis: Update security events to use Stasis
  
  Also moves ACL messages to the security topic and gets rid of the
  ACL topic
  
  (closes issue ASTERISK-21103)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2496/
........
  r388976 | mjordan | 2013-05-17 14:43:58 -0300 (Fri, 17 May 2013) | 19 lines
  
  Publish the outbound channel's application/data when dialing
  
  This patch does two things:
  * It fixes a bug where the outbound channel's application/data set by the
    dialing API/app_dial is not communicated until the channel is hung up.
    If that happens, AMI would incorrectly send a NewExten event immediately
    after a Hangup. This isn't really AMI's fault, as the dialing APIs never
    communicated the 'helpful' app/data on the outbound channel until it was
    hungup.
  * It makes public sending a stasis message about a change in channel state.
    This is useful enough that - for now at least - it should be public. If
    operations on a channel go to being more coarse-grained, this function
    could be made private again.
  
  Review: https://reviewboard.asterisk.org/r/2548
  
  Note that this problem was found and reported by Matt DiMeo.
........
  r389009 | elguero | 2013-05-17 17:24:56 -0300 (Fri, 17 May 2013) | 17 lines
  
  Remove Character Limit On "inkeys" For IAX2
  
  Currently, the buffer for processing "inkeys" is limited to 256 characters.  If
  the user has many keys and the names of those key files are long, the 256
  character limit is not enough.
  
  * Change inkeys buffer to be dynamic
  
  (closes issue ASTERISK-21398)
  Reported by: Pavel Kopchyk
  Tested by: Pavel Kopchyk, Michael L. Young
  Patches:
      asterisk-21398-iax2-inkeys-dynamic-buffer_v3.diff
  					by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2501/
........
  r389011 | dlee | 2013-05-17 18:10:32 -0300 (Fri, 17 May 2013) | 27 lines
  
  Fix shutdown assertions in stasis-core
  
  In r388005, macros were introduced to consistently define message
  types. This added an assert if a message type was used either before
  it was initialized or after it had been cleaned up. It turns out that
  this assertion fires during shutdown.
  
  This actually exposed a hidden shutdown ordering problem. Since
  unsubscribing is asynchronous, it's possible that the message types
  used by the subscription could be freed before the final message of
  the subscription was processed.
  
  This patch adds stasis_subscription_join(), which blocks until the
  last message has been processed by the subscription. Since joining was
  most commonly done right after an unsubscribe, a
  stasis_unsubscribe_and_join() convenience function was also added.
  
  Similar functions were also added to the stasis_caching_topic and
  stasis_message_router, since they wrap subscriptions and have similar
  problems.
  
  Other code in trunk was refactored to join() where appropriate, or at
  least verify that the subscription was complete before being
  destroyed.
  
  Review: https://reviewboard.asterisk.org/r/2540
........
  r389053 | file | 2013-05-18 16:47:24 -0300 (Sat, 18 May 2013) | 7 lines
  
  Move origination to use the dialing API and send Stasis messages on dial begin and end.
  
  (closes issue ASTERISK-21549)
  Reported by: Matt Jordan
  
  Review: https://reviewboard.asterisk.org/r/2512/
........
  r389085 | file | 2013-05-18 19:49:14 -0300 (Sat, 18 May 2013) | 2 lines
  
  Fix a bug where synchronous origination (oddly enough triggered by doing an async manager Originate) would not work properly.
........
  r389097 | wedhorn | 2013-05-18 20:20:53 -0300 (Sat, 18 May 2013) | 16 lines
  
  Add call forward no answer to skinny and cleanup general callfwd handling.
  
  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)
........
  r389116 | file | 2013-05-18 21:49:15 -0300 (Sat, 18 May 2013) | 2 lines
  
  If the caller of the originate API calls wants the channel ensure it has been requested and dialed.
........
  r389132 | file | 2013-05-18 23:21:44 -0300 (Sat, 18 May 2013) | 2 lines
  
  Don't hold the outgoing lock for a prolonged period of time as it may block the originator.
........
  r389148 | kmoore | 2013-05-19 14:45:42 -0300 (Sun, 19 May 2013) | 9 lines
  
  Add base XML documentation for res_sip
  
  Thanks to Brad Latus, this patch adds a significant amount much-needed
  documentation to res_sip. It should cover all existing configuration
  options currently in Asterisk trunk.
  
  Patch-by: Brad Latus (snuffy)
  Review: https://reviewboard.asterisk.org/r/2471/
........
  r389164 | wedhorn | 2013-05-19 16:45:14 -0300 (Sun, 19 May 2013) | 8 lines
  
  Add transfer softkey to ringout state to enable blond transfers.
  
  (closes issue ASTERISK-21327)
  Reported by: wedhorn
  Tested by: myself
  Patches: 
      skinny-blindxfer01.diff uploaded by wedhorn (license 5019)
........
  r389180 | may | 2013-05-19 17:52:34 -0300 (Sun, 19 May 2013) | 2 lines
  
  add ast_publish_channel_state according new event framework
........

Merged revisions 388526,388531,388579,388598,388602,388617,388668,388701,388729,388751,388770,388818,388840,388896,388975-388976,389009,389011,389053,389085,389097,389116,389132,389148,389164,389180 from http://svn.asterisk.org/svn/asterisk/trunk

Added:
    team/group/pimp_my_sip/include/asterisk/stasis_app_impl.h
      - copied unchanged from r389180, trunk/include/asterisk/stasis_app_impl.h
    team/group/pimp_my_sip/res/res_stasis_answer.c
      - copied unchanged from r389180, trunk/res/res_stasis_answer.c
    team/group/pimp_my_sip/res/res_stasis_json_asterisk.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_asterisk.c
    team/group/pimp_my_sip/res/res_stasis_json_asterisk.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_asterisk.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_bridges.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_bridges.c
    team/group/pimp_my_sip/res/res_stasis_json_bridges.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_bridges.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_channels.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_channels.c
    team/group/pimp_my_sip/res/res_stasis_json_channels.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_channels.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_endpoints.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_endpoints.c
    team/group/pimp_my_sip/res/res_stasis_json_endpoints.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_endpoints.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_events.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_events.c
    team/group/pimp_my_sip/res/res_stasis_json_events.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_events.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_playback.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_playback.c
    team/group/pimp_my_sip/res/res_stasis_json_playback.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_playback.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_recordings.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_recordings.c
    team/group/pimp_my_sip/res/res_stasis_json_recordings.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_recordings.exports.in
    team/group/pimp_my_sip/res/res_stasis_json_sounds.c
      - copied unchanged from r389180, trunk/res/res_stasis_json_sounds.c
    team/group/pimp_my_sip/res/res_stasis_json_sounds.exports.in
      - copied unchanged from r389180, trunk/res/res_stasis_json_sounds.exports.in
    team/group/pimp_my_sip/res/stasis/   (props changed)
      - copied from r389180, trunk/res/stasis/
    team/group/pimp_my_sip/res/stasis_json/
      - copied from r389180, trunk/res/stasis_json/
    team/group/pimp_my_sip/rest-api-templates/res_stasis_json_resource.c.mustache
      - copied unchanged from r389180, trunk/rest-api-templates/res_stasis_json_resource.c.mustache
    team/group/pimp_my_sip/rest-api-templates/res_stasis_json_resource.exports.mustache
      - copied unchanged from r389180, trunk/rest-api-templates/res_stasis_json_resource.exports.mustache
    team/group/pimp_my_sip/rest-api-templates/stasis_json_resource.h.mustache
      - copied unchanged from r389180, trunk/rest-api-templates/stasis_json_resource.h.mustache
Modified:
    team/group/pimp_my_sip/   (props changed)
    team/group/pimp_my_sip/CHANGES
    team/group/pimp_my_sip/addons/chan_ooh323.c
    team/group/pimp_my_sip/addons/chan_ooh323.h
    team/group/pimp_my_sip/apps/app_dial.c
    team/group/pimp_my_sip/apps/app_queue.c
    team/group/pimp_my_sip/apps/app_stasis.c
    team/group/pimp_my_sip/apps/app_voicemail.c
    team/group/pimp_my_sip/channels/chan_gulp.c
    team/group/pimp_my_sip/channels/chan_iax2.c
    team/group/pimp_my_sip/channels/chan_sip.c
    team/group/pimp_my_sip/channels/chan_skinny.c
    team/group/pimp_my_sip/channels/sip/config_parser.c
    team/group/pimp_my_sip/channels/sip/dialplan_functions.c
    team/group/pimp_my_sip/channels/sip/include/config_parser.h
    team/group/pimp_my_sip/channels/sip/include/sip.h
    team/group/pimp_my_sip/channels/sip/security_events.c
    team/group/pimp_my_sip/configs/skinny.conf.sample
    team/group/pimp_my_sip/configure
    team/group/pimp_my_sip/configure.ac
    team/group/pimp_my_sip/funcs/func_presencestate.c
    team/group/pimp_my_sip/include/asterisk/acl.h
    team/group/pimp_my_sip/include/asterisk/astobj2.h
    team/group/pimp_my_sip/include/asterisk/autoconfig.h.in
    team/group/pimp_my_sip/include/asterisk/dial.h
    team/group/pimp_my_sip/include/asterisk/json.h
    team/group/pimp_my_sip/include/asterisk/module.h
    team/group/pimp_my_sip/include/asterisk/netsock2.h
    team/group/pimp_my_sip/include/asterisk/res_sip.h
    team/group/pimp_my_sip/include/asterisk/security_events.h
    team/group/pimp_my_sip/include/asterisk/security_events_defs.h
    team/group/pimp_my_sip/include/asterisk/stasis.h
    team/group/pimp_my_sip/include/asterisk/stasis_app.h
    team/group/pimp_my_sip/include/asterisk/stasis_channels.h
    team/group/pimp_my_sip/include/asterisk/stasis_message_router.h
    team/group/pimp_my_sip/main/app.c
    team/group/pimp_my_sip/main/asterisk.c
    team/group/pimp_my_sip/main/astobj2.c
    team/group/pimp_my_sip/main/channel.c
    team/group/pimp_my_sip/main/devicestate.c
    team/group/pimp_my_sip/main/dial.c
    team/group/pimp_my_sip/main/endpoints.c
    team/group/pimp_my_sip/main/json.c
    team/group/pimp_my_sip/main/lock.c
    team/group/pimp_my_sip/main/logger.c
    team/group/pimp_my_sip/main/manager.c
    team/group/pimp_my_sip/main/manager_channels.c
    team/group/pimp_my_sip/main/named_acl.c
    team/group/pimp_my_sip/main/pbx.c
    team/group/pimp_my_sip/main/presencestate.c
    team/group/pimp_my_sip/main/security_events.c
    team/group/pimp_my_sip/main/stasis.c
    team/group/pimp_my_sip/main/stasis_cache.c
    team/group/pimp_my_sip/main/stasis_channels.c
    team/group/pimp_my_sip/main/stasis_endpoints.c
    team/group/pimp_my_sip/main/stasis_message_router.c
    team/group/pimp_my_sip/main/test.c
    team/group/pimp_my_sip/res/Makefile
    team/group/pimp_my_sip/res/res_chan_stats.c
    team/group/pimp_my_sip/res/res_jabber.c
    team/group/pimp_my_sip/res/res_security_log.c
    team/group/pimp_my_sip/res/res_sip.c
    team/group/pimp_my_sip/res/res_sip/config_transport.c
    team/group/pimp_my_sip/res/res_sip_acl.c
    team/group/pimp_my_sip/res/res_sip_endpoint_identifier_ip.c
    team/group/pimp_my_sip/res/res_sip_nat.c
    team/group/pimp_my_sip/res/res_sip_outbound_registration.c
    team/group/pimp_my_sip/res/res_srtp.c
    team/group/pimp_my_sip/res/res_stasis.c
    team/group/pimp_my_sip/res/res_stasis_http_events.c
    team/group/pimp_my_sip/res/res_stasis_test.c
    team/group/pimp_my_sip/res/stasis_http/resource_asterisk.h
    team/group/pimp_my_sip/res/stasis_http/resource_bridges.h
    team/group/pimp_my_sip/res/stasis_http/resource_channels.h
    team/group/pimp_my_sip/res/stasis_http/resource_endpoints.h
    team/group/pimp_my_sip/res/stasis_http/resource_events.h
    team/group/pimp_my_sip/res/stasis_http/resource_playback.h
    team/group/pimp_my_sip/res/stasis_http/resource_recordings.h
    team/group/pimp_my_sip/res/stasis_http/resource_sounds.h
    team/group/pimp_my_sip/rest-api-templates/make_stasis_http_stubs.py
    team/group/pimp_my_sip/rest-api-templates/res_stasis_http_resource.c.mustache
    team/group/pimp_my_sip/rest-api-templates/stasis_http_resource.h.mustache
    team/group/pimp_my_sip/tests/test_res_stasis.c
    team/group/pimp_my_sip/tests/test_security_events.c

Propchange: team/group/pimp_my_sip/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/pimp_my_sip/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/group/pimp_my_sip/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 20 07:51:41 2013
@@ -1,1 +1,1 @@
-/trunk:1-388483
+/trunk:1-389195

Modified: team/group/pimp_my_sip/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/CHANGES?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/CHANGES (original)
+++ team/group/pimp_my_sip/CHANGES Mon May 20 07:51:41 2013
@@ -146,6 +146,11 @@
    If any resource is available the device state is considered to be not in use.
    If no resources exist or all are unavailable the device state is considered
    to be unavailable.
+
+Security Events Framework
+-------------------------
+ * Security Event timestamps now use ISO 8601 formatted date/time instead of the
+   "seconds-microseconds" format that it was using previously.
 
 Sorcery
 ------------------

Modified: team/group/pimp_my_sip/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/addons/chan_ooh323.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/addons/chan_ooh323.c (original)
+++ team/group/pimp_my_sip/addons/chan_ooh323.c Mon May 20 07:51:41 2013
@@ -490,9 +490,8 @@
 	 	}
 
 		if (ch) {
-			manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", 
-				"Channel: %s\r\nChanneltype: %s\r\n"
-				"CallRef: %d\r\n", ast_channel_name(ch), "OOH323", i->call_reference);
+			ast_publish_channel_state(ch);
+
 		}
 	} else
 		ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
@@ -2149,8 +2148,7 @@
 
 			ast_queue_control(c, AST_CONTROL_ANSWER);
    			ast_channel_unlock(p->owner);
-			manager_event(EVENT_FLAG_SYSTEM,"ChannelUpdate","Channel: %s\r\nChanneltype: %s\r\n"
-				"CallRef: %d\r\n", ast_channel_name(c), "OOH323", p->call_reference);
+			ast_publish_channel_state(c);
 		}
 		ast_mutex_unlock(&p->lock);
 

Modified: team/group/pimp_my_sip/addons/chan_ooh323.h
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/addons/chan_ooh323.h?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/addons/chan_ooh323.h (original)
+++ team/group/pimp_my_sip/addons/chan_ooh323.h Mon May 20 07:51:41 2013
@@ -64,6 +64,7 @@
 #include "asterisk/format.h"
 #include "asterisk/format_cap.h"
 #include "asterisk/udptl.h"
+#include "asterisk/stasis_channels.h"
 
 #include "ootypes.h"
 #include "ooUtils.h"

Modified: team/group/pimp_my_sip/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/apps/app_dial.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/apps/app_dial.c (original)
+++ team/group/pimp_my_sip/apps/app_dial.c Mon May 20 07:51:41 2013
@@ -972,6 +972,7 @@
 
 		ast_channel_appl_set(c, "AppDial");
 		ast_channel_data_set(c, "(Outgoing Line)");
+		ast_publish_channel_state(c);
 
 		ast_channel_unlock(in);
 		if (single && !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
@@ -2453,6 +2454,8 @@
 
 		ast_channel_appl_set(tc, "AppDial");
 		ast_channel_data_set(tc, "(Outgoing Line)");
+		ast_publish_channel_state(tc);
+
 		memset(ast_channel_whentohangup(tc), 0, sizeof(*ast_channel_whentohangup(tc)));
 
 		/* Determine CallerID to store in outgoing channel. */

Modified: team/group/pimp_my_sip/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/apps/app_queue.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/apps/app_queue.c (original)
+++ team/group/pimp_my_sip/apps/app_queue.c Mon May 20 07:51:41 2013
@@ -9866,9 +9866,7 @@
 
 	res |= ast_data_unregister(NULL);
 
-	if (device_state_sub) {
-		device_state_sub = stasis_unsubscribe(device_state_sub);
-	}
+	device_state_sub = stasis_unsubscribe_and_join(device_state_sub);
 
 	ast_extension_state_del(0, extension_state_cb);
 

Modified: team/group/pimp_my_sip/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/apps/app_stasis.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/apps/app_stasis.c (original)
+++ team/group/pimp_my_sip/apps/app_stasis.c Mon May 20 07:51:41 2013
@@ -35,7 +35,7 @@
 #include "asterisk/app.h"
 #include "asterisk/module.h"
 #include "asterisk/stasis.h"
-#include "asterisk/stasis_app.h"
+#include "asterisk/stasis_app_impl.h"
 
 /*** DOCUMENTATION
 	<application name="Stasis" language="en_US">

Modified: team/group/pimp_my_sip/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/apps/app_voicemail.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/apps/app_voicemail.c (original)
+++ team/group/pimp_my_sip/apps/app_voicemail.c Mon May 20 07:51:41 2013
@@ -12689,9 +12689,7 @@
 {
 	poll_thread_run = 0;
 
-	if (mwi_sub_sub) {
-		mwi_sub_sub = stasis_unsubscribe(mwi_sub_sub);
-	}
+	mwi_sub_sub = stasis_unsubscribe_and_join(mwi_sub_sub);
 
 	ast_mutex_lock(&poll_lock);
 	ast_cond_signal(&poll_cond);
@@ -15118,24 +15116,20 @@
 	mailbox_snapshot->folders = ARRAY_LEN(mailbox_folders);
 
 	for (i = 0; i < mailbox_snapshot->folders; i++) {
-		int combining_old = 0;
-		/* Assume we are combining folders if:
-		 *  - The current index is the old folder index OR
-		 *  - The current index is urgent and we were looking for INBOX or all folders OR
-		 *  - The current index is INBOX and we were looking for Urgent or all folders
+		int msg_folder_index = i;
+
+		/* We want this message in the snapshot if any of the following:
+		 *   No folder was specified.
+		 *   The specified folder matches the current folder.
+		 *   The specified folder is INBOX AND we were asked to combine messages AND the current folder is either Old or Urgent.
 		 */
-		if ((i == old_index ||
-			(i == urgent_index && (this_index_only == inbox_index || this_index_only == -1)) ||
-			(i == inbox_index && (this_index_only == urgent_index || this_index_only == -1))) && (combine_INBOX_and_OLD)) {
-			combining_old = 1;
-		}
-
-		/* This if statement is confusing looking.  Here is what it means in english.
-		 * - If a folder is given to the function and that folder's index is not the one we are iterating over, skip it...
-		 * - Unless the folder provided is the INBOX folder and the current index is the OLD folder and we are combining OLD and INBOX msgs.
-		 */
-		if ((this_index_only != -1) && (this_index_only != i) && !(combining_old && i == old_index && this_index_only == inbox_index)) {
+		if (!(this_index_only == -1 || this_index_only == i || (this_index_only == inbox_index && combine_INBOX_and_OLD && (i == old_index || i == urgent_index)))) {
 			continue;
+		}
+
+		/* Make sure that Old or Urgent messages are marked as being in INBOX. */
+		if (combine_INBOX_and_OLD && (i == old_index || i == urgent_index)) {
+			msg_folder_index = inbox_index;
 		}
 
 		memset(&vms, 0, sizeof(vms));
@@ -15152,7 +15146,7 @@
 
 		/* Iterate through each msg, storing off info */
 		if (vms.lastmsg != -1) {
-			if ((vm_msg_snapshot_create(vmu, &vms, mailbox_snapshot, combining_old ? inbox_index : i, i, descending, sort_val))) {
+			if ((vm_msg_snapshot_create(vmu, &vms, mailbox_snapshot, msg_folder_index, i, descending, sort_val))) {
 				ast_log(LOG_WARNING, "Failed to create msg snapshots for %s@%s\n", mailbox, context);
 				goto snapshot_cleanup;
 			}

Modified: team/group/pimp_my_sip/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/channels/chan_gulp.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/channels/chan_gulp.c (original)
+++ team/group/pimp_my_sip/channels/chan_gulp.c Mon May 20 07:51:41 2013
@@ -117,8 +117,10 @@
 {
 	struct gulp_pvt *pvt = obj;
 	int i;
+
 	ao2_cleanup(pvt->session);
 	pvt->session = NULL;
+
 	for (i = 0; i < SIP_MEDIA_SIZE; ++i) {
 		ao2_cleanup(pvt->media[i]);
 		pvt->media[i] = NULL;
@@ -186,15 +188,16 @@
 /*! \brief Dialplan function for constructing a dial string for calling all contacts */
 static int gulp_dial_contacts(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
+	RAII_VAR(struct ast_sip_endpoint *, endpoint, NULL, ao2_cleanup);
+	RAII_VAR(struct ast_str *, dial, NULL, ast_free_ptr);
+	const char *aor_name;
+	char *rest;
+
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(endpoint_name);
 		AST_APP_ARG(aor_name);
 		AST_APP_ARG(request_user);
 	);
-	RAII_VAR(struct ast_sip_endpoint *, endpoint, NULL, ao2_cleanup);
-	const char *aor_name;
-	char *rest;
-	RAII_VAR(struct ast_str *, dial, NULL, ast_free_ptr);
 
 	AST_STANDARD_APP_ARGS(args, data);
 
@@ -402,12 +405,14 @@
 static void gulp_get_codec(struct ast_channel *chan, struct ast_format_cap *result)
 {
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(chan);
+
 	ast_format_cap_copy(result, pvt->session->endpoint->codecs);
 }
 
 static int send_direct_media_request(void *data)
 {
 	RAII_VAR(struct ast_sip_session *, session, data, ao2_cleanup);
+
 	return ast_sip_session_refresh(session, NULL, NULL, session->endpoint->direct_media_method, 1);
 }
 
@@ -583,6 +588,7 @@
 	}
 
 	ao2_ref(session, -1);
+
 	return (status == PJ_SUCCESS) ? 0 : -1;
 }
 
@@ -604,6 +610,7 @@
 		ao2_cleanup(session);
 		return -1;
 	}
+
 	return 0;
 }
 
@@ -669,8 +676,8 @@
 static int gulp_write(struct ast_channel *ast, struct ast_frame *frame)
 {
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(ast);
+	struct ast_sip_session_media *media;
 	int res = 0;
-	struct ast_sip_session_media *media;
 
 	switch (frame->frametype) {
 	case AST_FRAME_VOICE:
@@ -715,7 +722,9 @@
 static int fixup(void *data)
 {
 	struct fixup_data *fix_data = data;
+
 	fix_data->session->channel = fix_data->chan;
+
 	return 0;
 }
 
@@ -725,6 +734,7 @@
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(newchan);
 	struct ast_sip_session *session = pvt->session;
 	struct fixup_data fix_data;
+
 	fix_data.session = session;
 	fix_data.chan = newchan;
 
@@ -751,6 +761,7 @@
 static void indicate_data_destroy(void *obj)
 {
 	struct indicate_data *ind_data = obj;
+
 	ast_free(ind_data->frame_data);
 	ao2_ref(ind_data->session, -1);
 }
@@ -759,35 +770,40 @@
 		int condition, int response_code, const void *frame_data, size_t datalen)
 {
 	struct indicate_data *ind_data = ao2_alloc(sizeof(*ind_data), indicate_data_destroy);
+
 	if (!ind_data) {
 		return NULL;
 	}
+
 	ind_data->frame_data = ast_malloc(datalen);
 	if (!ind_data->frame_data) {
 		ao2_ref(ind_data, -1);
 		return NULL;
 	}
+
 	memcpy(ind_data->frame_data, frame_data, datalen);
 	ind_data->datalen = datalen;
 	ind_data->condition = condition;
 	ind_data->response_code = response_code;
 	ao2_ref(session, +1);
 	ind_data->session = session;
+
 	return ind_data;
 }
 
 static int indicate(void *data)
 {
+	pjsip_tx_data *packet = NULL;
 	struct indicate_data *ind_data = data;
 	struct ast_sip_session *session = ind_data->session;
 	int response_code = ind_data->response_code;
-	pjsip_tx_data *packet = NULL;
 
 	if (pjsip_inv_answer(session->inv_session, response_code, NULL, NULL, &packet) == PJ_SUCCESS) {
 		ast_sip_session_send_response(session, packet);
 	}
 
 	ao2_ref(ind_data, -1);
+
 	return 0;
 }
 
@@ -829,11 +845,11 @@
 /*! \brief Function called by core to ask the channel to indicate some sort of condition */
 static int gulp_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
 {
-	int res = 0;
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(ast);
 	struct ast_sip_session *session = pvt->session;
 	struct ast_sip_session_media *media;
 	int response_code = 0;
+	int res = 0;
 
 	switch (condition) {
 	case AST_CONTROL_RINGING:
@@ -936,8 +952,8 @@
 {
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(chan);
 	struct ast_sip_session *session = pvt->session;
+	struct ast_sip_session_media *media = pvt->media[SIP_MEDIA_AUDIO];
 	int res = 0;
-	struct ast_sip_session_media *media = pvt->media[SIP_MEDIA_AUDIO];
 
 	switch (session->endpoint->dtmf) {
 	case AST_SIP_DTMF_RFC_4733:
@@ -1024,8 +1040,8 @@
 {
 	struct gulp_pvt *pvt = ast_channel_tech_pvt(ast);
 	struct ast_sip_session *session = pvt->session;
+	struct ast_sip_session_media *media = pvt->media[SIP_MEDIA_AUDIO];
 	int res = 0;
-	struct ast_sip_session_media *media = pvt->media[SIP_MEDIA_AUDIO];
 
 	switch (session->endpoint->dtmf) {
 	case AST_SIP_DTMF_INFO:
@@ -1087,6 +1103,7 @@
 		ao2_cleanup(session);
 		return -1;
 	}
+
 	return 0;
 }
 
@@ -1146,17 +1163,21 @@
 static void hangup_data_destroy(void *obj)
 {
 	struct hangup_data *h_data = obj;
+
 	h_data->chan = ast_channel_unref(h_data->chan);
 }
 
 static struct hangup_data *hangup_data_alloc(int cause, struct ast_channel *chan)
 {
 	struct hangup_data *h_data = ao2_alloc(sizeof(*h_data), hangup_data_destroy);
+
 	if (!h_data) {
 		return NULL;
 	}
+
 	h_data->cause = cause;
 	h_data->chan = ast_channel_ref(chan);
+
 	return h_data;
 }
 
@@ -1183,6 +1204,7 @@
 
 	ao2_cleanup(pvt);
 	ao2_cleanup(h_data);
+
 	return 0;
 }
 
@@ -1193,6 +1215,7 @@
 	struct ast_sip_session *session = pvt->session;
 	int cause = hangup_cause2sip(ast_channel_hangupcause(session->channel));
 	struct hangup_data *h_data = hangup_data_alloc(cause, ast);
+
 	if (!h_data) {
 		goto failure;
 	}
@@ -1201,6 +1224,7 @@
 		ast_log(LOG_WARNING, "Unable to push hangup task to the threadpool. Expect bad things\n");
 		goto failure;
 	}
+
 	return 0;
 
 failure:
@@ -1212,6 +1236,7 @@
 	ast_channel_tech_pvt_set(ast, NULL);
 
 	ao2_cleanup(pvt);
+
 	return -1;
 }
 
@@ -1225,9 +1250,10 @@
 static int request(void *obj)
 {
 	struct request_data *req_data = obj;
+	struct ast_sip_session *session = NULL;
 	char *tmp = ast_strdupa(req_data->dest), *endpoint_name = NULL, *request_user = NULL;
 	RAII_VAR(struct ast_sip_endpoint *, endpoint, NULL, ao2_cleanup);
-	struct ast_sip_session *session = NULL;
+
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(endpoint);
 		AST_APP_ARG(aor);

Modified: team/group/pimp_my_sip/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/channels/chan_iax2.c?view=diff&rev=389196&r1=389195&r2=389196
==============================================================================
--- team/group/pimp_my_sip/channels/chan_iax2.c (original)
+++ team/group/pimp_my_sip/channels/chan_iax2.c Mon May 20 07:51:41 2013
@@ -101,6 +101,7 @@
 #include "asterisk/test.h"
 #include "asterisk/data.h"
 #include "asterisk/netsock2.h"
+#include "asterisk/security_events.h"
 
 #include "iax2/include/iax2.h"
 #include "iax2/include/firmware.h"
@@ -1333,24 +1334,20 @@
 
 static void network_change_stasis_unsubscribe(void)
 {
-	if (network_change_sub) {
-		network_change_sub = stasis_unsubscribe(network_change_sub);
-	}
+	network_change_sub = stasis_unsubscribe_and_join(network_change_sub);
 }
 
 static void acl_change_stasis_subscribe(void)
 {
 	if (!acl_change_sub) {
-		acl_change_sub = stasis_subscribe(ast_acl_topic(),
+		acl_change_sub = stasis_subscribe(ast_security_topic(),
 			acl_change_stasis_cb, NULL);
 	}
 }
 
 static void acl_change_stasis_unsubscribe(void)
 {
-	if (acl_change_sub) {
-		acl_change_sub = stasis_unsubscribe(acl_change_sub);
-	}
+	acl_change_sub = stasis_unsubscribe_and_join(acl_change_sub);
 }
 
 static int network_change_sched_cb(const void *data)
@@ -6261,7 +6258,7 @@
 		struct MD5Context md5;
 		unsigned char digest[16];
 		char *tmppw, *stringp;
-		
+
 		tmppw = ast_strdupa(iaxs[callno]->secret);
 		stringp = tmppw;
 		while ((tmppw = strsep(&stringp, ";"))) {
@@ -7823,10 +7820,13 @@
 	if ((p->authmethods & IAX_AUTH_RSA) && !ast_strlen_zero(rsasecret) && !ast_strlen_zero(p->inkeys)) {
 		struct ast_key *key;
 		char *keyn;
-		char tmpkey[256];
+		char *tmpkey;
 		char *stringp=NULL;
-		ast_copy_string(tmpkey, p->inkeys, sizeof(tmpkey));
-		stringp=tmpkey;
+		if (!(tmpkey = ast_strdup(p->inkeys))) {
+			ast_log(LOG_ERROR, "Unable to create a temporary string for parsing stored 'inkeys'\n");
+			return res;
+		}
+		stringp = tmpkey;
 		keyn = strsep(&stringp, ":");
 		while(keyn) {
 			key = ast_key_get(keyn, AST_KEY_PUBLIC);
@@ -7837,11 +7837,12 @@
 				ast_log(LOG_WARNING, "requested inkey '%s' for RSA authentication does not exist\n", keyn);
 			keyn = strsep(&stringp, ":");
 		}
+		ast_free(tmpkey);
 	} else if (p->authmethods & IAX_AUTH_MD5) {
 		struct MD5Context md5;
 		unsigned char digest[16];
 		char *tmppw, *stringp;
-		
+
 		tmppw = ast_strdupa(p->secret);
 		stringp = tmppw;
 		while((tmppw = strsep(&stringp, ";"))) {
@@ -7944,10 +7945,13 @@
 	/* Check secret against what we have on file */
 	if (!ast_strlen_zero(rsasecret) && (p->authmethods & IAX_AUTH_RSA) && !ast_strlen_zero(iaxs[callno]->challenge)) {
 		if (!ast_strlen_zero(p->inkeys)) {
-			char tmpkeys[256];
+			char *tmpkey;
 			char *stringp=NULL;
-			ast_copy_string(tmpkeys, p->inkeys, sizeof(tmpkeys));
-			stringp=tmpkeys;
+			if (!(tmpkey = ast_strdup(p->inkeys))) {
+				ast_log(LOG_ERROR, "Unable to create a temporary string for parsing stored 'inkeys'\n");
+				goto return_unref;
+			}
+			stringp = tmpkey;
 			keyn = strsep(&stringp, ":");
 			while(keyn) {
 				key = ast_key_get(keyn, AST_KEY_PUBLIC);
@@ -7958,6 +7962,7 @@
 					ast_log(LOG_WARNING, "requested inkey '%s' does not exist\n", keyn);
 				keyn = strsep(&stringp, ":");
 			}
+			ast_free(tmpkey);
 			if (!keyn) {
 				if (authdebug)

[... 8741 lines stripped ...]



More information about the asterisk-commits mailing list