[asterisk-commits] qwell: branch qwell/fun_with_transports r386005 - in /team/qwell/fun_with_tra...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 18 10:39:12 CDT 2013


Author: qwell
Date: Thu Apr 18 10:39:07 2013
New Revision: 386005

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386005
Log:
Multiple revisions 385280,385305,385318,385344,385359,385433,385476,385524,385553,385598,385640,385684,385721,385748,385790,385837,385864,385866,385890,385941,385967

........
  r385280 | root | 2013-04-10 18:17:37 -0500 (Wed, 10 Apr 2013) | 25 lines
  
  Multiple revisions 385277-385278
  
  ........
    r385277 | rmudgett | 2013-04-10 18:03:30 -0500 (Wed, 10 Apr 2013) | 13 lines
    
    * Fix unlocked accesses to feature_list.  The feature_list is now also
    protected by the features_lock.
    
    * Made all calls to ast_find_call_feature() have the features_lock held.
    
    * Fixed set_config_flags() to actually use find_group() to look for
    feature groups in DYNAMIC_FEATURES.  The code originally assumed all
    feature groups were listed in DYNAMIC_FEATURES.
    
    * Make everyone use ast_rdlock_call_features(),
    ast_unlock_call_features(), and new ast_wrlock_call_features() instead of
    directly calling the rwlock API on features_lock.
  ........
    r385278 | rmudgett | 2013-04-10 18:08:02 -0500 (Wed, 10 Apr 2013) | 1 line
    
    Eliminated dial_features_destroy() since it is equivalent to ast_free_ptr()
  ........
  
  Merged revisions 385277-385278 from file:///srv/subversion/repos/asterisk/trunk
........
  r385305 | mmichelson | 2013-04-11 09:34:54 -0500 (Thu, 11 Apr 2013) | 8 lines
  
  Add initial caller ID support into SIP code.
  
  This adds caller ID and limited connected line support.
  
  (closes issue ASTERISK-21257)
  
  Review: https://reviewboard.asterisk.org/r/2429
........
  r385318 | root | 2013-04-11 12:17:37 -0500 (Thu, 11 Apr 2013) | 8 lines
  
  Fix 'pri intense debug span' alias.
  ........
  
  Merged revisions 385313 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385314 from file:///srv/subversion/repos/asterisk/trunk
........
  r385344 | mmichelson | 2013-04-11 13:50:17 -0500 (Thu, 11 Apr 2013) | 3 lines
  
  Fix inconsistency in datastore naming.
........
  r385359 | root | 2013-04-11 15:17:38 -0500 (Thu, 11 Apr 2013) | 15 lines
  
  Blocked revisions 385356
  
  ........
  Add dependency on libuuid, for res_rtp_asterisk
  
  pjproject is what actually requires libuuid.
  
  (closes issue ASTERISK-21125)
  reported by Private Name
  
  (Ed. note: Really?  Private Name?  I am rolling my eyes so hard right now.)
  ........
  
  Merged revisions 385357 from file:///srv/subversion/repos/asterisk/trunk
........
  r385433 | root | 2013-04-12 04:18:42 -0500 (Fri, 12 Apr 2013) | 51 lines
  
  Multiple revisions 385406,385431
  
  ........
    r385406 | alecdavis | 2013-04-12 03:18:20 -0500 (Fri, 12 Apr 2013) | 24 lines
    
    IAX2, prevent network thread starting before all helper threads are ready
    
    On startup, it's possible for a frame to arrive before the processing threads were ready.
    
    In iax2_process_thread() the first pass through falls into ast_cond_wait, should a frame arrive
    before we are at ast_cond_wait, the signal will be ignored.
    The result iax2_process_thread stays at ast_cond_wait forever, with deferred frames being queued.  
    
    Fix: When creating initial idle iax2_process_threads, wait for init_cond to be signalled
    after each thread is started.
     
    (issue ASTERISK-18827)
    Reported by: alecdavis
    Tested by: alecdavis
    alecdavis (license 585)
    
    Review https://reviewboard.asterisk.org/r/2427/
    ........
    
    Merged revisions 385402 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    ........
    
    Merged revisions 385403 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r385431 | alecdavis | 2013-04-12 03:52:44 -0500 (Fri, 12 Apr 2013) | 17 lines
    
    IAX2 defer_full_frames fail to get sent
    
    Ensure iax2_process_thread is signalled when a deferred frame is queued to it.
    
    (closes issue ASTERISK-18827)
    Reported by: alecdavis
    Tested by: alecdavis
    alecdavis (license 585)
    
    Review https://reviewboard.asterisk.org/r/2426/
    ........
    
    Merged revisions 385429 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    ........
    
    Merged revisions 385430 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385406,385431 from file:///srv/subversion/repos/asterisk/trunk
