[asterisk-commits] branch oej/bug2617 r13626 - in
/team/oej/bug2617: ./ apps/ build_tools/ cdr/ ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Mar 19 13:10:55 MST 2006
Author: oej
Date: Sun Mar 19 14:10:38 2006
New Revision: 13626
URL: http://svn.digium.com/view/asterisk?rev=13626&view=rev
Log:
Reset automerge
Modified:
team/oej/bug2617/ (props changed)
team/oej/bug2617/Makefile
team/oej/bug2617/README
team/oej/bug2617/apps/app_dial.c
team/oej/bug2617/apps/app_mixmonitor.c
team/oej/bug2617/apps/app_queue.c
team/oej/bug2617/ast_expr2.c
team/oej/bug2617/ast_expr2.y
team/oej/bug2617/asterisk.c
team/oej/bug2617/asterisk.sgml
team/oej/bug2617/build_tools/make_build_h
team/oej/bug2617/build_tools/make_svn_branch_name
team/oej/bug2617/cdr.c
team/oej/bug2617/cdr/cdr_manager.c
team/oej/bug2617/cdr/cdr_odbc.c
team/oej/bug2617/cdr/cdr_pgsql.c
team/oej/bug2617/cdr/cdr_tds.c
team/oej/bug2617/channels/chan_iax2.c
team/oej/bug2617/channels/chan_sip.c
team/oej/bug2617/channels/chan_zap.c
team/oej/bug2617/channels/misdn/mISDN.patch (contents, props changed)
team/oej/bug2617/channels/misdn/mISDNuser.patch (props changed)
team/oej/bug2617/codecs/gsm/Makefile
team/oej/bug2617/configs/sip.conf.sample
team/oej/bug2617/configs/zapata.conf.sample
team/oej/bug2617/editline/np/vis.c
team/oej/bug2617/editline/readline.c
team/oej/bug2617/include/asterisk/cdr.h
team/oej/bug2617/pbx.c
team/oej/bug2617/res/res_config_odbc.c
team/oej/bug2617/res/res_monitor.c
Propchange: team/oej/bug2617/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/bug2617/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Mar 19 14:10:38 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-11390
+/branches/1.2:1-13625
Modified: team/oej/bug2617/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/Makefile?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/Makefile (original)
+++ team/oej/bug2617/Makefile Sun Mar 19 14:10:38 2006
@@ -212,10 +212,12 @@
endif
GREP=grep
+ID=id
ifeq ($(OSARCH),SunOS)
GREP=/usr/xpg4/bin/grep
M4=/usr/local/bin/m4
+ ID=/usr/xpg4/bin/id
endif
INCLUDE+=-Iinclude -I../include
@@ -331,7 +333,9 @@
ASTCFLAGS+= $(MALLOC_DEBUG)
ASTCFLAGS+= $(BUSYDETECT)
ASTCFLAGS+= $(OPTIONS)
+ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
ASTCFLAGS+= -fomit-frame-pointer
+endif
SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
@@ -537,7 +541,7 @@
$(MAKE) -C stdtime clean
datafiles: all
- if [ x`whoami` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+ if [ x`$(ID) -un` = xroot ]; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
for x in sounds/digits/*.gsm; do \
Modified: team/oej/bug2617/README
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/README?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/README (original)
+++ team/oej/bug2617/README Sun Mar 19 14:10:38 2006
@@ -67,7 +67,7 @@
In order to discover new features to use, please check the configuration
examples in the /configs directory of the source code distribution.
To discover the major new features of Asterisk 1.2, please visit
-http://www.astricon.net/asterisk1-2/
+http://edvina.net/asterisk1-2/
* NEW INSTALLATIONS
Modified: team/oej/bug2617/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/apps/app_dial.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/apps/app_dial.c (original)
+++ team/oej/bug2617/apps/app_dial.c Sun Mar 19 14:10:38 2006
@@ -108,9 +108,10 @@
" other than the number assigned to the caller.\n"
" g - Proceed with dialplan execution at the current extension if the\n"
" destination channel hangs up.\n"
-" G(context^exten^pri) - If the call is answered, transfer both parties to\n"
-" the specified priority. Optionally, an extension, or extension and\n"
-" context may be specified. Otherwise, the current extension is used.\n"
+" G(context^exten^pri) - If the call is answered, transfer the calling party to\n"
+" the specified priority and the called party to the specified priority+1.\n"
+" Optionally, an extension, or extension and context may be specified. \n"
+" Otherwise, the current extension is used.\n"
" h - Allow the called party to hang up by sending the '*' DTMF digit.\n"
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
" j - Jump to priority n+101 if all of the requested channels were busy.\n"
Modified: team/oej/bug2617/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/apps/app_mixmonitor.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/apps/app_mixmonitor.c (original)
+++ team/oej/bug2617/apps/app_mixmonitor.c Sun Mar 19 14:10:38 2006
@@ -203,6 +203,17 @@
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
+ if (mixmonitor->post_process) {
+ char *p;
+
+ for (p = mixmonitor->post_process; *p ; p++) {
+ if (*p == '^' && *(p+1) == '{') {
+ *p = '$';
+ }
+ }
+ pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
+ }
+
while (1) {
struct ast_frame *next;
int write;
@@ -237,17 +248,6 @@
ast_mutex_unlock(&spy.lock);
}
- if (mixmonitor->post_process) {
- char *p;
-
- for (p = mixmonitor->post_process; *p ; p++) {
- if (*p == '^' && *(p+1) == '{') {
- *p = '$';
- }
- }
- pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
- }
-
stopmon(mixmonitor->chan, &spy);
if (option_verbose > 1)
Modified: team/oej/bug2617/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/apps/app_queue.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/apps/app_queue.c (original)
+++ team/oej/bug2617/apps/app_queue.c Sun Mar 19 14:10:38 2006
@@ -941,7 +941,7 @@
}
ast_mutex_unlock(&qlock);
- if (!q) {
+ if (!q || q->realtime) {
/*! \note Load from realtime before taking the global qlock, to avoid blocking all
queue operations while waiting for the DB.
Modified: team/oej/bug2617/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/ast_expr2.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/ast_expr2.c (original)
+++ team/oej/bug2617/ast_expr2.c Sun Mar 19 14:10:38 2006
@@ -142,10 +142,10 @@
#include <asterisk/ast_expr.h>
#include <asterisk/logger.h>
-#ifdef LONG_LONG_MIN
+#if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
#define QUAD_MIN LONG_LONG_MIN
#endif
-#ifdef LONG_LONG_MAX
+#if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
#define QUAD_MAX LONG_LONG_MAX
#endif
Modified: team/oej/bug2617/ast_expr2.y
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/ast_expr2.y?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/ast_expr2.y (original)
+++ team/oej/bug2617/ast_expr2.y Sun Mar 19 14:10:38 2006
@@ -29,10 +29,10 @@
#include <asterisk/ast_expr.h>
#include <asterisk/logger.h>
-#ifdef LONG_LONG_MIN
+#if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
#define QUAD_MIN LONG_LONG_MIN
#endif
-#ifdef LONG_LONG_MAX
+#if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
#define QUAD_MAX LONG_LONG_MAX
#endif
Modified: team/oej/bug2617/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/asterisk.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/asterisk.c (original)
+++ team/oej/bug2617/asterisk.c Sun Mar 19 14:10:38 2006
@@ -83,6 +83,9 @@
#if defined(__FreeBSD__) || defined( __NetBSD__ ) || defined(SOLARIS)
#include <netdb.h>
+#if defined(SOLARIS)
+extern int daemon(int, int); /* defined in libresolv of all places */
+#endif
#endif
#include "asterisk.h"
@@ -1909,7 +1912,8 @@
snprintf(ast_config_AST_MONITOR_DIR, sizeof(ast_config_AST_MONITOR_DIR) - 1, "%s/monitor", v->value);
} else if (!strcasecmp(v->name, "astvarlibdir")) {
ast_copy_string(ast_config_AST_VAR_DIR, v->value, sizeof(ast_config_AST_VAR_DIR));
- snprintf(ast_config_AST_DB, sizeof(ast_config_AST_DB), "%s/%s", v->value, "astdb");
+ snprintf(ast_config_AST_DB, sizeof(ast_config_AST_DB), "%s/astdb", v->value);
+ snprintf(ast_config_AST_KEY_DIR, sizeof(ast_config_AST_KEY_DIR), "%s/keys", v->value);
} else if (!strcasecmp(v->name, "astlogdir")) {
ast_copy_string(ast_config_AST_LOG_DIR, v->value, sizeof(ast_config_AST_LOG_DIR));
} else if (!strcasecmp(v->name, "astagidir")) {
@@ -2174,7 +2178,7 @@
exit(1);
}
if (setgid(gr->gr_gid)) {
- ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup);
+ ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", (int)gr->gr_gid, rungroup);
exit(1);
}
if (setgroups(0, NULL)) {
@@ -2194,7 +2198,7 @@
}
if (!rungroup) {
if (setgid(pw->pw_gid)) {
- ast_log(LOG_WARNING, "Unable to setgid to %d!\n", pw->pw_gid);
+ ast_log(LOG_WARNING, "Unable to setgid to %d!\n", (int)pw->pw_gid);
exit(1);
}
if (initgroups(pw->pw_name, pw->pw_gid)) {
@@ -2203,7 +2207,7 @@
}
}
if (setuid(pw->pw_uid)) {
- ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser);
+ ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", (int)pw->pw_uid, runuser);
exit(1);
}
setenv("ASTERISK_ALREADY_NONROOT","yes",1);
@@ -2270,7 +2274,7 @@
unlink((char *)ast_config_AST_PID);
f = fopen((char *)ast_config_AST_PID, "w");
if (f) {
- fprintf(f, "%d\n", getpid());
+ fprintf(f, "%d\n", (int)getpid());
fclose(f);
} else
ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", (char *)ast_config_AST_PID, strerror(errno));
@@ -2281,7 +2285,7 @@
unlink((char *)ast_config_AST_PID);
f = fopen((char *)ast_config_AST_PID, "w");
if (f) {
- fprintf(f, "%d\n", getpid());
+ fprintf(f, "%d\n", (int)getpid());
fclose(f);
} else
ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", (char *)ast_config_AST_PID, strerror(errno));
Modified: team/oej/bug2617/asterisk.sgml
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/asterisk.sgml?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/asterisk.sgml (original)
+++ team/oej/bug2617/asterisk.sgml Sun Mar 19 14:10:38 2006
@@ -27,6 +27,7 @@
<arg><option>-G </option><replaceable class="parameter">group</replaceable></arg>
<arg><option>-x </option><replaceable class="parameter">command</replaceable></arg>
<arg><option>-M </option><replaceable class="parameter">value</replaceable></arg>
+<arg><option>-L </option><replaceable class="parameter">loadaverage</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
Modified: team/oej/bug2617/build_tools/make_build_h
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/build_tools/make_build_h?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/build_tools/make_build_h (original)
+++ team/oej/bug2617/build_tools/make_build_h Sun Mar 19 14:10:38 2006
@@ -3,7 +3,11 @@
KERNEL=`uname -r`
MACHINE=`uname -m`
OS=`uname -s`
-USER=`whoami`
+if [ `uname -s` = "SunOS" ]; then
+ USER=`/usr/xpg4/bin/id -un`
+else
+ USER=`id -un`
+fi
DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
cat << END
/*
Modified: team/oej/bug2617/build_tools/make_svn_branch_name
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/build_tools/make_svn_branch_name?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/build_tools/make_svn_branch_name (original)
+++ team/oej/bug2617/build_tools/make_svn_branch_name Sun Mar 19 14:10:38 2006
@@ -1,6 +1,6 @@
#!/bin/sh
-PARTS=`LANG=C svn info | grep URL | awk '{print $2;}' | sed -e s:^.*/svn/asterisk/:: | sed -e 's:/: :g'`
+PARTS=`LANG=C svn info | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
BRANCH=0
TEAM=0
Modified: team/oej/bug2617/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/cdr.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/cdr.c (original)
+++ team/oej/bug2617/cdr.c Sun Mar 19 14:10:38 2006
@@ -251,9 +251,9 @@
strftime(workspace, workspacelen, fmt, &tm);
}
} else if (!strcasecmp(name, "duration"))
- snprintf(workspace, workspacelen, "%d", cdr->duration);
+ snprintf(workspace, workspacelen, "%ld", cdr->duration);
else if (!strcasecmp(name, "billsec"))
- snprintf(workspace, workspacelen, "%d", cdr->billsec);
+ snprintf(workspace, workspacelen, "%ld", cdr->billsec);
else if (!strcasecmp(name, "disposition"))
ast_copy_string(workspace, ast_cdr_disp2str(cdr->disposition), workspacelen);
else if (!strcasecmp(name, "amaflags"))
@@ -788,11 +788,13 @@
ast_log(LOG_WARNING, "CDR on channel '%s' already posted\n", chan);
if (ast_tvzero(cdr->end))
ast_log(LOG_WARNING, "CDR on channel '%s' lacks end\n", chan);
- if (ast_tvzero(cdr->start))
+ if (ast_tvzero(cdr->start)) {
ast_log(LOG_WARNING, "CDR on channel '%s' lacks start\n", chan);
- cdr->duration = cdr->end.tv_sec - cdr->start.tv_sec + (cdr->end.tv_usec - cdr->start.tv_usec) / 1000000;
+ cdr->disposition = AST_CDR_FAILED;
+ } else
+ cdr->duration = cdr->end.tv_sec - cdr->start.tv_sec;
if (!ast_tvzero(cdr->answer))
- cdr->billsec = cdr->end.tv_sec - cdr->answer.tv_sec + (cdr->end.tv_usec - cdr->answer.tv_usec) / 1000000;
+ cdr->billsec = cdr->end.tv_sec - cdr->answer.tv_sec;
else
cdr->billsec = 0;
ast_set_flag(cdr, AST_CDR_FLAG_POSTED);
Modified: team/oej/bug2617/cdr/cdr_manager.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/cdr/cdr_manager.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/cdr/cdr_manager.c (original)
+++ team/oej/bug2617/cdr/cdr_manager.c Sun Mar 19 14:10:38 2006
@@ -121,8 +121,8 @@
"StartTime: %s\r\n"
"AnswerTime: %s\r\n"
"EndTime: %s\r\n"
- "Duration: %d\r\n"
- "BillableSeconds: %d\r\n"
+ "Duration: %ld\r\n"
+ "BillableSeconds: %ld\r\n"
"Disposition: %s\r\n"
"AMAFlags: %s\r\n"
"UniqueID: %s\r\n"
Modified: team/oej/bug2617/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/cdr/cdr_odbc.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/cdr/cdr_odbc.c (original)
+++ team/oej/bug2617/cdr/cdr_odbc.c Sun Mar 19 14:10:38 2006
@@ -122,7 +122,7 @@
if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
if (option_verbose > 10)
ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Failure in AllocStatement %d\n", ODBC_res);
- SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+ SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
SQLFreeHandle(SQL_HANDLE_STMT, ODBC_stmt);
connected = 0;
ast_mutex_unlock(&odbc_lock);
@@ -133,12 +133,12 @@
strange reason if I don't it blows holes in memory like
like a shotgun. So we just do this so its safe. */
- ODBC_res = SQLPrepare(ODBC_stmt, sqlcmd, SQL_NTS);
+ ODBC_res = SQLPrepare(ODBC_stmt, (unsigned char *)sqlcmd, SQL_NTS);
if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
if (option_verbose > 10)
ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error in PREPARE %d\n", ODBC_res);
- SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+ SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
SQLFreeHandle(SQL_HANDLE_STMT, ODBC_stmt);
connected = 0;
ast_mutex_unlock(&odbc_lock);
@@ -381,7 +381,7 @@
if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
if (option_verbose > 10)
ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error in Query %d\n", ODBC_res);
- SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+ SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
SQLFreeHandle(SQL_HANDLE_STMT, ODBC_stmt);
connected = 0;
return -1;
@@ -438,7 +438,7 @@
if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
if (option_verbose > 10)
ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error SQLConnect %d\n", ODBC_res);
- SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+ SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
SQLFreeHandle(SQL_HANDLE_ENV, ODBC_env);
connected = 0;
return -1;
Modified: team/oej/bug2617/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/cdr/cdr_pgsql.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/cdr/cdr_pgsql.c (original)
+++ team/oej/bug2617/cdr/cdr_pgsql.c Sun Mar 19 14:10:38 2006
@@ -122,7 +122,7 @@
snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,"
"lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES"
- " ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%d,%d,'%s',%d,'%s','%s','%s')",
+ " ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%ld,%ld,'%s',%ld,'%s','%s','%s')",
table,timestr,clid,cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata,
cdr->duration,cdr->billsec,ast_cdr_disp2str(cdr->disposition),cdr->amaflags, cdr->accountcode, uniqueid, userfield);
Modified: team/oej/bug2617/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/cdr/cdr_tds.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/cdr/cdr_tds.c (original)
+++ team/oej/bug2617/cdr/cdr_tds.c Sun Mar 19 14:10:38 2006
@@ -169,8 +169,8 @@
"%s, " /* start */
"%s, " /* answer */
"%s, " /* end */
- "%d, " /* duration */
- "%d, " /* billsec */
+ "%ld, " /* duration */
+ "%ld, " /* billsec */
"'%s', " /* disposition */
"'%s', " /* amaflags */
"'%s'" /* uniqueid */
Modified: team/oej/bug2617/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/channels/chan_iax2.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/channels/chan_iax2.c (original)
+++ team/oej/bug2617/channels/chan_iax2.c Sun Mar 19 14:10:38 2006
@@ -1958,7 +1958,7 @@
ast_cli(fd, " Status : ");
peer_status(peer, status, sizeof(status));
ast_cli(fd, "%s\n",status);
- ast_cli(fd, " Qualify : every %d when OK, every %d when UNREACHABLE (sample smoothing %s)\n", peer->pokefreqok, peer->pokefreqnotok, (peer->smoothing == 1) ? "On" : "Off");
+ ast_cli(fd, " Qualify : every %dms when OK, every %dms when UNREACHABLE (sample smoothing %s)\n", peer->pokefreqok, peer->pokefreqnotok, peer->smoothing ? "On" : "Off");
ast_cli(fd,"\n");
if (ast_test_flag(peer, IAX_TEMPONLY))
destroy_peer(peer);
Modified: team/oej/bug2617/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/channels/chan_sip.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/channels/chan_sip.c (original)
+++ team/oej/bug2617/channels/chan_sip.c Sun Mar 19 14:10:38 2006
@@ -579,7 +579,7 @@
#define SIP_PKT_DEBUG (1 << 0) /*!< Debug this packet */
#define SIP_PKT_WITH_TOTAG (1 << 1) /*!< This packet has a to-tag */
-static int global_rtautoclear = 120;
+static int global_rtautoclear;
/*! \brief sip_pvt: PVT structures are used for each SIP conversation, ie. a call */
static struct sip_pvt {
@@ -1362,12 +1362,12 @@
msg = sip_methods[sipmethod].text;
+ ast_mutex_lock(&p->lock);
cur = p->packets;
while(cur) {
if ((cur->seqno == seqno) && ((ast_test_flag(cur, FLAG_RESPONSE)) == resp) &&
((ast_test_flag(cur, FLAG_RESPONSE)) ||
(!strncasecmp(msg, cur->data, strlen(msg)) && (cur->data[strlen(msg)] < 33)))) {
- ast_mutex_lock(&p->lock);
if (!resp && (seqno == p->pendinginvite)) {
ast_log(LOG_DEBUG, "Acked pending invite %d\n", p->pendinginvite);
p->pendinginvite = 0;
@@ -1384,13 +1384,13 @@
ast_sched_del(sched, cur->retransid);
}
free(cur);
- ast_mutex_unlock(&p->lock);
res = 0;
break;
}
prev = cur;
cur = cur->next;
}
+ ast_mutex_unlock(&p->lock);
ast_log(LOG_DEBUG, "Stopping retransmission on '%s' of %s %d: Match %s\n", p->callid, resp ? "Response" : "Request", seqno, res ? "Not Found" : "Found");
return res;
}
@@ -2447,13 +2447,15 @@
if (!ast_test_flag(p, SIP_ALREADYGONE) && !ast_strlen_zero(p->initreq.data)) {
if (needcancel) { /* Outgoing call, not up */
if (ast_test_flag(p, SIP_OUTGOING)) {
+ /* stop retransmitting an INVITE that has not received a response */
+ __sip_pretend_ack(p);
+
+ /* Send a new request: CANCEL */
transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, 1, 0);
/* Actually don't destroy us yet, wait for the 487 on our original
INVITE, but do set an autodestruct just in case we never get it. */
ast_clear_flag(&locflags, SIP_NEEDDESTROY);
- sip_scheddestroy(p, 15000);
- /* stop retransmitting an INVITE that has not received a response */
- __sip_pretend_ack(p);
+ sip_scheddestroy(p, 32000);
if ( p->initid != -1 ) {
/* channel still up - reverse dec of inUse counter
only if the channel is not auto-congested */
@@ -2483,12 +2485,34 @@
return 0;
}
+/*! \brief Try setting codec suggested by the SIP_CODEC channel variable */
+static void try_suggested_sip_codec(struct sip_pvt *p)
+{
+ int fmt;
+ char *codec;
+
+ codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC");
+ if (!codec)
+ return;
+
+ fmt = ast_getformatbyname(codec);
+ if (fmt) {
+ ast_log(LOG_NOTICE, "Changing codec to '%s' for this call because of ${SIP_CODEC) variable\n",codec);
+ if (p->jointcapability & fmt) {
+ p->jointcapability &= fmt;
+ p->capability &= fmt;
+ } else
+ ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because it is not shared by both ends.\n");
+ } else
+ ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because of unrecognized/not configured codec (check allow/disallow in sip.conf): %s\n",codec);
+ return;
+}
+
/*! \brief sip_answer: Answer SIP call , send 200 OK on Invite
* Part of PBX interface */
static int sip_answer(struct ast_channel *ast)
{
- int res = 0,fmt;
- char *codec;
+ int res = 0;
struct sip_pvt *p = ast->tech_pvt;
ast_mutex_lock(&p->lock);
@@ -2496,19 +2520,7 @@
#ifdef OSP_SUPPORT
time(&p->ospstart);
#endif
-
- codec=pbx_builtin_getvar_helper(p->owner,"SIP_CODEC");
- if (codec) {
- fmt=ast_getformatbyname(codec);
- if (fmt) {
- ast_log(LOG_NOTICE, "Changing codec to '%s' for this call because of ${SIP_CODEC) variable\n",codec);
- if (p->jointcapability & fmt) {
- p->jointcapability &= fmt;
- p->capability &= fmt;
- } else
- ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because it is not shared by both ends.\n");
- } else ast_log(LOG_NOTICE, "Ignoring ${SIP_CODEC} variable because of unrecognized/not configured codec (check allow/disallow in sip.conf): %s\n",codec);
- }
+ try_suggested_sip_codec(p);
ast_setstate(ast, AST_STATE_UP);
if (option_debug)
@@ -4514,6 +4526,7 @@
respprep(&resp, p, msg, req);
if (p->rtp) {
ast_rtp_offered_from_local(p->rtp, 0);
+ try_suggested_sip_codec(p);
add_sdp(&resp, p);
} else {
ast_log(LOG_ERROR, "Can't add SDP to response, since we have no RTP session allocated. Call-ID %s\n", p->callid);
@@ -9242,6 +9255,8 @@
snprintf(buf, len, "%d", peer->call_limit);
} else if (!strcasecmp(colname, "curcalls")) {
snprintf(buf, len, "%d", peer->inUse);
+ } else if (!strcasecmp(colname, "accountcode")) {
+ ast_copy_string(buf, peer->accountcode, len);
} else if (!strcasecmp(colname, "useragent")) {
ast_copy_string(buf, peer->useragent, len);
} else if (!strcasecmp(colname, "mailbox")) {
@@ -9301,6 +9316,7 @@
"- curcalls Current amount of calls \n"
" Only available if call-limit is set\n"
"- language Default language for peer\n"
+ "- accountcode Account code for this peer\n"
"- useragent Current user agent id for peer\n"
"- codec[x] Preferred codec index number 'x' (beginning with zero).\n"
"\n"
@@ -9462,12 +9478,13 @@
break;
case 183: /* Session progress */
sip_cancel_destroy(p);
+ /* Ignore 183 Session progress without SDP */
if (!strcasecmp(get_header(req, "Content-Type"), "application/sdp")) {
process_sdp(p, req);
- }
- if (!ignore && p->owner) {
- /* Queue a progress frame */
- ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
+ if (!ignore && p->owner) {
+ /* Queue a progress frame */
+ ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
+ }
}
break;
case 200: /* 200 OK on invite - someone's answering our call */
@@ -10683,9 +10700,17 @@
int found = 0;
char *mailbox = NULL;
int mailboxsize = 0;
+ char *eventparam;
char *event = get_header(req, "Event"); /* Get Event package name */
char *accept = get_header(req, "Accept");
+
+ /* Find parameters to Event: header value and remove them for now */
+ eventparam = strchr(event, ';');
+ if (eventparam) {
+ *eventparam = '\0';
+ eventparam++;
+ }
if (!strcmp(event, "message-summary") && !strcmp(accept, "application/simple-message-summary")) {
mailbox = mailboxbuf;
@@ -12319,10 +12344,12 @@
global_rtptimeout = 0;
global_rtpholdtimeout = 0;
global_rtpkeepalive = 0;
+ global_rtautoclear = 120;
pedanticsipchecking = 0;
global_reg_timeout = DEFAULT_REGISTRATION_TIMEOUT;
global_regattempts_max = 0;
ast_clear_flag(&global_flags, AST_FLAGS_ALL);
+ ast_clear_flag(&global_flags_page2, AST_FLAGS_ALL);
ast_set_flag(&global_flags, SIP_DTMF_RFC2833);
ast_set_flag(&global_flags, SIP_NAT_RFC3581);
ast_set_flag(&global_flags, SIP_CAN_REINVITE);
Modified: team/oej/bug2617/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/channels/chan_zap.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/channels/chan_zap.c (original)
+++ team/oej/bug2617/channels/chan_zap.c Sun Mar 19 14:10:38 2006
@@ -5904,7 +5904,7 @@
number = 0;
/* If set to use V23 Signalling, launch our FSK gubbins and listen for it */
} else if (p->cid_signalling == CID_SIG_V23) {
- cs = callerid_new(cid_signalling);
+ cs = callerid_new(p->cid_signalling);
if (cs) {
samples = 0;
#if 1
@@ -6075,7 +6075,7 @@
}
} else if (p->use_callerid && p->cid_start == CID_START_RING) {
/* FSK Bell202 callerID */
- cs = callerid_new(cid_signalling);
+ cs = callerid_new(p->cid_signalling);
if (cs) {
#if 1
bump_gains(p);
Modified: team/oej/bug2617/channels/misdn/mISDN.patch
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/channels/misdn/mISDN.patch?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/channels/misdn/mISDN.patch (original)
+++ team/oej/bug2617/channels/misdn/mISDN.patch Sun Mar 19 14:10:38 2006
@@ -430,7 +430,7 @@
--- /tmp/mISDN/drivers/isdn/hardware/mISDN/dsp_cancel.c 1970-01-01 01:00:00.000000000 +0100
+++ mISDN/drivers/isdn/hardware/mISDN/dsp_cancel.c 2005-12-02 09:57:08.000000000 +0100
@@ -0,0 +1,390 @@
-+/* $Id: mISDN_echo_cancel.patch,v 1.1 2005/11/07 16:01:31 nadi Exp $
++/* $Id$
+ *
+ * Simple but fast Echo cancellation for mISDN_dsp.
+ *
Propchange: team/oej/bug2617/channels/misdn/mISDN.patch
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/oej/bug2617/channels/misdn/mISDN.patch
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: team/oej/bug2617/channels/misdn/mISDN.patch
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/oej/bug2617/channels/misdn/mISDNuser.patch
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/oej/bug2617/channels/misdn/mISDNuser.patch
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: team/oej/bug2617/channels/misdn/mISDNuser.patch
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: team/oej/bug2617/codecs/gsm/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/codecs/gsm/Makefile?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/codecs/gsm/Makefile (original)
+++ team/oej/bug2617/codecs/gsm/Makefile Sun Mar 19 14:10:38 2006
@@ -236,7 +236,9 @@
ifneq ($(shell uname -m),armv4l)
ifneq ($(shell uname -m),sparc64)
ifneq (${PROC},arm)
+ifneq ($(shell uname -m), parisc)
GSM_SOURCES+= $(SRC)/k6opt.s
+endif
endif
endif
endif
@@ -297,7 +299,9 @@
ifneq ($(shell uname -m), alpha)
ifneq ($(shell uname -m), sparc64)
ifneq ($(shell uname -m), armv4l)
+ifneq ($(shell uname -m), parisc)
GSM_OBJECTS+= $(SRC)/k6opt.o
+endif
endif
endif
endif
Modified: team/oej/bug2617/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/configs/sip.conf.sample?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/configs/sip.conf.sample (original)
+++ team/oej/bug2617/configs/sip.conf.sample Sun Mar 19 14:10:38 2006
@@ -86,6 +86,7 @@
;progressinband=never ; If we should generate in-band ringing always
; use 'never' to never use in-band signalling, even in cases
; where some buggy devices might not render it
+ ; Valid values: yes, no, never Default: never
;useragent=Asterisk PBX ; Allows you to change the user agent string
;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
; Note that promiscredir when redirects are made to the
Modified: team/oej/bug2617/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/configs/zapata.conf.sample?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/configs/zapata.conf.sample (original)
+++ team/oej/bug2617/configs/zapata.conf.sample Sun Mar 19 14:10:38 2006
@@ -431,7 +431,7 @@
;callprogress=yes
;progzone=us
;
-; FXO (FXS signalled) devices must have a timeout to determine whe there was a
+; FXO (FXS signalled) devices must have a timeout to determine if there was a
; hangup before the line was answered. This value can be tweaked to shorten
; how long it takes before Zap considers a non-ringing line to have hungup.
;
Modified: team/oej/bug2617/editline/np/vis.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/editline/np/vis.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/editline/np/vis.c (original)
+++ team/oej/bug2617/editline/np/vis.c Sun Mar 19 14:10:38 2006
@@ -68,6 +68,7 @@
#endif
#ifdef SOLARIS
+#include <alloca.h>
typedef unsigned int u_int32_t;
#endif
Modified: team/oej/bug2617/editline/readline.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/editline/readline.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/editline/readline.c (original)
+++ team/oej/bug2617/editline/readline.c Sun Mar 19 14:10:38 2006
@@ -51,6 +51,11 @@
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
+
+#ifdef SOLARIS
+#include <alloca.h>
+#endif
+
#include "histedit.h"
#include "readline/readline.h"
#include "el.h"
Modified: team/oej/bug2617/include/asterisk/cdr.h
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/include/asterisk/cdr.h?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/include/asterisk/cdr.h (original)
+++ team/oej/bug2617/include/asterisk/cdr.h Sun Mar 19 14:10:38 2006
@@ -74,13 +74,13 @@
struct timeval end;
/*! Total time in system, in seconds */
- int duration;
+ long int duration;
/*! Total time call is up, in seconds */
- int billsec;
+ long int billsec;
/*! What happened to the call */
- int disposition;
+ long int disposition;
/*! What flags to use */
- int amaflags;
+ long int amaflags;
/*! What account number to use */
char accountcode[AST_MAX_ACCOUNT_CODE];
/*! flags */
Modified: team/oej/bug2617/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/pbx.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/pbx.c (original)
+++ team/oej/bug2617/pbx.c Sun Mar 19 14:10:38 2006
@@ -225,6 +225,7 @@
int pbx_builtin_setvar(struct ast_channel *, void *);
static int pbx_builtin_importvar(struct ast_channel *, void *);
+AST_MUTEX_DEFINE_STATIC(globalslock);
static struct varshead globals;
static int autofallthrough = 0;
@@ -1138,10 +1139,8 @@
}
if (!(*ret)) {
/* Try globals */
+ ast_mutex_lock(&globalslock);
AST_LIST_TRAVERSE(&globals,variables,entries) {
-#if 0
- ast_log(LOG_WARNING,"Comparing variable '%s' with '%s'\n",var,ast_var_name(variables));
-#endif
if (strcasecmp(ast_var_name(variables),var)==0) {
*ret = ast_var_value(variables);
if (*ret) {
@@ -1150,6 +1149,7 @@
}
}
}
+ ast_mutex_unlock(&globalslock);
}
}
}
@@ -4648,10 +4648,12 @@
/* if we are adding a hint, and there are global variables, and the hint
contains variable references, then expand them
*/
+ ast_mutex_lock(&globalslock);
if ((priority == PRIORITY_HINT) && AST_LIST_FIRST(&globals) && strstr(application, "${")) {
pbx_substitute_variables_varshead(&globals, application, expand_buf, sizeof(expand_buf));
application = expand_buf;
}
+ ast_mutex_unlock(&globalslock);
length = sizeof(struct ast_exten);
length += strlen(extension) + 1;
@@ -5884,29 +5886,34 @@
char *pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
{
- struct ast_var_t *variables;
- struct varshead *headp;
-
- if (chan)
- headp=&chan->varshead;
- else
- headp=&globals;
-
- if (name) {
- AST_LIST_TRAVERSE(headp,variables,entries) {
- if (!strcmp(name, ast_var_name(variables)))
- return ast_var_value(variables);
- }
- if (headp != &globals) {
- /* Check global variables if we haven't already */
- headp = &globals;
- AST_LIST_TRAVERSE(headp,variables,entries) {
- if (!strcmp(name, ast_var_name(variables)))
- return ast_var_value(variables);
- }
- }
- }
- return NULL;
+ struct ast_var_t *variables;
+ char *ret = NULL;
+ int i;
+ struct varshead *places[2] = { NULL, &globals };
+
+ if (!name)
+ return NULL;
+ if (chan)
+ places[0] = &chan->varshead;
+
+ for (i = 0; i < 2; i++) {
+ if (!places[i])
+ continue;
+ if (places[i] == &globals)
+ ast_mutex_lock(&globalslock);
+ AST_LIST_TRAVERSE(places[i], variables, entries) {
+ if (!strcmp(name, ast_var_name(variables))) {
+ ret = ast_var_value(variables);
+ break;
+ }
+ }
+ if (places[i] == &globals)
+ ast_mutex_unlock(&globalslock);
+ if (ret)
+ break;
+ }
+
+ return ret;
}
void pbx_builtin_pushvar_helper(struct ast_channel *chan, const char *name, const char *value)
@@ -5924,8 +5931,12 @@
if (value) {
if ((option_verbose > 1) && (headp == &globals))
ast_verbose(VERBOSE_PREFIX_2 "Setting global variable '%s' to '%s'\n", name, value);
- newvariable = ast_var_assign(name, value);
+ newvariable = ast_var_assign(name, value);
+ if (headp == &globals)
+ ast_mutex_lock(&globalslock);
AST_LIST_INSERT_HEAD(headp, newvariable, entries);
+ if (headp == &globals)
+ ast_mutex_unlock(&globalslock);
}
}
@@ -5947,6 +5958,8 @@
nametail++;
}
+ if (headp == &globals)
+ ast_mutex_lock(&globalslock);
AST_LIST_TRAVERSE (headp, newvariable, entries) {
if (strcasecmp(ast_var_name(newvariable), nametail) == 0) {
/* there is already such a variable, delete it */
@@ -5954,14 +5967,17 @@
ast_var_delete(newvariable);
break;
}
- }
-
+ }
+
if (value) {
if ((option_verbose > 1) && (headp == &globals))
ast_verbose(VERBOSE_PREFIX_2 "Setting global variable '%s' to '%s'\n", name, value);
newvariable = ast_var_assign(name, value);
AST_LIST_INSERT_HEAD(headp, newvariable, entries);
}
+
+ if (headp == &globals)
+ ast_mutex_unlock(&globalslock);
}
int pbx_builtin_setvar_old(struct ast_channel *chan, void *data)
@@ -6076,10 +6092,11 @@
void pbx_builtin_clear_globals(void)
{
struct ast_var_t *vardata;
- while (!AST_LIST_EMPTY(&globals)) {
- vardata = AST_LIST_REMOVE_HEAD(&globals, entries);
+
+ ast_mutex_lock(&globalslock);
+ while ((vardata = AST_LIST_REMOVE_HEAD(&globals, entries)))
ast_var_delete(vardata);
- }
+ ast_mutex_unlock(&globalslock);
}
static int pbx_checkcondition(char *condition)
Modified: team/oej/bug2617/res/res_config_odbc.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug2617/res/res_config_odbc.c?rev=13626&r1=13625&r2=13626&view=diff
==============================================================================
--- team/oej/bug2617/res/res_config_odbc.c (original)
+++ team/oej/bug2617/res/res_config_odbc.c Sun Mar 19 14:10:38 2006
@@ -103,7 +103,7 @@
newval = va_arg(aq, const char *);
}
va_end(aq);
- res = SQLPrepare(stmt, sql, SQL_NTS);
[... 56 lines stripped ...]
More information about the asterisk-commits
mailing list