[asterisk-commits] kharwell: branch kharwell/pimp_sip_security r391813 - in /team/kharwell/pimp_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 14 11:27:52 CDT 2013


Author: kharwell
Date: Fri Jun 14 11:27:39 2013
New Revision: 391813

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391813
Log:
Multiple revisions 391192-391193,391201,391255,391270,391274,391299,391318,391337,391384,391408,391434,391458,391482,391527,391564,391601,391625,391649,391679,391706,391736

........
  r391192 | file | 2013-06-10 06:59:51 -0500 (Mon, 10 Jun 2013) | 6 lines
  
  Add security events to chan_pjsip.
  
  (closes issue ASTERISK-21460)
  
  Review: https://reviewboard.asterisk.org/r/2590/
........
  r391193 | file | 2013-06-10 07:02:42 -0500 (Mon, 10 Jun 2013) | 6 lines
  
  Add mid-call connected line update support.
  
  (closes issue ASTERISK-21258)
  
  Review: https://reviewboard.asterisk.org/r/2570/
........
  r391201 | root | 2013-06-10 08:17:47 -0500 (Mon, 10 Jun 2013) | 26 lines
  
  Stasis-HTTP: Flesh out bridge-related capabilities
  
  This adds support for Stasis applications to receive bridge-related
  messages when the application shows interest in a given bridge.
  
  To supplement this work and test it, this also adds support for the
  following bridge-related Stasis-HTTP functionality:
  * GET stasis/bridges
  * GET stasis/bridges/{bridgeId}
  * POST stasis/bridges
  * DELETE stasis/bridges/{bridgeId}
  * POST stasis/bridges/{bridgeId}/addChannel
  * POST stasis/bridges/{bridgeId}/removeChannel
  
  Review: https://reviewboard.asterisk.org/r/2572/
  (closes issue ASTERISK-21711)
  (closes issue ASTERISK-21621)
  (closes issue ASTERISK-21622)
  (closes issue ASTERISK-21623)
  (closes issue ASTERISK-21624)
  (closes issue ASTERISK-21625)
  (closes issue ASTERISK-21626)
  ........
  
  Merged revisions 391199 from file:///srv/subversion/repos/asterisk/trunk
........
  r391255 | root | 2013-06-10 10:17:41 -0500 (Mon, 10 Jun 2013) | 29 lines
  
  Add announce-to-first-user option for app_queue
  
  In r386792, the ability to play prompts to the first caller in a call queue was
  added. While this is arguably a bug fix for those who expect the first caller
  to continue receiving prompts while the agent is dialed, it has the side effect
  of preventing the first caller from hearing the agent immediately upon
  bridging. This may not be a problem for those who really want this option, but
  for those who didn't care whether or not the first caller in queue heard their
  position, it was an issue.
  
  This patch disables the ability for the first caller in the queue to hear
  prompts and adds a new option, announce-to-first-user, to queues.conf. Those
  who the behavior can enable it by setting this value to True.
  
  Note that if we ever implement the ability to have the prompts be stopped
  upon bridging, this option can be removed.
  
  (closes issue ASTERISK-21782)
  Reported by: Remi Quezada
  ........
  
  Merged revisions 391215 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 391241 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391245 from file:///srv/subversion/repos/asterisk/trunk
........
  r391270 | mmichelson | 2013-06-10 10:48:15 -0500 (Mon, 10 Jun 2013) | 3 lines
  
  Get SIP INFO-initiated recording to use features configuration API.
........
  r391274 | root | 2013-06-10 11:17:38 -0500 (Mon, 10 Jun 2013) | 39 lines
  
  Multiple revisions 391269,391271
  
  ........
    r391269 | mmichelson | 2013-06-10 10:32:02 -0500 (Mon, 10 Jun 2013) | 22 lines
    
    Temporary fix for people using sample features.conf from previous Asterisk versions.
    
    People who use the features.conf.sample file from Asterisk 11 and before in trunk were
    given a rude awakening when features configuration changes were made. Because it uses the
    config framework and the config framework is strict about what is accepted and what isn't,
    people that had parking options configured found that Asterisk no longer started. This is
    because parking options are currently handled in res_parking.conf instead of features.conf.
    
    This fix seeks to create a temporary band-aid fix for the problem, but having parking options
    from the general section be passed to a handler that will simply print that the option is no
    longer supported. This will not cause Asterisk to exit.
    
    The fix only applies to options in the general section. There are two main reasons for this:
    
    1) The sample features.conf file only has parking options in the general section. There are no
    configured parking lots. Therefore it's not quite as "urgent" to get the parking lot parsing
    fixed.
    
    2) The plan is to move parking configuration back from res_parking.conf to features.conf. When
    that happens, the parking lots will also be addressed at that time.
  ........
    r391271 | kmoore | 2013-06-10 11:03:51 -0500 (Mon, 10 Jun 2013) | 8 lines
    
    Add AGI command arguments to AsyncAGI event
    
    This makes the AGI AsyncAGI event put provided AGI command arguments in
    the event's environment.
    
    (closes issue ASTERISK-21304)
    Patch-By: Dirk Wendland
  ........
  
  Merged revisions 391269,391271 from file:///srv/subversion/repos/asterisk/trunk
