[asterisk-commits] murf: branch murf/bug7109 r48043 - in /team/murf/bug7109: ./ apps/ channels/ ...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 27 09:46:44 MST 2006


Author: murf
Date: Mon Nov 27 10:46:43 2006
New Revision: 48043

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48043
Log:
Merged revisions 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 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
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)

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

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

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

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

Propchange: team/murf/bug7109/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Nov 27 10:46:43 2006
@@ -1,1 +1,1 @@
-/trunk:1-47819
+/trunk:1-48042

Modified: team/murf/bug7109/.cleancount
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/.cleancount?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/.cleancount (original)
+++ team/murf/bug7109/.cleancount Mon Nov 27 10:46:43 2006
@@ -1,1 +1,1 @@
-25
+26

Modified: team/murf/bug7109/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/CHANGES?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/CHANGES (original)
+++ team/murf/bug7109/CHANGES Mon Nov 27 10:46:43 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/bug7109/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/UPGRADE.txt?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/UPGRADE.txt (original)
+++ team/murf/bug7109/UPGRADE.txt Mon Nov 27 10:46:43 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/bug7109/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/apps/app_dial.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/apps/app_dial.c (original)
+++ team/murf/bug7109/apps/app_dial.c Mon Nov 27 10:46:43 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/bug7109/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/apps/app_directed_pickup.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/apps/app_directed_pickup.c (original)
+++ team/murf/bug7109/apps/app_directed_pickup.c Mon Nov 27 10:46:43 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/bug7109/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/apps/app_voicemail.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/apps/app_voicemail.c (original)
+++ team/murf/bug7109/apps/app_voicemail.c Mon Nov 27 10:46:43 2006
@@ -1109,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);

Modified: team/murf/bug7109/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/channels/chan_h323.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/channels/chan_h323.c (original)
+++ team/murf/bug7109/channels/chan_h323.c Mon Nov 27 10:46:43 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/bug7109/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/channels/chan_oss.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/channels/chan_oss.c (original)
+++ team/murf/bug7109/channels/chan_oss.c Mon Nov 27 10:46:43 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/bug7109/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/channels/chan_sip.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/channels/chan_sip.c (original)
+++ team/murf/bug7109/channels/chan_sip.c Mon Nov 27 10:46:43 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)
 		ast_sched_del(sched, peer->pokeexpire);
 	register_peer_exten(peer, FALSE);
@@ -7818,8 +7820,10 @@
 	else
 		peer->username[0] = '\0';
 
-	if (peer->expire > -1)
+	if (peer->expire > -1) {
 		ast_sched_del(sched, peer->expire);
+		peer->expire = -1;
+	}
 	if (expiry > max_expiry)
 		expiry = max_expiry;
 	if (expiry < min_expiry)
@@ -8925,11 +8929,12 @@
 	if (!end || end == input)	/* we require a part in brackets */
 		return NULL;
 
