[svn-commits] murf: branch murf/bug7978 r48055 - in /team/murf/bug7978: ./ apps/ channels/ ...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Nov 27 11:10:15 MST 2006


Author: murf
Date: Mon Nov 27 12:10:14 2006
New Revision: 48055

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48055
Log:
Merged revisions 47801,47806,47813-47815,47817-47818,47821-47822,47824,47827,47829,47834-47836,47844,47846-47847,47851,47853-47854,47857,47861,47866,47880-47881,47893,47898,47912,47923,47933-47935,47945,47957,47960,47986,47995,47997,48001,48003-48004,48008-48014,48016,48018-48019,48032-48034,48039-48040,48048,48050 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r47801 | mattf | 2006-11-17 11:26:33 -0700 (Fri, 17 Nov 2006) | 3 lines

Add some sense of link state.  Don't make calls if link is down.  Only reset if we're bringing the 
link up for the first time.

................
r47806 | qwell | 2006-11-17 13:46:36 -0700 (Fri, 17 Nov 2006) | 4 lines

Add ability to add custom queue log via manager interface.

Issue 7806, patch by alexrch, with slight modifications by me.

................
r47813 | rizzo | 2006-11-17 14:50:55 -0700 (Fri, 17 Nov 2006) | 9 lines

describe a bit the patterns that you can have in the commands,
and add support for wildcard (spelled as '%').

On passing fix a bug in the expansion code which was hidden and
appeared when implementing the wildcard
The fix is just the line 'src != argindex', in case someone wants
to test this on 1.4 - but i would just keep this in trunk.


................
r47814 | qwell | 2006-11-17 14:51:42 -0700 (Fri, 17 Nov 2006) | 6 lines

Add ability to notify an external application/script that the voicemail password was,
while also still changing the password "internally".

Issue 7371, initial patch by pdunkel, with rewrite/config comments by me.
Additional modifications (yay bitmask) by pdunkel.

................
r47815 | rizzo | 2006-11-17 15:02:15 -0700 (Fri, 17 Nov 2006) | 3 lines

standardize "module show [like]"


................
r47817 | rizzo | 2006-11-17 15:53:57 -0700 (Fri, 17 Nov 2006) | 5 lines

convert "help" to new style,
fix completion of arguments past the first one
that i broke earlier today.


................
r47818 | rizzo | 2006-11-17 15:56:58 -0700 (Fri, 17 Nov 2006) | 3 lines

remove a debugging message


................
r47821 | murf | 2006-11-17 16:18:51 -0700 (Fri, 17 Nov 2006) | 1 line

This update fulfils the request of bug 7109, which claimed the language arg to ast_stream_and_wait() was redundant. Almost all calls just used chan->language, and seeing how chan is the first argument, this certainly seems redundant. A change of language could just as easily be done by simply changing the channel language before calling.
................
r47822 | rizzo | 2006-11-18 01:19:41 -0700 (Sat, 18 Nov 2006) | 15 lines

prevent the sound thread from consuming all the available CPU
doing busy-wait on the output audio device.
As it is set now, it tries to push a frame every 10ms,
which is still too frequent but avoids deep restructuring
of the code (which i should do, though).

Note, this is only for ring tones, regular audio coming
from the network is still delivered as soon as it is
available.

Eventually this could well end up in the 1.4 branch, but
since i am probably the only user of chan_oss there isn't
much urgency to do that.


................
r47824 | rizzo | 2006-11-18 11:03:42 -0700 (Sat, 18 Nov 2006) | 14 lines

Merged revisions 47823 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47823 | rizzo | 2006-11-18 18:59:35 +0100 (Sat, 18 Nov 2006) | 5 lines

fix bug 7450 - Parsing fails if From header contains angle brackets 
(the bug was only in a corner case where the < was right after the
opening quote, and the fix is trivial).


........


................
r47827 | rizzo | 2006-11-18 13:08:17 -0700 (Sat, 18 Nov 2006) | 11 lines

Move this macro from cli.c to cli.h so apps can use it
without duplicating the macro or the code:

/*!
 * In many cases we need to print singular or plural
 * words depending on a count. This macro helps us e.g.
 *     printf("we have %d object%s", n, ESS(n));
 */
#define ESS(x) ((x) == 1 ? "" : "s")


................
r47829 | rizzo | 2006-11-18 13:17:06 -0700 (Sat, 18 Nov 2006) | 5 lines

ESS-ification.

no need to bring this in 1.4, it is just code cleanup


................
r47834 | rizzo | 2006-11-18 15:14:20 -0700 (Sat, 18 Nov 2006) | 5 lines

comments-only change:
document a bit more when manager events are delivered
to the clients.


................
r47835 | murf | 2006-11-18 21:12:39 -0700 (Sat, 18 Nov 2006) | 1 line

Added a few words of explanation about macros
................
r47836 | murf | 2006-11-18 21:22:33 -0700 (Sat, 18 Nov 2006) | 1 line

Added a few words to explain the change to AEL concerning Gosub()
................
r47844 | oej | 2006-11-20 04:36:45 -0700 (Mon, 20 Nov 2006) | 2 lines

Properly reset schedule items (rizzo)

................
r47846 | oej | 2006-11-20 04:46:45 -0700 (Mon, 20 Nov 2006) | 2 lines

Update docs for videosupport

................
r47847 | murf | 2006-11-20 07:08:04 -0700 (Mon, 20 Nov 2006) | 1 line

