[asterisk-commits] file: branch file/netsock2 r95892 - in /team/file/netsock2: ./ apps/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 2 12:16:41 CST 2008


Author: file
Date: Wed Jan  2 12:16:41 2008
New Revision: 95892

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95892
Log:
Merged revisions 95864,95888,95891 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r95864 | russell | 2008-01-02 12:20:26 -0400 (Wed, 02 Jan 2008) | 6 lines

For some odd reason, the last set of libresample build changes from Kevin did
not work for everyone, but it did for some.  This set of changes makes trunk
start again for those having problems.  Instead of building libresample as a
static library, it just links the object files in directly with the asterisk
binary.

................
r95888 | qwell | 2008-01-02 13:38:02 -0400 (Wed, 02 Jan 2008) | 4 lines

Update osplookup documentation to use commas instead of pipes.

Closes issue #11666, patch by Laureano.

................
r95891 | mmichelson | 2008-01-02 14:05:57 -0400 (Wed, 02 Jan 2008) | 17 lines

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

........
r95890 | mmichelson | 2008-01-02 11:51:22 -0600 (Wed, 02 Jan 2008) | 9 lines

A change to improve the accuracy of queue logging in the case where a member does not
answer during the specified timeout period. Prior to this change, there was a small chance
that the member name recorded in this case would be blank. Also prior to this change, if using
the ringall strategy, if no one answered the call during the specified timeout, the member name
listed in the queue log would randomly be one of the members that was rung.