-	/* move away from "<" */
-	end--;
-
-	/* we found "name" */
-	if (tmp && tmp < end) {
+	end--; /* move just before "<" */
+
+	if (tmp && tmp <= end) {
+		/* The quote (tmp) precedes the bracket (end+1).
+		 * Find the matching quote and return the content.
+		 */
 		end = strchr(tmp+1, '"');
 		if (!end)
 			return NULL;
@@ -8939,7 +8944,7 @@
 			bytes = maxbytes;
 		ast_copy_string(output, tmp + 1, bytes);
 	} else {
-		/* we didn't find "name" */
+		/* No quoted string, or it is inside brackets. */
 		/* clear the empty characters in the begining*/
 		input = ast_skip_blanks(input);
 		/* clear the empty characters in the end */
@@ -11719,7 +11724,7 @@
 	/* RFC3261 says we must treat every 1xx response (but not 100)
 	   that we don't recognize as if it was 183.
 	*/
-	if (resp > 100 && resp < 200 && resp != 180 && resp != 183)
+	if (resp > 100 && resp < 200 && resp!=101 && resp != 180 && resp != 183)
 		resp = 183;
 
  	/* Any response between 100 and 199 is PROCEEDING */
@@ -11733,6 +11738,7 @@
 
 	switch (resp) {
 	case 100:	/* Trying */
+	case 101:	/* Dialog establishment */
 		if (!ast_test_flag(req, SIP_PKT_IGNORE))
 			sip_cancel_destroy(p);
 		check_pendings(p);
@@ -12002,6 +12008,7 @@
 		if (global_regattempts_max)
 			p->registry->regattempts = global_regattempts_max+1;
 		ast_sched_del(sched, r->timeout);
+		r->timeout = -1;
 		ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 		break;
 	case 404:	/* Not found */
@@ -12011,6 +12018,7 @@
 		ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 		r->call = NULL;
 		ast_sched_del(sched, r->timeout);
+		r->timeout = -1;
 		break;
 	case 407:	/* Proxy auth */
 		if (p->authtries == MAX_AUTHTRIES || do_register_auth(p, req, resp)) {
@@ -12044,6 +12052,7 @@
 		ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 		r->call = NULL;
 		ast_sched_del(sched, r->timeout);
+		r->timeout = -1;
 		break;
 	case 200:	/* 200 OK */
 		if (!r) {
@@ -12224,6 +12233,7 @@
 	} else if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
 		switch(resp) {
 		case 100:	/* 100 Trying */
+		case 101:	/* 101 Dialog establishment */
 			if (sipmethod == SIP_INVITE) 
 				handle_response_invite(p, resp, rest, req, seqno);
 			break;
@@ -12321,7 +12331,8 @@
 			if (sipmethod == SIP_INVITE) {
 				/* First we ACK */
 				transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
-					ast_log(LOG_WARNING, "INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
+				if (option_debug)
+					ast_log(LOG_DEBUG, "Got 481 on Invite. Assuming INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
 				if (owner)
 					ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
 				sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
@@ -12932,6 +12943,7 @@
 		respcode = atoi(code);
 		switch (respcode) {
 		case 100:	/* Trying: */
+		case 101:	/* dialog establishment */
 			/* Don't do anything yet */
 			break;
 		case 183:	/* Ringing: */
@@ -14445,7 +14457,7 @@
 
 			if ((firststate = ast_extension_state(NULL, p->context, p->exten)) < 0) {
 
-				ast_log(LOG_ERROR, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
+				ast_log(LOG_NOTICE, "Got SUBSCRIBE for extension %s@%s from %s, but there is no hint for that extension.\n", p->exten, p->context, ast_inet_ntoa(p->sa.sin_addr));
 				transmit_response(p, "404 Not found", req);
 				ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 				return 0;
@@ -14538,7 +14550,6 @@
 {
 	/* Called with p->lock held, as well as p->owner->lock if appropriate, keeping things
 	   relatively static */
-	struct sip_request resp;
 	const char *cmd;
 	const char *cseq;
 	const char *useragent;
@@ -14549,9 +14560,6 @@
 	int debug = sip_debug_test_pvt(p);
 	char *e;
 	int error = 0;
-
-	/* Clear out potential response */
-	memset(&resp, 0, sizeof(resp));
 
 	/* Get Method and Cseq */
 	cseq = get_header(req, "Cseq");
@@ -17108,6 +17116,7 @@
 			sip_destroy(iterator->call);
 		}
 		ASTOBJ_UNLOCK(iterator);
+	
 	} while(0));
 
 	/* Then, actually destroy users and registry */

Modified: team/murf/bug7109/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/channels/chan_zap.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/channels/chan_zap.c (original)
+++ team/murf/bug7109/channels/chan_zap.c Mon Nov 27 10:46:43 2006
@@ -8380,7 +8380,7 @@
 	startcic = linkset->pvts[0]->cic;
 
 	for (i = 0; i < linkset->numchans; i++) {
-		if (linkset->pvts[i+1] && (linkset->pvts[i+1]->cic - linkset->pvts[i]->cic) == 1) {
+		if (linkset->pvts[i+1] && ((linkset->pvts[i+1]->cic - linkset->pvts[i]->cic) == 1) && (linkset->pvts[i]->cic - startcic < 31)) {
 			continue;
 		} else {
 			endcic = linkset->pvts[i]->cic;
@@ -10568,23 +10568,23 @@
 	return RESULT_SUCCESS;
 }
 
-static const char pri_debug_help[] = 
+static char pri_debug_help[] = 
 	"Usage: pri debug span <span>\n"
 	"       Enables debugging on a given PRI span\n";
 	
-static const char pri_no_debug_help[] = 
+static char pri_no_debug_help[] = 
 	"Usage: pri no debug span <span>\n"
 	"       Disables debugging on a given PRI span\n";
 
-static const char pri_really_debug_help[] = 
+static char pri_really_debug_help[] = 
 	"Usage: pri intensive debug span <span>\n"
 	"       Enables debugging down to the Q.921 level\n";
 
-static const char pri_show_span_help[] = 
+static char pri_show_span_help[] = 
 	"Usage: pri show span <span>\n"
 	"       Displays PRI Information on a given PRI span\n";
 
-static const char pri_show_spans_help[] = 
+static char pri_show_spans_help[] = 
 	"Usage: pri show spans\n"
 	"       Displays PRI Information\n";
 
@@ -11556,7 +11556,6 @@
 	return RESULT_SUCCESS;
 }
 
-#if 0
 static int handle_ss7_show_linkset(int fd, int argc, char *argv[])
 {
 	int linkset;
@@ -11573,49 +11572,44 @@
 		return RESULT_SUCCESS;
 	}
 	if (linksets[linkset-1].ss7)
-		ss7 = linksets[linkset-1];
-
-	if (
+		ss7 = &linksets[linkset-1];
+
+	ast_cli(fd, "SS7 linkset %d status: %s\n", linkset, (ss7->state == LINKSET_STATE_UP) ? "Up" : "Down");
 
 	return RESULT_SUCCESS;
 }
-#endif
-
-static const char ss7_debug_help[] = 
+
+static char ss7_debug_help[] = 
 	"Usage: ss7 debug linkset <linkset>\n"
 	"       Enables debugging on a given SS7 linkset\n";
 	
-static const char ss7_no_debug_help[] = 
+static char ss7_no_debug_help[] = 
 	"Usage: ss7 no debug linkset <span>\n"
 	"       Disables debugging on a given SS7 linkset\n";
 
-static const char ss7_block_cic_help[] = 
+static char ss7_block_cic_help[] = 
 	"Usage: ss7 block cic <linkset> <CIC>\n"
 	"       Sends a remote blocking request for the given CIC on the specified linkset\n";
 
-static const char ss7_unblock_cic_help[] = 
+static char ss7_unblock_cic_help[] = 
 	"Usage: ss7 unblock cic <linkset> <CIC>\n"
 	"       Sends a remote unblocking request for the given CIC on the specified linkset\n";
 
-#if 0
-static const char ss7_show_linkset_help[] = 
+static char ss7_show_linkset_help[] = 
 	"Usage: ss7 show linkset <span>\n"
-	"       Disables debugging on a given SS7 linkset\n";
-#endif
+	"       Shows the status of an SS7 linkset.\n";
 
 static struct ast_cli_entry zap_ss7_cli[] = {
 	{ { "ss7", "debug", "linkset", NULL }, handle_ss7_debug,
 	  "Enables SS7 debugging on a linkset", ss7_debug_help, NULL },
 	{ { "ss7", "no", "debug", "linkset", NULL }, handle_ss7_no_debug,
-	  "Disables SS7 debugging on a linkset", ss7_debug_help, NULL },
+	  "Disables SS7 debugging on a linkset", ss7_no_debug_help, NULL },
 	{ { "ss7", "block", "cic", NULL }, handle_ss7_block_cic,
 	  "Disables SS7 debugging on a linkset", ss7_block_cic_help, NULL },
 	{ { "ss7", "unblock", "cic", NULL }, handle_ss7_unblock_cic,
 	  "Disables SS7 debugging on a linkset", ss7_unblock_cic_help, NULL },
-#if 0
 	{ { "ss7", "show", "linkset", NULL }, handle_ss7_show_linkset,
-	  "Disables SS7 debugging on a linkset", ss7_show_linkset_help, NULL },
-#endif
+	  "Shows the status of a linkset", ss7_show_linkset_help, NULL },
 };
 #endif /* HAVE_SS7 */
 

Modified: team/murf/bug7109/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/configs/sip.conf.sample?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/configs/sip.conf.sample (original)
+++ team/murf/bug7109/configs/sip.conf.sample Mon Nov 27 10:46:43 2006
@@ -119,7 +119,11 @@
 
 ;compactheaders = yes		; send compact sip headers.
 ;
-;videosupport=yes		; Turn on support for SIP video
+;videosupport=yes		; Turn on support for SIP video. You need to turn this on
+				; in the this section to get any video support at all.
+				; You can turn it off on a per peer basis if the general
+				; video support is enabled, but you can't enable it for
+				; one peer only without enabling in the general section.
 ;maxcallbitrate=384		; Maximum bitrate for video calls (default 384 kb/s)
 				; Videosupport and maxcallbitrate is settable
 				; for peers and users as well

Modified: team/murf/bug7109/doc/ael.txt
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/doc/ael.txt?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/doc/ael.txt (original)
+++ team/murf/bug7109/doc/ael.txt Mon Nov 27 10:46:43 2006
@@ -102,7 +102,9 @@
 might. A macro call can be made within an extension, and the
 individual statements there are executed until it ends. At this point,
 execution returns to the next statement after the macro call. Macros
-can call other macros. And they work just like function calls.
+can call other macros. And they work just like function calls. In 1.2,
+and 1.4, they are implemented underneath with the Macro() application.
+In 1.6 and up, they are implemented with the Gosub() application.
 
 Applications
 ------------
@@ -981,7 +983,7 @@
 
 A macro is defined in its own block like this. The arguments to the
 macro are specified with the name of the macro. They are then referred
-to by that same name. A catch block can be specified to catch special
+to by that same name. A catch block can be specified to 'catch' special
 extensions.
 
 

Modified: team/murf/bug7109/doc/asterisk-conf.txt
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/doc/asterisk-conf.txt?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/doc/asterisk-conf.txt (original)
+++ team/murf/bug7109/doc/asterisk-conf.txt Mon Nov 27 10:46:43 2006
@@ -69,6 +69,7 @@
 	       	       				; when off, sound files are searched as <path>/<lang>/<file>
 						; when on, sound files are search as <lang>/<path>/<file>
 						; (only affects relative paths for sound files)
+maxlimit = <value>				; Maximum number open files for the Asterisk process
 
 [files]
 ; Changing the following lines may compromise your security

Modified: team/murf/bug7109/funcs/func_cdr.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7109/funcs/func_cdr.c?view=diff&rev=48043&r1=48042&r2=48043
==============================================================================
--- team/murf/bug7109/funcs/func_cdr.c (original)
+++ team/murf/bug7109/funcs/func_cdr.c Mon Nov 27 10:46:43 2006
@@ -129,7 +129,28 @@
 "  For example, 'start', 'answer', and 'end' will be retrieved as epoch\n"
 "  values, when the 'u' option is passed, but formatted as YYYY-MM-DD HH:MM:SS\n"
 "  otherwise.  Similarly, disposition and amaflags will return their raw\n"
-"  integral values.\n",
+"  integral values.\n"
+"  Here is a list of all the available cdr field names:\n"
+"    clid          lastdata       disposition\n"
+"    src           start          amaflags\n"
+"    dst           answer         accountcode\n"
+"    dcontext      end            uniqueid\n"
+"    dstchannel    duration       userfield\n"
+"    lastapp       billsec        channel\n"
+"  All of the above variables are read-only, except for accountcode,\n"
+"  userfield, and amaflags. You may, however,  supply\n"
+"  a name not on the above list, and create your own\n"
+"  variable, whose value can be changed with this function,\n"
+"  and this variable will be stored on the cdr.\n"
+"   raw values for disposition:\n"
+"       1 = NO ANSWER\n"
+"	2 = BUSY\n"
+"	3 = FAILED\n"
+"	4 = ANSWERED\n"
+"    raw values for amaflags:\n"
+"       1 = OMIT\n"
+"       2 = BILLING\n"
+"       3 = DOCUMENTATION\n",
 };
 
 static int unload_module(void)


[... 1007 lines stripped ...]


More information about the asterisk-commits mailing list