[asterisk-commits] branch oej/astum r9275 - in /team/oej/astum: ./ apps/ cdr/ channels/ channels...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 9 06:44:34 MST 2006


Author: oej
Date: Thu Feb  9 07:44:22 2006
New Revision: 9275

URL: http://svn.digium.com/view/asterisk?rev=9275&view=rev
Log:
Merged revisions 9150,9157,9163,9166,9186,9194,9215,9223,9225,9238-9239,9247-9248,9259-9261,9263 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r9150 | russell | 2006-02-04 17:32:27 +0100 (Sat, 04 Feb 2006) | 2 lines

remove windows-style line endings

................
r9157 | tilghman | 2006-02-05 18:20:29 +0100 (Sun, 05 Feb 2006) | 10 lines

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

........
r9156 | tilghman | 2006-02-05 11:10:19 -0600 (Sun, 05 Feb 2006) | 2 lines

Bug 6176 - Fix race condition

........

................
r9163 | kpfleming | 2006-02-06 21:18:17 +0100 (Mon, 06 Feb 2006) | 2 lines

rename properties for forward-porting fixes so they don't conflict with developer branches

................
r9166 | kpfleming | 2006-02-06 21:30:49 +0100 (Mon, 06 Feb 2006) | 2 lines

minor cleanup

................
r9186 | crichter | 2006-02-07 14:34:59 +0100 (Tue, 07 Feb 2006) | 1 line

default values of jitterbuffer and jitterbuffer_upper_threshold should be > 0, this fixes the tv_fix warnings, because we use ast_read to transmit frames to asterisk in jitterbuffer mode, instead of queueing the audio data with ast_queue_frame.
................
r9194 | mattf | 2006-02-07 19:00:42 +0100 (Tue, 07 Feb 2006) | 2 lines

Make sure we output the APDU debug on pri debug commands

................
r9215 | crichter | 2006-02-08 17:10:21 +0100 (Wed, 08 Feb 2006) | 8 lines