........
  r391299 | root | 2013-06-10 16:17:47 -0500 (Mon, 10 Jun 2013) | 11 lines
  
  Change chan_skinny to use core transfer API.
  
  Changes for both attended and blind transfers in chan_skinny to use the new transfer API instead of masquerade.
  
  (closes issue ASTERISK-21526)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2557/
  ........
  
  Merged revisions 391297 from file:///srv/subversion/repos/asterisk/trunk
........
  r391318 | root | 2013-06-10 18:17:39 -0500 (Mon, 10 Jun 2013) | 10 lines
  
  Make the reload stasis message bump the ref count of its sub-object
  
  JSON objects are reference stealing. Hence, if you've RAII_VAR'd some
  subobject and want to pack it into another JSON object, you have to bump
  the reference count. Using the 'O' option during the pack will bump the
  reference count for you.
  ........
  
  Merged revisions 391314 from file:///srv/subversion/repos/asterisk/trunk
........
  r391337 | root | 2013-06-11 03:17:39 -0500 (Tue, 11 Jun 2013) | 25 lines
  
  IAX2: Transfer Reject: Lock bridgecallno before touching it, refactor
  
  1). When touching the bridgecallno, we need to lock it.
  
  2). Remove magic number '0' and replace with TRANSFER_NONE.
  
  3). Exit early if no bridgecallno.
  
  4). Reduce indentation.
  
  Reported by: alecdavis
  Tested by: alecdavis
  alecdavis (license 585)
  
  Review https://reviewboard.asterisk.org/r/2613/
  ........
  
  Merged revisions 391333 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 391334 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391335 from file:///srv/subversion/repos/asterisk/trunk
........
  r391384 | root | 2013-06-11 06:18:00 -0500 (Tue, 11 Jun 2013) | 11 lines
  
  
  Fix issue with no sound in both way in case of previous call to chan_unistim phone was canceled. 
  
  (related to ASTERISK-20183)
  ........
  
  Merged revisions 391379 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391380 from file:///srv/subversion/repos/asterisk/trunk
........
  r391408 | root | 2013-06-11 11:18:08 -0500 (Tue, 11 Jun 2013) | 18 lines
  
  Add vtable and methods for to_json and to_ami for Stasis messages
  
  When a Stasis message type is defined in a loadable module, handling
  those messages for AMI and res_stasis events can be cumbersome.
  
  This patch adds a vtable to stasis_message_type, with to_ami and
  to_json virtual functions. These allow messages to be handled
  abstractly without putting module-specific code in core.
  
  As an example, the VarSet AMI event was refactored to use the to_ami
  virtual function.
  
  (closes issue ASTERISK-21817)
  Review: https://reviewboard.asterisk.org/r/2579/
  ........
  
  Merged revisions 391403 from file:///srv/subversion/repos/asterisk/trunk
........
  r391434 | root | 2013-06-11 15:17:55 -0500 (Tue, 11 Jun 2013) | 12 lines
  
  bridge_native_rtp: Fix possible segfaults on leaves/joins
  
  native_rtp_bridge_get can return any result from the ast_rtp_glue_result
  enumerator and the join/leave functions for bridge_native_rtp seem to assume
  that if the result wasn't local that it was remote. Meanwhile forbid can be
  returned by that function which can mean certain glue pointers are NULL. Then
  when the join/leave functions try to use members of that pointer, boom.
  Segfault.
  ........
  
  Merged revisions 391430 from file:///srv/subversion/repos/asterisk/trunk
........
  r391458 | root | 2013-06-11 18:17:59 -0500 (Tue, 11 Jun 2013) | 24 lines
  
  Multiple revisions 391453,391455
  
  ........
    r391453 | jrose | 2013-06-11 17:21:36 -0500 (Tue, 11 Jun 2013) | 12 lines
    
    bridge_native_rtp: Fix native bridge tech being incompatible when it should be.
    
    When checking compatability for the native RTP bridge technology there is a
    race condition between clearing framehooks that are destroyed when leaving
    certain bridges with certain technologies (such as bridge_native_rtp) and
    joining bridges with the bridge_native_rtp technology. Yes, that means a
    channel in a native RTP bridge could move to another native RTP bridge and
    be considered incompatible with the new native RTP bridge causing it to
    revert to a simple bridge technology0. This fixes that bug by ignoring
    framehooks that have been marked for destruction when checking for
    compatibility with the bridge_native_rtp technology.
  ........
    r391455 | mmichelson | 2013-06-11 17:57:09 -0500 (Tue, 11 Jun 2013) | 3 lines
    
    Remove incorrect comment about local channel optimization occurring when performing an attended transfer on an entire bridge.
  ........
  
  Merged revisions 391453,391455 from file:///srv/subversion/repos/asterisk/trunk
........
  r391482 | root | 2013-06-11 21:18:00 -0500 (Tue, 11 Jun 2013) | 15 lines
  
  Fix memory leaks in stasis_channels and bridge_native_rtp
  
  This patch fixes two memory leaks:
   * A memory leak in packing channels into a multi-channel blob payload when
     publishing dial messages. The multi-channel blob payload does not steal
     the references - this approach was chosen because it works well with the
     RAII_VAR macro. Unfortunately, this does mean that you actually have to use
     the RAII_VAR macro (or manually deref it yourself)
   * RTP instances returned as a result of one of the glue operations are ref
     counted and have to be de-ref'd appropriately. We now do that, as saying
     that we should do it and then not would be silly.
  ........
  
  Merged revisions 391479 from file:///srv/subversion/repos/asterisk/trunk