(closes issue #11498, reported and tested by hloubser, patched by me)


........

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

Modified:
    team/file/netsock2/   (props changed)
    team/file/netsock2/apps/app_osplookup.c
    team/file/netsock2/apps/app_queue.c
    team/file/netsock2/main/Makefile
    team/file/netsock2/main/translate.c

Propchange: team/file/netsock2/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/file/netsock2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/file/netsock2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan  2 12:16:41 2008
@@ -1,1 +1,1 @@
-/trunk:1-95843
+/trunk:1-95891

Modified: team/file/netsock2/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/file/netsock2/apps/app_osplookup.c?view=diff&rev=95892&r1=95891&r2=95892
==============================================================================
--- team/file/netsock2/apps/app_osplookup.c (original)
+++ team/file/netsock2/apps/app_osplookup.c Wed Jan  2 12:16:41 2008
@@ -1938,7 +1938,7 @@
 static const char* app1= "OSPAuth";
 static const char* synopsis1 = "OSP authentication";
 static const char* descrip1 =
-"  OSPAuth([provider[|options]]):  Authenticate a SIP INVITE by OSP and sets\n"
+"  OSPAuth([provider[,options]]):  Authenticate a SIP INVITE by OSP and sets\n"
 "the variables:\n"
 " ${OSPINHANDLE}:  The inbound call transaction handle\n"
 " ${OSPINTIMELIMIT}:  The inbound call duration limit in seconds\n"
@@ -1950,7 +1950,7 @@
 static const char* app2= "OSPLookup";
 static const char* synopsis2 = "Lookup destination by OSP";
 static const char* descrip2 =
-"  OSPLookup(exten[|provider[|options]]):  Looks up an extension via OSP and sets\n"
+"  OSPLookup(exten[,provider[,options]]):  Looks up an extension via OSP and sets\n"
 "the variables, where 'n' is the number of the result beginning with 1:\n"
 " ${OSPOUTHANDLE}:  The OSP Handle for anything remaining\n"
 " ${OSPTECH}:  The technology to use for the call\n"
@@ -1975,7 +1975,7 @@
 static const char* app3 = "OSPNext";
 static const char* synopsis3 = "Lookup next destination by OSP";
 static const char* descrip3 =
-"  OSPNext(cause[|provider[|options]]):  Looks up the next OSP Destination for ${OSPOUTHANDLE}\n"
+"  OSPNext(cause[,provider[,options]]):  Looks up the next OSP Destination for ${OSPOUTHANDLE}\n"
 "See OSPLookup for more information\n"
 "\n"
 "This application sets the following channel variable upon completion:\n"
@@ -1985,7 +1985,7 @@
 static const char* app4 = "OSPFinish";
 static const char* synopsis4 = "Record OSP entry";
 static const char* descrip4 =
-"  OSPFinish([status[|options]]):  Records call state for ${OSPINHANDLE}, according to\n"
+"  OSPFinish([status[,options]]):  Records call state for ${OSPINHANDLE}, according to\n"
 "status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL\n"
 "or coincidentally, just what the Dial application stores in its ${DIALSTATUS}.\n"
 "\n"

Modified: team/file/netsock2/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/file/netsock2/apps/app_queue.c?view=diff&rev=95892&r1=95891&r2=95892
==============================================================================
--- team/file/netsock2/apps/app_queue.c (original)
+++ team/file/netsock2/apps/app_queue.c Wed Jan  2 12:16:41 2008
@@ -300,10 +300,18 @@
 
 /*! \brief We define a custom "local user" structure because we
    use it not only for keeping track of what is in use but
-   also for keeping track of who we're dialing. */
+   also for keeping track of who we're dialing.
+
+   There are two "links" defined in this structure, q_next and call_next.
+   q_next links ALL defined callattempt structures into a linked list. call_next is
+   a link which allows for a subset of the callattempts to be traversed. This subset
+   is used in wait_for_answer so that irrelevant callattempts are not traversed. This
+   also is helpful so that queue logs are always accurate in the case where a call to 
+   a member times out, especially if using the ringall strategy. */
 
 struct callattempt {
 	struct callattempt *q_next;
+	struct callattempt *call_next;
 	struct ast_channel *chan;
 	char interface[256];
 	int stillgoing;
@@ -2303,7 +2311,7 @@
 static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callattempt *outgoing, int *to, char *digit, int prebusies, int caller_disconnect, int forwardsallowed)
 {
 	const char *queue = qe->parent->name;
-	struct callattempt *o;
+	struct callattempt *o, *start = NULL, *prev = NULL;
 	int status;
 	int numbusies = prebusies;
 	int numnochan = 0;
@@ -2333,14 +2341,21 @@
 		int numlines, retry, pos = 1;
 		struct ast_channel *watchers[AST_MAX_WATCHERS];
 		watchers[0] = in;
+		start = NULL;
 
 		for (retry = 0; retry < 2; retry++) {
 			numlines = 0;
 			for (o = outgoing; o; o = o->q_next) { /* Keep track of important channels */
 				if (o->stillgoing) {	/* Keep track of important channels */
 					stillgoing = 1;
-					if (o->chan)
+					if (o->chan) {
 						watchers[pos++] = o->chan;
+						if (!start)
+							start = o;
+						else
+							prev->call_next = o;
+						prev = o;
+					}
 				}
 				numlines++;
 			}
@@ -2362,7 +2377,7 @@
 			return NULL;
 		}
 		winner = ast_waitfor_n(watchers, pos, to);
-		for (o = outgoing; o; o = o->q_next) {
+		for (o = start; o; o = o->call_next) {
 			if (o->stillgoing && (o->chan) &&  (o->chan->_state == AST_STATE_UP)) {
 				if (!peer) {
 					ast_verb(3, "%s answered %s\n", o->chan->name, in->name);
@@ -2524,8 +2539,10 @@
 			}
 			ast_frfree(f);
 		}
-		if (!*to)
-			rna(orig, qe, on, membername);
+		if (!*to) {
+			for (o = start; o; o = o->call_next)
+				rna(orig, qe, o->interface, o->member->membername);
+		}
 	}
 
 #ifdef HAVE_EPOLL

Modified: team/file/netsock2/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/file/netsock2/main/Makefile?view=diff&rev=95892&r1=95891&r2=95892
==============================================================================
--- team/file/netsock2/main/Makefile (original)
+++ team/file/netsock2/main/Makefile Wed Jan  2 12:16:41 2008
@@ -17,6 +17,8 @@
 
 include $(ASTTOPDIR)/Makefile.moddir_rules
 
+RESAMPLE_OBJS:=libresample/src/resample.o libresample/src/resamplesubs.o libresample/src/filterkit.o
+
 OBJS=	io.o sched.o logger.o frame.o loader.o config.o channel.o \
 	translate.o file.o pbx.o cli.o md5.o term.o \
 	ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
@@ -27,7 +29,7 @@
 	netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
 	cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o \
 	strcompat.o threadstorage.o dial.o event.o adsistub.o audiohook.o \
-	astobj2.o hashtab.o global_datastores.o netsock2.o
+	astobj2.o hashtab.o global_datastores.o netsock2.o $(RESAMPLE_OBJS)
 
 # we need to link in the objects statically, not as a library, because
 # otherwise modules will not have them available if none of the static
@@ -112,9 +114,6 @@
 db1-ast/libdb1.a: CHECK_SUBDIR
 	CFLAGS="$(ASTCFLAGS)" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
 
-libresample/libresample.a: CHECK_SUBDIR
-	$(MAKE) -f Makefile.asterisk -C libresample libresample.a
-
 ast_expr2.c ast_expr2.h:
 	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
 
@@ -130,8 +129,6 @@
 	rm ast_expr2.o ast_expr2f.o 
 
 channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE)
-
-translate.o: ASTCFLAGS+=-Ilibresample/include
 
 AST_EMBED_LDSCRIPTS:=$(sort $(EMBED_LDSCRIPTS))
 AST_EMBED_LDFLAGS:=$(foreach dep,$(EMBED_LDFLAGS),$(value $(dep)))
@@ -158,7 +155,7 @@
 MAIN_TGT:=asterisk
 endif
 
-$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS) libresample/libresample.a
+$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS)
 	@$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
 ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
@@ -175,4 +172,4 @@
 	@$(MAKE) -C db1-ast clean
 	@$(MAKE) -C stdtime clean
 	@$(MAKE) -C minimime clean
-	@$(MAKE) -f Makefile.asterisk -C libresample clean
+	rm -f libresample/src/*.o

Modified: team/file/netsock2/main/translate.c
URL: http://svn.digium.com/view/asterisk/team/file/netsock2/main/translate.c?view=diff&rev=95892&r1=95891&r2=95892
==============================================================================
--- team/file/netsock2/main/translate.c (original)
+++ team/file/netsock2/main/translate.c Wed Jan  2 12:16:41 2008
@@ -39,13 +39,7 @@
 #include "asterisk/cli.h"
 #include "asterisk/term.h"
 
-#include "libresample.h"
-
 #define MAX_RECALC 1000 /* max sample recalc */
-
-/* hack to ensure that the libresample code gets linked in */
-
-static attribute_unused void (*resample_hack)(void *) = resample_close;
 
 /*! \brief the list of translators */
 static AST_RWLIST_HEAD_STATIC(translators, ast_translator);




More information about the asterisk-commits mailing list