* dozens of white-space removements
* some // comment removements
* debugging optimization, use port where possible
* fixed  pickup problem (pickup didn't work anymore after mqueue)
* removed some mIDSN_JOLLY defines which are not needed anymore in mqueue
* adapted the new cli.h constifications


................
r9223 | crichter | 2006-02-08 20:39:37 +0100 (Wed, 08 Feb 2006) | 1 line

L2 Signalling in PTP-TE Mode fixed
................
r9225 | crichter | 2006-02-08 20:51:53 +0100 (Wed, 08 Feb 2006) | 1 line

fix for the L2 Signalling
................
r9238 | tilghman | 2006-02-09 00:10:39 +0100 (Thu, 09 Feb 2006) | 10 lines

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

........
r9233 | tilghman | 2006-02-08 16:34:38 -0600 (Wed, 08 Feb 2006) | 2 lines

Leave it to RH/CentOS to put the freetds headers in a completely nonstandard location.

........

................
r9239 | mogorman | 2006-02-09 00:14:17 +0100 (Thu, 09 Feb 2006) | 12 lines

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

........
r9232 | mogorman | 2006-02-08 16:12:34 -0600 (Wed, 08 Feb 2006) | 4 lines

Make logger report error,warning,notice if logger.conf
not found, also updated chan_oss to give correct
error message if its config file is not found.

........

................
r9247 | russell | 2006-02-09 02:33:50 +0100 (Thu, 09 Feb 2006) | 10 lines

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

........
r9246 | russell | 2006-02-08 20:24:55 -0500 (Wed, 08 Feb 2006) | 2 lines

reload peercontext on iax2 reload (issue #6442)

........

................
r9248 | russell | 2006-02-09 02:52:09 +0100 (Thu, 09 Feb 2006) | 2 lines

clarify return value (issue #6434)

................
r9259 | russell | 2006-02-09 03:08:04 +0100 (Thu, 09 Feb 2006) | 4 lines

various code cleanup changes including changing #define'd constants to enums,
comments to doxygen style, memory allocation to use ast_ wrappers, use calloc
instead of malloc+memset, and removing duplicated error messages (issue #6435)

................
r9260 | russell | 2006-02-09 03:21:57 +0100 (Thu, 09 Feb 2006) | 3 lines

remove unnecessary format check in zt_request so that we will actually accept
a requested format of ALAW (issue #6421, different patch)

................
r9261 | russell | 2006-02-09 03:27:30 +0100 (Thu, 09 Feb 2006) | 2 lines

remove some Makefile targets for things that don't exist in the tree

................
r9263 | russell | 2006-02-09 03:35:34 +0100 (Thu, 09 Feb 2006) | 1 line


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

Modified:
    team/oej/astum/   (props changed)
    team/oej/astum/Makefile
    team/oej/astum/apps/Makefile
    team/oej/astum/apps/app_macro.c
    team/oej/astum/cdr/Makefile
    team/oej/astum/channels/chan_iax2.c
    team/oej/astum/channels/chan_misdn.c
    team/oej/astum/channels/chan_misdn_config.c
    team/oej/astum/channels/chan_oss.c
    team/oej/astum/channels/chan_zap.c
    team/oej/astum/channels/misdn/Makefile
    team/oej/astum/channels/misdn/isdn_lib.c
    team/oej/astum/channels/misdn/isdn_lib_intern.h
    team/oej/astum/channels/misdn/isdn_msg_parser.c
    team/oej/astum/configs/misdn.conf.sample
    team/oej/astum/dsp.c
    team/oej/astum/enum.c
    team/oej/astum/file.c
    team/oej/astum/include/asterisk/sha1.h
    team/oej/astum/logger.c
    team/oej/astum/sha1.c

Propchange: team/oej/astum/
------------------------------------------------------------------------------
--- branch-1.2-blocked (added)
+++ branch-1.2-blocked Thu Feb  9 07:44:22 2006
@@ -1,0 +1,1 @@
+/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112,8124,8134,8394,8412,8414,8418,8429,8433,8445,8562,8573,8600,8619,8666,8808,9073,9262

Propchange: team/oej/astum/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/astum/
            ('svnmerge-blocked' removed)

Propchange: team/oej/astum/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Feb  9 07:44:22 2006
@@ -1,1 +1,1 @@
-/trunk:1-9143
+/trunk:1-9274

Modified: team/oej/astum/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/Makefile?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/Makefile (original)
+++ team/oej/astum/Makefile Thu Feb  9 07:44:22 2006
@@ -3,7 +3,7 @@
 # 
 # Top level Makefile
 #
-# Copyright (C) 1999-2005, Mark Spencer
+# Copyright (C) 1999-2006, Digium, Inc.
 #
 # Mark Spencer <markster at digium.com>
 #
@@ -943,4 +943,4 @@
 	rm -rf $(DESTDIR)$(ASTSPOOLDIR)
 	rm -rf $(DESTDIR)$(ASTETCDIR)
 	rm -rf $(DESTDIR)$(ASTLOGDIR)
-	
+

Modified: team/oej/astum/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/Makefile?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/apps/Makefile (original)
+++ team/oej/astum/apps/Makefile Thu Feb  9 07:44:22 2006
@@ -91,15 +91,6 @@
 app_curl.so: app_curl.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
 
-app_sql_postgres.o: app_sql_postgres.c
-	$(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
-
-app_sql_postgres.so: app_sql_postgres.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
-
-app_sql_odbc.so: app_sql_odbc.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
-
 look:	look.c
 	$(CC) -pipe -O6 -g look.c -o look -lncurses
 

Modified: team/oej/astum/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/apps/app_macro.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/apps/app_macro.c (original)
+++ team/oej/astum/apps/app_macro.c Thu Feb  9 07:44:22 2006
@@ -107,7 +107,7 @@
 	char oldcontext[AST_MAX_CONTEXT] = "";
 	int offset, depth = 0;
 	int setmacrocontext=0;
-	int autoloopflag;
+	int autoloopflag, dead = 0;
   
 	char *save_macro_exten;
 	char *save_macro_context;
@@ -208,8 +208,8 @@
 				break;
 			}
 			switch(res) {
-	        	case MACRO_EXIT_RESULT:
-                        	res = 0;
+			case MACRO_EXIT_RESULT:
+				res = 0;
 				goto out;
 			case AST_PBX_KEEPALIVE:
 				if (option_debug)
@@ -223,6 +223,7 @@
 					ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
 				else if (option_verbose > 1)
 					ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
+				dead = 1;
 				goto out;
 			}
 		}
@@ -242,37 +243,44 @@
 	out:
 	/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
 	snprintf(depthc, sizeof(depthc), "%d", depth);
-	pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
-
-	ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
-  	for (x=1; x<argc; x++) {
+	if (!dead) {
+		pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
+
+		ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
+	}
+
+  	for (x = 1; x < argc; x++) {
   		/* Restore old arguments and delete ours */
 		snprintf(varname, sizeof(varname), "ARG%d", x);
   		if (oldargs[x]) {
-			pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
+			if (!dead)
+				pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
 			free(oldargs[x]);
-		} else {
+		} else if (!dead) {
 			pbx_builtin_setvar_helper(chan, varname, NULL);
 		}
   	}
 
 	/* Restore macro variables */
-	pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
+	if (!dead) {
+		pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
+		pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
+		pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
+	}
 	if (save_macro_exten)
 		free(save_macro_exten);
-	pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
 	if (save_macro_context)
 		free(save_macro_context);
-	pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
 	if (save_macro_priority)
 		free(save_macro_priority);
-	if (setmacrocontext) {
+
+	if (!dead && setmacrocontext) {
 		chan->macrocontext[0] = '\0';
 		chan->macroexten[0] = '\0';
 		chan->macropriority = 0;
 	}
 
-	if (!strcasecmp(chan->context, fullmacro)) {
+	if (!dead && !strcasecmp(chan->context, fullmacro)) {
   		/* If we're leaving the macro normally, restore original information */
 		chan->priority = oldpriority;
 		ast_copy_string(chan->context, oldcontext, sizeof(chan->context));
@@ -292,7 +300,8 @@
 		}
 	}
 
-	pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
+	if (!dead)
+		pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
 	if (save_macro_offset)
 		free(save_macro_offset);
 	LOCAL_USER_REMOVE(u);

Modified: team/oej/astum/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/cdr/Makefile?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/cdr/Makefile (original)
+++ team/oej/astum/cdr/Makefile Thu Feb  9 07:44:22 2006
@@ -45,11 +45,11 @@
 #
 # FreeTDS stuff...
 #
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h),)
-  ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h | grep -c 0.63),1)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
+  ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
     CFLAGS += -DFREETDS_0_63
   else
-	ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h | grep -c 0.62),1)
+	ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.62),1)
       CFLAGS += -DFREETDS_0_62
     else
       CFLAGS += -DFREETDS_PRE_0_62

Modified: team/oej/astum/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_iax2.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/chan_iax2.c (original)
+++ team/oej/astum/channels/chan_iax2.c Thu Feb  9 07:44:22 2006
@@ -8131,6 +8131,7 @@
 		peer->pokefreqok = DEFAULT_FREQ_OK;
 		peer->pokefreqnotok = DEFAULT_FREQ_NOTOK;
 		peer->context[0] = '\0';