Erased the svnmerge-integrated prop from trunk. Please, in your svnmerge-ings, don't let these props leak into the trunk or branches.
................
r47851 | file | 2006-11-20 08:55:58 -0700 (Mon, 20 Nov 2006) | 10 lines

Merged revisions 47850 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47850 | file | 2006-11-20 10:51:37 -0500 (Mon, 20 Nov 2006) | 2 lines

Use a separate variable in the channel structure to store the context that the channel was dialed from. (issue #8382 reported by jiddings)

........

................
r47853 | file | 2006-11-20 09:04:14 -0700 (Mon, 20 Nov 2006) | 10 lines

Merged revisions 47852 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47852 | file | 2006-11-20 10:58:50 -0500 (Mon, 20 Nov 2006) | 2 lines

Only remove/destroy the RTCP I/O item if it exists.

........

................
r47854 | file | 2006-11-20 09:06:10 -0700 (Mon, 20 Nov 2006) | 2 lines

Use RTP/RTCP fds on the RTP structure, don't bother storing them.

................
r47857 | file | 2006-11-20 09:19:13 -0700 (Mon, 20 Nov 2006) | 16 lines

Blocked revisions 47856 via svnmerge

................
r47856 | file | 2006-11-20 11:17:47 -0500 (Mon, 20 Nov 2006) | 9 lines

Blocked revisions 47855 via svnmerge

........
r47855 | file | 2006-11-20 11:16:22 -0500 (Mon, 20 Nov 2006) | 2 lines

Free history items at the end of use of the temporary SIP pvt structure. (issue #8383 reported by benh)

........

................

................
r47861 | file | 2006-11-20 12:52:38 -0700 (Mon, 20 Nov 2006) | 18 lines

Merged revisions 47860 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47860 | file | 2006-11-20 14:51:36 -0500 (Mon, 20 Nov 2006) | 10 lines

Merged revisions 47859 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47859 | file | 2006-11-20 14:50:21 -0500 (Mon, 20 Nov 2006) | 2 lines

Don't forget to byte swap if we are exiting the smoother feed early. (issue #8287 reported by arturs)

........

................

................
r47866 | tilghman | 2006-11-20 13:04:11 -0700 (Mon, 20 Nov 2006) | 11 lines

Merged revisions 47864-47865 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47864 | tilghman | 2006-11-20 14:01:58 -0600 (Mon, 20 Nov 2006) | 2 lines

Oops, merge missed release of odbc object

........
........

................
r47880 | rizzo | 2006-11-21 04:07:30 -0700 (Tue, 21 Nov 2006) | 8 lines

do not ast_hangup() on a NULL channel.
In the original code this would happen in the case of
	o->forwards >=  AST_MAX_FORWARDS

Likely an 1.2/1.4 isse as well - please someone have a look,
while I am hunting a few more similar panics now.


................
r47881 | rizzo | 2006-11-21 04:53:06 -0700 (Tue, 21 Nov 2006) | 10 lines

better fix for the previous bug.

In general this code needs a deep revision, because the body of
do_forward() deletes/overwrites the output channel without freeing
the resouce in some cases, and without notifying the caller.

Also, on FreeBSD with MALLOC_OPTIONS set i am seeing various panics
(duplicate freee etc.)


................
r47893 | oej | 2006-11-21 08:25:38 -0700 (Tue, 21 Nov 2006) | 2 lines

Treat 101 as 100, not 183 session progress

................
r47898 | file | 2006-11-21 10:34:22 -0700 (Tue, 21 Nov 2006) | 10 lines

Merged revisions 47897 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47897 | file | 2006-11-21 12:32:27 -0500 (Tue, 21 Nov 2006) | 2 lines

If we have the non standard G726-32 setting turned on we want to return G726-32 to the SDP, not our AAL2 string. (issue #8330 reported by voipgate)

........

................
r47912 | markster | 2006-11-21 22:49:06 -0700 (Tue, 21 Nov 2006) | 2 lines

Restore some sense of security to manager

................
r47923 | oej | 2006-11-22 04:28:12 -0700 (Wed, 22 Nov 2006) | 2 lines

Don't over-deprecate... :-)

................
r47933 | file | 2006-11-22 10:41:07 -0700 (Wed, 22 Nov 2006) | 2 lines

Add support to set the maximum number of files open when Asterisk loads using the 'maxfiles' configuration option. (issue #7499 reported by rkarlsba)

................
r47934 | file | 2006-11-22 10:43:36 -0700 (Wed, 22 Nov 2006) | 2 lines

Need to update the CHANGES file as well for the maxfiles option.

................
r47935 | file | 2006-11-22 10:47:14 -0700 (Wed, 22 Nov 2006) | 2 lines

Clarify a bit more.

................
r47945 | file | 2006-11-22 14:49:11 -0700 (Wed, 22 Nov 2006) | 10 lines

Merged revisions 47944 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47944 | file | 2006-11-22 16:47:43 -0500 (Wed, 22 Nov 2006) | 2 lines

Video will never reach Packet2Packet bridging and can do more harm then good.

........

................
r47957 | oej | 2006-11-23 03:46:09 -0700 (Thu, 23 Nov 2006) | 2 lines

Document new configuration option.

................
r47960 | oej | 2006-11-23 04:04:25 -0700 (Thu, 23 Nov 2006) | 2 lines

Remove unused memory allocation

................
r47986 | oej | 2006-11-24 07:00:19 -0700 (Fri, 24 Nov 2006) | 6 lines

Doxygen update
- Document cause codes
- Document a bit more on channel variables - global, predefined and local
- Fix some doxygen in channel.h. Adding one comment for two definitions does not
  work. They won't be copied to each.

................
r47995 | murf | 2006-11-24 10:40:49 -0700 (Fri, 24 Nov 2006) | 1 line

This fix inspired by a patch supplied in bug 8189, which points out problems with the PLC code
................
r47997 | murf | 2006-11-24 11:17:25 -0700 (Fri, 24 Nov 2006) | 1 line

removed the svnmerge-integrated property from trunk; it's confusing svnmerge in newly created branches
................
r48001 | rizzo | 2006-11-25 02:02:42 -0700 (Sat, 25 Nov 2006) | 5 lines

set pointers to NULL after freeing memory to avoid multiple free()

probably 1.4/1.2 issue as well if someone can look into that.


................
r48003 | oej | 2006-11-25 02:45:57 -0700 (Sat, 25 Nov 2006) | 9 lines

- Adding comment on suspicious memory allocation. Seems like it's never freed, but I don't
  have a clear understanding of the frame allocation/deallocation, so I just mark this
  for investigation. (Reported by Ed Guy). We're trying to see if a free() hurts...

- Doxygen comments on p2p rtp bridge stuff.  I am a bit worried about shortcutting
  rtcp this way, but will need feedback from rtcp gurus. This should work for 
  video calls too, and possibly UDPTL.


................
r48004 | oej | 2006-11-25 02:48:30 -0700 (Sat, 25 Nov 2006) | 2 lines

Changing ERROR to lesser level. Imported from 1.2/1.4

................
r48008 | rizzo | 2006-11-25 10:37:04 -0700 (Sat, 25 Nov 2006) | 7 lines

generalize a bit the functions used to create an tcp socket
and then run a service on it.
The code in manager.c does essentially the same things,
so we will be able to reuse the code in here (probably
moving it to netsock.c or another appropriate library file).


................
r48009 | mattf | 2006-11-25 13:30:04 -0700 (Sat, 25 Nov 2006) | 1 line

Updates to show linkset command
................
r48010 | mattf | 2006-11-25 13:54:38 -0700 (Sat, 25 Nov 2006) | 2 lines

Add ss7 show linkset command

................
r48011 | mattf | 2006-11-25 14:32:33 -0700 (Sat, 25 Nov 2006) | 1 line

Make sure we don't send a group reset on a group larger than 32 CICs
................
r48012 | mattf | 2006-11-25 14:35:23 -0700 (Sat, 25 Nov 2006) | 1 line

bug fix
................
r48013 | mattf | 2006-11-25 14:46:58 -0700 (Sat, 25 Nov 2006) | 1 line

Make compiler happier
................
r48014 | mattf | 2006-11-25 14:50:42 -0700 (Sat, 25 Nov 2006) | 1 line

Little fix so we use the right message
................
r48016 | murf | 2006-11-25 17:15:42 -0700 (Sat, 25 Nov 2006) | 9 lines

Merged revisions 48015 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48015 | murf | 2006-11-25 17:01:34 -0700 (Sat, 25 Nov 2006) | 1 line

A little bit of func_cdr documentation upgrade-- no bug# involved, although 8221 may have inspired it.
........

................
r48018 | murf | 2006-11-25 17:31:13 -0700 (Sat, 25 Nov 2006) | 9 lines

Merged revisions 48017 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48017 | murf | 2006-11-25 17:26:16 -0700 (Sat, 25 Nov 2006) | 1 line

might as well also document the raw values of the flag vars
........

................
r48019 | russell | 2006-11-25 23:55:33 -0700 (Sat, 25 Nov 2006) | 6 lines

- Add some comments on thread storage with a brief explanation of what it is
  as well as what the motivation is for using it.
- Add a comment by the declaration of ast_inet_ntoa() noting that this function
  is not reentrant, and the result of a previous call to the function is no
  longer valid after calling it again.

................
r48032 | oej | 2006-11-26 23:44:40 -0700 (Sun, 26 Nov 2006) | 2 lines

Change error message (imported from 1.4)

................
r48033 | oej | 2006-11-26 23:59:20 -0700 (Sun, 26 Nov 2006) | 2 lines

Doxygen updates

................
r48034 | rizzo | 2006-11-27 07:47:15 -0700 (Mon, 27 Nov 2006) | 5 lines

remove an extra comma in an initializer

Detected by: AST_DEVMODE=yes


................
r48039 | file | 2006-11-27 08:33:56 -0700 (Mon, 27 Nov 2006) | 18 lines

Merged revisions 48038 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48038 | file | 2006-11-27 10:32:19 -0500 (Mon, 27 Nov 2006) | 10 lines

Merged revisions 48037 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48037 | file | 2006-11-27 10:30:37 -0500 (Mon, 27 Nov 2006) | 2 lines

Do not reference the freed outgoing structure in the debug message. (issue #8425 reported by arkadia)

........

................

................
r48040 | file | 2006-11-27 08:48:57 -0700 (Mon, 27 Nov 2006) | 2 lines

More fixes for referencing a structure after it has been freed. (issue #8425 reported by arkadia)

................
r48048 | russell | 2006-11-27 10:19:47 -0700 (Mon, 27 Nov 2006) | 9 lines

Blocked revisions 48046 via svnmerge

........
r48046 | russell | 2006-11-27 12:17:40 -0500 (Mon, 27 Nov 2006) | 2 lines

Remove a couple of unused variables (issue #8380, casper)

........

................
r48050 | tilghman | 2006-11-27 10:31:56 -0700 (Mon, 27 Nov 2006) | 18 lines

Merged revisions 48049 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48049 | tilghman | 2006-11-27 11:20:37 -0600 (Mon, 27 Nov 2006) | 10 lines

Merged revisions 48045 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48045 | tilghman | 2006-11-27 11:15:54 -0600 (Mon, 27 Nov 2006) | 2 lines

Random MOH wasn't really random (bug 8381)

........

................

................

Modified:
    team/murf/bug7978/   (props changed)
    team/murf/bug7978/.cleancount
    team/murf/bug7978/CHANGES
    team/murf/bug7978/UPGRADE.txt
    team/murf/bug7978/apps/app_dial.c
    team/murf/bug7978/apps/app_directed_pickup.c
    team/murf/bug7978/apps/app_directory.c
    team/murf/bug7978/apps/app_followme.c
    team/murf/bug7978/apps/app_queue.c
    team/murf/bug7978/apps/app_voicemail.c
    team/murf/bug7978/channels/chan_h323.c
    team/murf/bug7978/channels/chan_oss.c
    team/murf/bug7978/channels/chan_sip.c
    team/murf/bug7978/channels/chan_zap.c
    team/murf/bug7978/configs/sip.conf.sample
    team/murf/bug7978/configs/voicemail.conf.sample
    team/murf/bug7978/doc/ael.txt
    team/murf/bug7978/doc/asterisk-conf.txt
    team/murf/bug7978/funcs/func_cdr.c
    team/murf/bug7978/include/asterisk/causes.h
    team/murf/bug7978/include/asterisk/channel.h
    team/murf/bug7978/include/asterisk/cli.h
    team/murf/bug7978/include/asterisk/doxyref.h
    team/murf/bug7978/include/asterisk/file.h
    team/murf/bug7978/include/asterisk/threadstorage.h
    team/murf/bug7978/include/asterisk/utils.h
    team/murf/bug7978/main/app.c
    team/murf/bug7978/main/asterisk.c
    team/murf/bug7978/main/cdr.c
    team/murf/bug7978/main/channel.c
    team/murf/bug7978/main/cli.c
    team/murf/bug7978/main/file.c
    team/murf/bug7978/main/frame.c
    team/murf/bug7978/main/http.c
    team/murf/bug7978/main/manager.c
    team/murf/bug7978/main/pbx.c
    team/murf/bug7978/main/rtp.c
    team/murf/bug7978/main/translate.c
    team/murf/bug7978/pbx/pbx_spool.c
    team/murf/bug7978/res/res_features.c
    team/murf/bug7978/res/res_musiconhold.c
    team/murf/bug7978/res/res_realtime.c

Propchange: team/murf/bug7978/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/murf/bug7978/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug7978/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov 27 12:10:14 2006
@@ -1,1 +1,1 @@
-/trunk:1-47796
+/trunk:1-48052

Modified: team/murf/bug7978/.cleancount
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/.cleancount?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/.cleancount (original)
+++ team/murf/bug7978/.cleancount Mon Nov 27 12:10:14 2006
@@ -1,1 +1,1 @@
-25
+26

Modified: team/murf/bug7978/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/CHANGES?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/CHANGES (original)
+++ team/murf/bug7978/CHANGES Mon Nov 27 12:10:14 2006
@@ -61,3 +61,5 @@
   * CID matching information is now shown when doing 'dialplan show'.
   * app_queue now has a 'loose' option which is almost exactly like 'strict' except it
      does not count paused queue members as unavailable.
+  * Added maxfiles option to options section of asterisk.conf which allows you to specify
+     what Asterisk should set as the maximum number of open files when it loads.

Modified: team/murf/bug7978/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/UPGRADE.txt?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/UPGRADE.txt (original)
+++ team/murf/bug7978/UPGRADE.txt Mon Nov 27 12:10:14 2006
@@ -6,3 +6,14 @@
 * The CallerID fields across Manager events have now been made more
   consistent. CallerID Number will be sent as CallerIDNum and CallerID
   Name will be sent as CallerIDName wherever used.
+
+AEL:
+
+* Macros are now implemented underneath with the Gosub() application.
+  Heaven Help You if you wrote code depending on any aspect of this!
+  Previous to 1.6, macros were implemented with the Macro() app, which
+  provided a nice feature of auto-returning. The compiler will do its
+  best to insert a Return() app call at the end of your macro if you did
+  not include it, but really, you should make sure that all execution
+  paths within your macros end in "return;".
+

Modified: team/murf/bug7978/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/apps/app_dial.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/apps/app_dial.c (original)
+++ team/murf/bug7978/apps/app_dial.c Mon Nov 27 12:10:14 2006
@@ -419,7 +419,12 @@
 					src->name, dialstatus);
 }	
 
-/* helper function for wait_for_answer() */
+/*!
+ * helper function for wait_for_answer()
+ *
+ * XXX this code is highly suspicious, as it essentially overwrites
+ * the outgoing channel without properly deleting it.
+ */
 static void do_forward(struct dial_localuser *o,
 	struct cause_args *num, struct ast_flags *peerflags, int single)
 {
@@ -504,10 +509,10 @@
 				char cidname[AST_MAX_EXTENSION];
 				ast_set_callerid(c, S_OR(in->macroexten, in->exten), get_cid_name(cidname, sizeof(cidname), in), NULL);
 			}
-		}
-	}
-	/* Hangup the original channel now, in case we needed it */
-	ast_hangup(c);
+			/* Hangup the original channel now, in case we needed it */
+			ast_hangup(c);
+		}
+	}
 }
 
 /* argument used for some functions. */