........
  r385476 | root | 2013-04-12 10:18:12 -0500 (Fri, 12 Apr 2013) | 43 lines
  
  Fix One-Way Audio With auto_* NAT Settings When SIP Calls Initiated By PBX
  
  When we reload Asterisk or chan_sip, the flags force_rport and comedia that are
  turned on and off when using the auto_force_rport and auto_comedia nat settings
  go back to the default setting off.  These flags are turned on when needed or
  off when not needed at the time that a peer registers, re-registers or initiates
  a call.  This would apply even when only the default global setting
  "nat=auto_force_rport" is being used, which in this case would only affect the
  force_rport flag.
  
  Everything is good except for the following:  The nat setting is set to
  auto_force_rport and auto_comedia.  We reload Asterisk and the peer's
  registration has not expired.  We load in the settings for the peer which turns
  force_rport and comedia back to off.  Since the peer has not re-registered or
  placed a call yet, those flags remain off.  We then initiate a call to the peer
  from the PBX.  The force_rport and comedia flags stay off.  If NAT is involved,
  we end up with one-way audio since we never checked to see if the peer is behind
  NAT or not.
  
  This patch does the following:
  
  * Moves the checking of whether a peer is behind NAT into its own function
  
  * Create a function to set the peer's NAT flags if they are using the auto_* NAT
    settings
  
  * Adds calls in sip_request_call() to these new functions in order to setup the
    dialog according to the peer's settings
  
  (closes issue ASTERISK-21374)
  Reported by: Michael L. Young
  Tested by: Michael L. Young
  Patches:
      asterisk-21374-auto-nat-outgoing-fix_v2.diff Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2421/
  ........
  
  Merged revisions 385473 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385474 from file:///srv/subversion/repos/asterisk/trunk