+		peer->peercontext[0] = '\0';
 		while(v) {
 			if (!strcasecmp(v->name, "secret")) {
 				if (!ast_strlen_zero(peer->secret)) {

Modified: team/oej/astum/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_misdn.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/chan_misdn.c (original)
+++ team/oej/astum/channels/chan_misdn.c Thu Feb  9 07:44:22 2006
@@ -888,7 +888,7 @@
 	return RESULT_SUCCESS ;
 }
 
-static char *complete_ch_helper(char *line, char *word, int pos, int state, int rpos)
+static char *complete_ch_helper(const char *line, const char *word, int pos, int state, int rpos)
 {
 	struct ast_channel *c;
 	int which=0;
@@ -912,12 +912,12 @@
 	return ret;
 }
 
-static char *complete_ch(char *line, char *word, int pos, int state)
+static char *complete_ch(const char *line, const char *word, int pos, int state)
 {
 	return complete_ch_helper(line, word, pos, state, 3);
 }
 
-static char *complete_debug_port (char *line, char *word, int pos, int state)
+static char *complete_debug_port (const char *line, const char *word, int pos, int state)
 {
 	if (state)
 		return NULL;
@@ -1418,14 +1418,7 @@
 	struct misdn_bchannel *newbc;
 	char *opts=NULL, *ext,*tokb;
 	char dest_cp[256];
-	struct ast_channel *bridged;
-	
-	if ( (bridged=ast_bridged_channel(ast)) ) {
-		chan_misdn_log(0,0,"Our Bridged Partner is %s\n",bridged->tech->type);
-	} else {
-		chan_misdn_log(0,0,"No Bridged Partner\n");
-	}
-	
+
 	{
 		strncpy(dest_cp,dest,sizeof(dest_cp)-1);
 		dest_cp[sizeof(dest_cp)]=0;
@@ -1480,7 +1473,7 @@
 	strncpy(ast->exten,ext,sizeof(ast->exten));
 	
 	
-	chan_misdn_log(1, 0, "* CALL: %s\n",dest);
+	chan_misdn_log(1, port, "* CALL: %s\n",dest);
 	
 	chan_misdn_log(1, port, " --> * dad:%s tech:%s ctx:%s\n",ast->exten,ast->name, ast->context);
 	
@@ -1521,7 +1514,7 @@
 		if (opts)
 			misdn_set_opt_exec(ast,opts);
 		else
-			chan_misdn_log(1,0,"NO OPTS GIVEN\n");
+			chan_misdn_log(2,port,"NO OPTS GIVEN\n");
 		
 		
 		ch->state=MISDN_CALLING;
@@ -2342,8 +2335,8 @@
 	}
 	
 	if (!newbc) {
-		chan_misdn_log(1, 0, " --> ! No free channel chan ext:%s even after Group Call\n",ext);
-		chan_misdn_log(1, 0, " --> SEND: State Down\n");
+		chan_misdn_log(-1, 0, " --> ! No free channel chan ext:%s even after Group Call\n",ext);
+		chan_misdn_log(-1, 0, " --> SEND: State Down\n");
 		return NULL;
 	}
 
@@ -2773,7 +2766,6 @@
 					} else {
 						chan_misdn_log(2,  bc->port, "* --> Hangup\n");
 						ast_queue_hangup(ast);
-						//ast_hangup(ast);
 					}
 					break;
 					
@@ -2817,7 +2809,6 @@
 	holded_chan->state=MISDN_CONNECTED;
 	holded_chan->holded=0;
 	misdn_lib_transfer(holded_chan->bc?holded_chan->bc:holded_chan->holded_bc);
-	
 	ast_channel_masquerade(holded_chan->ast, AST_BRIDGED_P(tmp_ch->ast));
 }
 
@@ -2832,7 +2823,6 @@
 	strncpy(predial, ast->exten, sizeof(predial) -1 );
   
 	ch->state=MISDN_DIALING;
-	
 
 	if (bc->nt) {
 		int ret; 
@@ -2845,7 +2835,6 @@
 			ret = misdn_lib_send_event(bc, EVENT_PROCEEDING );
 		}
 	}
-
 	tone_indicate(ch,TONE_DIAL);  
   
 	chan_misdn_log(1, bc->port, "* Starting Ast ctx:%s dad:%s oad:%s with 's' extension\n", ast->context, ast->exten, AST_CID_P(ast));
@@ -3010,6 +2999,21 @@
 			}
 /*			chan_misdn_log(5, bc->port, "Can Match Extension: dad:%s oad:%s\n",bc->dad,bc->oad);*/
 			