........
  r391527 | root | 2013-06-11 22:17:53 -0500 (Tue, 11 Jun 2013) | 23 lines
  
  Fix memory leak while loading modules, adding formats, and destroying endpoints
  
  This patch fixes three memory leaks
   * When we load a module with the LOAD_PRIORITY flag, we remove its entry from
     the load order list. Unfortunately, we don't free the memory associated with
     entry in the list. This patch corrects that and properly frees the memory
     for the module in the list.
  
   * When adding a custom format (such as SILK or CELT), the routine for adding
     the format was leaking a reference. RAII_VAR cleans this up properly.
  
   * We now de-ref the channel_snapshot appropriately when an endpoint is
     disposed of
  ........
  
  Merged revisions 391489 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 391507 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391521 from file:///srv/subversion/repos/asterisk/trunk
........
  r391564 | root | 2013-06-12 16:18:00 -0500 (Wed, 12 Jun 2013) | 22 lines
  
  Fix segfault for certain invalid WebSocket input.
  
  The WebSocket code would allocate, on the stack, a string large enough
  to hold a key provided by the client, and the WEBSOCKET_GUID. If the key
  is NULL, this causes a segfault. If the key is too large, it could
  overflow the stack.
  
  This patch checks the key for NULL and checks the length of the key to
  avoid stack smashing nastiness.
  
  (closes issue ASTERISK-21825)
  Reported by: Alfred Farrugia
  Tested by: Alfred Farrugia, David M. Lee
  Patches:
      issueA21825_check_if_key_is_sent.patch uploaded by Walter Doekes (license 5674)
  ........
  
  Merged revisions 391560 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391561 from file:///srv/subversion/repos/asterisk/trunk
........
  r391601 | root | 2013-06-13 06:18:36 -0500 (Thu, 13 Jun 2013) | 9 lines
  
  Add support for requiring that all queued messages on a caching topic have been handled before
  retrieving from the cache and also change adding channels to an endpoint to be an immediate
  operation.
  
  Review: https://reviewboard.asterisk.org/r/2599/
  ........
  
  Merged revisions 391596 from file:///srv/subversion/repos/asterisk/trunk
........
  r391625 | root | 2013-06-13 08:18:02 -0500 (Thu, 13 Jun 2013) | 25 lines
  
  Refactor CEL channel events on top of Stasis-Core
  
  This uses the channel state change events from Stasis-Core to determine
  when channel-related CEL events should be raised. Those refactored in
  this patch are:
  * AST_CEL_CHANNEL_START
  * AST_CEL_ANSWER
  * AST_CEL_APP_START
  * AST_CEL_APP_END
  * AST_CEL_HANGUP
  * AST_CEL_CHANNEL_END
  
  Retirement of Linked IDs is also refactored.
  
  CEL configuration has been refactored to use the config framework.
  
  Note: Some HANGUP events are not generated correctly because the bridge
  layer does not propagate hangupcause/hangupsource information yet.
  
  Review: https://reviewboard.asterisk.org/r/2544/
  (closes issue ASTERISK-21563)
  ........
  
  Merged revisions 391622 from file:///srv/subversion/repos/asterisk/trunk
........
  r391649 | root | 2013-06-13 09:18:05 -0500 (Thu, 13 Jun 2013) | 20 lines
  
  Refactor CEL bridge events on top of Stasis-Core
  
  This pulls bridge-related CEL event triggers out of the code in which
  they were residing and pulls them into cel.c where they are now
  triggered by changes in bridge snapshots. To get access to the
  Stasis-Core parking topic in cel.c, the Stasis-Core portions of parking
  init have been pulled into core Asterisk init.
  
  This also adds a new CEL event (AST_CEL_BRIDGE_TO_CONF) that indicates
  a two-party bridge has transitioned to a multi-party conference. The
  reverse cannot occur in CEL terms even though it may occur in actuality
  and two party bridges which receive a AST_CEL_BRIDGE_TO_CONF will be
  treated as multi-party conferences for the duration of the bridge.
  
  Review: https://reviewboard.asterisk.org/r/2563/
  (closes issue ASTERISK-21564)
  ........
  
  Merged revisions 391643 from file:///srv/subversion/repos/asterisk/trunk
........
  r391679 | root | 2013-06-13 13:17:55 -0500 (Thu, 13 Jun 2013) | 26 lines
  
  Multiple revisions 391675-391676
  
  ........
    r391675 | mjordan | 2013-06-13 13:14:38 -0500 (Thu, 13 Jun 2013) | 8 lines
    
    Blow away usage of libjansson's foreach macro
    
    While very handy, this macro didn't occur until a later version of libjansson.
    We'd prefer to be compatible with older versions still - as such, iteration
    over key/value pairs in a JSON object have to be done with a little bit more
    manual work.
  ........
    r391676 | mmichelson | 2013-06-13 13:17:13 -0500 (Thu, 13 Jun 2013) | 10 lines
    
    Fix memory leak in features_config.c
    
    The options should not be registered multiple times. Instead, the configuration just needs
    to be reprocessed by the config framework. This also exposed that we were not properly telling
    the config framework to treat the configuration processing with the "reload" semantics when
    a reload occurred. Both of these errors are fixed now.
    
    Thanks to Richard Mudgett for discovering the leak.
  ........
  
  Merged revisions 391675-391676 from file:///srv/subversion/repos/asterisk/trunk