........
  r385524 | root | 2013-04-12 16:17:22 -0500 (Fri, 12 Apr 2013) | 8 lines
  
  Expose channel snapshot manager blob generation
  
  These functions are already used in one branch (jrose's parking branch)
  and will soon be used in other branches as well.
  ........
  
  Merged revisions 385522 from file:///srv/subversion/repos/asterisk/trunk
........
  r385553 | root | 2013-04-12 17:17:39 -0500 (Fri, 12 Apr 2013) | 5 lines
  
  Fix documentation.
  ........
  
  Merged revisions 385548 from file:///srv/subversion/repos/asterisk/trunk
........
  r385598 | root | 2013-04-12 18:17:39 -0500 (Fri, 12 Apr 2013) | 84 lines
  
  Multiple revisions 385573,385585,385595
  
  ........
    r385573 | elguero | 2013-04-12 17:22:58 -0500 (Fri, 12 Apr 2013) | 36 lines
    
    Fix app_voicemail Segfault And A Few Memory Leaks
    
    The original report was that app_voicemail would crash.  This was caused by
    ast_config_load() returning CONFIG_STATUS_FILEINVALID but no checks being
    performed for that return status.  After adding the initial patch to fix this
    issue, Jaco Kroon (jkroon) added some fixes to memory leaks he had discovered.
    
    During review, Walter Doekes (wdoekes) suggested adding a helper function in
    order to determine if we had a valid configuration or not.
    
    This patch does the following:
    
    * Creates a helper function to check if the configuration is valid
    
    * Adds calls to the new helper function where appropiate
    
    * Fixes memory leaks where the code returned without running
      ast_config_destroy() on the configuration that was loaded
    
    (closes issue ASTERISK-21302)
    Reported by: Jaco Kroon
    Tested by: Jaco Kroon, Michael L. Young
    Patches:
        asterisk-11.3.0-app_voicemail-ast_config-fixes.patch
                                                           Jaco Kroon (license 5671)
        asterisk-21302-valid_cfg_and_mem_leaks_v3-1.8.diff
                                                     Michael L. Young (license 5026)
    
    Review: https://reviewboard.asterisk.org/r/2443/
    ........
    
    Merged revisions 385551 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    ........
    
    Merged revisions 385557 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r385585 | kmoore | 2013-04-12 17:26:17 -0500 (Fri, 12 Apr 2013) | 14 lines
    
    Allow codec_resample to be unloaded
    
    Ensure that trans_size is correct to prevent uninitialized entries from
    preventing reload.
    
    (closes issue ASTERISK-21401)
    Reported by: Corey Farrell
    Tested by: Corey Farrell
    Patches:
        codec_resample-unload.patch uploaded by Corey Farrell
    ........
    
    Merged revisions 385582 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r385595 | elguero | 2013-04-12 17:38:56 -0500 (Fri, 12 Apr 2013) | 22 lines
    
    Fix Manager Segfault When app_queue Is Unloaded
    
    When app_queue is unloaded, some manager commands are not being unregistered
    which result in a segfault.  This patch corrects this.
    
    (closes issue ASTERISK-21397)
    Reported by: Peter Katzmann, Corey Farrell
    Tested by: Corey Farrell
    Patches:
        asterisk-21397-missing-unreg-manager-cmd_1.8.diff
                                                     Michael L. Young (license 5026)
        asterisk-21397-missing-unreg-manager-cmd_11.diff
                                                     Michael L. Young (license 5026)
    
    Review: https://reviewboard.asterisk.org/r/2444/
    ........
    
    Merged revisions 385593 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    ........
    
    Merged revisions 385594 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385573,385585,385595 from file:///srv/subversion/repos/asterisk/trunk
........
  r385640 | root | 2013-04-13 22:17:43 -0500 (Sat, 13 Apr 2013) | 52 lines
  
  Multiple revisions 385635,385638
  
  ........
    r385635 | mjordan | 2013-04-13 21:35:04 -0500 (Sat, 13 Apr 2013) | 23 lines
    
    Don't attempt to create a voice frame on a read error
    
    Prior to this patch, a read error in snd_pcm_readi would still be treated as a
    nominal result when constructing a voice frame from the expected data. Since
    the value returned is negative, as opposed to the number of samples read,
    this could result in a crash. With this patch, we now return a null frame
    when a read error is detected.
    
    Note that the patch on ASTERISK-21329 was modified slightly for this commit,
    in that we bail immediately on detecting the read error, rather than bypassing
    the construction of the voice frame.
    
    (closes issue ASTERISK-21329)
    Reported by: Keiichiro Kawasaki
    patches:
      chan_alsa.diff uploaded by kawasaki (License 6489)
    ........
    
    Merged revisions 385633 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    ........
    
    Merged revisions 385634 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
    r385638 | mjordan | 2013-04-13 22:01:33 -0500 (Sat, 13 Apr 2013) | 19 lines
    
    Calculate the timestamp for outbound RTP if we don't have timing information
    
    This patch calculates the timestamp for outbound RTP when we don't have timing
    information. This uses the same approach in res_rtp_asterisk. Thanks to both
    Pietro and Tzafrir for providing patches.
    
    (closes issue ASTERISK-19883)
    Reported by: Giacomo Trovato
    Tested by: Pietro Bertera, Tzafrir Cohen
    patches:
      rtp-timestamp-1.8.patch uploaded by tzafrir (License 5035)
      rtp-timestamp.patch uploaded by pbertera (License 5943)
    ........
    
    Merged revisions 385636 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    ........
    
    Merged revisions 385637 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385635,385638 from file:///srv/subversion/repos/asterisk/trunk
........
  r385684 | file | 2013-04-15 09:40:11 -0500 (Mon, 15 Apr 2013) | 2 lines
  
  Fix a deadlock due to queueing a frame from a threadpool thread while holding the channel lock in another thread.
........
  r385721 | root | 2013-04-15 11:17:41 -0500 (Mon, 15 Apr 2013) | 15 lines
  
  Fix the svn:keywords property on several files.
  
  Normally I think keyword expansion is silly, but the one time it would have
  been good, it didn't work because the property had quotes in it. This patch
  fixes obviously busted svn:keywords properties.
  ........
  
  Merged revisions 385683 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 385689 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385718 from file:///srv/subversion/repos/asterisk/trunk
........
  r385748 | root | 2013-04-15 12:17:45 -0500 (Mon, 15 Apr 2013) | 50 lines
  
  Multiple revisions 385734,385742-385743
  
  ........
    r385734 | dlee | 2013-04-15 11:22:03 -0500 (Mon, 15 Apr 2013) | 16 lines
    
    DTMF events are now published on a channel's stasis_topic. AMI was
    refactored to use these events rather than producing the events directly
    in channel.c. Finally, the code was added to app_stasis to produce
    DTMF events on the WebSocket.
    
    The AMI events are completely backward compatible, including sending
    events on transmitted DTMF, and sending DTMF start events.
    
    The Stasis-HTTP events are somewhat simplified. Since DTMF start and
    DTMF send events are generally less useful, Stasis-HTTP will only send
    events on received DTMF end.
    
    (closes issue ASTERISK-21282)
    (closes issue ASTERISK-21359)
    Review: https://reviewboard.asterisk.org/r/2439
  ........
    r385742 | dlee | 2013-04-15 11:43:47 -0500 (Mon, 15 Apr 2013) | 20 lines
    
    Moved core logic from app_stasis to res_stasis
    
    After some discussion on asterisk-dev, it was decided that the bulk of
    the logic in app_stasis actually belongs in a resource module instead
    of the application module.
    
    This patch does that, leaves the app specific stuff in app_stasis, and
    fixes up everything else to be consistent with that change.
    
     * Renamed test_app_stasis to test_res_stasis
     * Renamed app_stasis.h to stasis_app.h
       * This is still stasis application support, even though it's no
         longer in an app_ module. The name should never have been tied to
         the type of module, anyways.
     * Now that json isn't a resource module anymore, moved the
       ast_channel_snapshot_to_json function to main/stasis_channels.c,
       where it makes more sense.
    
    Review: https://reviewboard.asterisk.org/r/2430/
  ........
    r385743 | dlee | 2013-04-15 11:47:25 -0500 (Mon, 15 Apr 2013) | 1 line
    
    Avoid unused variable warning when not in devmode
  ........
  
  Merged revisions 385734,385742-385743 from file:///srv/subversion/repos/asterisk/trunk
........
  r385790 | root | 2013-04-15 13:17:38 -0500 (Mon, 15 Apr 2013) | 13 lines
  
  Don't unnecessarily rebuild things on every run of 'make'.
  
  Review: https://reviewboard.asterisk.org/r/2449/
  ........
  
  Merged revisions 385745 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 385768 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 385782 from file:///srv/subversion/repos/asterisk/trunk
........
  r385837 | root | 2013-04-16 09:17:55 -0500 (Tue, 16 Apr 2013) | 5 lines
  
  Fixed a typo
  ........
  
  Merged revisions 385835 from file:///srv/subversion/repos/asterisk/trunk
........
  r385864 | kharwell | 2013-04-16 10:53:45 -0500 (Tue, 16 Apr 2013) | 1 line
  
  Modified the fast fast picture update request handler to always send through the session (using ast_sip_session_send_request instead of ast_sip_send_request)
........
  r385866 | root | 2013-04-16 11:17:46 -0500 (Tue, 16 Apr 2013) | 31 lines
  
  Multiple revisions 385860,385862
  
  ........
    r385860 | kmoore | 2013-04-16 10:33:59 -0500 (Tue, 16 Apr 2013) | 12 lines
    
    Move device state distribution to Stasis-core
    
    In the move from Asterisk's event system to Stasis, this makes
    distributed device state aggregation always-on, removes unnecessary
    task processors where possible, and collapses aggregate and
    non-aggregate states into a single cache for ease of retrieval. This
    also removes an intermediary step in device state aggregation.
    
    Review: https://reviewboard.asterisk.org/r/2389/
    (closes issue ASTERISK-21101)
    Patch-by: Kinsey Moore <kmoore at digium.com>
  ........
    r385862 | kmoore | 2013-04-16 10:48:16 -0500 (Tue, 16 Apr 2013) | 9 lines
    
    Move presence state distribution to Stasis-core
    
    Convert presence state events to Stasis-core messages and remove
    redundant serializers where possible.
    
    Review: https://reviewboard.asterisk.org/r/2410/
    (closes issue ASTERISK-21102)
    Patch-by: Kinsey Moore <kmoore at digium.com>
  ........
  
  Merged revisions 385860,385862 from file:///srv/subversion/repos/asterisk/trunk
........
  r385890 | root | 2013-04-16 13:17:38 -0500 (Tue, 16 Apr 2013) | 8 lines
  
  Allow res_corosync to build
  
  ast_enable_distributed_devstate is no longer applicable to how the
  distributed device state system works and is no longer necessary.
  ........
  
  Merged revisions 385886 from file:///srv/subversion/repos/asterisk/trunk
........
  r385941 | root | 2013-04-16 19:17:37 -0500 (Tue, 16 Apr 2013) | 16 lines
  
  res_xmpp and res_jabber need to search 'cachable' in the attrib section of the received IE, not data.
  
  (issue ASTERISK-20175)
  (closes issue ASTERISK-21429)
  (closes issue ASTERISK-21069)
  (closes issue ASTERISK-21164)
  
  Reported by: alecdavis
  Tested by: alecdavis
  alecdavis (license 585)
  
  Review https://reviewboard.asterisk.org/r/2452/
  ........
  
  Merged revisions 385939 from file:///srv/subversion/repos/asterisk/trunk
........
  r385967 | mmichelson | 2013-04-17 10:32:57 -0500 (Wed, 17 Apr 2013) | 11 lines
  
  This adds support for outbound authentication for outbound registrations.
  
  In order to facilitate the change, the outbound authentication API had to
  be modified not to be dependent on endpoints but rather to be given the
  names of auth IDs in sorcery to use. This way, outbound registration
  can be configured to point to an auth section in the configuration the
  same way that endpoints do.
  
  Review: https://reviewboard.asterisk.org/r/2431
........

Merged revisions 385280,385305,385318,385344,385359,385433,385476,385524,385553,385598,385640,385684,385721,385748,385790,385837,385864,385866,385890,385941,385967 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip

Added:
    team/qwell/fun_with_transports/include/asterisk/stasis_app.h
      - copied unchanged from r385967, team/group/pimp_my_sip/include/asterisk/stasis_app.h
    team/qwell/fun_with_transports/res/res_sip_caller_id.c
      - copied unchanged from r385967, team/group/pimp_my_sip/res/res_sip_caller_id.c
    team/qwell/fun_with_transports/res/res_stasis.c
      - copied unchanged from r385967, team/group/pimp_my_sip/res/res_stasis.c
    team/qwell/fun_with_transports/res/res_stasis.exports.in
      - copied unchanged from r385967, team/group/pimp_my_sip/res/res_stasis.exports.in
    team/qwell/fun_with_transports/tests/test_res_stasis.c
      - copied unchanged from r385967, team/group/pimp_my_sip/tests/test_res_stasis.c
Removed:
    team/qwell/fun_with_transports/apps/app_stasis.exports.in
    team/qwell/fun_with_transports/apps/stasis_json.c
    team/qwell/fun_with_transports/include/asterisk/app_stasis.h
    team/qwell/fun_with_transports/tests/test_app_stasis.c
Modified:
    team/qwell/fun_with_transports/   (props changed)
    team/qwell/fun_with_transports/BSDmakefile   (props changed)
    team/qwell/fun_with_transports/Makefile
    team/qwell/fun_with_transports/apps/Makefile
    team/qwell/fun_with_transports/apps/app_queue.c
    team/qwell/fun_with_transports/apps/app_saycounted.c   (props changed)
    team/qwell/fun_with_transports/apps/app_stasis.c
    team/qwell/fun_with_transports/apps/app_voicemail.c
    team/qwell/fun_with_transports/build_tools/sha1sum-sh   (props changed)
    team/qwell/fun_with_transports/channels/chan_alsa.c
    team/qwell/fun_with_transports/channels/chan_gulp.c
    team/qwell/fun_with_transports/channels/chan_iax2.c
    team/qwell/fun_with_transports/channels/chan_multicast_rtp.c   (props changed)
    team/qwell/fun_with_transports/channels/chan_sip.c
    team/qwell/fun_with_transports/channels/sig_ss7.c   (props changed)
    team/qwell/fun_with_transports/channels/sig_ss7.h   (props changed)
    team/qwell/fun_with_transports/channels/sip/include/security_events.h   (props changed)
    team/qwell/fun_with_transports/channels/sip/security_events.c   (props changed)
    team/qwell/fun_with_transports/codecs/codec_resample.c
    team/qwell/fun_with_transports/configs/cli_aliases.conf.sample
    team/qwell/fun_with_transports/configs/res_curl.conf.sample   (props changed)
    team/qwell/fun_with_transports/contrib/realtime/mysql/musiconhold.sql   (props changed)
    team/qwell/fun_with_transports/contrib/realtime/mysql/queue_log.sql   (props changed)
    team/qwell/fun_with_transports/contrib/realtime/mysql/voicemail_data.sql   (props changed)
    team/qwell/fun_with_transports/contrib/realtime/mysql/voicemail_messages.sql   (props changed)
    team/qwell/fun_with_transports/doc/Makefile   (props changed)
    team/qwell/fun_with_transports/funcs/func_presencestate.c
    team/qwell/fun_with_transports/include/asterisk/bridging_features.h   (props changed)
    team/qwell/fun_with_transports/include/asterisk/bridging_technology.h   (props changed)
    team/qwell/fun_with_transports/include/asterisk/cli.h
    team/qwell/fun_with_transports/include/asterisk/devicestate.h
    team/qwell/fun_with_transports/include/asterisk/json.h
    team/qwell/fun_with_transports/include/asterisk/manager.h
    team/qwell/fun_with_transports/include/asterisk/presencestate.h
    team/qwell/fun_with_transports/include/asterisk/res_sip.h
    team/qwell/fun_with_transports/include/asterisk/res_sip_session.h
    team/qwell/fun_with_transports/include/asterisk/select.h   (props changed)
    team/qwell/fun_with_transports/include/asterisk/sorcery.h
    team/qwell/fun_with_transports/include/asterisk/stasis_channels.h
    team/qwell/fun_with_transports/include/asterisk/strings.h
    team/qwell/fun_with_transports/include/asterisk/xmpp.h
    team/qwell/fun_with_transports/main/asterisk.c
    team/qwell/fun_with_transports/main/ccss.c
    team/qwell/fun_with_transports/main/channel.c
    team/qwell/fun_with_transports/main/devicestate.c
    team/qwell/fun_with_transports/main/features.c
    team/qwell/fun_with_transports/main/json.c
    team/qwell/fun_with_transports/main/manager.c
    team/qwell/fun_with_transports/main/manager_channels.c
    team/qwell/fun_with_transports/main/pbx.c
    team/qwell/fun_with_transports/main/presencestate.c
    team/qwell/fun_with_transports/main/stasis_channels.c
    team/qwell/fun_with_transports/res/res_corosync.c
    team/qwell/fun_with_transports/res/res_jabber.c
    team/qwell/fun_with_transports/res/res_mutestream.c   (contents, props changed)
    team/qwell/fun_with_transports/res/res_rtp_multicast.c   (contents, props changed)
    team/qwell/fun_with_transports/res/res_sip.c
    team/qwell/fun_with_transports/res/res_sip.exports.in
    team/qwell/fun_with_transports/res/res_sip/sip_configuration.c
    team/qwell/fun_with_transports/res/res_sip/sip_outbound_auth.c
    team/qwell/fun_with_transports/res/res_sip_outbound_authenticator_digest.c
    team/qwell/fun_with_transports/res/res_sip_outbound_registration.c
    team/qwell/fun_with_transports/res/res_sip_session.c
    team/qwell/fun_with_transports/res/res_stasis_websocket.c
    team/qwell/fun_with_transports/res/res_timing_kqueue.c   (props changed)
    team/qwell/fun_with_transports/res/res_xmpp.c
    team/qwell/fun_with_transports/tests/test_devicestate.c
    team/qwell/fun_with_transports/tests/test_expr.c   (props changed)
    team/qwell/fun_with_transports/tests/test_func_file.c   (props changed)
    team/qwell/fun_with_transports/tests/test_json.c
    team/qwell/fun_with_transports/tests/test_locale.c   (props changed)
    team/qwell/fun_with_transports/tests/test_poll.c   (props changed)
    team/qwell/fun_with_transports/tests/test_stasis_channels.c

Propchange: team/qwell/fun_with_transports/
------------------------------------------------------------------------------
--- branch-11-blocked (original)
+++ branch-11-blocked Thu Apr 18 10:39:07 2013
@@ -1,1 +1,1 @@
-/branches/11:373240,375247,375702
+/branches/11:373240,375247,375702,385356

Propchange: team/qwell/fun_with_transports/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/qwell/fun_with_transports/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Apr 18 10:39:07 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-385268 /trunk:1-383466
+/team/group/pimp_my_sip:1-386004 /trunk:1-383466

Propchange: team/qwell/fun_with_transports/BSDmakefile
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Apr 18 10:39:07 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision

Modified: team/qwell/fun_with_transports/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/qwell/fun_with_transports/Makefile?view=diff&rev=386005&r1=386004&r2=386005
==============================================================================
--- team/qwell/fun_with_transports/Makefile (original)
+++ team/qwell/fun_with_transports/Makefile Thu Apr 18 10:39:07 2013
@@ -356,7 +356,7 @@
 	+@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LDFLAGS)
 	+@$(SUBMAKE) $(MOD_SUBDIRS_EMBED_LIBS)
 