+			/* Check for Pickup Request first */
+			if (!strcmp(ch->ast->exten, ast_pickup_ext())) {
+				int ret;/** Sending SETUP_ACK**/
+				ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+				if (ast_pickup_call(ch->ast)) {
+					ast_hangup(ch->ast);
+				} else {
+					struct ast_channel *chan=ch->ast;
+					ch->state = MISDN_CALLING_ACKNOWLEDGE;
+					ch->ast=NULL;
+					ast_setstate(chan, AST_STATE_DOWN);
+					ast_hangup(chan);
+					break;
+				}
+			}
 			
 			if(!ast_canmatch_extension(ch->ast, ch->context, bc->dad, 1, bc->oad)) {
 
@@ -3130,7 +3134,21 @@
 
 		/** queue new chan **/
 		cl_queue_chan(&cl_te, ch) ;
-
+		
+		/* Check for Pickup Request first */
+		if (!strcmp(chan->exten, ast_pickup_ext())) {
+			int ret;/** Sending SETUP_ACK**/
+			ret = misdn_lib_send_event(bc, EVENT_SETUP_ACKNOWLEDGE );
+			if (ast_pickup_call(chan)) {
+				ast_hangup(chan);
+			} else {
+				ch->state = MISDN_CALLING_ACKNOWLEDGE;
+				ch->ast=NULL;
+				ast_setstate(chan, AST_STATE_DOWN);
+				ast_hangup(chan);
+				break;
+			}
+		}
 		
 		/*
 		  added support for s extension hope it will help those poor cretains
@@ -3371,7 +3389,7 @@
 		int res;
 		int (*generate)(struct ast_channel *chan, void *tmp, int datalen, int samples);
 
-		chan_misdn_log(9,0,"TONE_GEN: len:%d\n");
+		chan_misdn_log(9,bc->port,"TONE_GEN: len:%d\n");
 		
 		if (!ast->generator) break;
 		

Modified: team/oej/astum/channels/chan_misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_misdn_config.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/chan_misdn_config.c (original)
+++ team/oej/astum/channels/chan_misdn_config.c Thu Feb  9 07:44:22 2006
@@ -107,8 +107,8 @@
 	{ "echocancelwhenbridged", MISDN_CFG_ECHOCANCELWHENBRIDGED, MISDN_CTYPE_BOOL, "no", NONE },
 	{ "echotraining", MISDN_CFG_ECHOTRAINING, MISDN_CTYPE_BOOLINT, "1", 1 },
 	{ "need_more_infos", MISDN_CFG_NEED_MORE_INFOS, MISDN_CTYPE_BOOL, "0", NONE },
-	{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "0", NONE },
-	{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "0", NONE },
+	{ "jitterbuffer", MISDN_CFG_JITTERBUFFER, MISDN_CTYPE_INT, "1000", NONE },
+	{ "jitterbuffer_upper_threshold", MISDN_CFG_JITTERBUFFER_UPPER_THRESHOLD, MISDN_CTYPE_INT, "600", NONE },
 	{ "callgroup", MISDN_CFG_CALLGROUP, MISDN_CTYPE_ASTGROUP, NO_DEFAULT, NONE },
 	{ "pickupgroup", MISDN_CFG_PICKUPGROUP, MISDN_CTYPE_ASTGROUP, NO_DEFAULT, NONE },
 	{ "msns", MISDN_CFG_MSNS, MISDN_CTYPE_MSNLIST, NO_DEFAULT, NONE }

Modified: team/oej/astum/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_oss.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/chan_oss.c (original)
+++ team/oej/astum/channels/chan_oss.c Thu Feb  9 07:44:22 2006
@@ -1392,6 +1392,9 @@
 			store_config(cfg, ctg);
 		} while ( (ctg = ast_category_browse(cfg, ctg)) != NULL);
 		ast_config_destroy(cfg);
+	} else {
+		 ast_log(LOG_NOTICE, "Unable to load config oss.conf\n");
+		 return -1;
 	}
 	if (find_desc(oss_active) == NULL) {
 		ast_log(LOG_NOTICE, "Device %s not found\n", oss_active);

Modified: team/oej/astum/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/chan_zap.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/chan_zap.c (original)
+++ team/oej/astum/channels/chan_zap.c Thu Feb  9 07:44:22 2006
@@ -7032,7 +7032,7 @@
 				if (p.sigtype != (signalling & 0x3ffff)) {
 					ast_log(LOG_ERROR, "Signalling requested on channel %d is %s but line is in %s signalling\n", channel, sig2str(signalling), sig2str(p.sigtype));
 					destroy_zt_pvt(&tmp);
-					return tmp;
+					return NULL;
 				}
 				tmp->law = p.curlaw;
 				tmp->span = p.spanno;
@@ -7587,7 +7587,6 @@
 
 static struct ast_channel *zt_request(const char *type, int format, void *data, int *cause)
 {
-	int oldformat;
 	int groupmatch = 0;
 	int channelmatch = -1;
 	int roundrobin = 0;
@@ -7616,13 +7615,6 @@
 	lock = &iflock;
 	start = iflist;
 	end = ifend;
-	/* We do signed linear */
-	oldformat = format;
-	format &= (AST_FORMAT_SLINEAR | AST_FORMAT_ULAW);
-	if (!format) {
-		ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
-		return NULL;
-	}
 	if (data) {
 		dest = ast_strdupa((char *)data);
 	} else {
@@ -9392,7 +9384,7 @@
 	}
 	for (x=0;x<NUM_DCHANS;x++) {
 		if (pris[span-1].dchans[x])
-			pri_set_debug(pris[span-1].dchans[x], PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE);
+			pri_set_debug(pris[span-1].dchans[x], PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE);
 	}
 	ast_cli(fd, "Enabled debugging on span %d\n", span);
 	return RESULT_SUCCESS;
@@ -9440,7 +9432,7 @@
 	}
 	for (x=0;x<NUM_DCHANS;x++) {
 		if (pris[span-1].dchans[x])
-			pri_set_debug(pris[span-1].dchans[x], (PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_STATE));
+			pri_set_debug(pris[span-1].dchans[x], (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_STATE));
 	}
 	ast_cli(fd, "Enabled EXTENSIVE debugging on span %d\n", span);
 	return RESULT_SUCCESS;

Modified: team/oej/astum/channels/misdn/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/misdn/Makefile?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/misdn/Makefile (original)
+++ team/oej/astum/channels/misdn/Makefile Thu Feb  9 07:44:22 2006
@@ -6,7 +6,7 @@
 
 # Verify those options with main Makefile
 CFLAGS		= -pipe -c -Wall
-ifeq ($(PROC),x86_64)
+ifeq ($(shell uname -m),x86_64)
 CFLAGS	       += -fPIC
 endif
 SOURCES		= isdn_lib.c isdn_msg_parser.c 

Modified: team/oej/astum/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/misdn/isdn_lib.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/misdn/isdn_lib.c (original)
+++ team/oej/astum/channels/misdn/isdn_lib.c Thu Feb  9 07:44:22 2006
@@ -335,9 +335,8 @@
 	frm = (iframe_t *)dmsg->data;
 	struct misdn_stack *stack=get_stack_by_bc(bc);
 
-
 	if (!stack) {
-		cb_log(0,0,"send_msg: IEK!! no stack\n ");
+		cb_log(0,bc->port,"send_msg: IEK!! no stack\n ");
 		return -1;
 	}
 	
@@ -594,16 +593,11 @@
 
 static int newteid=0;
 
-#ifdef MISDNUSER_JOLLY
 #define MAXPROCS 0x100
-#else
-#define MAXPROCS 0x10
-#endif
-
 
 int misdn_lib_get_l1_up(struct misdn_stack *stack)
 {
-	/* Pull Up L1 if we have JOLLY */ 
+	/* Pull Up L1 */ 
 	iframe_t act;
 	act.prim = PH_ACTIVATE | REQUEST; 
 	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
@@ -641,18 +635,30 @@
 	return 0;
 }
 