........
  r391706 | root | 2013-06-13 14:17:54 -0500 (Thu, 13 Jun 2013) | 25 lines
  
  Multiple revisions 391689,391699,391701
  
  ........
    r391689 | kmoore | 2013-06-13 13:20:31 -0500 (Thu, 13 Jun 2013) | 1 line
    
    Ensure that Asterisk still starts up when cel.conf is missing
  ........
    r391699 | mmichelson | 2013-06-13 13:26:25 -0500 (Thu, 13 Jun 2013) | 3 lines
    
    Just return outright on a reload since we have already processed configuration.
  ........
    r391701 | rmudgett | 2013-06-13 14:04:41 -0500 (Thu, 13 Jun 2013) | 9 lines
    
    app_confbridge: Fix memory leak on reload.
    
    The config framework options should not be registered multiple times.
    Instead the configuration just needs to be reprocessed by the config
    framework.
    ........
    
    Merged revisions 391700 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391689,391699,391701 from file:///srv/subversion/repos/asterisk/trunk
........
  r391736 | root | 2013-06-13 17:17:56 -0500 (Thu, 13 Jun 2013) | 11 lines
  
  Make the utils directory compile... again.
  
  Utils is a source folder that lies,
  eventually all developers will cry,
  "I know I must maintain it,
  But really with this last commit
  I can kiss my software ethics good-bye."
  ........
  
  Merged revisions 391732 from file:///srv/subversion/repos/asterisk/trunk
........

Merged revisions 391192-391193,391201,391255,391270,391274,391299,391318,391337,391384,391408,391434,391458,391482,391527,391564,391601,391625,391649,391679,391706,391736 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip

Added:
    team/kharwell/pimp_sip_security/res/res_sip/security_events.c
      - copied unchanged from r391736, team/group/pimp_my_sip/res/res_sip/security_events.c
    team/kharwell/pimp_sip_security/res/res_stasis_bridge_add.c
      - copied unchanged from r391736, team/group/pimp_my_sip/res/res_stasis_bridge_add.c
    team/kharwell/pimp_sip_security/res/res_stasis_bridge_add.exports.in
      - copied unchanged from r391736, team/group/pimp_my_sip/res/res_stasis_bridge_add.exports.in
Modified:
    team/kharwell/pimp_sip_security/   (props changed)
    team/kharwell/pimp_sip_security/UPGRADE.txt
    team/kharwell/pimp_sip_security/apps/app_confbridge.c
    team/kharwell/pimp_sip_security/apps/app_queue.c
    team/kharwell/pimp_sip_security/apps/confbridge/conf_config_parser.c
    team/kharwell/pimp_sip_security/apps/confbridge/include/confbridge.h
    team/kharwell/pimp_sip_security/bridges/bridge_native_rtp.c
    team/kharwell/pimp_sip_security/channels/chan_gulp.c
    team/kharwell/pimp_sip_security/channels/chan_iax2.c
    team/kharwell/pimp_sip_security/channels/chan_skinny.c
    team/kharwell/pimp_sip_security/channels/chan_unistim.c
    team/kharwell/pimp_sip_security/configs/queues.conf.sample
    team/kharwell/pimp_sip_security/include/asterisk/_private.h
    team/kharwell/pimp_sip_security/include/asterisk/cel.h
    team/kharwell/pimp_sip_security/include/asterisk/channel.h
    team/kharwell/pimp_sip_security/include/asterisk/config_options.h
    team/kharwell/pimp_sip_security/include/asterisk/framehook.h
    team/kharwell/pimp_sip_security/include/asterisk/json.h
    team/kharwell/pimp_sip_security/include/asterisk/parking.h
    team/kharwell/pimp_sip_security/include/asterisk/res_sip.h
    team/kharwell/pimp_sip_security/include/asterisk/stasis.h
    team/kharwell/pimp_sip_security/include/asterisk/stasis_app.h
    team/kharwell/pimp_sip_security/include/asterisk/stasis_bridging.h
    team/kharwell/pimp_sip_security/include/asterisk/stasis_channels.h
    team/kharwell/pimp_sip_security/include/asterisk/stasis_endpoints.h
    team/kharwell/pimp_sip_security/include/asterisk/strings.h
    team/kharwell/pimp_sip_security/main/asterisk.c
    team/kharwell/pimp_sip_security/main/bridging.c
    team/kharwell/pimp_sip_security/main/cel.c
    team/kharwell/pimp_sip_security/main/channel.c
    team/kharwell/pimp_sip_security/main/channel_internal_api.c
    team/kharwell/pimp_sip_security/main/config_options.c
    team/kharwell/pimp_sip_security/main/endpoints.c
    team/kharwell/pimp_sip_security/main/features.c
    team/kharwell/pimp_sip_security/main/features_config.c
    team/kharwell/pimp_sip_security/main/format.c
    team/kharwell/pimp_sip_security/main/framehook.c
    team/kharwell/pimp_sip_security/main/json.c
    team/kharwell/pimp_sip_security/main/loader.c
    team/kharwell/pimp_sip_security/main/manager.c
    team/kharwell/pimp_sip_security/main/manager_channels.c
    team/kharwell/pimp_sip_security/main/parking.c
    team/kharwell/pimp_sip_security/main/pbx.c
    team/kharwell/pimp_sip_security/main/stasis_bridging.c
    team/kharwell/pimp_sip_security/main/stasis_cache.c
    team/kharwell/pimp_sip_security/main/stasis_channels.c
    team/kharwell/pimp_sip_security/main/stasis_endpoints.c
    team/kharwell/pimp_sip_security/main/stasis_message.c
    team/kharwell/pimp_sip_security/res/parking/parking_manager.c
    team/kharwell/pimp_sip_security/res/res_agi.c
    team/kharwell/pimp_sip_security/res/res_http_websocket.c
    team/kharwell/pimp_sip_security/res/res_sip.c
    team/kharwell/pimp_sip_security/res/res_sip.exports.in
    team/kharwell/pimp_sip_security/res/res_sip/sip_configuration.c
    team/kharwell/pimp_sip_security/res/res_sip/sip_distributor.c
    team/kharwell/pimp_sip_security/res/res_sip_caller_id.c
    team/kharwell/pimp_sip_security/res/res_sip_one_touch_record_info.c
    team/kharwell/pimp_sip_security/res/res_sip_registrar.c
    team/kharwell/pimp_sip_security/res/res_stasis.c
    team/kharwell/pimp_sip_security/res/res_stasis_json_events.c
    team/kharwell/pimp_sip_security/res/res_stasis_json_events.exports.in
    team/kharwell/pimp_sip_security/res/stasis/app.c
    team/kharwell/pimp_sip_security/res/stasis/app.h
    team/kharwell/pimp_sip_security/res/stasis/control.c
    team/kharwell/pimp_sip_security/res/stasis_http/resource_bridges.c
    team/kharwell/pimp_sip_security/res/stasis_http/resource_bridges.h
    team/kharwell/pimp_sip_security/res/stasis_http/resource_endpoints.c
    team/kharwell/pimp_sip_security/res/stasis_json/resource_events.h
    team/kharwell/pimp_sip_security/rest-api/api-docs/bridges.json
    team/kharwell/pimp_sip_security/rest-api/api-docs/events.json
    team/kharwell/pimp_sip_security/tests/test_stasis.c
    team/kharwell/pimp_sip_security/tests/test_stasis_channels.c
    team/kharwell/pimp_sip_security/utils/ael_main.c
    team/kharwell/pimp_sip_security/utils/check_expr.c
    team/kharwell/pimp_sip_security/utils/conf2ael.c
    team/kharwell/pimp_sip_security/utils/refcounter.c

