[asterisk-commits] murf: branch murf/bug11210 r104012 - in /team/murf/bug11210: ./ apps/ build_t...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 20 19:06:14 CST 2008
Author: murf
Date: Wed Feb 20 19:06:14 2008
New Revision: 104012
URL: http://svn.digium.com/view/asterisk?view=rev&rev=104012
Log:
Merged revisions 103737-103740,103742,103750,103754-103755,103764-103765,103769,103771-103772,103781,103783,103787-103788,103791,103794,103796,103798-103799,103802,103805,103808,103813,103818-103820,103822,103824,103827-103828,103831-103833,103838,103840,103842,103844,103846-103847,103902-103903,103908,103954-103955,103957 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r103737 | mmichelson | 2008-02-15 15:56:14 -0700 (Fri, 15 Feb 2008) | 8 lines
Fix redeclaration of variables when using IMAP storage
(closes issue #11988)
Reported by: jaroth
Patches:
variable_cleanup.patch uploaded by jaroth (license 50)
................
r103738 | mmichelson | 2008-02-15 16:07:12 -0700 (Fri, 15 Feb 2008) | 9 lines
Add proper "false" case behavior to GotoIfTime
(closes issue #11719)
Reported by: kshumard
Patches:
gotoiftime.twobranches.patch uploaded by kshumard (license 92)
Tested by: kshumard
................
r103739 | russell | 2008-02-15 16:14:32 -0700 (Fri, 15 Feb 2008) | 9 lines
Fix a regression in Asterisk 1.6 related to the use of AES encryption.
1024 was used instead of 128 when using AES from OpenSSL. Many thanks
to d1mas for figuring this one out!
(closes issue #11946)
Reported by: bbhoss
Patches:
v1-11946.patch uploaded by dimas (license 88)
................
r103740 | mmichelson | 2008-02-15 16:20:48 -0700 (Fri, 15 Feb 2008) | 3 lines
Document GotoIfTime change from svn revision 103738
................
r103742 | russell | 2008-02-15 16:32:18 -0700 (Fri, 15 Feb 2008) | 16 lines
Merged revisions 103741 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103741 | russell | 2008-02-15 17:31:39 -0600 (Fri, 15 Feb 2008) | 8 lines
Fix a crash in chan_iax2 due to a race condition
(closes issue #11780)
Reported by: guillecabeza
Patches:
bug_iax2_jb_1.4.patch uploaded by guillecabeza (license 380)
bug_iax2_jb_trunk.patch uploaded by guillecabeza (license 380)
........
................
r103750 | mvanbaak | 2008-02-16 14:22:00 -0700 (Sat, 16 Feb 2008) | 4 lines
move two ast_log calls to ast_debug.
Now monitoring chan_skinny port with nagios or zabbix wont generate noise on the console.
@ok tilghman
................
r103754 | tilghman | 2008-02-17 21:43:33 -0700 (Sun, 17 Feb 2008) | 6 lines
Context tracing for channels
(closes issue #11268)
Reported by: moy
Patches:
chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222)
................
r103755 | oej | 2008-02-18 03:10:35 -0700 (Mon, 18 Feb 2008) | 3 lines
- No space in manager event names, please
- Add new event to CHANGES
................
r103764 | file | 2008-02-18 08:35:04 -0700 (Mon, 18 Feb 2008) | 10 lines
Merged revisions 103763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103763 | file | 2008-02-18 11:33:14 -0400 (Mon, 18 Feb 2008) | 2 lines
Don't care if the extension given doesn't exist for subscription based MWI.
........
................
r103765 | file | 2008-02-18 08:47:00 -0700 (Mon, 18 Feb 2008) | 4 lines
Add an API call (ast_async_parseable_goto) which parses a goto string and does an async goto instead of an explicit goto.
(closes issue #11753)
Reported by: johan
................
r103769 | file | 2008-02-18 09:13:36 -0700 (Mon, 18 Feb 2008) | 11 lines
Blocked revisions 103768 via svnmerge
........
r103768 | file | 2008-02-18 12:11:51 -0400 (Mon, 18 Feb 2008) | 4 lines
Backport fix from issue #9325.
(closes issue #11980)
Reported by: rbrunka
........
................
r103771 | mmichelson | 2008-02-18 09:40:36 -0700 (Mon, 18 Feb 2008) | 18 lines
Merged revisions 103770 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103770 | mmichelson | 2008-02-18 10:37:31 -0600 (Mon, 18 Feb 2008) | 10 lines
Fix a linked list corruption that under the right circumstances
could lead to a looped list, meaning it will traverse forever.
(closes issue #11818)
Reported by: michael-fig
Patches:
11818.patch uploaded by putnopvut (license 60)
Tested by: michael-fig
........
................
r103772 | oej | 2008-02-18 10:12:13 -0700 (Mon, 18 Feb 2008) | 4 lines
Make sure we can set up calls without audio (text+video).
And ... it works!
................
r103781 | tilghman | 2008-02-18 10:45:48 -0700 (Mon, 18 Feb 2008) | 17 lines
Merged revisions 103780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103780 | tilghman | 2008-02-18 11:31:52 -0600 (Mon, 18 Feb 2008) | 9 lines
When a SIP channel is being auto-destroyed, it's possible for it to still be
in bridge code. When that happens, we crash. Delay the RTP destruction until
the bridge is ended.
(closes issue #11960)
Reported by: norman
Patches:
20080215__bug11960__2.diff.txt uploaded by Corydon76 (license 14)
Tested by: norman
........
................
r103783 | mvanbaak | 2008-02-18 12:47:40 -0700 (Mon, 18 Feb 2008) | 7 lines
make the output of 'core show settings' a bit nicer.
(closes issue #12020)
Reported by: seanbright
Patches:
asterisk.c.patch uploaded by seanbright (license 71)
................
r103787 | mmichelson | 2008-02-18 13:53:25 -0700 (Mon, 18 Feb 2008) | 18 lines
Merged revisions 103786 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103786 | mmichelson | 2008-02-18 14:52:09 -0600 (Mon, 18 Feb 2008) | 10 lines
There was an invalid assumption when calculating the duration of a file that the filestream in question
was created properly. Unfortunately this led to a segfault in the situation where an unknown format was
specified in voicemail.conf and a voicemail was recorded. Now, we first check to be sure that the stream
was written correctly or else assume a zero duration.
(closes issue #12021)
Reported by: jakep
Tested by: putnopvut
........
................
r103788 | mattf | 2008-02-18 13:58:23 -0700 (Mon, 18 Feb 2008) | 1 line
Make sure EC is enabled when SS7 call comes in. Also add support for multiple DPCs per linkset. #11779
................
r103791 | qwell | 2008-02-18 14:30:22 -0700 (Mon, 18 Feb 2008) | 12 lines
Merged revisions 103790 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103790 | qwell | 2008-02-18 15:23:32 -0600 (Mon, 18 Feb 2008) | 4 lines
Correct a message when echocancelwhenbridged is on, but echocancel is not.
Closes issue #12019
........
................
r103794 | mattf | 2008-02-18 14:57:50 -0700 (Mon, 18 Feb 2008) | 1 line
Commit chan_zap portion of #11964: add the ability to get ORIG_CALLED_NUM
................
r103796 | qwell | 2008-02-18 15:33:27 -0700 (Mon, 18 Feb 2008) | 9 lines
Merged revisions 103795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103795 | qwell | 2008-02-18 16:28:56 -0600 (Mon, 18 Feb 2008) | 1 line
Fix previous commit so that we actually disable echocanbridged if echocancel is off.
........
................
r103798 | file | 2008-02-18 15:54:25 -0700 (Mon, 18 Feb 2008) | 2 lines
Add some missing control frames.
................
r103799 | file | 2008-02-18 16:47:01 -0700 (Mon, 18 Feb 2008) | 6 lines
Add a non-invasive API for application level manipulation of T38 on a channel. This uses control frames (so they can even pass across IAX2) to negotiate T38 and provided a way of getting the current status of T38 using queryoption. This should by no means cause any issues and if it does I will take responsibility for it.
(closes issue #11873)
Reported by: dimas
Patches:
v4-t38-api.patch uploaded by dimas (license 88)
................
r103802 | file | 2008-02-18 16:58:38 -0700 (Mon, 18 Feb 2008) | 18 lines
Merged revisions 103801 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103801 | file | 2008-02-18 19:56:48 -0400 (Mon, 18 Feb 2008) | 10 lines
Ensure that emulated DTMFs do not get interrupted by another begin frame.
(closes issue #11740)
Reported by: gserra
Patches:
v1-11740.patch uploaded by dimas (license 88)
(closes issue #11955)
Reported by: tsearle
(closes issue #10530)
Reported by: xmarksthespot
........
................
r103805 | tilghman | 2008-02-18 17:59:40 -0700 (Mon, 18 Feb 2008) | 3 lines
Change verbosity into debug for Hebrew (and various whitespace fixes)
(Closes issue #12011)
................
r103808 | file | 2008-02-19 08:03:39 -0700 (Tue, 19 Feb 2008) | 9 lines
Blocked revisions 103807 via svnmerge
........
r103807 | file | 2008-02-19 11:01:42 -0400 (Tue, 19 Feb 2008) | 2 lines
Fix building of chan_sip.
........
................
r103813 | file | 2008-02-19 10:33:55 -0700 (Tue, 19 Feb 2008) | 12 lines
Merged revisions 103812 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103812 | file | 2008-02-19 13:31:32 -0400 (Tue, 19 Feb 2008) | 4 lines
Don't look for launchd when cross compiling.
(closes issue #12029)
Reported by: ovi
........
................
r103818 | jpeeler | 2008-02-19 11:14:56 -0700 (Tue, 19 Feb 2008) | 6 lines
(closes issue #11864)
Reported by: julianjm
Patches:
chan_zap.c-1.4-devicestate-v1.diff uploaded by julianjm (license 99)
Patch fixes problem of device state incorrectly reporting idle before PBX answers incoming call on FXO channel. Device status is updated now during new channel creation.
................
r103819 | file | 2008-02-19 11:40:22 -0700 (Tue, 19 Feb 2008) | 8 lines
Add CHANNELREDIRECT_STATUS variable to ChannelRedirect() dialplan application. This will either be set to NOCHANNEL if the given channel was not found or SUCCESS if it worked.
(closes issue #11553)
Reported by: johan
Patches:
UPGRADE.txt.channelredirect.patch uploaded by johan (license 334)
CHANGES.channelredirect.patch uploaded by johan (license 334)
app_channelredirect-20080219.patch uploaded by johan (license 334)
................
r103820 | file | 2008-02-19 12:27:50 -0700 (Tue, 19 Feb 2008) | 4 lines
len already contains the position we want to examine, if we move one left again we'll actually probably be looking at a digit.
(issue #12030)
Reported by: alligosh
................
r103822 | russell | 2008-02-19 13:06:23 -0700 (Tue, 19 Feb 2008) | 16 lines
Merged revisions 103821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103821 | russell | 2008-02-19 14:02:49 -0600 (Tue, 19 Feb 2008) | 8 lines
Account for the fact that the "other" channel can disappear while the local pvt
is not locked.
(fixes a problem introduced in rev 100581)
(closes issue #12012)
Reported by: stevedavies
Patch by me
........
................
r103824 | file | 2008-02-19 13:31:15 -0700 (Tue, 19 Feb 2008) | 14 lines
Merged revisions 103823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103823 | file | 2008-02-19 16:28:08 -0400 (Tue, 19 Feb 2008) | 6 lines
Send CallerID Name in setup message.
(closes issue #11241)
Reported by: tusar
Patches:
h323id_as_callerid_name.patch uploaded by tusar (license 344)
........
................
r103827 | file | 2008-02-19 14:38:39 -0700 (Tue, 19 Feb 2008) | 6 lines
Only output a log message saying the format does not exist if it actually does not exist, not if the file itself could not be opened.
(closes issue #11828)
Reported by: IgorG
Patches:
readfile.v1.diff uploaded by IgorG (license 20)
................
r103828 | file | 2008-02-19 14:54:09 -0700 (Tue, 19 Feb 2008) | 6 lines
Add a log message that appears when you try to unload a module that isn't loaded.
(closes issue #12033)
Reported by: jamesgolovich
Patches:
asterisk-loader.diff.txt uploaded by jamesgolovich (license 176)
................
r103831 | qwell | 2008-02-19 15:23:04 -0700 (Tue, 19 Feb 2008) | 1 line
Maybe we should set the value before we test it? Fixes an issue people have been seeing (unreported?) with file playback not working.
................
r103832 | qwell | 2008-02-19 15:35:23 -0700 (Tue, 19 Feb 2008) | 1 line
Make sure to mask out non-audio first as well
................
r103833 | mmichelson | 2008-02-19 17:49:38 -0700 (Tue, 19 Feb 2008) | 11 lines
When using IMAP storage, if the folder you attempt to save to does not exist,
create it first.
(closes issue #12032)
Reported by: jaroth
Patches:
createfolder.patch uploaded by jaroth (license 50)
Tested by: jaroth
................
r103838 | file | 2008-02-19 20:38:13 -0700 (Tue, 19 Feb 2008) | 2 lines
Minor test...
................
r103840 | file | 2008-02-19 20:44:40 -0700 (Tue, 19 Feb 2008) | 2 lines
file not found.
................
r103842 | file | 2008-02-19 20:52:57 -0700 (Tue, 19 Feb 2008) | 2 lines
*mumble*
................
r103844 | mmichelson | 2008-02-20 08:21:51 -0700 (Wed, 20 Feb 2008) | 5 lines
Fix another spot where a hard-coded '|' hadn't been converted to ','
(closes issue #12034)
Reported by: kowalma
................
r103846 | tilghman | 2008-02-20 11:28:00 -0700 (Wed, 20 Feb 2008) | 15 lines
Merged revisions 103845 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103845 | tilghman | 2008-02-20 11:53:00 -0600 (Wed, 20 Feb 2008) | 7 lines
Compat fix for Solaris
(closes issue #12022)
Reported by: asgaroth
Patches:
20080219__bug12022.diff.txt uploaded by Corydon76 (license 14)
Tested by: asgaroth
........
................
r103847 | tilghman | 2008-02-20 11:29:14 -0700 (Wed, 20 Feb 2008) | 2 lines
Add some documentation fixups
................
r103902 | mmichelson | 2008-02-20 14:08:46 -0700 (Wed, 20 Feb 2008) | 9 lines
Fix a crash due to the wrong variable being used when building a directory string.
(closes issue #12027)
Reported by: jaroth
Patches:
forward.patch uploaded by jaroth (license 50)
Tested by: jaroth
................
r103903 | qwell | 2008-02-20 14:36:46 -0700 (Wed, 20 Feb 2008) | 13 lines
Largely refactor DSP tone detection routines.
Separate fax detection from digit detected.
Added CED (called) tone detection for fax (previously, only CNG (calling) was supported).
Separate DTMF/MF code paths where appropriate.
Allow detection of arbitary tones.
(closes issue #11796)
Reported by: dimas
Patches:
v6-dsp-faxtones.patch uploaded by dimas (license 88)
Tested by: dimas, IgorG, Cache
................
r103908 | mmichelson | 2008-02-20 14:41:31 -0700 (Wed, 20 Feb 2008) | 14 lines
Merged revisions 103904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103904 | mmichelson | 2008-02-20 15:40:08 -0600 (Wed, 20 Feb 2008) | 6 lines
Fix a crash if the channel becomes NULL while attempting to lock it.
(closes issue #12039)
Reported by: danpwi
........
................
r103954 | file | 2008-02-20 15:10:30 -0700 (Wed, 20 Feb 2008) | 14 lines
Merged revisions 103953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103953 | file | 2008-02-20 18:06:59 -0400 (Wed, 20 Feb 2008) | 6 lines
Don't wait for additional digits when overlap dialing is enabled if the setup message contains the sending_complete information element.
(closes issue #11785)
Reported by: klaus3000
Patches:
sending_complete_overlap_asterisk-1.4.17.patch.txt uploaded by klaus3000 (license 65)
........
................
r103955 | file | 2008-02-20 15:29:47 -0700 (Wed, 20 Feb 2008) | 4 lines
Try to do Packet2Packet bridging with chan_h323 if reinviting isn't enabled.
(closes issue #11901)
Reported by: pj
................
r103957 | mmichelson | 2008-02-20 15:34:12 -0700 (Wed, 20 Feb 2008) | 16 lines
Merged revisions 103956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r103956 | mmichelson | 2008-02-20 16:32:22 -0600 (Wed, 20 Feb 2008) | 8 lines
Clear up confusion when viewing the QUEUE_WAITING_COUNT of a
"dead" realtime queue. Since from the user's perspective, the queue
does exist, we shouldn't tell them we couldn't find the queue. Instead
since it is a dead queue, report a 0 waiting count
This issue was brought up on IRC by jmls
........
................
Modified:
team/murf/bug11210/ (props changed)
team/murf/bug11210/CHANGES
team/murf/bug11210/UPGRADE.txt
team/murf/bug11210/apps/app_authenticate.c
team/murf/bug11210/apps/app_channelredirect.c
team/murf/bug11210/apps/app_queue.c
team/murf/bug11210/apps/app_voicemail.c
team/murf/bug11210/build_tools/cflags.xml
team/murf/bug11210/channels/chan_h323.c
team/murf/bug11210/channels/chan_iax2.c
team/murf/bug11210/channels/chan_local.c
team/murf/bug11210/channels/chan_sip.c
team/murf/bug11210/channels/chan_skinny.c
team/murf/bug11210/channels/chan_zap.c
team/murf/bug11210/channels/h323/ast_h323.cxx
team/murf/bug11210/configure
team/murf/bug11210/configure.ac
team/murf/bug11210/funcs/func_channel.c
team/murf/bug11210/include/asterisk/aes.h
team/murf/bug11210/include/asterisk/channel.h
team/murf/bug11210/include/asterisk/dsp.h
team/murf/bug11210/include/asterisk/frame.h
team/murf/bug11210/include/asterisk/pbx.h
team/murf/bug11210/include/asterisk/sched.h
team/murf/bug11210/main/app.c
team/murf/bug11210/main/asterisk.c
team/murf/bug11210/main/audiohook.c
team/murf/bug11210/main/channel.c
team/murf/bug11210/main/cli.c
team/murf/bug11210/main/dsp.c
team/murf/bug11210/main/file.c
team/murf/bug11210/main/frame.c
team/murf/bug11210/main/loader.c
team/murf/bug11210/main/pbx.c
team/murf/bug11210/main/rtp.c
team/murf/bug11210/main/say.c
team/murf/bug11210/main/stdtime/localtime.c
team/murf/bug11210/res/res_monitor.c
Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Feb 20 19:06:14 2008
@@ -1,1 +1,1 @@
-/trunk:1-103734
+/trunk:1-104011
Modified: team/murf/bug11210/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/CHANGES?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/CHANGES (original)
+++ team/murf/bug11210/CHANGES Wed Feb 20 19:06:14 2008
@@ -47,6 +47,7 @@
* Added new action insert to add new variable to category at specified line.
* Updated action newcat to allow new category to be inserted in file above another
existing category.
+ * Added new event "JitterBufStats" in the IAX2 channel
Dialplan functions
------------------
@@ -368,6 +369,10 @@
direct options to the app.
* AMD() has a new "maximum word length" option. "show application AMD" from the CLI
for more details
+ * GotoIfTime() now may branch based on a "false" condition, like other Goto-related applications
+ * The ChannelRedirect application no longer exits the dialplan if the given channel
+ does not exist. It will now set the CHANNELREDIRECT_STATUS variable to SUCCESS upon success
+ or NOCHANNEL if the given channel was not found.
Music On Hold Changes
---------------------
@@ -525,3 +530,6 @@
do not come from the remote party.
* Added the 'n' option to the SpeechBackground application to tell it to not
answer the channel if it has not already been answered.
+ * Added a compiler flag, CHANNEL_TRACE, which permits channel tracing to be
+ turned on, via the CHANNEL(trace) dialplan function. Could be useful for
+ dialplan debugging.
Modified: team/murf/bug11210/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/UPGRADE.txt?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/UPGRADE.txt (original)
+++ team/murf/bug11210/UPGRADE.txt Wed Feb 20 19:06:14 2008
@@ -77,6 +77,9 @@
* ChanIsAvail() now has a 't' option, which allows the specified device
to be queried for state without consulting the channel drivers. This
performs mostly a 'ChanExists' sort of function.
+* ChannelRedirect() will not terminate the channel that fails to do a
+ channelredirect as it has done previously. Instead CHANNELREDIRECT_STATUS
+ will reflect if the attempt was successful of not.
* SetCallerPres() has been replaced with the CALLERPRES() dialplan function
and is now deprecated.
* DISA()'s fifth argument is now an options argument. If you have previously
Modified: team/murf/bug11210/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_authenticate.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/apps/app_authenticate.c (original)
+++ team/murf/bug11210/apps/app_authenticate.c Wed Feb 20 19:06:14 2008
@@ -159,8 +159,8 @@
continue;
len = strlen(buf) - 1;
- if (buf[len - 1] == '\n')
- buf[len - 1] = '\0';
+ if (buf[len] == '\n')
+ buf[len] = '\0';
if (ast_test_flag(&flags, OPT_MULTIPLE)) {
md5secret = buf;
Modified: team/murf/bug11210/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_channelredirect.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/apps/app_channelredirect.c (original)
+++ team/murf/bug11210/apps/app_channelredirect.c Wed Feb 20 19:06:14 2008
@@ -39,8 +39,10 @@
static char *synopsis = "Redirects given channel to a dialplan target.";
static char *descrip =
"ChannelRedirect(channel,[[context,]extension,]priority)\n"
-" Sends the specified channel to the specified extension priority\n";
-
+" Sends the specified channel to the specified extension priority\n"
+"This application sets the following channel variables upon completion:\n"
+" CHANNELREDIRECT_STATUS - Are set to the result of the redirection\n"
+" either NOCHANNEL or SUCCESS\n";
static int asyncgoto_exec(struct ast_channel *chan, void *data)
{
@@ -69,11 +71,12 @@
chan2 = ast_get_channel_by_name_locked(args.channel);
if (!chan2) {
ast_log(LOG_WARNING, "No such channel: %s\n", args.channel);
- return -1;
+ pbx_builtin_setvar_helper(chan, "CHANNELREDIRECT_STATUS", "NOCHANNEL");
+ return 0;
}
- res = ast_parseable_goto(chan2, args.label);
-
+ res = ast_async_parseable_goto(chan2, args.label);
+ pbx_builtin_setvar_helper(chan, "CHANNELREDIRECT_STATUS", "SUCCESS");
ast_channel_unlock(chan2);
return res;
Modified: team/murf/bug11210/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_queue.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/apps/app_queue.c (original)
+++ team/murf/bug11210/apps/app_queue.c Wed Feb 20 19:06:14 2008
@@ -4688,6 +4688,7 @@
struct call_queue *q, tmpq = {
.name = data,
};
+ struct ast_variable *var = NULL;
buf[0] = '\0';
@@ -4701,6 +4702,13 @@
count = q->count;
ao2_unlock(q);
queue_unref(q);
+ } else if ((var = ast_load_realtime("queues", "name", data, NULL))) {
+ /* if the queue is realtime but was not found in memory, this
+ * means that the queue had been deleted from memory since it was
+ * "dead." This means it has a 0 waiting count
+ */
+ count = 0;
+ ast_variables_destroy(var);
} else
ast_log(LOG_WARNING, "queue %s was not found\n", data);
Modified: team/murf/bug11210/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/apps/app_voicemail.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/apps/app_voicemail.c (original)
+++ team/murf/bug11210/apps/app_voicemail.c Wed Feb 20 19:06:14 2008
@@ -2827,7 +2827,7 @@
ast_copy_string(fromdir, dir, sizeof(fromdir));
make_file(frompath, sizeof(frompath), fromdir, msgnum);
- make_dir(todir, sizeof(todir), recip->context, recip->mailbox, frombox);
+ make_dir(todir, sizeof(todir), recip->context, recip->mailbox, "INBOX");
if (vm_lock_path(todir))
return ERROR_LOCK_PATH;
@@ -3474,11 +3474,20 @@
/* simple. huh? */
long res;
char sequence[10];
+ char mailbox[256];
/* if save to Old folder, just leave in INBOX */
if (box == 1) return 10;
/* get the real IMAP message number for this message */
snprintf(sequence, sizeof(sequence), "%ld", vms->msgArray[msg]);
+ /* Create the folder if it don't exist */
+ imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */
+ ast_debug(5, "Checking if folder exists: %s\n",mailbox);
+ if (mail_create(vms->mailstream, mailbox) == NIL)
+ ast_debug(5, "Folder exists.\n");
+ else
+ ast_log(LOG_NOTICE, "Folder %s created!\n",mbox(box));
+
ast_debug(3, "Copying sequence %s to mailbox %s\n", sequence, mbox(box));
res = mail_copy(vms->mailstream, sequence, (char *)mbox(box));
if (res == 1) return 0;
@@ -4422,12 +4431,6 @@
long duration = 0;
char origmsgfile[PATH_MAX], msgfile[PATH_MAX];
struct vm_state vmstmp;
-#ifdef IMAP_STORAGE
- char *myserveremail = serveremail;
- char buf[1024] = "";
- int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
-#endif
-
memcpy(&vmstmp, vms, sizeof(vmstmp));
make_file(origmsgfile, sizeof(origmsgfile), dir, curmsg);
@@ -4443,8 +4446,9 @@
if (!cmd) {
AST_LIST_TRAVERSE_SAFE_BEGIN(&extensions, vmtmp, list) {
#ifdef IMAP_STORAGE
- char *myserveremail;
+ char *myserveremail = serveremail;
int attach_user_voicemail;
+ char buf[1024] = "";
/* Need to get message content */
ast_debug(3, "Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n", vms->curmsg, vms->msgArray[vms->curmsg]);
@@ -9459,6 +9463,7 @@
void mm_notify(MAILSTREAM * stream, char *string, long errflg)
{
+ ast_debug(5, "Entering NOTIFY callback, errflag is %ld, string is %s\n", errflg, string);
mm_log (string, errflg);
}
Modified: team/murf/bug11210/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/build_tools/cflags.xml?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/build_tools/cflags.xml (original)
+++ team/murf/bug11210/build_tools/cflags.xml Wed Feb 20 19:06:14 2008
@@ -59,4 +59,6 @@
<member name="BUSYDETECT_DEBUG" displayname="Enable additional busy detection debugging">
<defaultenabled>no</defaultenabled>
</member>
+ <member name="CHANNEL_TRACE" displayname="Enable CHANNEL(trace) function">
+ </member>
</category>
Modified: team/murf/bug11210/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_h323.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/channels/chan_h323.c (original)
+++ team/murf/bug11210/channels/chan_h323.c Wed Feb 20 19:06:14 2008
@@ -3082,10 +3082,10 @@
static enum ast_rtp_get_result oh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp **rtp)
{
struct oh323_pvt *pvt;
- enum ast_rtp_get_result res = AST_RTP_GET_FAILED;
+ enum ast_rtp_get_result res = AST_RTP_TRY_PARTIAL;
if (!(pvt = (struct oh323_pvt *)chan->tech_pvt))
- return res;
+ return AST_RTP_GET_FAILED;
ast_mutex_lock(&pvt->lock);
if (pvt->rtp && pvt->options.bridge) {
Modified: team/murf/bug11210/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_iax2.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/channels/chan_iax2.c (original)
+++ team/murf/bug11210/channels/chan_iax2.c Wed Feb 20 19:06:14 2008
@@ -3302,7 +3302,9 @@
int type, len;
int ret;
int needfree = 0;
-
+ struct ast_channel *owner = NULL;
+ struct ast_channel *bridge = NULL;
+
/* Attempt to recover wrapped timestamps */
unwrap_timestamp(fr);
@@ -3333,11 +3335,12 @@
return -1;
}
+ if ((owner = iaxs[fr->callno]->owner))
+ bridge = ast_bridged_channel(owner);
+
/* if the user hasn't requested we force the use of the jitterbuffer, and we're bridged to
* a channel that can accept jitter, then flush and suspend the jb, and send this frame straight through */
- if( (!ast_test_flag(iaxs[fr->callno], IAX_FORCEJITTERBUF)) &&
- iaxs[fr->callno]->owner && ast_bridged_channel(iaxs[fr->callno]->owner) &&
- (ast_bridged_channel(iaxs[fr->callno]->owner)->tech->properties & AST_CHAN_TP_WANTSJITTER)) {
+ if ( (!ast_test_flag(iaxs[fr->callno], IAX_FORCEJITTERBUF)) && owner && bridge && (bridge->tech->properties & AST_CHAN_TP_WANTSJITTER) ) {
jb_frame frame;
/* deliver any frames in the jb */
@@ -7891,7 +7894,7 @@
iaxs[callno]->remote_rr.dropped,
iaxs[callno]->remote_rr.ooo,
iaxs[callno]->remote_rr.packets);
- manager_event(EVENT_FLAG_REPORTING, "JB Stats", "Owner: %s\r\nPing: %d\r\nLocalJitter: %d\r\nLocalJBDelay: %d\t\nLocalTotalLost: %d LocalLossPercent: %d\r\nLocalDropped: %d\r\nLocalooo: %d\r\nLocalReceived: %d\r\nRemoteJitter: %d\r\nRemoteJBDelay: %d\r\nRemoteTotalLost: %d\r\nRemoteLossPercent: %d\r\nRemoteDropped: %d\r\nRemoteooo: %d\r\nRemoteReceived: %d\r\n",
+ manager_event(EVENT_FLAG_REPORTING, "JitterBufStats", "Owner: %s\r\nPing: %d\r\nLocalJitter: %d\r\nLocalJBDelay: %d\t\nLocalTotalLost: %d LocalLossPercent: %d\r\nLocalDropped: %d\r\nLocalooo: %d\r\nLocalReceived: %d\r\nRemoteJitter: %d\r\nRemoteJBDelay: %d\r\nRemoteTotalLost: %d\r\nRemoteLossPercent: %d\r\nRemoteDropped: %d\r\nRemoteooo: %d\r\nRemoteReceived: %d\r\n",
iaxs[callno]->owner->name,
iaxs[callno]->pingtime,
localjitter,
Modified: team/murf/bug11210/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_local.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/channels/chan_local.c (original)
+++ team/murf/bug11210/channels/chan_local.c Wed Feb 20 19:06:14 2008
@@ -179,24 +179,22 @@
return 0;
}
- ast_mutex_unlock(&p->lock);
-
/* Ensure that we have both channels locked */
- if (us) {
- while (ast_channel_trylock(other)) {
+ while (other && ast_channel_trylock(other)) {
+ ast_mutex_unlock(&p->lock);
+ if (us)
ast_channel_unlock(us);
- usleep(1);
+ usleep(1);
+ if (us)
ast_channel_lock(us);
- }
- } else {
- ast_channel_lock(other);
- }
-
- ast_queue_frame(other, f);
-
- ast_channel_unlock(other);
-
- ast_mutex_lock(&p->lock);
+ ast_mutex_lock(&p->lock);
+ other = isoutbound ? p->owner : p->chan;
+ }
+
+ if (other) {
+ ast_queue_frame(other, f);
+ ast_channel_unlock(other);
+ }
ast_clear_flag(p, LOCAL_GLARE_DETECT);
@@ -513,13 +511,15 @@
const char *status = pbx_builtin_getvar_helper(p->chan, "DIALSTATUS");
if ((status) && (p->owner)) {
/* Deadlock avoidance */
- while (ast_channel_trylock(p->owner)) {
+ while (p->owner && ast_channel_trylock(p->owner)) {
ast_mutex_unlock(&p->lock);
usleep(1);
ast_mutex_lock(&p->lock);
}
- pbx_builtin_setvar_helper(p->owner, "CHANLOCALSTATUS", status);
- ast_channel_unlock(p->owner);
+ if (p->owner) {
+ pbx_builtin_setvar_helper(p->owner, "CHANLOCALSTATUS", status);
+ ast_channel_unlock(p->owner);
+ }
}
p->chan = NULL;
ast_clear_flag(p, LOCAL_LAUNCHED_PBX);
Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=104012&r1=104011&r2=104012
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Wed Feb 20 19:06:14 2008
@@ -1811,6 +1811,7 @@
static int sip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
static int sip_senddigit_begin(struct ast_channel *ast, char digit);
static int sip_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration);
+static int sip_queryoption(struct ast_channel *chan, int option, void *data, int *datalen);
static const char *sip_get_callid(struct ast_channel *chan);
static int handle_request_do(struct sip_request *req, struct sockaddr_in *sin);
@@ -2138,6 +2139,7 @@
static int transmit_response_with_t38_sdp(struct sip_pvt *p, char *msg, struct sip_request *req, int retrans);
static struct ast_udptl *sip_get_udptl_peer(struct ast_channel *chan);
static int sip_set_udptl_peer(struct ast_channel *chan, struct ast_udptl *udptl);
+static void change_t38_state(struct sip_pvt *p, int state);
/*------ Session-Timers functions --------- */
static void proc_422_rsp(struct sip_pvt *p, struct sip_request *rsp);
@@ -2179,6 +2181,7 @@
.early_bridge = ast_rtp_early_bridge,
.send_text = sip_sendtext, /* called with chan locked */
.func_channel_read = acf_channel_read,
+ .queryoption = sip_queryoption,
.get_pvt_uniqueid = sip_get_callid,
};
@@ -3292,6 +3295,53 @@
res = (reliable) ?
__sip_reliable_xmit(p, seqno, 0, req->data, req->len, (reliable == XMIT_CRITICAL), req->method) :
__sip_xmit(p, req->data, req->len);
+ return res;
+}
+
+/*! \brief Query an option on a SIP dialog */
+static int sip_queryoption(struct ast_channel *chan, int option, void *data, int *datalen)
+{
+ int res = -1;
+ enum ast_t38_state state = T38_STATE_UNAVAILABLE;
+ struct sip_pvt *p = (struct sip_pvt *) chan->tech_pvt;
+
+ switch (option) {
+ case AST_OPTION_T38_STATE:
+ /* Make sure we got an ast_t38_state enum passed in */
+ if (*datalen != sizeof(enum ast_t38_state)) {
+ ast_log(LOG_ERROR, "Invalid datalen for AST_OPTION_T38_STATE option. Expected %d, got %d\n", (int)sizeof(enum ast_t38_state), *datalen);
+ return -1;
+ }
+
+ sip_pvt_lock(p);
+
+ /* Now if T38 support is enabled we need to look and see what the current state is to get what we want to report back */
+ if (ast_test_flag(&p->t38.t38support, SIP_PAGE2_T38SUPPORT)) {
+ switch (p->t38.state) {
+ case T38_LOCAL_DIRECT:
+ case T38_LOCAL_REINVITE:
+ case T38_PEER_DIRECT:
+ case T38_PEER_REINVITE:
+ state = T38_STATE_NEGOTIATING;
+ break;
+ case T38_ENABLED:
+ state = T38_STATE_NEGOTIATED;
+ break;
+ default:
+ state = T38_STATE_UNKNOWN;
+ }
+ }
+
+ sip_pvt_unlock(p);
+
+ *((enum ast_t38_state *) data) = state;
+ res = 0;
+
+ break;
+ default:
+ break;
+ }
+
return res;
}
@@ -4008,6 +4058,37 @@
}
}
+/*! \brief Change the T38 state on a SIP dialog */
+static void change_t38_state(struct sip_pvt *p, int state)
+{
+ int old = p->t38.state;
+ struct ast_channel *chan = p->owner;
+ enum ast_control_t38 message = 0;
+
+ /* Don't bother changing if we are already in the state wanted */
+ if (old == state)
+ return;
+
+ p->t38.state = state;
+ ast_debug(2, "T38 state changed to %d on channel %s\n", p->t38.state, chan ? chan->name : "<none>");
+
+ /* If no channel was provided we can't send off a control frame */
+ if (!chan)
+ return;
+
+ /* Given the state requested and old state determine what control frame we want to queue up */
+ if (state == T38_ENABLED)
+ message = AST_T38_NEGOTIATED;
+ else if (state == T38_DISABLED && old == T38_ENABLED)
+ message = AST_T38_TERMINATED;
+ else if (state == T38_DISABLED && old == T38_LOCAL_REINVITE)
+ message = AST_T38_REFUSED;
+
+ /* Woot we got a message, create a control frame and send it on! */
+ if (message)
+ ast_queue_control_data(chan, AST_CONTROL_T38, &message, sizeof(message));
+}
+
/*! \brief Set the global T38 capabilities on a SIP dialog structure */
static void set_t38_capabilities(struct sip_pvt *p)
{
@@ -4373,6 +4454,21 @@
ast_debug(2, "This call did not properly clean up call limits. Call ID %s\n", p->callid);
}
+ /* Unlink us from the owner if we have one */
+ if (p->owner) {
+ if (lockowner)
+ ast_channel_lock(p->owner);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Detaching from %s\n", p->owner->name);
+ p->owner->tech_pvt = NULL;
+ /* Make sure that the channel knows its backend is going away */
+ p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+ if (lockowner)
+ ast_channel_unlock(p->owner);
+ /* Give the channel a chance to react before deallocation */
+ usleep(1);
+ }
+
/* Remove link from peer to subscription of MWI */
if (p->relatedpeer && p->relatedpeer->mwipvt)
p->relatedpeer->mwipvt = dialog_unref(p->relatedpeer->mwipvt, "delete ->relatedpeer->mwipvt");
@@ -4394,12 +4490,22 @@
if (p->options)
ast_free(p->options);
- if (p->rtp)
+ /* We absolutely cannot destroy the rtp struct while a bridge is active or we WILL crash */
+ if (p->rtp) {
+ while (ast_rtp_get_bridged(p->rtp))
+ usleep(1);
ast_rtp_destroy(p->rtp);
- if (p->vrtp)
+ }
+ if (p->vrtp) {
+ while (ast_rtp_get_bridged(p->vrtp))
+ usleep(1);
ast_rtp_destroy(p->vrtp);
- if (p->trtp)
+ }
+ if (p->trtp) {
+ while (ast_rtp_get_bridged(p->trtp))
+ usleep(1);
ast_rtp_destroy(p->trtp);
+ }
if (p->udptl)
ast_udptl_destroy(p->udptl);
if (p->refer)
@@ -4417,15 +4523,6 @@
p->stimer = NULL;
}
- /* Unlink us from the owner if we have one */
- if (p->owner) {
- if (lockowner)
- ast_channel_lock(p->owner);
- ast_debug(1, "Detaching from %s\n", p->owner->name);
- p->owner->tech_pvt = NULL;
- if (lockowner)
- ast_channel_unlock(p->owner);
- }
/* Clear history */
if (p->history) {
struct sip_history *hist;
@@ -4947,8 +5044,7 @@
ast_setstate(ast, AST_STATE_UP);
ast_debug(1, "SIP answering channel: %s\n", ast->name);
if (p->t38.state == T38_PEER_DIRECT) {
- p->t38.state = T38_ENABLED;
- ast_debug(2, "T38State change to %d on channel %s\n", p->t38.state, ast->name);
+ change_t38_state(p, T38_ENABLED);
res = transmit_response_with_t38_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
} else
res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL, FALSE);
@@ -5232,6 +5328,26 @@
/* ast_rtcp_send_h261fur(p->vrtp); */
} else
res = -1;
+ break;
+ case AST_CONTROL_T38: /* T38 control frame */
+ if (datalen != sizeof(enum ast_control_t38)) {
+ ast_log(LOG_ERROR, "Invalid datalen for AST_CONTROL_T38. Expected %d, got %d\n", (int)sizeof(enum ast_control_t38), (int)datalen);
+ } else {
+ switch (*((enum ast_control_t38 *) data)) {
+ case AST_T38_REQUEST_NEGOTIATE: /* Request T38 */
+ if (p->t38.state != T38_ENABLED) {
+ change_t38_state(p, T38_LOCAL_REINVITE);
+ transmit_reinvite_with_sdp(p, TRUE, FALSE);
+ }
+ break;
+ case AST_T38_REQUEST_TERMINATE: /* Shutdown T38 */
+ if (p->t38.state == T38_ENABLED)
+ transmit_reinvite_with_sdp(p, FALSE, FALSE);
+ break;
+ default:
+ break;
+ }
+ }
break;
case -1:
res = -1;
@@ -5665,9 +5781,8 @@
if (!ast_test_flag(&p->flags[0], SIP_GOTREFER)) {
if (!p->pendinginvite) {
ast_debug(3, "Sending reinvite on SIP (%s) for T.38 negotiation.\n", ast->name);
- p->t38.state = T38_LOCAL_REINVITE;
+ change_t38_state(p, T38_LOCAL_REINVITE);
transmit_reinvite_with_sdp(p, TRUE, FALSE);
- ast_debug(2, "T38 state changed to %d on channel %s\n", p->t38.state, ast->name);
}
} else if (!ast_test_flag(&p->flags[0], SIP_PENDINGBYE)) {
ast_debug(3, "Deferring reinvite on SIP (%s) - it will be re-negotiated for T.38\n", ast->name);
@@ -6869,23 +6984,20 @@
p->t38.peercapability,
[... 4467 lines stripped ...]
More information about the asterisk-commits
mailing list