-
-int misdn_lib_get_l2_status(struct misdn_stack *stack)
+int misdn_lib_get_l2_te_ptp_up(struct misdn_stack *stack)
 {
 	iframe_t act;
-	
+		
 	act.prim = DL_ESTABLISH | REQUEST;
-
-	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
-
+	act.addr = (stack->upper_id  & ~LAYER_ID_MASK) | 3 | FLG_MSG_DOWN;
+		
 	act.dinfo = 0;
 	act.len = 0;
 	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
+	return 0;
+}
+
+int misdn_lib_get_l2_status(struct misdn_stack *stack)
+{
+	iframe_t act;
+	
+	act.prim = DL_ESTABLISH | REQUEST;
+
+	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
+
+	act.dinfo = 0;
+	act.len = 0;
+	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
 }
 
 int misdn_lib_get_short_status(struct misdn_stack *stack)
@@ -662,9 +668,9 @@
 	
 	act.prim = MGR_SHORTSTATUS | REQUEST; 
 	
-	act.addr = (stack->upper_id | FLG_MSG_DOWN)  ;
-
-	act.dinfo = SSTATUS_L1;
+	act.addr = (stack->upper_id | MSG_BROADCAST)  ;
+
+	act.dinfo = SSTATUS_BROADCAST_BIT | SSTATUS_ALL;
 	
 	act.len = 0;
 	return mISDN_write(stack->midev, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
@@ -693,11 +699,7 @@
 		}
 		stack->procids[i]=1;
 
-#ifdef MISDNUSER_JOLLY
 		l3_id = 0xff00 | i;
-#else
-		l3_id = 0xfff0 | i;
-#endif
     
 		ncr.prim = CC_NEW_CR | REQUEST; 
 
@@ -1054,15 +1056,11 @@
 		}
 	}
 	
-	
-
 	{
 		int ret;
 		int nt=stack->nt;
 
 		cb_log(4, port, "Init. Stack.\n");
-		
-		
 		
 		memset(&li, 0, sizeof(li));
 		{
@@ -1092,7 +1090,6 @@
 			return(NULL);
 		}
 		
-		
 		stack->lower_id = mISDN_get_layerid(midev, stack->d_stid, nt?1:3); 
 		if (stack->lower_id < 0) {
 			cb_log(-1, port, "%s: Cannot get layer(%d) id of this port.\n", __FUNCTION__, nt?1:3);
@@ -1144,6 +1141,7 @@
 			stack->l1link=1;
 		}
 
+		misdn_lib_get_short_status(stack);
 		misdn_lib_get_l1_up(stack);
 		misdn_lib_get_l2_up(stack);
 		
@@ -1277,7 +1275,6 @@
 				int ret=setup_bc(bc);
 				if (ret == -EINVAL){
 					cb_log(-1,bc->port,"send_event: setup_bc failed\n");
-					
 				}
 			}
 			
@@ -1287,7 +1284,6 @@
 
 			if ( *bc->crypt_key ) {
 				cb_log(4, stack->port, "ENABLING BLOWFISH channel:%d oad%d:%s dad%d:%s\n", bc->channel, bc->onumplan,bc->oad, bc->dnumplan,bc->dad);
-				
 				manager_ph_control_block(bc,  BF_ENABLE_KEY, bc->crypt_key, strlen(bc->crypt_key) );
 			}
 		case EVENT_SETUP:
@@ -1333,7 +1329,7 @@
 	
 	
 	if (!bc) {
-		cb_log(-1, 0, " --> !! lib: No free channel!\n");
+		cb_log(-1, stack->port, " --> !! lib: No free channel!\n");
 		return -1;
 	}
   