Propchange: team/kharwell/pimp_sip_security/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/kharwell/pimp_sip_security/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/kharwell/pimp_sip_security/
------------------------------------------------------------------------------
--- pimp_sip_security-integrated (original)
+++ pimp_sip_security-integrated Fri Jun 14 11:27:39 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-391165
+/team/group/pimp_my_sip:1-391775

Propchange: team/kharwell/pimp_sip_security/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 14 11:27:39 2013
@@ -1,1 +1,1 @@
-/trunk:1-391159
+/trunk:1-391735

Modified: team/kharwell/pimp_sip_security/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/UPGRADE.txt?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/UPGRADE.txt (original)
+++ team/kharwell/pimp_sip_security/UPGRADE.txt Fri Jun 14 11:27:39 2013
@@ -20,7 +20,6 @@
 === UPGRADE-11.txt -- Upgrade info for 10 to 11
 ===
 ===========================================================
-
 
 AMI:
  - The SIP SIPqualifypeer action now sends a response indicating it will qualify
@@ -55,6 +54,11 @@
    Queue member being paused would result in a disposition of BUSY.
  - Removed the queues.conf check_state_unknown option.  It is no longer
    necessary.
+ - It is now possible to play the Queue prompts to the first user waiting in a
+   call queue. Note that this may impact the ability for agents to talk with
+   users, as a prompt may still be playing when an agent connects to the user.
+   This ability is disabled by default but can be enabled on an individual
+   queue using the 'announce-to-first-user' option.
 
 Dial:
  - Now recognizes 'W' to pause sending DTMF for one second in addition to