-$(SUBDIRS): makeopts cleantest main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
+$(SUBDIRS): makeopts .lastclean main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
 
 ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
     # Non-windows:
@@ -382,26 +382,25 @@
 $(OTHER_SUBDIRS): makeopts
 	+ at _ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
-defaults.h: makeopts cleantest build_tools/make_defaults_h
+defaults.h: makeopts .lastclean build_tools/make_defaults_h
 	@build_tools/make_defaults_h > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-main/version.c: FORCE cleantest
+main/version.c: FORCE .lastclean
 	@build_tools/make_version_c > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-include/asterisk/buildopts.h: menuselect.makeopts cleantest
+include/asterisk/buildopts.h: menuselect.makeopts .lastclean
 	@build_tools/make_buildopts_h > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-# build.h must depend on cleantest, or parallel make may wipe it out after it's
-# been created. But since build.h contains a timestamp, the cmp trick used above
-# won't work. Just testing for existence is good enough.
-include/asterisk/build.h: cleantest
-	@test -f $@ || build_tools/make_build_h > $@
+# build.h must depend on .lastclean, or parallel make may wipe it out after it's
+# been created.
+include/asterisk/build.h: .lastclean
+	@build_tools/make_build_h > $@
 
 $(SUBDIRS_CLEAN):
 	+@$(SUBMAKE) -C $(@:-clean=) clean
