[asterisk-commits] kharwell: branch kharwell/pimp_my_sip r385964 - in /team/kharwell/pimp_my_sip...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Apr 17 09:20:21 CDT 2013
Author: kharwell
Date: Wed Apr 17 09:20:16 2013
New Revision: 385964
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385964
Log:
Multiple revisions 385433,385476,385524,385553,385598,385640,385684,385721,385748,385790,385837,385864,385866,385890,385941
........
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
........
Merged revisions 385433,385476,385524,385553,385598,385640,385684,385721,385748,385790,385837,385864,385866,385890,385941 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip
Added:
team/kharwell/pimp_my_sip/include/asterisk/stasis_app.h
- copied unchanged from r385941, team/group/pimp_my_sip/include/asterisk/stasis_app.h
team/kharwell/pimp_my_sip/res/res_stasis.c
- copied unchanged from r385941, team/group/pimp_my_sip/res/res_stasis.c
team/kharwell/pimp_my_sip/res/res_stasis.exports.in
- copied unchanged from r385941, team/group/pimp_my_sip/res/res_stasis.exports.in
team/kharwell/pimp_my_sip/tests/test_res_stasis.c
- copied unchanged from r385941, team/group/pimp_my_sip/tests/test_res_stasis.c
Removed:
team/kharwell/pimp_my_sip/apps/app_stasis.exports.in
team/kharwell/pimp_my_sip/apps/stasis_json.c
team/kharwell/pimp_my_sip/include/asterisk/app_stasis.h
team/kharwell/pimp_my_sip/tests/test_app_stasis.c
Modified:
team/kharwell/pimp_my_sip/ (props changed)
team/kharwell/pimp_my_sip/BSDmakefile (props changed)
team/kharwell/pimp_my_sip/Makefile
team/kharwell/pimp_my_sip/apps/Makefile
team/kharwell/pimp_my_sip/apps/app_queue.c
team/kharwell/pimp_my_sip/apps/app_saycounted.c (props changed)
team/kharwell/pimp_my_sip/apps/app_stasis.c
team/kharwell/pimp_my_sip/apps/app_voicemail.c
team/kharwell/pimp_my_sip/build_tools/sha1sum-sh (props changed)
team/kharwell/pimp_my_sip/channels/chan_alsa.c
team/kharwell/pimp_my_sip/channels/chan_gulp.c
team/kharwell/pimp_my_sip/channels/chan_iax2.c
team/kharwell/pimp_my_sip/channels/chan_multicast_rtp.c (props changed)
team/kharwell/pimp_my_sip/channels/chan_sip.c
team/kharwell/pimp_my_sip/channels/sig_ss7.c (props changed)
team/kharwell/pimp_my_sip/channels/sig_ss7.h (props changed)
team/kharwell/pimp_my_sip/channels/sip/include/security_events.h (props changed)
team/kharwell/pimp_my_sip/channels/sip/security_events.c (props changed)
team/kharwell/pimp_my_sip/codecs/codec_resample.c
team/kharwell/pimp_my_sip/configs/res_curl.conf.sample (props changed)
team/kharwell/pimp_my_sip/contrib/realtime/mysql/musiconhold.sql (props changed)
team/kharwell/pimp_my_sip/contrib/realtime/mysql/queue_log.sql (props changed)
team/kharwell/pimp_my_sip/contrib/realtime/mysql/voicemail_data.sql (props changed)
team/kharwell/pimp_my_sip/contrib/realtime/mysql/voicemail_messages.sql (props changed)
team/kharwell/pimp_my_sip/doc/Makefile (props changed)
team/kharwell/pimp_my_sip/funcs/func_presencestate.c
team/kharwell/pimp_my_sip/include/asterisk/bridging_features.h (props changed)
team/kharwell/pimp_my_sip/include/asterisk/bridging_technology.h (props changed)
team/kharwell/pimp_my_sip/include/asterisk/cli.h
team/kharwell/pimp_my_sip/include/asterisk/devicestate.h
team/kharwell/pimp_my_sip/include/asterisk/json.h
team/kharwell/pimp_my_sip/include/asterisk/manager.h
team/kharwell/pimp_my_sip/include/asterisk/presencestate.h
team/kharwell/pimp_my_sip/include/asterisk/select.h (props changed)
team/kharwell/pimp_my_sip/include/asterisk/sorcery.h
team/kharwell/pimp_my_sip/include/asterisk/stasis_channels.h
team/kharwell/pimp_my_sip/include/asterisk/strings.h
team/kharwell/pimp_my_sip/include/asterisk/xmpp.h
team/kharwell/pimp_my_sip/main/asterisk.c
team/kharwell/pimp_my_sip/main/ccss.c
team/kharwell/pimp_my_sip/main/channel.c
team/kharwell/pimp_my_sip/main/devicestate.c
team/kharwell/pimp_my_sip/main/json.c
team/kharwell/pimp_my_sip/main/manager_channels.c
team/kharwell/pimp_my_sip/main/pbx.c
team/kharwell/pimp_my_sip/main/presencestate.c
team/kharwell/pimp_my_sip/main/stasis_channels.c
team/kharwell/pimp_my_sip/res/res_corosync.c
team/kharwell/pimp_my_sip/res/res_jabber.c
team/kharwell/pimp_my_sip/res/res_mutestream.c (contents, props changed)
team/kharwell/pimp_my_sip/res/res_rtp_multicast.c (contents, props changed)
team/kharwell/pimp_my_sip/res/res_stasis_websocket.c
team/kharwell/pimp_my_sip/res/res_timing_kqueue.c (props changed)
team/kharwell/pimp_my_sip/res/res_xmpp.c
team/kharwell/pimp_my_sip/tests/test_devicestate.c
team/kharwell/pimp_my_sip/tests/test_expr.c (props changed)
team/kharwell/pimp_my_sip/tests/test_func_file.c (props changed)
team/kharwell/pimp_my_sip/tests/test_json.c
team/kharwell/pimp_my_sip/tests/test_locale.c (props changed)
team/kharwell/pimp_my_sip/tests/test_poll.c (props changed)
team/kharwell/pimp_my_sip/tests/test_stasis_channels.c
Propchange: team/kharwell/pimp_my_sip/
------------------------------------------------------------------------------
automerge = *
Propchange: team/kharwell/pimp_my_sip/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Propchange: team/kharwell/pimp_my_sip/
------------------------------------------------------------------------------
--- pimp_my_sip-integrated (original)
+++ pimp_my_sip-integrated Wed Apr 17 09:20:16 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-385387
+/team/group/pimp_my_sip:1-385963
Propchange: team/kharwell/pimp_my_sip/BSDmakefile
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 09:20:16 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Modified: team/kharwell/pimp_my_sip/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_my_sip/Makefile?view=diff&rev=385964&r1=385963&r2=385964
==============================================================================
--- team/kharwell/pimp_my_sip/Makefile (original)
+++ team/kharwell/pimp_my_sip/Makefile Wed Apr 17 09:20:16 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/kharwell/pimp_my_sip/apps/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_my_sip/apps/Makefile?view=diff&rev=385964&r1=385963&r2=385964
==============================================================================
--- team/kharwell/pimp_my_sip/apps/Makefile (original)
+++ team/kharwell/pimp_my_sip/apps/Makefile Wed Apr 17 09:20:16 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/kharwell/pimp_my_sip/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_my_sip/apps/app_queue.c?view=diff&rev=385964&r1=385963&r2=385964
==============================================================================
--- team/kharwell/pimp_my_sip/apps/app_queue.c (original)
+++ team/kharwell/pimp_my_sip/apps/app_queue.c Wed Apr 17 09:20:16 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/kharwell/pimp_my_sip/apps/app_saycounted.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Apr 17 09:20:16 2013
@@ -1,1 +1,1 @@
-'Date Author Id Revision Yoyo'
+Author Date Id Revision
Modified: team/kharwell/pimp_my_sip/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_my_sip/apps/app_stasis.c?view=diff&rev=385964&r1=385963&r2=385964
==============================================================================
--- team/kharwell/pimp_my_sip/apps/app_stasis.c (original)
+++ team/kharwell/pimp_my_sip/apps/app_stasis.c Wed Apr 17 09:20:16 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;
- /*! Opaque data to hand to callback function. */
- void *data;
- /*! Name of the Stasis application */
- char name[];
-};
-
-static void app_dtor(void *obj)
-{
- struct app *app = obj;
-
- ao2_cleanup(app->data);
- app->data = NULL;
-}
-
-/*! Constructor for \ref app. */
-static struct app *app_create(const char *name, stasis_app_cb handler, void *data)
-{
- struct app *app;
- size_t size;
-
- ast_assert(name != NULL);
- ast_assert(handler != NULL);
-
- size = sizeof(*app) + strlen(name) + 1;
- app = ao2_alloc_options(size, app_dtor, AO2_ALLOC_OPT_LOCK_MUTEX);
-
- if (!app) {
- return NULL;
- }
-
- strncpy(app->name, name, size - sizeof(*app));
- app->handler = handler;
- ao2_ref(data, +1);
- app->data = data;
-
- return app;
-}
-
-/*! AO2 hash function for \ref app */
-static int app_hash(const void *obj, const int flags)
-{
- const struct app *app = obj;
- const char *name = flags & OBJ_KEY ? obj : app->name;
-
- return ast_str_hash(name);
-}
-
-/*! AO2 comparison function for \ref app */
-static int app_compare(void *lhs, void *rhs, int flags)
-{
- const struct app *lhs_app = lhs;
- const struct app *rhs_app = rhs;
- const char *rhs_name = flags & OBJ_KEY ? rhs : rhs_app->name;
-
- if (strcmp(lhs_app->name, rhs_name) == 0) {
- return CMP_MATCH | CMP_STOP;
- } else {
- return 0;
- }
-}
-
-/*!
- * \brief Send a message to the given application.
- * \param app App to send the message to.
- * \param message Message to send.
- */
-static void app_send(struct app *app, struct ast_json *message)
-{
- app->handler(app->data, app->name, message);
-}
-
-struct stasis_app_control {
- /*!
- * When set, /c app_stasis should exit and continue in the dialplan.
- */
- int continue_to_dialplan:1;
- /*! Uniqueid of the associated channel */
- char channel_id[];
-};
-
-static struct stasis_app_control *control_create(const char *uniqueid)
-{
- struct stasis_app_control *control;
- size_t size;
-
- size = sizeof(*control) + strlen(uniqueid) + 1;
- control = ao2_alloc(size, NULL);
- if (!control) {
- return NULL;
- }
-
- strncpy(control->channel_id, uniqueid, size - sizeof(*control));
-
- return control;
-}
-
-/*! AO2 hash function for \ref stasis_app_control */
-static int control_hash(const void *obj, const int flags)
-{
- const struct stasis_app_control *control = obj;
- const char *id = flags & OBJ_KEY ? obj : control->channel_id;
-
- return ast_str_hash(id);
-}
-
-/*! AO2 comparison function for \ref stasis_app_control */
-static int control_compare(void *lhs, void *rhs, int flags)
-{
- const struct stasis_app_control *lhs_control = lhs;
- const struct stasis_app_control *rhs_control = rhs;
- const char *rhs_name =
- flags & OBJ_KEY ? rhs : rhs_control->channel_id;
-
- if (strcmp(lhs_control->channel_id, rhs_name) == 0) {
- return CMP_MATCH | CMP_STOP;
- } else {
- return 0;
- }
-}
-
-struct stasis_app_control *stasis_app_control_find_by_channel(
- const struct ast_channel *chan)
-{
- RAII_VAR(struct ao2_container *, controls, NULL, ao2_cleanup);
- if (chan == NULL) {
- return NULL;
- }
-
- controls = app_controls();
- return ao2_find(controls, ast_channel_uniqueid(chan), OBJ_KEY);
-}
-
-/*!
- * \brief Test the \c continue_to_dialplan bit for the given \a app.
- *
- * The bit is also reset for the next call.
- *
- * \param app Application to check the \c continue_to_dialplan bit.
- * \return Zero to remain in \c Stasis
- * \return Non-zero to continue in the dialplan
- */
-static int control_continue_test_and_reset(struct stasis_app_control *control)
-{
- int r;
- SCOPED_AO2LOCK(lock, control);
-
- r = control->continue_to_dialplan;
- control->continue_to_dialplan = 0;
- return r;
-}
-
-void stasis_app_control_continue(struct stasis_app_control *control)
-{
- SCOPED_AO2LOCK(lock, control);
- control->continue_to_dialplan = 1;
-}
-
-static struct ast_json *app_event_create(
- const char *event_name,
- const struct ast_channel_snapshot *snapshot,
- const struct ast_json *extra_info)
-{
- RAII_VAR(struct ast_json *, message, NULL, ast_json_unref);
- RAII_VAR(struct ast_json *, event, NULL, ast_json_unref);
-
- if (extra_info) {
- event = ast_json_deep_copy(extra_info);
- } else {
- event = ast_json_object_create();
- }
-
- if (snapshot) {
- int ret;
-
- /* Mustn't already have a channel field */
- ast_assert(ast_json_object_get(event, "channel") == NULL);
-
- ret = ast_json_object_set(
- event,
[... 4119 lines stripped ...]
More information about the asterisk-commits
mailing list