Modified: team/kharwell/pimp_sip_security/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/apps/app_confbridge.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/apps/app_confbridge.c (original)
+++ team/kharwell/pimp_sip_security/apps/app_confbridge.c Fri Jun 14 11:27:39 2013
@@ -3142,7 +3142,7 @@
 {
 	int res = 0;
 
-	if (conf_load_config(0)) {
+	if (conf_load_config()) {
 		ast_log(LOG_ERROR, "Unable to load config. Not loading module.\n");
 		return AST_MODULE_LOAD_DECLINE;
 	}
@@ -3191,7 +3191,7 @@
 
 static int reload(void)
 {
-	return conf_load_config(1);
+	return conf_reload_config();
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Conference Bridge Application",

Modified: team/kharwell/pimp_sip_security/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/apps/app_queue.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/apps/app_queue.c (original)
+++ team/kharwell/pimp_sip_security/apps/app_queue.c Fri Jun 14 11:27:39 2013
@@ -1517,6 +1517,7 @@
 	struct ast_str *sound_periodicannounce[MAX_PERIODIC_ANNOUNCEMENTS];
 	unsigned int dead:1;
 	unsigned int ringinuse:1;
+	unsigned int announce_to_first_user:1; /*!< Whether or not we announce to the first user in a queue */
 	unsigned int setinterfacevar:1;
 	unsigned int setqueuevar:1;
 	unsigned int setqueueentryvar:1;
@@ -2370,6 +2371,7 @@
 	q->roundingseconds = 0; /* Default - don't announce seconds */
 	q->servicelevel = 0;
 	q->ringinuse = 1;
+	q->announce_to_first_user = 0;
 	q->setinterfacevar = 0;
 	q->setqueuevar = 0;
 	q->setqueueentryvar = 0;
@@ -2648,6 +2650,8 @@
 		ast_string_field_set(q, sound_reporthold, val);
 	} else if (!strcasecmp(param, "announce-frequency")) {
 		q->announcefrequency = atoi(val);
+	} else if (!strcasecmp(param, "announce-to-first-user")) {
+		q->announce_to_first_user = ast_true(val);
 	} else if (!strcasecmp(param, "min-announce-frequency")) {
 		q->minannouncefrequency = atoi(val);
 		ast_debug(1, "%s=%s for queue '%s'\n", param, val, q->name);
@@ -4820,12 +4824,12 @@
 	}
 
 	/* Make a position announcement, if enabled */
- 	if (qe->parent->announcefrequency) {
+ 	if (qe->parent->announcefrequency && qe->parent->announce_to_first_user) {
 		say_position(qe, ringing);
 	}
 
  	/* Make a periodic announcement, if enabled */
- 	if (qe->parent->periodicannouncefrequency) {
+ 	if (qe->parent->periodicannouncefrequency && qe->parent->announce_to_first_user) {
  		say_periodic_announcement(qe, ringing);
  	}
  
@@ -9661,6 +9665,7 @@
 	MEMBER(call_queue, sound_reporthold, AST_DATA_STRING)		\
 	MEMBER(call_queue, dead, AST_DATA_BOOLEAN)			\
 	MEMBER(call_queue, ringinuse, AST_DATA_BOOLEAN)			\
+	MEMBER(call_queue, announce_to_first_user, AST_DATA_BOOLEAN)	\
 	MEMBER(call_queue, setinterfacevar, AST_DATA_BOOLEAN)		\
 	MEMBER(call_queue, setqueuevar, AST_DATA_BOOLEAN)		\
 	MEMBER(call_queue, setqueueentryvar, AST_DATA_BOOLEAN)		\

Modified: team/kharwell/pimp_sip_security/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/apps/confbridge/conf_config_parser.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/apps/confbridge/conf_config_parser.c (original)
+++ team/kharwell/pimp_sip_security/apps/confbridge/conf_config_parser.c Fri Jun 14 11:27:39 2013
@@ -1889,12 +1889,10 @@
 	return 0;
 }
 
-int conf_load_config(int reload)
-{
-	if (!reload) {
-		if (aco_info_init(&cfg_info)) {
-			return -1;
-		}
+int conf_load_config(void)
+{
+	if (aco_info_init(&cfg_info)) {
+		return -1;
 	}
 
 	/* User options */
@@ -1944,21 +1942,27 @@
 	aco_option_register(&cfg_info, "type", ACO_EXACT, menu_types, NULL, OPT_NOOP_T, 0, 0);
 	aco_option_register_custom(&cfg_info, "^[0-9A-D*#]+$", ACO_REGEX, menu_types, NULL, menu_option_handler, 0);
 
-	if (aco_process_config(&cfg_info, reload) == ACO_PROCESS_ERROR) {
+	if (aco_process_config(&cfg_info, 0) == ACO_PROCESS_ERROR) {
 		goto error;
 	}
 
-	if (!reload && ast_cli_register_multiple(cli_confbridge_parser, ARRAY_LEN(cli_confbridge_parser))) {
+	if (ast_cli_register_multiple(cli_confbridge_parser, ARRAY_LEN(cli_confbridge_parser))) {
 		goto error;
 	}
 
 	return 0;
 error:
-	/* On a reload, just keep the config we already have in place. */
-	if (!reload) {
-		conf_destroy_config();
-	}
+	conf_destroy_config();
 	return -1;
+}
+
+int conf_reload_config(void)
+{
+	if (aco_process_config(&cfg_info, 1) == ACO_PROCESS_ERROR) {
+		/* On a reload, just keep the config we already have in place. */
+		return -1;
+	}
+	return 0;
 }
 
 static void conf_user_profile_copy(struct user_profile *dst, struct user_profile *src)

Modified: team/kharwell/pimp_sip_security/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/apps/confbridge/include/confbridge.h?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/apps/confbridge/include/confbridge.h (original)
+++ team/kharwell/pimp_sip_security/apps/confbridge/include/confbridge.h Fri Jun 14 11:27:39 2013
@@ -247,7 +247,10 @@
 };
 
 /*! \brief load confbridge.conf file */
-int conf_load_config(int reload);
+int conf_load_config(void);
+
+/*! \brief reload confbridge.conf file */
+int conf_reload_config(void);
 
 /*! \brief destroy the information loaded from the confbridge.conf file*/
 void conf_destroy_config(void);

Modified: team/kharwell/pimp_sip_security/bridges/bridge_native_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/bridges/bridge_native_rtp.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/bridges/bridge_native_rtp.c (original)
+++ team/kharwell/pimp_sip_security/bridges/bridge_native_rtp.c Fri Jun 14 11:27:39 2013
@@ -87,7 +87,7 @@
 {
 	if (ast_channel_monitor(chan) || (ast_channel_audiohooks(chan) &&
 		!ast_audiohook_write_list_empty(ast_channel_audiohooks(chan))) ||
-		!ast_framehook_list_is_empty(ast_channel_framehooks(chan))) {
+		!ast_framehook_list_contains_no_active(ast_channel_framehooks(chan))) {
 		return 0;
 	} else {
 		return 1;
@@ -155,7 +155,10 @@
 	struct ast_bridge_channel *c1 = AST_LIST_LAST(&bridge->channels);
 	enum ast_rtp_glue_result native_type;
 	struct ast_rtp_glue *glue0, *glue1;
-	struct ast_rtp_instance *instance0 = NULL, *instance1 = NULL, *vinstance0 = NULL, *vinstance1 = NULL;
+	RAII_VAR(struct ast_rtp_instance *, instance0, NULL, ao2_cleanup);
+	RAII_VAR(struct ast_rtp_instance *, instance1, NULL, ao2_cleanup);
+	RAII_VAR(struct ast_rtp_instance *, vinstance0, NULL, ao2_cleanup);
+	RAII_VAR(struct ast_rtp_instance *, vinstance1, NULL, ao2_cleanup);
 	RAII_VAR(struct ast_format_cap *, cap0, ast_format_cap_alloc_nolock(), ast_format_cap_destroy);
 	RAII_VAR(struct ast_format_cap *, cap1, ast_format_cap_alloc_nolock(), ast_format_cap_destroy);
 	int read_ptime0, read_ptime1, write_ptime0, write_ptime1;
@@ -317,7 +320,8 @@
 		glue1->get_codec(c1->chan, cap1);
 	}
 
-	if (native_type == AST_RTP_GLUE_RESULT_LOCAL) {
+	switch (native_type) {
+	case AST_RTP_GLUE_RESULT_LOCAL:
 		if (ast_rtp_instance_get_engine(instance0)->local_bridge) {
 			ast_rtp_instance_get_engine(instance0)->local_bridge(instance0, instance1);
 		}
@@ -326,9 +330,14 @@
 		}
 		ast_rtp_instance_set_bridged(instance0, instance1);
 		ast_rtp_instance_set_bridged(instance1, instance0);
-	} else {
+		break;
+
+	case AST_RTP_GLUE_RESULT_REMOTE:
 		glue0->update_peer(c0->chan, instance1, vinstance1, tinstance1, cap1, 0);
 		glue1->update_peer(c1->chan, instance0, vinstance0, tinstance0, cap0, 0);
+		break;
+	case AST_RTP_GLUE_RESULT_FORBID:
+		break;
 	}
 
 	return 0;
@@ -354,7 +363,8 @@
 
 	native_type = native_rtp_bridge_get(c0->chan, c1 ? c1->chan : NULL, &glue0, &glue1, &instance0, &instance1, &vinstance0, &vinstance1);
 
-	if (native_type == AST_RTP_GLUE_RESULT_LOCAL) {
+	switch (native_type) {
+	case AST_RTP_GLUE_RESULT_LOCAL:
 		if (ast_rtp_instance_get_engine(instance0)->local_bridge) {
 			ast_rtp_instance_get_engine(instance0)->local_bridge(instance0, NULL);
 		}
@@ -365,11 +375,15 @@
 		if (instance1) {
 			ast_rtp_instance_set_bridged(instance1, instance0);
 		}
-	} else {
+		break;
+	case AST_RTP_GLUE_RESULT_REMOTE:
 		glue0->update_peer(c0->chan, NULL, NULL, NULL, NULL, 0);
 		if (glue1) {
 			glue1->update_peer(c1->chan, NULL, NULL, NULL, NULL, 0);
 		}
+		break;
+	case AST_RTP_GLUE_RESULT_FORBID:
+		break;
 	}
 }
 

Modified: team/kharwell/pimp_sip_security/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/channels/chan_gulp.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/channels/chan_gulp.c (original)
+++ team/kharwell/pimp_sip_security/channels/chan_gulp.c Fri Jun 14 11:27:39 2013
@@ -847,6 +847,40 @@
 	return 0;
 }
 
+/*! \brief Update connected line information */
+static int update_connected_line_information(void *data)
+{
+	RAII_VAR(struct ast_sip_session *, session, data, ao2_cleanup);
+
+	if ((ast_channel_state(session->channel) != AST_STATE_UP) && (session->inv_session->role == PJSIP_UAS_ROLE)) {
+		int response_code = 0;
+
+		if (ast_channel_state(session->channel) == AST_STATE_RING) {
+			response_code = !session->endpoint->inband_progress ? 180 : 183;
+		} else if (ast_channel_state(session->channel) == AST_STATE_RINGING) {
+			response_code = 183;
+		}
+
+		if (response_code) {
+			struct 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);
+			}
+		}
+	} else {
+		enum ast_sip_session_refresh_method method = session->endpoint->connected_line_method;
+
+		if (session->inv_session->invite_tsx && (session->inv_session->options & PJSIP_INV_SUPPORT_UPDATE)) {
+			method = AST_SIP_SESSION_REFRESH_METHOD_UPDATE;
+		}
+
+		ast_sip_session_refresh(session, NULL, NULL, method, 0);
+	}
+
+	return 0;
+}
+
 /*! \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)
 {
@@ -914,6 +948,12 @@
 			}
 		} else {
 			res = -1;
+		}
+		break;
+	case AST_CONTROL_CONNECTED_LINE:
+		ao2_ref(session, +1);
+		if (ast_sip_push_task(session->serializer, update_connected_line_information, session)) {
+			ao2_cleanup(session);
 		}
 		break;
 	case AST_CONTROL_UPDATE_RTP_PEER:

Modified: team/kharwell/pimp_sip_security/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/channels/chan_iax2.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/channels/chan_iax2.c (original)
+++ team/kharwell/pimp_sip_security/channels/chan_iax2.c Fri Jun 14 11:27:39 2013
@@ -11204,15 +11204,28 @@
 				}
 				break;
 			case IAX_COMMAND_TXREJ:
-				iaxs[fr->callno]->transferring = 0;
+				if (iaxs[fr->callno]->bridgecallno) {
+					while (ast_mutex_trylock(&iaxsl[iaxs[fr->callno]->bridgecallno])) {
+						DEADLOCK_AVOIDANCE(&iaxsl[fr->callno]);
+					}
+					if (!iaxs[fr->callno]) {
+						break;
+					}
+				}
+
+				iaxs[fr->callno]->transferring = TRANSFER_NONE;
 				ast_verb(3, "Channel '%s' unable to transfer\n", iaxs[fr->callno]->owner ? ast_channel_name(iaxs[fr->callno]->owner) : "<Unknown>");
 				memset(&iaxs[fr->callno]->transfer, 0, sizeof(iaxs[fr->callno]->transfer));
-				if (iaxs[fr->callno]->bridgecallno) {
-					if (iaxs[iaxs[fr->callno]->bridgecallno]->transferring) {
-						iaxs[iaxs[fr->callno]->bridgecallno]->transferring = 0;
-						send_command(iaxs[iaxs[fr->callno]->bridgecallno], AST_FRAME_IAX, IAX_COMMAND_TXREJ, 0, NULL, 0, -1);
-					}
+
+				if (!iaxs[fr->callno]->bridgecallno) {
+					break;
 				}
+
+				if (iaxs[iaxs[fr->callno]->bridgecallno]->transferring) {
+					iaxs[iaxs[fr->callno]->bridgecallno]->transferring = TRANSFER_NONE;
+					send_command(iaxs[iaxs[fr->callno]->bridgecallno], AST_FRAME_IAX, IAX_COMMAND_TXREJ, 0, NULL, 0, -1);
+				}
+				ast_mutex_unlock(&iaxsl[iaxs[fr->callno]->bridgecallno]);
 				break;
 			case IAX_COMMAND_TXREADY:
 				if (iaxs[fr->callno]->bridgecallno) {

Modified: team/kharwell/pimp_sip_security/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/channels/chan_skinny.c?view=diff&rev=391813&r1=391812&r2=391813
==============================================================================
--- team/kharwell/pimp_sip_security/channels/chan_skinny.c (original)
+++ team/kharwell/pimp_sip_security/channels/chan_skinny.c Fri Jun 14 11:27:39 2013
@@ -81,6 +81,7 @@
 #include "asterisk/event.h"
 #include "asterisk/indications.h"
 #include "asterisk/linkedlists.h"
+#include "asterisk/bridging.h"
 
 /*** DOCUMENTATION
 	<manager name="SKINNYdevices" language="en_US">
@@ -952,6 +953,7 @@
 static const uint8_t soft_key_default_offhook[] = {
 	SOFTKEY_REDIAL,
 	SOFTKEY_ENDCALL,
+	SOFTKEY_TRNSFER,
 	SOFTKEY_CFWDALL,
 	SOFTKEY_CFWDBUSY,
 	SOFTKEY_CFWDNOANSWER,
@@ -971,6 +973,7 @@
 static const uint8_t soft_key_default_dadfd[] = {
 	SOFTKEY_BKSPC,
 	SOFTKEY_ENDCALL,
+	SOFTKEY_TRNSFER,
 	SOFTKEY_FORCEDIAL,
 };
 
@@ -1375,6 +1378,7 @@
 
 #define DIALTYPE_NORMAL      1<<0
 #define DIALTYPE_CFWD        1<<1
+#define DIALTYPE_XFER        1<<2
 
 struct skinny_subchannel {
 	ast_mutex_t lock;
@@ -1656,7 +1660,6 @@
 };
 
 static int skinny_extensionstate_cb(char *context, char *id, struct ast_state_cb_info *info, void *data);
-static int skinny_transfer(struct skinny_subchannel *sub);
 
 static struct skinny_line *skinny_line_alloc(void)
 {
@@ -5008,14 +5011,6 @@
 	int res = 0;
 	struct skinny_subchannel *sub = ast_channel_tech_pvt(ast);
 
-	if (sub->blindxfer) {
-		SKINNY_DEBUG(DEBUG_SUB, 3, "skinny_answer(%s) on %s@%s-%d with BlindXFER, transferring\n",
-			ast_channel_name(ast), sub->line->name, sub->line->device->name, sub->callid);
-		ast_setstate(ast, AST_STATE_UP);
-		skinny_transfer(sub);
-		return 0;
-	}
-
 	sub->cxmode = SKINNY_CX_SENDRECV;
 
 	SKINNY_DEBUG(DEBUG_SUB, 3, "skinny_answer(%s) on %s@%s-%d\n",
@@ -5242,64 +5237,52 @@
 	}
 }
 
-static int skinny_transfer(struct skinny_subchannel *sub)
-{

[... 5424 lines stripped ...]



More information about the asterisk-commits mailing list