@@ -459,7 +458,7 @@
   XML_core_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
 endif
 
-doc/core-en_US.xml: makeopts cleantest $(XML_core_en_US)
+doc/core-en_US.xml: makeopts .lastclean $(XML_core_en_US)
 	@printf "Building Documentation For: "
 	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
 	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
@@ -477,7 +476,7 @@
   XMX_full_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
 endif
 
-doc/full-en_US.xml: makeopts cleantest $(XML_full_en_US)
+doc/full-en_US.xml: makeopts .lastclean $(XML_full_en_US)
 ifeq ($(PYTHON),:)
 	@echo "--------------------------------------------------------------------------"
 	@echo "---        Please install python to build full documentation           ---"
@@ -848,8 +847,8 @@
 # .cleancount is the global clean count, and .lastclean is the
 # last clean count we had
 
-cleantest:
-	@cmp -s .cleancount .lastclean || $(MAKE) clean
+.lastclean: .cleancount
+	@$(MAKE) clean
 	@[ -f "$(DESTDIR)$(ASTDBDIR)/astdb.sqlite3" ] || [ ! -f "$(DESTDIR)$(ASTDBDIR)/astdb" ] || [ ! -f menuselect.makeopts ] || grep -q MENUSELECT_UTILS=.*astdb2sqlite3 menuselect.makeopts || (sed -i.orig -e's/MENUSELECT_UTILS=\(.*\)/MENUSELECT_UTILS=\1 astdb2sqlite3/' menuselect.makeopts && echo "Updating menuselect.makeopts to include astdb2sqlite3" && echo "Original version backed up to menuselect.makeopts.orig")
 
 $(SUBDIRS_UNINSTALL):