@@ -590,7 +595,7 @@
 						       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 						       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 						       DIAL_NOFORWARDHTML);
-					ast_copy_string(c->context, "", sizeof(c->context));
+					ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
 					ast_copy_string(c->exten, "", sizeof(c->exten));
 				}
 				continue;
@@ -625,7 +630,7 @@
 							       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 							       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 							       DIAL_NOFORWARDHTML);
-						ast_copy_string(c->context, "", sizeof(c->context));
+						ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
 						ast_copy_string(c->exten, "", sizeof(c->exten));
 						/* Setup early bridge if appropriate */
 						ast_channel_early_bridge(in, peer);
@@ -1369,7 +1374,7 @@
 			ast_app_group_set_channel(tmp->chan, outbound_group);
 
 		/* Inherit context and extension */
-		ast_copy_string(tmp->chan->context, chan->context, sizeof(tmp->chan->context));
+		ast_copy_string(tmp->chan->dialcontext, chan->context, sizeof(tmp->chan->dialcontext));
 		ast_copy_string(tmp->chan->exten, chan->exten, sizeof(tmp->chan->exten));
 
 		/* Place the call, but don't wait on the answer */

Modified: team/murf/bug7978/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/apps/app_directed_pickup.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/apps/app_directed_pickup.c (original)
+++ team/murf/bug7978/apps/app_directed_pickup.c Mon Nov 27 12:10:14 2006
@@ -97,7 +97,7 @@
 
 	while ((target = ast_channel_walk_locked(target))) {
 		if (!strcasecmp(target->exten, exten) &&
-		    !strcasecmp(target->context, context) &&
+		    !strcasecmp(target->dialcontext, context) &&
 		    can_pickup(target)) {
 			res = pickup_do(chan, target);
 			ast_channel_unlock(target);

Modified: team/murf/bug7978/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/apps/app_directory.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/apps/app_directory.c (original)
+++ team/murf/bug7978/apps/app_directory.c Mon Nov 27 12:10:14 2006
@@ -282,17 +282,17 @@
 #endif
 
 	if (ast_fileexists(fn, NULL, chan->language) > 0) {
-		res = ast_stream_and_wait(chan, fn, chan->language, AST_DIGIT_ANY);
+		res = ast_stream_and_wait(chan, fn, AST_DIGIT_ANY);
 		ast_stopstream(chan);
 		/* If Option 'e' was specified, also read the extension number with the name */
 		if (readext) {
-			ast_stream_and_wait(chan, "vm-extension", chan->language, AST_DIGIT_ANY);
+			ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY);
 			res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language);
 		}
 	} else {
 		res = ast_say_character_str(chan, S_OR(name, ext), AST_DIGIT_ANY, chan->language);
 		if (!ast_strlen_zero(name) && readext) {
-			ast_stream_and_wait(chan, "vm-extension", chan->language, AST_DIGIT_ANY);
+			ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY);
 			res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language);
 		}
 	}