@@ -1347,7 +1343,6 @@
 
 int handle_cr ( struct misdn_stack *stack, iframe_t *frm)
 {
-	
 	if (!stack) return -1;
   
 	switch (frm->prim) {
@@ -1385,7 +1380,6 @@
 				dump_chan_list(stack);
 				bc->pid = 0;
 				cb_event(EVENT_CLEANUP, bc, glob_mgr->user_data);
-				
 				if (bc->stack_holder) {
 					cb_log(4,stack->port, "REMOVEING Holder\n");
 					stack_holder_remove( stack, bc);
@@ -1427,7 +1421,7 @@
 
 
 int misdn_lib_get_port_up (int port) 
-{ /* Pull Up L1 if we have JOLLY */ 
+{ /* Pull Up L1 */ 
 	struct misdn_stack *stack;
 	
 	for (stack=glob_mgr->stack_list;
@@ -1508,16 +1502,11 @@
 		return(-EINVAL);
 
 	hh=(mISDNuser_head_t*)msg->data;
-
-
 	port=stack->port;
 	
-	
 	cb_log(4, stack->port, " --> lib: prim %x dinfo %x\n",hh->prim, hh->dinfo);
-  
 	{
 		switch(hh->prim){
-			
 		case CC_RETRIEVE|INDICATION:
 		{
 			iframe_t frm; /* fake te frm to add callref to global callreflist */
@@ -1549,15 +1538,13 @@
 			
 			break;
 			
-			
 		case CC_SETUP|CONFIRM:
 		{
 			struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
 			int l3id = *((int *)(((u_char *)msg->data)+ mISDNUSER_HEAD_SIZE));
-			
-			cb_log(4, bc?stack->port:0, " --> lib: Event_ind:SETUP CONFIRM [NT] : new L3ID  is %x\n",l3id );
-	
-			if (!bc) { cb_log(4, 0, "Bc Not found (after SETUP CONFIRM)\n"); return 0; }
+			cb_log(4, stack->port, " --> lib: Event_ind:SETUP CONFIRM [NT] : new L3ID  is %x\n",l3id );
+	
+			if (!bc) { cb_log(4, stack->port, "Bc Not found (after SETUP CONFIRM)\n"); return 0; }
 			cb_log (2,bc->port,"I IND :CC_SETUP|CONFIRM: old l3id:%x new l3id:%x\n", bc->l3_id, l3id);
 			bc->l3_id=l3id;
 			cb_event(EVENT_NEW_L3ID, bc, glob_mgr->user_data);
@@ -1656,7 +1643,6 @@
 		}
 		break;
 		
-
 		case CC_RELEASE_COMPLETE|INDICATION:
 			break;
 
@@ -1696,11 +1682,9 @@
 
 			frm.addr=stack->upper_id | FLG_MSG_DOWN;
 
-
 			frm.prim = CC_RELEASE_CR|INDICATION;
 			cb_log(4, stack->port, " --> Faking Realease_cr for %x\n",frm.addr);
 			/** removing procid **/
-
 			if (!bc) {
 				cb_log(4, stack->port, " --> Didn't found BC so temporarly creating dummy BC (l3id:%x) on this port.\n", hh->dinfo);
 				memset (&dummybc,0,sizeof(dummybc));
@@ -1710,20 +1694,10 @@
 			}
 	
 			if (bc) {
-#ifdef MISDNUSER_JOLLY
 				if ( (bc->l3_id & 0xff00) == 0xff00) {
 					cb_log(4, stack->port, " --> Removing Process Id:%x on this port.\n", bc->l3_id&0xff);
 					stack->procids[bc->l3_id&0xff] = 0 ;
 				}
-#else
-				if ( (bc->l3_id & 0xfff0) == 0xfff0) {
-					cb_log(4, stack->port, " --> Removing Process Id:%x on this port.\n", bc->l3_id&0xf);
-					stack->procids[bc->l3_id&0xf] = 0 ;
-	    
-				}
-	  
-#endif
-
 			}
 			else cb_log(-1, stack->port, "Couldnt find BC so I couldnt remove the Process!!!! this is a bad port.\n");
 	
@@ -1731,7 +1705,6 @@
 			free_msg(msg);
 			return 0 ;
 		}
-      
 		break;
       
 		case CC_NEW_CR|INDICATION:
@@ -1740,24 +1713,15 @@
 		{
 			struct misdn_bchannel *bc=find_bc_by_l3id(stack, hh->dinfo);
 			int l3id = *((int *)(((u_char *)msg->data)+ mISDNUSER_HEAD_SIZE));
-			if (!bc) { cb_log(-1, 0, " --> In NEW_CR: didn't found bc ??\n"); return -1;};
-#ifdef MISDNUSER_JOLLY
+			if (!bc) { cb_log(-1, stack->port, " --> In NEW_CR: didn't found bc ??\n"); return -1;};
 			if (((l3id&0xff00)!=0xff00) && ((bc->l3_id&0xff00)==0xff00)) {
 				cb_log(4, stack->port, " --> Removing Process Id:%x on this port.\n", 0xff&bc->l3_id);
 				stack->procids[bc->l3_id&0xff] = 0 ;
 			}
-#else
-			if (((l3id&0xfff0)!=0xfff0) && ((bc->l3_id&0xfff0)==0xfff0)) {
-				cb_log(4, stack->port, "Removing Process Id:%x on this port.\n", 0xf&bc->l3_id);
-				stack->procids[bc->l3_id&0xf] = 0 ;
-			}
-
-#endif
 			cb_log(4, stack->port, "lib: Event_ind:CC_NEW_CR : very new L3ID  is %x\n",l3id );
 	
 			bc->l3_id =l3id;
 			cb_event(EVENT_NEW_L3ID, bc, glob_mgr->user_data);
-	
 	
 			free_msg(msg);
 			return 0;
@@ -1787,8 +1751,6 @@
 		}
 	}
 	
-  
-
 	{
 		/*  Parse Events and fire_up to App. */
 		struct misdn_bchannel *bc;
@@ -1954,7 +1916,7 @@
 	struct misdn_stack *stack=get_stack_by_bc(bc);
 	
 	if (!stack) {
-		cb_log(0,0,"handle_bchan: STACK not found for prim:%x with addr:%x dinfo:%x\n", frm->prim, frm->addr, frm->dinfo);
+		cb_log(0, bc->port,"handle_bchan: STACK not found for prim:%x with addr:%x dinfo:%x\n", frm->prim, frm->addr, frm->dinfo);
 		return 0;
 	}
 	
@@ -2219,17 +2181,11 @@
 #endif
       
 		} else {
-	
 			cb_log(-1, stack->port, "NO BC FOR STACK\n");		
-			
-		}
-
+		}
 	}
 
 	cb_log(4, stack->port, "TE_FRM_HANDLER: Returning 0 on prim:%x \n",frm->prim);
-
-	
-  
 	return 0;
 }
 
@@ -2237,10 +2193,7 @@
 int handle_l1(msg_t *msg)
 {
 	iframe_t *frm = (iframe_t*) msg->data;
-
 	struct misdn_stack *stack = find_stack_by_addr(frm->addr);
-
-	
 	int i ;
 	
 	if (!stack) return 0 ;
@@ -2267,19 +2220,16 @@
 			}
 			
 		}
-		
 		return 1;
 
 	case PH_ACTIVATE | REQUEST:
 		free_msg(msg);
 		cb_log(1,stack->port,"L1: PH_ACTIVATE|REQUEST \n");
-		
 		return 1;
 		
 	case PH_DEACTIVATE | REQUEST:
 		free_msg(msg);
 		cb_log(1,stack->port,"L1: PH_DEACTIVATE|REQUEST \n");
-		
 		return 1;
 		
 	case PH_DEACTIVATE | CONFIRM:
@@ -2290,13 +2240,11 @@
 			if (global_state == MISDN_INITIALIZED)  {
 				cb_event(EVENT_CLEANUP, &stack->bc[i], glob_mgr->user_data);
 			}
-			
 		}
 		
 		if (stack->nt) {
 			if (stack->nst.l1_l2(&stack->nst, msg))
 				free_msg(msg);
-			
 		} else {
 			free_msg(msg);
 		}
@@ -2315,8 +2263,6 @@
 	iframe_t *frm = (iframe_t*) msg->data;
 
 	struct misdn_stack *stack = find_stack_by_addr(frm->addr);
-
-	
 	
 	if (!stack) {
 		return 0 ;
@@ -2355,12 +2301,9 @@
 	return 0;
 }
 
-
 int handle_mgmt(msg_t *msg)
 {
 	iframe_t *frm = (iframe_t*) msg->data;
-	
-
 
 	if ( (frm->addr == 0) && (frm->prim == (MGR_DELLAYER|CONFIRM)) ) {
 		cb_log(2, 0, "MGMT: DELLAYER|CONFIRM Addr: 0 !\n") ;
@@ -2376,12 +2319,14 @@
 	
 	switch(frm->prim) {
 	case MGR_SHORTSTATUS | INDICATION:
+	case MGR_SHORTSTATUS | CONFIRM:
 		cb_log(2, 0, "MGMT: Short status dinfo %x\n",frm->dinfo);
 		
 		switch (frm->dinfo) {
 		case SSTATUS_L1_ACTIVATED:
 			cb_log(1, 0, "MGMT: SSTATUS: L1_ACTIVATED \n");
 			stack->l1link=1;
+		
 			break;
 		case SSTATUS_L1_DEACTIVATED:
 			cb_log(1, 0, "MGMT: SSTATUS: L1_DEACTIVATED \n");
@@ -2393,31 +2338,28 @@
 				stack->l1link=0;
 			
 			break;
+
 		case SSTATUS_L2_ESTABLISHED:
-			cb_log(1, 0, "MGMT: SSTATUS: L2_ESTABLISH \n");
+			cb_log(1, stack->port, "MGMT: SSTATUS: L2_ESTABLISH \n");
 			stack->l2link=1;
-			
 			break;
 			
 		case SSTATUS_L2_RELEASED:
-			cb_log(1, 0, "MGMT: SSTATUS: L2_RELEASED \n");
+			cb_log(1, stack->port, "MGMT: SSTATUS: L2_RELEASED \n");
 			stack->l2link=0;
 			stack->l1link=2;
-			
 			break;
-			
-		}
-		
+		}
 		
 		free_msg(msg);
 		return 1;
 		
 	case MGR_SETSTACK | INDICATION:
-		cb_log(2, 0, "MGMT: SETSTACK|IND dinfo %x\n",frm->dinfo);
+		cb_log(2, stack->port, "MGMT: SETSTACK|IND dinfo %x\n",frm->dinfo);
 		free_msg(msg);
 		return 1;
 	case MGR_DELLAYER | CONFIRM:
-		cb_log(2, 0, "MGMT: DELLAYER|CNF dinfo %x\n",frm->dinfo) ;
+		cb_log(2, stack->port, "MGMT: DELLAYER|CNF dinfo %x\n",frm->dinfo) ;
 		free_msg(msg);
 		return 1;
 		
@@ -2648,7 +2590,6 @@
 	struct misdn_stack *stack=get_stack_by_bc(bc);
 
 	if (!stack) return;
-	
 
 	cb_log(2, stack->port, " --> mode:%s cause:%d ocause:%d rad:%s\n", stack->nt?"NT":"TE", bc->cause, bc->out_cause, bc->rad);
 	
@@ -2680,12 +2621,10 @@
 	int err = -1 ;
   
 	if (!bc) goto ERR; 
-
 	
 	struct misdn_stack *stack=get_stack_by_bc(bc);
 
-
-	cb_log(0,0,"SENDEVENT: stack->nt:%d stack->uperid:%x\n",stack->nt, stack->upper_id);
+	cb_log(6,stack->port,"SENDEVENT: stack->nt:%d stack->uperid:%x\n",stack->nt, stack->upper_id);
 
 	if ( stack->nt && !stack->l1link) {
 		/** Queue Event **/
@@ -2707,8 +2646,6 @@
 			goto ERR;
 		}
 		break;
-
-		
 
 	case EVENT_CONNECT:
 	case EVENT_PROGRESS:
@@ -2737,14 +2674,12 @@
 			}
 		} 
 		
-		
 		if ( (event == EVENT_CONNECT ) && misdn_cap_is_speech(bc->capability) ) {
 			if ( *bc->crypt_key ) {
 				cb_log(4, stack->port,  " --> ENABLING BLOWFISH channel:%d oad%d:%s dad%d:%s \n", bc->channel, bc->onumplan,bc->oad, bc->dnumplan,bc->dad);
 				
 				manager_ph_control_block(bc,  BF_ENABLE_KEY, bc->crypt_key, strlen(bc->crypt_key) );
 			}
-			
 			
 			if (!bc->nodsp) manager_ph_control(bc,  DTMF_TONE_START, 0);
 			
@@ -2827,7 +2762,6 @@
 }
 
 
-
 int manager_isdn_handler(iframe_t *frm ,msg_t *msg)
 {  
 
@@ -2836,13 +2770,10 @@
 	}
 
 	if ( ((frm->addr | ISDN_PID_BCHANNEL_BIT )>> 28 ) == 0x5) {
-		cb_log(9,0,"BCHANNEL_BIT\n");
 		if (handle_bchan(msg)) 
 			return 0 ;
-	} else {
-		cb_log(9,0,"NO BCHANNEL_BIT !\n");
-	}
-	
+	}	
+
 	if (handle_timers(msg)) 
 		return 0 ;
 	
@@ -2910,10 +2841,8 @@
 	cb_log(0, port, "Restarting this port.\n");
 	if (stack) {
 		cb_log(0, port, "Stack:%p\n",stack);
-
 		
 		clear_l3(stack);
-		
 		{
 			msg_t *msg=alloc_msg(MAX_MSG_SIZE);
 			iframe_t *frm;
@@ -2926,12 +2855,9 @@
 			frm=(iframe_t*)msg->data;
 			/* we must activate if we are deactivated */
 			/* activate bchannel */
-	
 			frm->prim = DL_RELEASE | REQUEST;
-
 			frm->addr = stack->upper_id | FLG_MSG_DOWN;
 
-	
 			frm->dinfo = 0;
 			frm->len = 0;
 			msg_queue_tail(&glob_mgr->activatequeue, msg);
@@ -3112,8 +3038,6 @@
 		}
 		stack=stack_init(midev, port, ptp);
     
-    
-    
 		if (!stack) {
 			perror("init_stack");
 			exit(1);

Modified: team/oej/astum/channels/misdn/isdn_lib_intern.h
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/misdn/isdn_lib_intern.h?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/misdn/isdn_lib_intern.h (original)
+++ team/oej/astum/channels/misdn/isdn_lib_intern.h Thu Feb  9 07:44:22 2006
@@ -16,11 +16,8 @@
 
 #ifndef mISDNUSER_HEAD_SIZE
 
-#ifdef MISDNUSER_JOLLY
 #define mISDNUSER_HEAD_SIZE (sizeof(mISDNuser_head_t))
-#else
-#define mISDNUSER_HEAD_SIZE (sizeof(mISDN_head_t))
-#endif
+/*#define mISDNUSER_HEAD_SIZE (sizeof(mISDN_head_t))*/
 #endif
 
 

Modified: team/oej/astum/channels/misdn/isdn_msg_parser.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/channels/misdn/isdn_msg_parser.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/channels/misdn/isdn_msg_parser.c (original)
+++ team/oej/astum/channels/misdn/isdn_msg_parser.c Thu Feb  9 07:44:22 2006
@@ -165,23 +165,18 @@
 		strcpy(bc->oad, id);
 		switch (present) {
 		case 0:
-//			cb_log(3, bc->stack->port, " --> Pres:0\n");
 			bc->pres=0; /* screened */
 			break;
 		case 1:
-//			cb_log(3, bc->stack->port, " --> Pres:1\n");
 			bc->pres=1; /* not screened */
 			break;
 		default:
-//			cb_log(3, bc->stack->port, " --> Pres:%d\n",present);
 			bc->pres=0;
 		}
 		switch (screen) {
 		case 0:
-//			cb_log(4, bc->stack->port, " --> Screen:0\n");
 			break;
 		default:
-//			cb_log(4, bc->stack->port, " --> Screen:%d\n",screen);
 			;
 		} 
 	}
@@ -210,7 +205,6 @@
     
 		strcpy(bc->rad, id);
 		bc->rnumplan=type; 
-//		cb_log(3, bc->stack->port, " --> Redirecting number (REDIR_NR): '%s'\n", id);
 	}
 	{
 		int  coding, capability, mode, rate, multi, user, async, urate, stopbits, dbits, parity;
@@ -267,7 +261,6 @@
   
 	setup=(SETUP_t*)((msg->data+HEADER_LEN)); 
   
-//	cb_log(2, bc->stack->port, " --> oad %s dad %s channel %d\n",bc->oad, bc->dad,bc->channel);
 	if (bc->channel == 0 || bc->channel == ANY_CHANNEL || bc->channel==-1)
 		enc_ie_channel_id(&setup->CHANNEL_ID, msg, 0, bc->channel, nt,bc);
 	else 
@@ -346,7 +339,7 @@
 	CONNECT_t *connect;
 	msg_t *msg =(msg_t*)create_l3msg(CC_CONNECT | REQUEST, MT_CONNECT,  bc?bc->l3_id:-1, sizeof(CONNECT_t) ,nt); 
 	
-	cb_log(0,0,"BUILD_CONNECT: bc:%p bc->l3id:%d, nt:%d\n",bc,bc->l3_id,nt);
+	cb_log(6,bc->port,"BUILD_CONNECT: bc:%p bc->l3id:%d, nt:%d\n",bc,bc->l3_id,nt);
 
 	connect=(CONNECT_t*)((msg->data+HEADER_LEN)); 
 
@@ -765,7 +758,7 @@
 		dec_ie_channel_id(restart->CHANNEL_ID, (Q931_info_t *)restart, &exclusive, &channel, nt,bc);
 		if (channel==0xff) /* any channel */
 			channel=-1;
-		cb_log(0, stack->port, "CC_RESTART Request on channel:%d on this port.\n");
+		cb_log(3, stack->port, "CC_RESTART Request on channel:%d on this port.\n");
 	}
   
  
@@ -822,15 +815,12 @@
 	iframe_t *frm = (iframe_t*) msg->data;
 
 	struct misdn_stack *stack=get_stack_by_bc(bc);
-	
-#ifdef MISDNUSER_JOLLY
 	mISDNuser_head_t *hh;
 	hh=(mISDNuser_head_t*)msg->data;
-#else
-	mISDN_head_t *hh;
-	hh=(mISDN_head_t*)msg->data;
-#endif
-  
+
+	/*hh=(mISDN_head_t*)msg->data;
+	mISDN_head_t *hh;*/
+
 	if (nt) {
 		if (hh->prim == (CC_RELEASE_COMPLETE|CONFIRM)) {
 			cb_log(0, stack->port, "CC_RELEASE_COMPLETE|CONFIRM [NT] \n");

Modified: team/oej/astum/configs/misdn.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/astum/configs/misdn.conf.sample?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/configs/misdn.conf.sample (original)
+++ team/oej/astum/configs/misdn.conf.sample Thu Feb  9 07:44:22 2006
@@ -258,7 +258,7 @@
 ;
 ; change this threshold to enable dejitter functionality
 ;
-jitterbuffer_upper_threshold=0
+jitterbuffer_upper_threshold=600
 
 
 [intern]

Modified: team/oej/astum/dsp.c
URL: http://svn.digium.com/view/asterisk/team/oej/astum/dsp.c?rev=9275&r1=9274&r2=9275&view=diff
==============================================================================
--- team/oej/astum/dsp.c (original)
+++ team/oej/astum/dsp.c Thu Feb  9 07:44:22 2006
@@ -58,34 +58,41 @@
 #include "asterisk/dsp.h"
 #include "asterisk/ulaw.h"
 #include "asterisk/alaw.h"
-
-/* Number of goertzels for progress detect */
-#define GSAMP_SIZE_NA 183			/* North America - 350, 440, 480, 620, 950, 1400, 1800 Hz */
-#define GSAMP_SIZE_CR 188			/* Costa Rica, Brazil - Only care about 425 Hz */
-#define GSAMP_SIZE_UK 160			/* UK disconnect goertzel feed - shoud trigger 400hz */
-
-#define PROG_MODE_NA		0
-#define PROG_MODE_CR		1	
-#define PROG_MODE_UK		2	
-
-/* For US modes */
-#define HZ_350  0
-#define HZ_440  1
-#define HZ_480  2

[... 1320 lines stripped ...]


More information about the asterisk-commits mailing list