@@ -927,19 +926,19 @@
 		CFLAGS="$(BUILD_CFLAGS)" LDFLAGS="$(BUILD_LDFLAGS)" \
 		$(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
 
-menuselect/menuselect: menuselect/makeopts cleantest
+menuselect/menuselect: menuselect/makeopts .lastclean
 	+$(MAKE_MENUSELECT) menuselect
 
-menuselect/cmenuselect: menuselect/makeopts cleantest
+menuselect/cmenuselect: menuselect/makeopts .lastclean
 	+$(MAKE_MENUSELECT) cmenuselect
 
-menuselect/gmenuselect: menuselect/makeopts cleantest
+menuselect/gmenuselect: menuselect/makeopts .lastclean
 	+$(MAKE_MENUSELECT) gmenuselect
 
-menuselect/nmenuselect: menuselect/makeopts cleantest
+menuselect/nmenuselect: menuselect/makeopts .lastclean
 	+$(MAKE_MENUSELECT) nmenuselect
 
-menuselect/makeopts: makeopts cleantest
+menuselect/makeopts: makeopts .lastclean
 	+$(MAKE_MENUSELECT) makeopts
 
 menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml utils/utils.xml agi/agi.xml configure makeopts
@@ -970,7 +969,6 @@
 .PHONY: full
 .PHONY: _full
 .PHONY: prereqs
-.PHONY: cleantest
 .PHONY: uninstall
 .PHONY: _uninstall
 .PHONY: uninstall-all

Modified: team/qwell/fun_with_transports/apps/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/qwell/fun_with_transports/apps/Makefile?view=diff&rev=386005&r1=386004&r2=386005
==============================================================================
--- team/qwell/fun_with_transports/apps/Makefile (original)
+++ team/qwell/fun_with_transports/apps/Makefile Thu Apr 18 10:39:07 2013
@@ -37,5 +37,3 @@
   LIBS+= -lres_features.so -lres_ael_share.so -lres_monitor.so -lres_speech.so
   LIBS+= -lres_smdi.so
 endif
-
-app_stasis.so: stasis_json.o

Modified: team/qwell/fun_with_transports/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/fun_with_transports/apps/app_queue.c?view=diff&rev=386005&r1=386004&r2=386005
==============================================================================
--- team/qwell/fun_with_transports/apps/app_queue.c (original)
+++ team/qwell/fun_with_transports/apps/app_queue.c Thu Apr 18 10:39:07 2013
@@ -990,9 +990,6 @@
 	{ QUEUE_AUTOPAUSE_ALL,"all" },
 };
 