@@ -303,7 +303,7 @@
 
 	for (loop = 3 ; loop > 0; loop--) {
 		if (!res)
-			res = ast_stream_and_wait(chan, "dir-instr", chan->language, AST_DIGIT_ANY);
+			res = ast_stream_and_wait(chan, "dir-instr", AST_DIGIT_ANY);
 		if (!res)
 			res = ast_waitfordigit(chan, 3000);
 		ast_stopstream(chan);
@@ -622,7 +622,7 @@
 
 	for (;;) {
 		if (!res)
-			res = ast_stream_and_wait(chan, dirintro, chan->language, AST_DIGIT_ANY);
+			res = ast_stream_and_wait(chan, dirintro, AST_DIGIT_ANY);
 		ast_stopstream(chan);
 		if (!res)
 			res = ast_waitfordigit(chan, 5000);

Modified: team/murf/bug7978/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/apps/app_followme.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/apps/app_followme.c (original)
+++ team/murf/bug7978/apps/app_followme.c Mon Nov 27 12:10:14 2006
@@ -982,7 +982,7 @@
 		ast_mutex_unlock(&f->lock);
 
 		if (targs.followmeflags.flags & FOLLOWMEFLAG_STATUSMSG) 
-			ast_stream_and_wait(chan, targs.statusprompt, chan->language, "");
+			ast_stream_and_wait(chan, targs.statusprompt, "");
 
 		snprintf(namerecloc,sizeof(namerecloc),"%s/followme.%s",ast_config_AST_SPOOL_DIR,chan->uniqueid);
 		duration = 5;
@@ -1022,7 +1022,7 @@
 		if (targs.status != 100) {
 			ast_moh_stop(chan);
 			if (targs.followmeflags.flags & FOLLOWMEFLAG_UNREACHABLEMSG) 
-				ast_stream_and_wait(chan, targs.sorryprompt, chan->language, "");
+				ast_stream_and_wait(chan, targs.sorryprompt, "");
 			res = 0;
 		} else {
 			caller = chan;

Modified: team/murf/bug7978/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/apps/app_queue.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/apps/app_queue.c (original)
+++ team/murf/bug7978/apps/app_queue.c Mon Nov 27 12:10:14 2006
@@ -4461,6 +4461,27 @@
 	return 0;
 }
 
+static int manager_queue_log_custom(struct mansession *s, struct message *m)
+{
+	char *queuename, *event, *message, *interface, *uniqueid;
+
+	queuename = astman_get_header(m, "Queue");
+	uniqueid = astman_get_header(m, "UniqueId");
+	interface = astman_get_header(m, "Interface");
+	event = astman_get_header(m, "Event");
+	message = astman_get_header(m, "Message");
+
+	if (ast_strlen_zero(queuename) || ast_strlen_zero(event)) {
+		astman_send_error(s, m, "Need 'Queue' and 'Event' parameters.");
+		return 0;
+	}
+
+	ast_queue_log(queuename, S_OR(uniqueid, "NONE"), interface, event, "%s", message);
+	astman_send_ack(s, m, "Event added successfully");
+
+	return 0;
+}
+
 static int handle_queue_add_member(int fd, int argc, char *argv[])
 {
 	char *queuename, *interface, *membername;
@@ -4648,6 +4669,7 @@
 	res |= ast_manager_unregister("QueueAdd");
 	res |= ast_manager_unregister("QueueRemove");
 	res |= ast_manager_unregister("QueuePause");
+	res |= ast_manager_unregister("QueueLog");
 	res |= ast_unregister_application(app_aqm);
 	res |= ast_unregister_application(app_rqm);
 	res |= ast_unregister_application(app_pqm);
@@ -4686,6 +4708,7 @@
 	res |= ast_manager_register("QueueAdd", EVENT_FLAG_AGENT, manager_add_queue_member, "Add interface to queue.");
 	res |= ast_manager_register("QueueRemove", EVENT_FLAG_AGENT, manager_remove_queue_member, "Remove interface from queue.");
 	res |= ast_manager_register("QueuePause", EVENT_FLAG_AGENT, manager_pause_queue_member, "Makes a queue member temporarily unavailable");
+	res |= ast_manager_register("QueueLog", EVENT_FLAG_AGENT, manager_queue_log_custom, "Adds custom entry in queue_log");
 	res |= ast_custom_function_register(&queuevar_function);
 	res |= ast_custom_function_register(&queuemembercount_function);
 	res |= ast_custom_function_register(&queuememberlist_function);

Modified: team/murf/bug7978/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/apps/app_voicemail.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/apps/app_voicemail.c (original)
+++ team/murf/bug7978/apps/app_voicemail.c Mon Nov 27 12:10:14 2006
@@ -401,6 +401,10 @@
 static char VM_SPOOL_DIR[PATH_MAX];
 
 static char ext_pass_cmd[128];
+
+#define PWDCHANGE_INTERNAL (1 << 1)
+#define PWDCHANGE_EXTERNAL (1 << 2)
+static int pwdchange = PWDCHANGE_INTERNAL;
 
 #if ODBC_STORAGE
 #define tdesc "Comedian Mail (Voicemail System) with ODBC Storage"
@@ -1105,8 +1109,14 @@
 						fd = -1;
 						continue;
 					}
-					if (fd > -1)
-						fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+					if (fd > -1) {
+						if ((fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == -1) {
+							ast_log(LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
+							SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+							ast_odbc_release_obj(obj);
+							goto yuck;
+						}
+					}
 				}
 				if (fdm) {
 					memset(fdm, 0, fdlen);
@@ -2143,7 +2153,7 @@
 	snprintf(fn, sizeof(fn), "%s%s/%s/greet", VM_SPOOL_DIR, context, ext);
 	RETRIEVE(fn, -1);
 	if (ast_fileexists(fn, NULL, NULL) > 0) {
-		res = ast_stream_and_wait(chan, fn, chan->language, ecodes);
+		res = ast_stream_and_wait(chan, fn, ecodes);
 		if (res) {
 			DISPOSE(fn, -1);
 			return res;
@@ -2151,14 +2161,14 @@
 	} else {
 		/* Dispose just in case */
 		DISPOSE(fn, -1);
-		res = ast_stream_and_wait(chan, "vm-theperson", chan->language, ecodes);
+		res = ast_stream_and_wait(chan, "vm-theperson", ecodes);
 		if (res)
 			return res;
 		res = ast_say_digit_str(chan, ext, ecodes, chan->language);
 		if (res)
 			return res;
 	}
-	res = ast_stream_and_wait(chan, busy ? "vm-isonphone" : "vm-isunavail", chan->language, ecodes);
+	res = ast_stream_and_wait(chan, busy ? "vm-isonphone" : "vm-isunavail", ecodes);
 	return res;
 }
 
@@ -2925,7 +2935,7 @@
 		res = 0;
 	}
 	if (!res && !ast_test_flag(options, OPT_SILENT)) {
-		res = ast_stream_and_wait(chan, INTRO, chan->language, ecodes);
+		res = ast_stream_and_wait(chan, INTRO, ecodes);
 		if (res == '#') {
 			ast_set_flag(options, OPT_SILENT);
 			res = 0;
@@ -3039,7 +3049,7 @@
 		/* Now play the beep once we have the message number for our next message. */
 		if (res >= 0) {
 			/* Unless we're *really* silent, try to send the beep */
-			res = ast_stream_and_wait(chan, "beep", chan->language, "");
+			res = ast_stream_and_wait(chan, "beep", "");
 		}
 				
 		/* Store information */
@@ -4152,7 +4162,7 @@
 static int wait_file2(struct ast_channel *chan, struct vm_state *vms, char *file)
 {
 	int res;
-	if ((res = ast_stream_and_wait(chan, file, chan->language, AST_DIGIT_ANY)) < 0) 
+	if ((res = ast_stream_and_wait(chan, file, AST_DIGIT_ANY)) < 0) 
 		ast_log(LOG_WARNING, "Unable to play message %s\n", file); 
 	return res;
 }
@@ -4283,7 +4293,7 @@
 							ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: CID number '%s' matches mailbox number, playing recorded name\n", callerid);
 						if (!callback)
 							res = wait_file2(chan, vms, "vm-from");
-						res = ast_stream_and_wait(chan, prefile, chan->language, "");
+						res = ast_stream_and_wait(chan, prefile, "");
 					} else {
 						if (option_verbose > 2)
 							ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: message from '%s'\n", callerid);
@@ -5741,10 +5751,11 @@
 		if (++tries == 3)
 			return -1;
 	}
-	if (ast_strlen_zero(ext_pass_cmd)) 
-		vm_change_password(vmu,newpassword);
-	else 
-		vm_change_password_shell(vmu,newpassword);
+	if (pwdchange & PWDCHANGE_INTERNAL)
+		vm_change_password(vmu, newpassword);
+	if ((pwdchange & PWDCHANGE_EXTERNAL) && !ast_strlen_zero(ext_pass_cmd))
+		vm_change_password_shell(vmu, newpassword);
+
 	if (option_debug)
 		ast_log(LOG_DEBUG,"User %s set password to %s of length %d\n",vms->username,newpassword,(int)strlen(newpassword));
 	cmd = ast_play_and_wait(chan, vm_passchanged);
@@ -5844,10 +5855,11 @@
 				cmd = ast_play_and_wait(chan, vm_mismatch);
 				break;
 			}
-			if (ast_strlen_zero(ext_pass_cmd)) 
-				vm_change_password(vmu,newpassword);
-			else 
-				vm_change_password_shell(vmu,newpassword);
+			if (pwdchange & PWDCHANGE_INTERNAL)
+				vm_change_password(vmu, newpassword);
+			if ((pwdchange & PWDCHANGE_EXTERNAL) && !ast_strlen_zero(ext_pass_cmd))
+				vm_change_password_shell(vmu, newpassword);
+
 			if (option_debug)
 				ast_log(LOG_DEBUG,"User %s set password to %s of length %d\n",vms->username,newpassword,(int)strlen(newpassword));
 			cmd = ast_play_and_wait(chan, vm_passchanged);
@@ -7176,7 +7188,12 @@
 		/* External password changing command */
 		if ((extpc = ast_variable_retrieve(cfg, "general", "externpass"))) {
 			ast_copy_string(ext_pass_cmd,extpc,sizeof(ext_pass_cmd));
-		}
+			pwdchange = PWDCHANGE_EXTERNAL;
+		} else if ((extpc = ast_variable_retrieve(cfg, "general", "externpassnotify"))) {
+			ast_copy_string(ext_pass_cmd,extpc,sizeof(ext_pass_cmd));
+			pwdchange = PWDCHANGE_EXTERNAL | PWDCHANGE_INTERNAL;
+		}
+
 #ifdef IMAP_STORAGE
 		/* IMAP server address */
 		if ((imap_server = ast_variable_retrieve(cfg, "general", "imapserver"))) {
@@ -7994,7 +8011,7 @@
 				/* Otherwise 1 is to save the existing message */
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
-				ast_stream_and_wait(chan, "vm-msgsaved", chan->language, "");
+				ast_stream_and_wait(chan, "vm-msgsaved", "");
 				cmd = 't';
 				return res;
 			}
@@ -8002,7 +8019,7 @@
 			/* Review */
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Reviewing the message\n");
-			cmd = ast_stream_and_wait(chan, recordfile, chan->language, AST_DIGIT_ANY);
+			cmd = ast_stream_and_wait(chan, recordfile, AST_DIGIT_ANY);
 			break;
 		case '3':
 			message_exists = 0;

Modified: team/murf/bug7978/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/channels/chan_h323.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/channels/chan_h323.c (original)
+++ team/murf/bug7978/channels/chan_h323.c Mon Nov 27 12:10:14 2006
@@ -2754,21 +2754,6 @@
 	h323_tokens_show, "Show all active call tokens",
 	show_tokens_usage };
 
-static struct ast_cli_entry cli_h323_debug_deprecated = {
-	{ "h.323", "debug", NULL },
-	h323_do_debug, "Enable H.323 debug",
-	debug_usage };
-
-static struct ast_cli_entry cli_h323_trace_deprecated = {
-	{ "h.323", "trace", NULL },
-	h323_do_trace, "Enable H.323 Stack Tracing",
-	trace_usage };
-
-static struct ast_cli_entry cli_h323_gk_cycle_deprecated = {
-	{ "h323", "cycle", "gk", NULL },
-	h323_gk_cycle, "Manually re-register with the Gatekeper",
-	show_cycle_usage };
-
 static struct ast_cli_entry cli_h323[] = {
 	{ { "h323", "set", "trace", NULL },
 	h323_do_trace, "Enable H.323 Stack Tracing",

Modified: team/murf/bug7978/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/channels/chan_oss.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/channels/chan_oss.c (original)
+++ team/murf/bug7978/channels/chan_oss.c Mon Nov 27 12:10:14 2006
@@ -530,7 +530,7 @@
 		return 0;
 	}
 	o->w_errors = 0;
-	return write(o->sounddev, ((void *) data), FRAME_SIZE * 2);
+	return write(o->sounddev, (void *)data, FRAME_SIZE * 2);
 }
 
 /*
@@ -559,10 +559,8 @@
 		l = s->samplen - l_sampsent;	/* # of available samples */
 		if (l > 0) {
 			start = l_sampsent % s->datalen;	/* source offset */
-			if (l > FRAME_SIZE - ofs)	/* don't overflow the frame */
-				l = FRAME_SIZE - ofs;
-			if (l > s->datalen - start)	/* don't overflow the source */
-				l = s->datalen - start;
+			l = MIN(l, FRAME_SIZE - ofs);	/* don't overflow the frame */
+			l = MIN(l, s->datalen - start);	/* don't overflow the source */
 			bcopy(s->data + start, myframe + ofs, l * 2);
 			if (0)
 				ast_log(LOG_WARNING, "send_sound sound %d/%d of %d into %d\n", l_sampsent, l, s->samplen, ofs);
@@ -572,8 +570,7 @@
 
 			l += s->silencelen;
 			if (l > 0) {
-				if (l > FRAME_SIZE - ofs)
-					l = FRAME_SIZE - ofs;
+				l = MIN(l, FRAME_SIZE - ofs);
 				bcopy(silence, myframe + ofs, l * 2);
 				l_sampsent += l;
 			} else {			/* silence is over, restart sound if loop */
@@ -605,6 +602,7 @@
 	for (;;) {
 		fd_set rfds, wfds;
 		int maxfd, res;
+		struct timeval *to = NULL, t;
 
 		FD_ZERO(&rfds);
 		FD_ZERO(&wfds);
@@ -620,13 +618,19 @@
 				maxfd = MAX(o->sounddev, maxfd);
 			}
 			if (o->cursound > -1) {
-				FD_SET(o->sounddev, &wfds);
-				maxfd = MAX(o->sounddev, maxfd);
+				/*
+				 * We would like to use select here, but the device
+				 * is always writable, so this would become busy wait.
+				 * So we rather set a timeout to 1/2 of the frame size.
+				 */
+				t.tv_sec = 0;
+				t.tv_usec = (1000000 * FRAME_SIZE) / (5 * DEFAULT_SAMPLE_RATE);
+				to = &t;
 			}
 		}
 		/* ast_select emulates linux behaviour in terms of timeout handling */
-		res = ast_select(maxfd + 1, &rfds, &wfds, NULL, NULL);
-		if (res < 1) {
+		res = ast_select(maxfd + 1, &rfds, &wfds, NULL, to);
+		if (res < 0) {
 			ast_log(LOG_WARNING, "select failed: %s\n", strerror(errno));
 			sleep(1);
 			continue;
@@ -650,7 +654,7 @@
 		if (o->sounddev > -1) {
 			if (FD_ISSET(o->sounddev, &rfds))	/* read and ignore errors */
 				read(o->sounddev, ign, sizeof(ign));
-			if (FD_ISSET(o->sounddev, &wfds))
+			if (to != NULL)			/* maybe it is possible to write */
 				send_sound(o);
 		}
 	}

Modified: team/murf/bug7978/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7978/channels/chan_sip.c?view=diff&rev=48055&r1=48054&r2=48055
==============================================================================
--- team/murf/bug7978/channels/chan_sip.c (original)
+++ team/murf/bug7978/channels/chan_sip.c Mon Nov 27 12:10:14 2006
@@ -558,7 +558,7 @@
 static int allow_external_domains;	/*!< Accept calls to external SIP domains? */
 static int global_callevents;		/*!< Whether we send manager events or not */
 static int global_t1min;		/*!< T1 roundtrip time minimum */
-static int global_autoframing;          /*!< ?????????? */
+static int global_autoframing;          /*!< Turn autoframing on or off. */
 static enum transfermodes global_allowtransfer;	/*!< SIP Refer restriction scheme */
 
 /*! \brief Codecs that we support by default: */
@@ -2095,6 +2095,7 @@
 				if (sipdebug && option_debug > 3)
 					ast_log(LOG_DEBUG, "** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #%d\n", cur->retransid);
 				ast_sched_del(sched, cur->retransid);
+				cur->retransid = -1;
 			}
 			UNLINK(cur, p->packets, prev);
 			free(cur);
@@ -2139,8 +2140,8 @@
 				if (option_debug > 3 && sipdebug)
 					ast_log(LOG_DEBUG, "*** SIP TIMER: Cancelling retransmission #%d - %s (got response)\n", cur->retransid, sip_methods[sipmethod].text);
 				ast_sched_del(sched, cur->retransid);
+				cur->retransid = -1;
 			}
-			cur->retransid = -1;
 			res = 0;
 			break;
 		}
@@ -2458,6 +2459,7 @@
 	}
 	if (peer->expire > -1)
 		ast_sched_del(sched, peer->expire);
+
 	if (peer->pokeexpire > -1)

[... 1945 lines stripped ...]


More information about the svn-commits mailing list