-
-static struct ast_taskprocessor *devicestate_tps;
-
 #define DEFAULT_RETRY		5
 #define DEFAULT_TIMEOUT		15
 #define RECHECK			1		/*!< Recheck every second to see we we're at the top yet */
@@ -1037,8 +1034,8 @@
 /*! \brief queues.conf [general] option */
 static int shared_lastcall = 1;
 
-/*! \brief Subscription to device state change events */
-static struct ast_event_sub *device_state_sub;
+/*! \brief Subscription to device state change messages */
+static struct stasis_subscription *device_state_sub;
 
 /*! \brief queues.conf [general] option */
 static int update_cdr = 0;
@@ -1618,12 +1615,6 @@
 	return -1;
 }
 
-struct statechange {
-	AST_LIST_ENTRY(statechange) entry;
-	int state;
-	char dev[0];
-};
-
 /*! \brief set a member's status based on device state of that member's state_interface.
  *
  * Lock interface list find sc, iterate through each queues queue_member list for member to
@@ -1742,10 +1733,10 @@
 }
 
 /*! \brief set a member's status based on device state of that member's interface*/
-static int handle_statechange(void *datap)
-{
-	struct statechange *sc = datap;
+static void device_state_cb(void *unused, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
+{
 	struct ao2_iterator miter, qiter;
+	struct ast_device_state_message *dev_state;
 	struct member *m;
 	struct call_queue *q;
 	char interface[80], *slash_pos;
@@ -1753,6 +1744,16 @@
 	int found_member;		/* Found this member in this queue */
 	int avail = 0;			/* Found an available member in this queue */
 
+	if (ast_device_state_message_type() != stasis_message_type(msg)) {
+		return;
+	}
+
+	dev_state = stasis_message_data(msg);
+	if (dev_state->eid) {
+		/* ignore non-aggregate states */
+		return;
+	}
+
 	qiter = ao2_iterator_init(queues, 0);
 	while ((q = ao2_t_iterator_next(&qiter, "Iterate over queues"))) {
 		ao2_lock(q);
@@ -1770,9 +1771,9 @@
 					}
 				}
 
-				if (!strcasecmp(interface, sc->dev)) {
+				if (!strcasecmp(interface, dev_state->device)) {
 					found_member = 1;
-					update_status(q, m, sc->state);
+					update_status(q, m, dev_state->state);
 				}
 			}
 
@@ -1804,39 +1805,18 @@
 	ao2_iterator_destroy(&qiter);
 
 	if (found) {
-		ast_debug(1, "Device '%s' changed to state '%d' (%s)\n", sc->dev, sc->state, ast_devstate2str(sc->state));
+		ast_debug(1, "Device '%s' changed to state '%d' (%s)\n",
+			dev_state->device,
+			dev_state->state,
+			ast_devstate2str(dev_state->state));
 	} else {
-		ast_debug(3, "Device '%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", sc->dev, sc->state, ast_devstate2str(sc->state));
-	}
-
-	ast_free(sc);
-	return 0;
-}
-
-static void device_state_cb(const struct ast_event *event, void *unused)
-{
-	enum ast_device_state state;
-	const char *device;
-	struct statechange *sc;
-	size_t datapsize;
-
-	state = ast_event_get_ie_uint(event, AST_EVENT_IE_STATE);
-	device = ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE);
-
-	if (ast_strlen_zero(device)) {
-		ast_log(LOG_ERROR, "Received invalid event that had no device IE\n");
-		return;
-	}
-	datapsize = sizeof(*sc) + strlen(device) + 1;
-	if (!(sc = ast_calloc(1, datapsize))) {
-		ast_log(LOG_ERROR, "failed to calloc a state change struct\n");
-		return;
-	}
-	sc->state = state;
-	strcpy(sc->dev, device);
-	if (ast_taskprocessor_push(devicestate_tps, handle_statechange, sc) < 0) {
-		ast_free(sc);
-	}
+		ast_debug(3, "Device '%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n",
+			dev_state->device,
+			dev_state->state,
+			ast_devstate2str(dev_state->state));
+	}
+
+	return;
 }
 
 /*! \brief Helper function which converts from extension state to device state values */
@@ -9857,6 +9837,9 @@
 	res |= ast_manager_unregister("QueuePause");
 	res |= ast_manager_unregister("QueueLog");
 	res |= ast_manager_unregister("QueuePenalty");
+	res |= ast_manager_unregister("QueueReload");
+	res |= ast_manager_unregister("QueueReset");
+	res |= ast_manager_unregister("QueueMemberRingInUse");
 	res |= ast_unregister_application(app_aqm);
 	res |= ast_unregister_application(app_rqm);
 	res |= ast_unregister_application(app_pqm);
@@ -9873,8 +9856,9 @@
 
 	res |= ast_data_unregister(NULL);
 
-	if (device_state_sub)
-		ast_event_unsubscribe(device_state_sub);
+	if (device_state_sub) {
+		device_state_sub = stasis_unsubscribe(device_state_sub);
+	}
 
 	ast_extension_state_del(0, extension_state_cb);
 
@@ -9884,7 +9868,6 @@
 		queue_t_unref(q, "Done with iterator");
 	}
 	ao2_iterator_destroy(&q_iter);
-	devicestate_tps = ast_taskprocessor_unreference(devicestate_tps);
 	ao2_ref(queues, -1);
 	ast_unload_realtime("queue_members");
 	return res;
@@ -9945,12 +9928,8 @@
 	res |= ast_custom_function_register(&queuewaitingcount_function);
 	res |= ast_custom_function_register(&queuememberpenalty_function);
 
-	if (!(devicestate_tps = ast_taskprocessor_get("app_queue", 0))) {
-		ast_log(LOG_WARNING, "devicestate taskprocessor reference failed - devicestate notifications will not occur\n");
-	}
-
 	/* in the following subscribe call, do I use DEVICE_STATE, or DEVICE_STATE_CHANGE? */
-	if (!(device_state_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, device_state_cb, "AppQueue Device state", NULL, AST_EVENT_IE_END))) {
+	if (!(device_state_sub = stasis_subscribe(ast_device_state_topic_all(), device_state_cb, NULL))) {
 		res = -1;
 	}
 

Propchange: team/qwell/fun_with_transports/apps/app_saycounted.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Apr 18 10:39:07 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision

Modified: team/qwell/fun_with_transports/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/fun_with_transports/apps/app_stasis.c?view=diff&rev=386005&r1=386004&r2=386005
==============================================================================
--- team/qwell/fun_with_transports/apps/app_stasis.c (original)
+++ team/qwell/fun_with_transports/apps/app_stasis.c Thu Apr 18 10:39:07 2013
@@ -24,6 +24,7 @@
  */
 
 /*** MODULEINFO
+	<depend>res_stasis</depend>
 	<support_level>core</support_level>
  ***/
 
@@ -32,14 +33,9 @@
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include "asterisk/app.h"
-#include "asterisk/app_stasis.h"
-#include "asterisk/astobj2.h"
-#include "asterisk/channel.h"
-#include "asterisk/lock.h"
 #include "asterisk/module.h"
 #include "asterisk/stasis.h"
-#include "asterisk/strings.h"
-#include "asterisk/stasis_channels.h"
+#include "asterisk/stasis_app.h"
 
 /*** DOCUMENTATION
 	<application name="Stasis" language="en_US">
@@ -67,347 +63,10 @@
 /*! \brief Dialplan application name */
 static const char *stasis = "Stasis";
 
-/*!
- * \brief Number of buckets for the Stasis application hash table.  Remember to
- * keep it a prime number!
- */
-#define APPS_NUM_BUCKETS 127
-
-/*!
- * \brief Number of buckets for the Stasis application hash table.  Remember to
- * keep it a prime number!
- */
-#define CONTROLS_NUM_BUCKETS 127
-
-/*!
- * \brief Stasis application container. Please call apps_registry() instead of
- * directly accessing.
- */
-struct ao2_container *__apps_registry;
-
-struct ao2_container *__app_controls;
-
-/*! Ref-counting accessor for the stasis applications container */
-static struct ao2_container *apps_registry(void)
+/*! /brief Stasis dialplan application callback */
+static int app_exec(struct ast_channel *chan, const char *data)
 {
-	ao2_ref(__apps_registry, +1);
-	return __apps_registry;
-}
-
-static struct ao2_container *app_controls(void)
-{
-	ao2_ref(__app_controls, +1);
-	return __app_controls;
-}
-
-struct app {
-	/*! Callback function for this application. */
-	stasis_app_cb handler;

[... 5406 lines stripped ...]



More information about the asterisk-commits mailing list