[Pkg-voip-commits] r1759 - in asterisk/branches/sarge/debian: .
patches
Tzafrir Cohen
tzafrir-guest at costa.debian.org
Thu May 11 15:32:34 UTC 2006
Author: tzafrir-guest
Date: 2006-05-11 15:32:31 +0000 (Thu, 11 May 2006)
New Revision: 1759
Modified:
asterisk/branches/sarge/debian/changelog
asterisk/branches/sarge/debian/patches/bristuff.dpatch
Log:
backporting bristuff upgrade
Modified: asterisk/branches/sarge/debian/changelog
===================================================================
--- asterisk/branches/sarge/debian/changelog 2006-05-11 15:17:30 UTC (rev 1758)
+++ asterisk/branches/sarge/debian/changelog 2006-05-11 15:32:31 UTC (rev 1759)
@@ -15,8 +15,9 @@
[ Tzafrir Cohen ]
* reunite init.d and logrotate scripts in the package asterisk
* Re-add correct_pid_display.dpatch
+ * bristuff 0.3.0-PRE1p (gsm functionality missing: needs libgstam)
- -- Mark Purcell <msp at debian.org> Sat, 6 May 2006 11:24:21 +0100
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Thu, 11 May 2006 18:14:36 +0300
asterisk (1:1.2.7.1.dfsg-2) unstable; urgency=high
Modified: asterisk/branches/sarge/debian/patches/bristuff.dpatch
===================================================================
--- asterisk/branches/sarge/debian/patches/bristuff.dpatch 2006-05-11 15:17:30 UTC (rev 1758)
+++ asterisk/branches/sarge/debian/patches/bristuff.dpatch 2006-05-11 15:32:31 UTC (rev 1759)
@@ -2,19 +2,19 @@
## bristuff.dpatch by Tzafrir Cohen <tzafrir.cohen at xorcom.com>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: bristuff support in asterisk: asterisk.patch from bristuff-0.3.0-PRE-1n
-## DP: with some adjustments for asterisk 1.2.7
+## DP: bristuff support in asterisk: asterisk.patch from bristuff-0.3.0-PRE-1p
+## DP: cygdef.h removed ;-)
@DPATCH@
-diff -urN asterisk-1.2.6.orig/.version asterisk-1.2.6/.version
---- asterisk-1.2.6.orig/.version 2006-03-26 18:49:52.000000000 +0200
-+++ asterisk-1.2.6/.version 2006-04-10 10:41:06.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/.version asterisk-1.2.7.1/.version
+--- asterisk-1.2.7.1.orig/.version 2006-04-13 19:50:06.000000000 +0200
++++ asterisk-1.2.7.1/.version 2006-04-18 14:39:46.000000000 +0200
@@ -1 +1 @@
-1.2.7.1
-+1.2.7.1-BRIstuffed-0.3.0-PRE-1n
-diff -urN asterisk-1.2.6.orig/HARDWARE asterisk-1.2.6/HARDWARE
---- asterisk-1.2.6.orig/HARDWARE 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/HARDWARE 2006-04-10 11:59:19.000000000 +0200
++1.2.7.1-BRIstuffed-0.3.0-PRE-1p
+diff -urN asterisk-1.2.7.1.orig/HARDWARE asterisk-1.2.7.1/HARDWARE
+--- asterisk-1.2.7.1.orig/HARDWARE 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/HARDWARE 2006-04-18 14:39:28.000000000 +0200
@@ -37,6 +37,19 @@
* Wildcard TE410P - Quad T1/E1 switchable interface. Supports PRI and
RBS signalling, as well as PPP, FR, and HDLC data modes.
@@ -35,9 +35,9 @@
Non-zaptel compatible hardware
==============================
-diff -urN asterisk-1.2.6.orig/LICENSE asterisk-1.2.6/LICENSE
---- asterisk-1.2.6.orig/LICENSE 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/LICENSE 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/LICENSE asterisk-1.2.7.1/LICENSE
+--- asterisk-1.2.7.1.orig/LICENSE 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/LICENSE 2006-04-18 14:39:28.000000000 +0200
@@ -1,7 +1,7 @@
-Asterisk is distributed under the GNU General Public License version 2
-and is also available under alternative licenses negotiated directly
@@ -50,10 +50,10 @@
except as defined below. The GPL (version 2) is included in this
source tree in the file COPYING.
-diff -urN asterisk-1.2.6.orig/Makefile asterisk-1.2.6/Makefile
---- asterisk-1.2.6.orig/Makefile 2006-03-03 18:13:37.000000000 +0100
-+++ asterisk-1.2.6/Makefile 2006-04-10 10:40:28.000000000 +0200
-@@ -762,6 +762,9 @@
+diff -urN asterisk-1.2.7.1.orig/Makefile asterisk-1.2.7.1/Makefile
+--- asterisk-1.2.7.1.orig/Makefile 2006-04-11 23:58:47.000000000 +0200
++++ asterisk-1.2.7.1/Makefile 2006-04-18 14:39:28.000000000 +0200
+@@ -760,6 +760,9 @@
echo ";astctlowner = root" ; \
echo ";astctlgroup = apache" ; \
echo ";astctl = asterisk.ctl" ; \
@@ -63,9 +63,9 @@
) > $(DESTDIR)$(ASTCONFPATH) ; \
else \
echo "Skipping asterisk.conf creation"; \
-diff -urN asterisk-1.2.6.orig/README asterisk-1.2.6/README
---- asterisk-1.2.6.orig/README 2006-03-03 09:12:33.000000000 +0100
-+++ asterisk-1.2.6/README 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/README asterisk-1.2.7.1/README
+--- asterisk-1.2.7.1.orig/README 2006-03-03 09:12:33.000000000 +0100
++++ asterisk-1.2.7.1/README 2006-04-18 14:39:28.000000000 +0200
@@ -4,6 +4,8 @@
Copyright (C) 2001-2005 Digium, Inc.
@@ -75,9 +75,9 @@
================================================================
* SECURITY
-diff -urN asterisk-1.2.6.orig/README.chan_capi asterisk-1.2.6/README.chan_capi
---- asterisk-1.2.6.orig/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/README.chan_capi 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/README.chan_capi asterisk-1.2.7.1/README.chan_capi
+--- asterisk-1.2.7.1.orig/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/README.chan_capi 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,146 @@
+(CAPI*) chan_capi a Common ISDN API 2.0 implementation for Asterisk
+(C) 2002, 2003, 2004, 2005 Junghanns.NET GmbH
@@ -225,9 +225,9 @@
+
+
+
-diff -urN asterisk-1.2.6.orig/agi/Makefile asterisk-1.2.6/agi/Makefile
---- asterisk-1.2.6.orig/agi/Makefile 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/agi/Makefile 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/agi/Makefile asterisk-1.2.7.1/agi/Makefile
+--- asterisk-1.2.7.1.orig/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
++++ asterisk-1.2.7.1/agi/Makefile 2006-04-18 14:39:28.000000000 +0200
@@ -11,7 +11,7 @@
# the GNU General Public License
#
@@ -235,7 +235,7 @@
-AGIS=agi-test.agi eagi-test eagi-sphinx-test
+AGIS=agi-test.agi eagi-test eagi-sphinx-test xagi-test
- CFLAGS+=
+ CFLAGS+=-DNO_AST_MM
@@ -37,7 +37,7 @@
$(CC) $(CFLAGS) -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS)
@@ -246,10 +246,10 @@
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<
-diff -urN asterisk-1.2.6.orig/agi/xagi-test.c asterisk-1.2.6/agi/xagi-test.c
---- asterisk-1.2.6.orig/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/agi/xagi-test.c 2006-04-10 10:40:28.000000000 +0200
-@@ -0,0 +1,176 @@
+diff -urN asterisk-1.2.7.1.orig/agi/xagi-test.c asterisk-1.2.7.1/agi/xagi-test.c
+--- asterisk-1.2.7.1.orig/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/agi/xagi-test.c 2006-04-24 09:55:45.000000000 +0200
+@@ -0,0 +1,175 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
@@ -329,11 +329,11 @@
+ if (FD_ISSET(STDIN_FILENO, &fds)) {
+ fgets(astresp, sizeof(astresp), stdin);
+ if (feof(stdin)) {
-+ return NULL;
++ return;
+ }
+ astresp[strlen(astresp) - 1] = '\0';
+ fprintf(stderr, "Ooh, got a response from Asterisk: '%s'\n", astresp);
-+ return astresp;
++ return;
+ }
+ if (FD_ISSET(AUDIO_FILENO_IN, &fds)) {
+ /* what goes in.... */
@@ -351,7 +351,6 @@
+{
+ fd_set fds;
+ int res;
-+ int bytes = 0;
+ static char astresp[256];
+ char audiobuf[4096];
+ for (;;) {
@@ -426,9 +425,9 @@
+ return -1;
+ exit(0);
+}
-diff -urN asterisk-1.2.6.orig/apps/Makefile asterisk-1.2.6/apps/Makefile
---- asterisk-1.2.6.orig/apps/Makefile 2006-02-09 03:31:21.000000000 +0100
-+++ asterisk-1.2.6/apps/Makefile 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/Makefile asterisk-1.2.7.1/apps/Makefile
+--- asterisk-1.2.7.1.orig/apps/Makefile 2006-02-09 03:31:21.000000000 +0100
++++ asterisk-1.2.7.1/apps/Makefile 2006-04-18 14:39:28.000000000 +0200
@@ -28,8 +28,15 @@
app_test.so app_forkcdr.so app_math.so app_realtime.so \
app_dumpchan.so app_waitforsilence.so app_while.so app_setrdnis.so \
@@ -446,9 +445,9 @@
#
# Obsolete things...
-diff -urN asterisk-1.2.6.orig/apps/app_callingpres.c asterisk-1.2.6/apps/app_callingpres.c
---- asterisk-1.2.6.orig/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_callingpres.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_callingpres.c asterisk-1.2.7.1/apps/app_callingpres.c
+--- asterisk-1.2.7.1.orig/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_callingpres.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,70 @@
+/*
+ * An application to change the CallingPresentation for an Asterisk channel.
@@ -520,9 +519,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_capiCD.c asterisk-1.2.6/apps/app_capiCD.c
---- asterisk-1.2.6.orig/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_capiCD.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_capiCD.c asterisk-1.2.7.1/apps/app_capiCD.c
+--- asterisk-1.2.7.1.orig/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_capiCD.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,172 @@
+/*
+ * (CAPI*)
@@ -696,9 +695,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_capiECT.c asterisk-1.2.6/apps/app_capiECT.c
---- asterisk-1.2.6.orig/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_capiECT.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_capiECT.c asterisk-1.2.7.1/apps/app_capiECT.c
+--- asterisk-1.2.7.1.orig/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_capiECT.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,210 @@
+/*
+ * (CAPI*)
@@ -910,9 +909,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_capiNoES.c asterisk-1.2.6/apps/app_capiNoES.c
---- asterisk-1.2.6.orig/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_capiNoES.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_capiNoES.c asterisk-1.2.7.1/apps/app_capiNoES.c
+--- asterisk-1.2.7.1.orig/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_capiNoES.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,96 @@
+/*
+ * (CAPI*)
@@ -1010,9 +1009,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_chanisavail.c asterisk-1.2.6/apps/app_chanisavail.c
---- asterisk-1.2.6.orig/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/apps/app_chanisavail.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_chanisavail.c asterisk-1.2.7.1/apps/app_chanisavail.c
+--- asterisk-1.2.7.1.orig/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_chanisavail.c 2006-04-18 14:39:28.000000000 +0200
@@ -118,7 +118,7 @@
snprintf(trychan, sizeof(trychan), "%s/%s",cur,number);
status = inuse = ast_device_state(trychan);
@@ -1022,9 +1021,9 @@
pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name);
/* Store the originally used channel too */
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
-diff -urN asterisk-1.2.6.orig/apps/app_devstate.c asterisk-1.2.6/apps/app_devstate.c
---- asterisk-1.2.6.orig/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_devstate.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_devstate.c asterisk-1.2.7.1/apps/app_devstate.c
+--- asterisk-1.2.7.1.orig/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_devstate.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,219 @@
+/*
+ * Devstate application
@@ -1245,9 +1244,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_dial.c asterisk-1.2.6/apps/app_dial.c
---- asterisk-1.2.6.orig/apps/app_dial.c 2006-03-19 10:59:55.000000000 +0100
-+++ asterisk-1.2.6/apps/app_dial.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_dial.c asterisk-1.2.7.1/apps/app_dial.c
+--- asterisk-1.2.7.1.orig/apps/app_dial.c 2006-04-12 00:39:59.000000000 +0200
++++ asterisk-1.2.7.1/apps/app_dial.c 2006-04-25 14:41:03.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -1300,7 +1299,7 @@
AST_APP_OPTION_ARG('S', OPT_DURATION_STOP, OPT_ARG_DURATION_STOP),
AST_APP_OPTION('t', OPT_CALLEE_TRANSFER),
AST_APP_OPTION('T', OPT_CALLER_TRANSFER),
-@@ -384,7 +396,7 @@
+@@ -386,7 +398,7 @@
char *context = NULL;
char cidname[AST_MAX_EXTENSION];
@@ -1309,7 +1308,7 @@
if (single) {
/* Turn off hold music, etc */
-@@ -463,7 +475,7 @@
+@@ -465,7 +477,7 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
@@ -1318,7 +1317,7 @@
if (!o->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
} else {
-@@ -579,12 +591,18 @@
+@@ -581,12 +593,18 @@
HANDLE_CAUSE(AST_CAUSE_CONGESTION, in);
break;
case AST_CONTROL_RINGING:
@@ -1343,7 +1342,15 @@
break;
case AST_CONTROL_PROGRESS:
if (option_verbose > 2)
-@@ -917,17 +935,24 @@
+@@ -761,6 +779,7 @@
+ int digit = 0, result = 0;
+ time_t start_time, answer_time, end_time;
+ struct ast_app *app = NULL;
++/* char *aoceunits; */
+
+ char *parse;
+ AST_DECLARE_APP_ARGS(args,
+@@ -934,17 +953,24 @@
}
if( privdb_val == AST_PRIVACY_DENY ) {
@@ -1370,7 +1377,7 @@
res = 0;
goto out; /* is this right??? */
-@@ -964,7 +989,7 @@
+@@ -981,7 +1007,7 @@
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
@@ -1379,7 +1386,7 @@
cur = args.peers;
do {
/* Remember where to start next time */
-@@ -1006,7 +1031,7 @@
+@@ -1023,7 +1049,7 @@
ast_log(LOG_DEBUG, "Dialing by extension %s\n", numsubst);
}
/* Request the peer */
@@ -1388,7 +1395,7 @@
if (!tmp->chan) {
/* If we can't, just go on to the next call */
ast_log(LOG_NOTICE, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
-@@ -1037,7 +1062,7 @@
+@@ -1054,7 +1080,7 @@
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", chan->name, tech, stuff, tmp->chan->name);
ast_hangup(tmp->chan);
/* Setup parameters */
@@ -1397,7 +1404,7 @@
if (!tmp->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
} else {
-@@ -1156,8 +1181,11 @@
+@@ -1173,8 +1199,11 @@
ast_indicate(chan, AST_CONTROL_RINGING);
sentringing++;
}
@@ -1410,7 +1417,7 @@
time(&start_time);
peer = wait_for_answer(chan, outgoing, &to, peerflags, &sentringing, status, sizeof(status), numbusy, numnochan, numcongestion, ast_test_flag(&opts, OPT_PRIORITY_JUMP), &result);
-@@ -1286,6 +1314,8 @@
+@@ -1303,6 +1332,8 @@
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_DENY);
}
@@ -1419,9 +1426,26 @@
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
ast_moh_stop(chan);
} else if (ast_test_flag(&opts, OPT_RINGBACK)) {
-diff -urN asterisk-1.2.6.orig/apps/app_directed_pickup.c asterisk-1.2.6/apps/app_directed_pickup.c
---- asterisk-1.2.6.orig/apps/app_directed_pickup.c 2005-12-20 18:34:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_directed_pickup.c 2006-04-10 10:40:28.000000000 +0200
+@@ -1585,7 +1616,15 @@
+ }
+ snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
+ pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
+-
++
++ /* forward AOC-E units from peer, if possible */
++/* aoceunits = pbx_builtin_getvar_helper(peer, "AOCEUNITS");
++
++ if (aoceunits) {
++ snprintf(toast, sizeof(toast), "%d", atoi(aoceunits));
++ pbx_builtin_setvar_helper(chan, "AOCEUNITS", toast);
++ } */
++
+ if (res != AST_PBX_NO_HANGUP_PEER) {
+ if (!chan->_softhangup)
+ chan->hangupcause = peer->hangupcause;
+diff -urN asterisk-1.2.7.1.orig/apps/app_directed_pickup.c asterisk-1.2.7.1/apps/app_directed_pickup.c
+--- asterisk-1.2.7.1.orig/apps/app_directed_pickup.c 2006-04-06 19:00:10.000000000 +0200
++++ asterisk-1.2.7.1/apps/app_directed_pickup.c 2006-04-18 14:39:28.000000000 +0200
@@ -41,7 +41,7 @@
#include "asterisk/app.h"
@@ -1431,10 +1455,10 @@
static const char *synopsis = "Directed Call Pickup";
static const char *descrip =
" Pickup(extension[@context]): This application can pickup any ringing channel\n"
-diff -urN asterisk-1.2.6.orig/apps/app_meetme.c asterisk-1.2.6/apps/app_meetme.c
---- asterisk-1.2.6.orig/apps/app_meetme.c 2006-03-23 21:43:05.000000000 +0100
-+++ asterisk-1.2.6/apps/app_meetme.c 2006-04-10 10:40:28.000000000 +0200
-@@ -454,7 +454,7 @@
+diff -urN asterisk-1.2.7.1.orig/apps/app_meetme.c asterisk-1.2.7.1/apps/app_meetme.c
+--- asterisk-1.2.7.1.orig/apps/app_meetme.c 2006-04-07 00:15:20.000000000 +0200
++++ asterisk-1.2.7.1/apps/app_meetme.c 2006-04-18 14:39:28.000000000 +0200
+@@ -455,7 +455,7 @@
ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
cnf->markedusers = 0;
@@ -1443,7 +1467,7 @@
if (cnf->chan) {
cnf->fd = cnf->chan->fds[0]; /* for use by conf_play() */
} else {
-@@ -824,8 +824,9 @@
+@@ -825,8 +825,9 @@
char exitcontext[AST_MAX_CONTEXT] = "";
char recordingtmp[AST_MAX_EXTENSION] = "";
int dtmf;
@@ -1454,7 +1478,7 @@
char *buf = __buf + AST_FRIENDLY_OFFSET;
if (!user) {
-@@ -991,7 +992,7 @@
+@@ -992,7 +993,7 @@
}
/* Setup buffering information */
memset(&bi, 0, sizeof(bi));
@@ -1463,7 +1487,7 @@
bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
bi.numbufs = audio_buffers;
-@@ -1276,6 +1277,14 @@
+@@ -1277,6 +1278,14 @@
f = ast_read(c);
if (!f)
break;
@@ -1478,7 +1502,7 @@
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
if (user->talk.actual)
ast_frame_adjust_volume(f, user->talk.actual);
-@@ -1507,7 +1516,7 @@
+@@ -1508,7 +1517,7 @@
}
ast_frfree(f);
} else if (outfd > -1) {
@@ -1487,9 +1511,9 @@
if (res > 0) {
memset(&fr, 0, sizeof(fr));
fr.frametype = AST_FRAME_VOICE;
-diff -urN asterisk-1.2.6.orig/apps/app_milliwatt.c asterisk-1.2.6/apps/app_milliwatt.c
---- asterisk-1.2.6.orig/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
-+++ asterisk-1.2.6/apps/app_milliwatt.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_milliwatt.c asterisk-1.2.7.1/apps/app_milliwatt.c
+--- asterisk-1.2.7.1.orig/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_milliwatt.c 2006-04-18 14:39:28.000000000 +0200
@@ -74,20 +74,28 @@
{
struct ast_frame wf;
@@ -1525,9 +1549,9 @@
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
-diff -urN asterisk-1.2.6.orig/apps/app_page.c asterisk-1.2.6/apps/app_page.c
---- asterisk-1.2.6.orig/apps/app_page.c 2006-02-11 20:16:23.000000000 +0100
-+++ asterisk-1.2.6/apps/app_page.c 2006-04-10 11:04:08.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_page.c asterisk-1.2.7.1/apps/app_page.c
+--- asterisk-1.2.7.1.orig/apps/app_page.c 2006-04-13 19:40:21.000000000 +0200
++++ asterisk-1.2.7.1/apps/app_page.c 2006-04-18 14:39:28.000000000 +0200
@@ -85,7 +85,7 @@
{
struct calloutdata *cd = data;
@@ -1537,9 +1561,9 @@
free(cd);
return NULL;
}
-diff -urN asterisk-1.2.6.orig/apps/app_parkandannounce.c asterisk-1.2.6/apps/app_parkandannounce.c
---- asterisk-1.2.6.orig/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/apps/app_parkandannounce.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_parkandannounce.c asterisk-1.2.7.1/apps/app_parkandannounce.c
+--- asterisk-1.2.7.1.orig/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_parkandannounce.c 2006-04-18 14:39:28.000000000 +0200
@@ -183,7 +183,7 @@
memset(&oh, 0, sizeof(oh));
@@ -1549,9 +1573,9 @@
if(dchan) {
if(dchan->_state == AST_STATE_UP) {
-diff -urN asterisk-1.2.6.orig/apps/app_pickup.c asterisk-1.2.6/apps/app_pickup.c
---- asterisk-1.2.6.orig/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_pickup.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_pickup.c asterisk-1.2.7.1/apps/app_pickup.c
+--- asterisk-1.2.7.1.orig/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_pickup.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,319 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -1872,9 +1896,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_queue.c asterisk-1.2.6/apps/app_queue.c
---- asterisk-1.2.6.orig/apps/app_queue.c 2006-03-14 19:28:39.000000000 +0100
-+++ asterisk-1.2.6/apps/app_queue.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_queue.c asterisk-1.2.7.1/apps/app_queue.c
+--- asterisk-1.2.7.1.orig/apps/app_queue.c 2006-04-04 19:59:18.000000000 +0200
++++ asterisk-1.2.7.1/apps/app_queue.c 2006-04-18 14:39:28.000000000 +0200
@@ -501,7 +501,7 @@
return NULL;
}
@@ -1902,9 +1926,9 @@
if (status != o->oldstatus)
update_dial_status(qe->parent, o->member, status);
if (!o->chan) {
-diff -urN asterisk-1.2.6.orig/apps/app_readfile.c asterisk-1.2.6/apps/app_readfile.c
---- asterisk-1.2.6.orig/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
-+++ asterisk-1.2.6/apps/app_readfile.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_readfile.c asterisk-1.2.7.1/apps/app_readfile.c
+--- asterisk-1.2.7.1.orig/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_readfile.c 2006-04-18 14:39:28.000000000 +0200
@@ -40,7 +40,7 @@
#include "asterisk/app.h"
#include "asterisk/module.h"
@@ -1914,9 +1938,9 @@
static char *app_readfile = "ReadFile";
-diff -urN asterisk-1.2.6.orig/apps/app_segfault.c asterisk-1.2.6/apps/app_segfault.c
---- asterisk-1.2.6.orig/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/apps/app_segfault.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_segfault.c asterisk-1.2.7.1/apps/app_segfault.c
+--- asterisk-1.2.7.1.orig/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_segfault.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,75 @@
+/*
+ * Segfault application
@@ -1993,9 +2017,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/apps/app_sms.c asterisk-1.2.6/apps/app_sms.c
---- asterisk-1.2.6.orig/apps/app_sms.c 2005-12-26 19:19:12.000000000 +0100
-+++ asterisk-1.2.6/apps/app_sms.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_sms.c asterisk-1.2.7.1/apps/app_sms.c
+--- asterisk-1.2.7.1.orig/apps/app_sms.c 2005-12-26 19:19:12.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_sms.c 2006-04-18 14:39:28.000000000 +0200
@@ -1179,32 +1179,31 @@
{
struct ast_frame f = { 0 };
@@ -2050,9 +2074,9 @@
}
static void sms_process (sms_t * h, int samples, signed short *data)
-diff -urN asterisk-1.2.6.orig/apps/app_zapras.c asterisk-1.2.6/apps/app_zapras.c
---- asterisk-1.2.6.orig/apps/app_zapras.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/apps/app_zapras.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/apps/app_zapras.c asterisk-1.2.7.1/apps/app_zapras.c
+--- asterisk-1.2.7.1.orig/apps/app_zapras.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/apps/app_zapras.c 2006-04-18 14:39:28.000000000 +0200
@@ -182,7 +182,7 @@
}
}
@@ -2062,9 +2086,9 @@
ioctl(chan->fds[0], ZT_AUDIOMODE, &x);
/* Restore saved values */
-diff -urN asterisk-1.2.6.orig/asterisk.c asterisk-1.2.6/asterisk.c
---- asterisk-1.2.6.orig/asterisk.c 2006-03-02 23:26:30.000000000 +0100
-+++ asterisk-1.2.6/asterisk.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/asterisk.c asterisk-1.2.7.1/asterisk.c
+--- asterisk-1.2.7.1.orig/asterisk.c 2006-04-11 23:55:51.000000000 +0200
++++ asterisk-1.2.7.1/asterisk.c 2006-04-18 14:39:28.000000000 +0200
@@ -228,6 +228,7 @@
char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH] = "\0";
char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH] = "\0";
@@ -2073,7 +2097,7 @@
static char *_argv[256];
static int shuttingdown = 0;
-@@ -1885,6 +1886,7 @@
+@@ -1887,6 +1888,7 @@
ast_copy_string(ast_config_AST_PID, AST_PID, sizeof(ast_config_AST_PID));
ast_copy_string(ast_config_AST_SOCKET, AST_SOCKET, sizeof(ast_config_AST_SOCKET));
ast_copy_string(ast_config_AST_RUN_DIR, AST_RUN_DIR, sizeof(ast_config_AST_RUN_DIR));
@@ -2081,7 +2105,7 @@
/* no asterisk.conf? no problem, use buildtime config! */
if (!cfg) {
-@@ -1924,6 +1926,8 @@
+@@ -1926,6 +1928,8 @@
ast_copy_string(ast_config_AST_RUN_DIR, v->value, sizeof(ast_config_AST_RUN_DIR));
} else if (!strcasecmp(v->name, "astmoddir")) {
ast_copy_string(ast_config_AST_MODULE_DIR, v->value, sizeof(ast_config_AST_MODULE_DIR));
@@ -2090,9 +2114,9 @@
}
v = v->next;
}
-diff -urN asterisk-1.2.6.orig/build_tools/make_defaults_h asterisk-1.2.6/build_tools/make_defaults_h
---- asterisk-1.2.6.orig/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
-+++ asterisk-1.2.6/build_tools/make_defaults_h 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/build_tools/make_defaults_h asterisk-1.2.7.1/build_tools/make_defaults_h
+--- asterisk-1.2.7.1.orig/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
++++ asterisk-1.2.7.1/build_tools/make_defaults_h 2006-04-18 14:39:28.000000000 +0200
@@ -16,6 +16,7 @@
#define AST_KEY_DIR "${INSTALL_PATH}${ASTVARLIBDIR}/keys"
#define AST_DB "${INSTALL_PATH}${ASTVARLIBDIR}/astdb"
@@ -2101,9 +2125,9 @@
#define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
-diff -urN asterisk-1.2.6.orig/channel.c asterisk-1.2.6/channel.c
---- asterisk-1.2.6.orig/channel.c 2006-03-06 15:23:14.000000000 +0100
-+++ asterisk-1.2.6/channel.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channel.c asterisk-1.2.7.1/channel.c
+--- asterisk-1.2.7.1.orig/channel.c 2006-04-11 23:35:52.000000000 +0200
++++ asterisk-1.2.7.1/channel.c 2006-04-18 14:39:28.000000000 +0200
@@ -94,8 +94,8 @@
*/
static int shutting_down = 0;
@@ -2253,7 +2277,7 @@
}
int ast_channel_spy_add(struct ast_channel *chan, struct ast_channel_spy *spy)
-@@ -2369,7 +2398,7 @@
+@@ -2362,7 +2391,7 @@
&chan->writetrans, 1);
}
@@ -2262,7 +2286,7 @@
{
int state = 0;
int cause = 0;
-@@ -2377,7 +2406,7 @@
+@@ -2370,7 +2399,7 @@
struct ast_frame *f;
int res = 0;
@@ -2271,7 +2295,7 @@
if (chan) {
if (oh) {
if (oh->vars)
-@@ -2391,6 +2420,7 @@
+@@ -2384,6 +2413,7 @@
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);
@@ -2279,7 +2303,7 @@
if (!ast_call(chan, data, 0)) {
res = 1; /* in case chan->_state is already AST_STATE_UP */
while (timeout && (chan->_state != AST_STATE_UP)) {
-@@ -2414,6 +2444,7 @@
+@@ -2407,6 +2437,7 @@
if (f->subclass == AST_CONTROL_RINGING)
state = AST_CONTROL_RINGING;
else if ((f->subclass == AST_CONTROL_BUSY) || (f->subclass == AST_CONTROL_CONGESTION)) {
@@ -2287,7 +2311,7 @@
state = f->subclass;
ast_frfree(f);
break;
-@@ -2483,12 +2514,12 @@
+@@ -2476,12 +2507,12 @@
return chan;
}
@@ -2303,7 +2327,7 @@
{
struct chanlist *chan;
struct ast_channel *c;
-@@ -2525,6 +2556,7 @@
+@@ -2518,6 +2549,7 @@
if (!(c = chan->tech->requester(type, capabilities, data, cause)))
return NULL;
@@ -2311,7 +2335,7 @@
if (c->_state == AST_STATE_DOWN) {
manager_event(EVENT_FLAG_CALL, "Newchannel",
"Channel: %s\r\n"
-@@ -2772,6 +2804,29 @@
+@@ -2765,6 +2797,29 @@
return res;
}
@@ -2341,7 +2365,7 @@
void ast_change_name(struct ast_channel *chan, char *newname)
{
char tmp[256];
-@@ -3138,15 +3193,14 @@
+@@ -3131,15 +3186,14 @@
);
}
@@ -2359,7 +2383,7 @@
manager_event(EVENT_FLAG_CALL,
(oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
"Channel: %s\r\n"
-@@ -3162,6 +3216,10 @@
+@@ -3155,6 +3209,10 @@
return 0;
}
@@ -2370,7 +2394,7 @@
/*--- Find bridged channel */
struct ast_channel *ast_bridged_channel(struct ast_channel *chan)
{
-@@ -3339,6 +3397,7 @@
+@@ -3332,6 +3390,7 @@
char callee_warning = 0;
int to;
@@ -2378,7 +2402,7 @@
if (c0->_bridge) {
ast_log(LOG_WARNING, "%s is already in a bridge with %s\n",
c0->name, c0->_bridge->name);
-@@ -3349,6 +3408,10 @@
+@@ -3342,6 +3401,10 @@
c1->name, c1->_bridge->name);
return -1;
}
@@ -2389,9 +2413,21 @@
/* Stop if we're a zombie or need a soft hangup */
if (ast_test_flag(c0, AST_FLAG_ZOMBIE) || ast_check_hangup_locked(c0) ||
-diff -urN asterisk-1.2.6.orig/channels/Makefile asterisk-1.2.6/channels/Makefile
---- asterisk-1.2.6.orig/channels/Makefile 2005-12-15 11:52:30.000000000 +0100
-+++ asterisk-1.2.6/channels/Makefile 2006-04-10 11:37:13.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/Makefile asterisk-1.2.7.1/channels/Makefile
+--- asterisk-1.2.7.1.orig/channels/Makefile 2005-12-15 11:52:30.000000000 +0100
++++ asterisk-1.2.7.1/channels/Makefile 2006-04-18 14:39:28.000000000 +0200
+@@ -102,6 +102,11 @@
+ ZAPR2=-lmfcr2
+ endif
+
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libgsmat.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libgsmat.so.1),)
++ CFLAGS+=-DZAPATA_GSM
++ ZAPGSM=-lgsmat
++endif
++
+ ALSA_SRC=chan_alsa.c
+
+ ifneq ($(wildcard alsa-monitor.h),)
@@ -122,6 +127,35 @@
endif
endif # WITHOUT_ZAPTEL
@@ -2447,9 +2483,9 @@
chan_vpb.o: chan_vpb.c
$(CXX) -c $(CFLAGS) -o $@ chan_vpb.c
-diff -urN asterisk-1.2.6.orig/channels/chan_agent.c asterisk-1.2.6/channels/chan_agent.c
---- asterisk-1.2.6.orig/channels/chan_agent.c 2006-02-15 02:21:33.000000000 +0100
-+++ asterisk-1.2.6/channels/chan_agent.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/chan_agent.c asterisk-1.2.7.1/channels/chan_agent.c
+--- asterisk-1.2.7.1.orig/channels/chan_agent.c 2006-02-15 02:21:33.000000000 +0100
++++ asterisk-1.2.7.1/channels/chan_agent.c 2006-04-18 14:39:28.000000000 +0200
@@ -1331,7 +1331,7 @@
chan = agent_new(p, AST_STATE_DOWN);
} else if (!p->owner && !ast_strlen_zero(p->loginchan)) {
@@ -2459,9 +2495,9 @@
if (p->chan)
chan = agent_new(p, AST_STATE_DOWN);
}
-diff -urN asterisk-1.2.6.orig/channels/chan_capi.c asterisk-1.2.6/channels/chan_capi.c
---- asterisk-1.2.6.orig/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/channels/chan_capi.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/chan_capi.c asterisk-1.2.7.1/channels/chan_capi.c
+--- asterisk-1.2.7.1.orig/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/channels/chan_capi.c 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,2888 @@
+/*
+ * (CAPI*)
@@ -5351,9 +5387,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/channels/chan_features.c asterisk-1.2.6/channels/chan_features.c
---- asterisk-1.2.6.orig/channels/chan_features.c 2006-01-25 19:39:44.000000000 +0100
-+++ asterisk-1.2.6/channels/chan_features.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/chan_features.c asterisk-1.2.7.1/channels/chan_features.c
+--- asterisk-1.2.7.1.orig/channels/chan_features.c 2006-01-25 19:39:44.000000000 +0100
++++ asterisk-1.2.7.1/channels/chan_features.c 2006-04-18 14:39:28.000000000 +0200
@@ -438,7 +438,7 @@
}
ast_mutex_unlock(&featurelock);
@@ -5363,9 +5399,9 @@
if (!chan) {
ast_log(LOG_NOTICE, "Unable to allocate subchannel '%s/%s'\n", tech, dest);
return NULL;
-diff -urN asterisk-1.2.6.orig/channels/chan_iax2.c asterisk-1.2.6/channels/chan_iax2.c
---- asterisk-1.2.6.orig/channels/chan_iax2.c 2006-03-20 18:36:45.000000000 +0100
-+++ asterisk-1.2.6/channels/chan_iax2.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/chan_iax2.c asterisk-1.2.7.1/channels/chan_iax2.c
+--- asterisk-1.2.7.1.orig/channels/chan_iax2.c 2006-03-31 21:11:26.000000000 +0200
++++ asterisk-1.2.7.1/channels/chan_iax2.c 2006-04-18 14:39:28.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -5376,7 +5412,7 @@
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
-@@ -3064,7 +3067,7 @@
+@@ -3065,7 +3068,7 @@
memset(&ied, 0, sizeof(ied));
ast_mutex_lock(&iaxsl[callno]);
if (callno && iaxs[callno]) {
@@ -5385,7 +5421,7 @@
alreadygone = ast_test_flag(iaxs[callno], IAX_ALREADYGONE);
/* Send the hangup unless we have had a transmission error or are already gone */
iax_ie_append_byte(&ied, IAX_IE_CAUSECODE, (unsigned char)c->hangupcause);
-@@ -3116,7 +3119,8 @@
+@@ -3117,7 +3120,8 @@
static struct ast_frame *iax2_read(struct ast_channel *c)
{
static struct ast_frame f = { AST_FRAME_NULL, };
@@ -5395,7 +5431,7 @@
return &f;
}
-@@ -6701,7 +6705,7 @@
+@@ -6702,7 +6706,7 @@
}
if (f.frametype == AST_FRAME_IAX) {
if (iaxs[fr.callno]->initid > -1) {
@@ -5404,9 +5440,9 @@
ast_sched_del(sched, iaxs[fr.callno]->initid);
iaxs[fr.callno]->initid = -1;
}
-diff -urN asterisk-1.2.6.orig/channels/chan_sip.c asterisk-1.2.6/channels/chan_sip.c
---- asterisk-1.2.6.orig/channels/chan_sip.c 2006-03-22 10:10:13.000000000 +0100
-+++ asterisk-1.2.6/channels/chan_sip.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/chan_sip.c asterisk-1.2.7.1/channels/chan_sip.c
+--- asterisk-1.2.7.1.orig/channels/chan_sip.c 2006-04-07 16:16:41.000000000 +0200
++++ asterisk-1.2.7.1/channels/chan_sip.c 2006-04-25 13:23:13.000000000 +0200
@@ -596,6 +596,7 @@
unsigned int flags; /*!< SIP_ flags */
int timer_t1; /*!< SIP timer T1, ms rtt */
@@ -5481,23 +5517,32 @@
if (pedanticsipchecking) {
/* In principle Call-ID's uniquely identify a call, but with a forking SIP proxy
we need more to identify a branch - so we have to check branch, from
-@@ -4824,13 +4842,14 @@
+@@ -4058,6 +4075,7 @@
+ if (sipmethod == SIP_CANCEL) {
+ c = p->initreq.rlPart2; /* Use original URI */
+ } else if (sipmethod == SIP_ACK) {
++// XXX+ } else if (!strcasecmp(msg, "ACK") && !p->dialog_established) {
+ /* Use URI from Contact: in 200 OK (if INVITE)
+ (we only have the contacturi on INVITEs) */
+ if (!ast_strlen_zero(p->okcontacturi))
+@@ -4824,13 +4842,15 @@
ast_build_string(&invite, &invite_max, ";%s", p->options->uri_options);
ast_copy_string(p->uri, invite_buf, sizeof(p->uri));
+ ast_copy_string(p->origuri, invite, sizeof(p->origuri));
- if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
- /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
- snprintf(to, sizeof(to), "<sip:%s>;tag=%s", p->uri, p->theirtag);
- } else if (p->options && p->options->vxml_url) {
- /* If there is a VXML URL append it to the SIP URL */
+ if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
+ /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
+ snprintf(to, sizeof(to), "<sip:%s>;tag=%s", p->uri, p->theirtag);
+ } else if (p->options && p->options->vxml_url) {
+ /* If there is a VXML URL append it to the SIP URL */
- snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
++// snprintf(to, sizeof(to), "<%s>;%s", p->uri, p->options->vxml_url);
+ snprintf(to, sizeof(to), "<%s;%s>", p->uri, p->options->vxml_url);
} else {
snprintf(to, sizeof(to), "<%s>", p->uri);
}
-@@ -4883,6 +4903,11 @@
+@@ -4887,6 +4907,11 @@
if (!ast_strlen_zero(p->referred_by))
add_header(&req, "Referred-By", p->referred_by);
}
@@ -5509,7 +5554,7 @@
#ifdef OSP_SUPPORT
if ((req.method != SIP_OPTIONS) && p->options && !ast_strlen_zero(p->options->osptoken)) {
ast_log(LOG_DEBUG,"Adding OSP Token: %s\n", p->options->osptoken);
-@@ -4957,8 +4982,7 @@
+@@ -4961,8 +4986,7 @@
}
/*! \brief transmit_state_notify: Used in the SUBSCRIBE notification subsystem ----*/
@@ -5519,7 +5564,7 @@
char tmp[4000], from[256], to[256];
char *t = tmp, *c, *a, *mfrom, *mto;
size_t maxbytes = sizeof(tmp);
-@@ -5102,10 +5126,19 @@
+@@ -5106,10 +5130,19 @@
case DIALOG_INFO_XML: /* SNOM subscribes in this format */
ast_build_string(&t, &maxbytes, "<?xml version=\"1.0\"?>\n");
ast_build_string(&t, &maxbytes, "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"%d\" state=\"%s\" entity=\"%s\">\n", p->dialogver++, full ? "full":"partial", mto);
@@ -5542,7 +5587,7 @@
ast_build_string(&t, &maxbytes, "<state>%s</state>\n", statestring);
ast_build_string(&t, &maxbytes, "</dialog>\n</dialog-info>\n");
break;
-@@ -6315,7 +6348,7 @@
+@@ -6321,7 +6354,7 @@
/*! \brief cb_extensionstate: Callback for the devicestate notification (SUBSCRIBE) support subsystem ---*/
/* If you add an "hint" priority to the extension in the dial plan,
you will get notifications on device state changes */
@@ -5551,7 +5596,7 @@
{
struct sip_pvt *p = data;
-@@ -6334,7 +6367,7 @@
+@@ -6340,7 +6373,7 @@
p->laststate = state;
break;
}
@@ -5560,7 +5605,7 @@
if (option_debug > 1)
ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
-@@ -8600,6 +8633,7 @@
+@@ -8607,6 +8640,7 @@
char buf[1024];
unsigned int event;
char *c;
@@ -5568,7 +5613,7 @@
/* Need to check the media/type */
if (!strcasecmp(get_header(req, "Content-Type"), "application/dtmf-relay") ||
-@@ -8663,6 +8697,19 @@
+@@ -8670,6 +8704,19 @@
ast_queue_control(p->owner, AST_CONTROL_VIDUPDATE);
transmit_response(p, "200 OK", req);
return;
@@ -5588,7 +5633,7 @@
} else if ((c = get_header(req, "X-ClientCode"))) {
/* Client code (from SNOM phone) */
if (ast_test_flag(p, SIP_USECLIENTCODE)) {
-@@ -8762,12 +8809,63 @@
+@@ -8769,12 +8816,63 @@
return RESULT_SUCCESS;
}
@@ -5653,7 +5698,7 @@
if (argc < 4)
return RESULT_SHOWUSAGE;
-@@ -8784,41 +8882,13 @@
+@@ -8791,41 +8889,13 @@
}
for (i = 3; i < argc; i++) {
@@ -5700,7 +5745,13 @@
/*! \brief sip_do_history: Enable SIP History logging (CLI) ---*/
static int sip_do_history(int fd, int argc, char *argv[])
{
-@@ -9466,7 +9536,7 @@
+@@ -9468,12 +9538,13 @@
+ case 100: /* Trying */
+ sip_cancel_destroy(p);
+ break;
++ case 183:
+ case 180: /* 180 Ringing */
+ sip_cancel_destroy(p);
if (!ignore && p->owner) {
ast_queue_control(p->owner, AST_CONTROL_RINGING);
if (p->owner->_state != AST_STATE_UP)
@@ -5709,7 +5760,37 @@
}
if (!strcasecmp(get_header(req, "Content-Type"), "application/sdp")) {
process_sdp(p, req);
-@@ -10829,7 +10899,7 @@
+@@ -9483,17 +9554,17 @@
+ }
+ }
+ break;
+- case 183: /* Session progress */
++/* case 183: // Session progress
+ sip_cancel_destroy(p);
+- /* Ignore 183 Session progress without SDP */
++ // 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 */
++ // Queue a progress frame
+ ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
+ }
+ }
+- break;
++ break; */
+ case 200: /* 200 OK on invite - someone's answering our call */
+ sip_cancel_destroy(p);
+ p->authtries = 0;
+@@ -10287,6 +10358,7 @@
+ /* This is a call to ourself. Send ourselves an error code and stop
+ processing immediately, as SIP really has no good mechanism for
+ being able to call yourself */
++ast_log(LOG_NOTICE, "to: %s uri: %s\n", get_header(req, "To"), p->origuri);
+ transmit_response(p, "482 Loop Detected", req);
+ /* We do NOT destroy p here, so that our response will be accepted */
+ return 0;
+@@ -10836,7 +10908,7 @@
struct sip_pvt *p_old;
transmit_response(p, "200 OK", req);
@@ -5718,7 +5799,7 @@
append_history(p, "Subscribestatus", ast_extension_state2str(firststate));
/* remove any old subscription from this peer for the same exten/context,
-@@ -11141,7 +11211,7 @@
+@@ -11148,7 +11220,7 @@
/* Process request, with netlock held */
retrylock:
ast_mutex_lock(&netlock);
@@ -5727,7 +5808,7 @@
if (p) {
/* Go ahead and lock the owner if it has one -- we may need it */
if (p->owner && ast_mutex_trylock(&p->owner->lock)) {
-@@ -11460,6 +11530,52 @@
+@@ -11468,6 +11540,52 @@
return 0;
}
@@ -5780,7 +5861,7 @@
/*! \brief sip_devicestate: Part of PBX channel interface ---*/
/* Return values:---
-@@ -13155,6 +13271,8 @@
+@@ -13167,6 +13285,8 @@
"List SIP peers (text format)", mandescr_show_peers);
ast_manager_register2("SIPshowpeer", EVENT_FLAG_SYSTEM, manager_sip_show_peer,
"Show SIP peer (text format)", mandescr_show_peer);
@@ -5789,7 +5870,7 @@
sip_poke_all_peers();
sip_send_all_registers();
-@@ -13185,6 +13303,7 @@
+@@ -13197,6 +13317,7 @@
ast_rtp_proto_unregister(&sip_rtp);
@@ -5797,14 +5878,14 @@
ast_manager_unregister("SIPpeers");
ast_manager_unregister("SIPshowpeer");
-diff -urN asterisk-1.2.6.orig/channels/chan_zap.c asterisk-1.2.6/channels/chan_zap.c
---- asterisk-1.2.6.orig/channels/chan_zap.c 2006-03-23 22:44:36.000000000 +0100
-+++ asterisk-1.2.6/channels/chan_zap.c 2006-04-10 14:01:20.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/channels/chan_zap.c asterisk-1.2.7.1/channels/chan_zap.c
+--- asterisk-1.2.7.1.orig/channels/chan_zap.c 2006-04-04 20:28:14.000000000 +0200
++++ asterisk-1.2.7.1/channels/chan_zap.c 2006-05-08 10:59:30.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
-+ * Copyright (C) 2003, 2004, 2005 Junghanns.NET GmbH
++ * Copyright (C) 2003-2006 Junghanns.NET GmbH
+ * Klaus-Peter Junghanns <kpj at junghanns.net>
+ *
+ *
@@ -5816,7 +5897,7 @@
#include <libmfcr2.h>
#endif
+#ifdef ZAPATA_GSM
-+#include <libgsm.h>
++#include <libgsmat.h>
+#endif
#include "asterisk.h"
@@ -6208,7 +6289,7 @@
y = 1;
res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &y);
if (res)
-@@ -1774,7 +1956,13 @@
+@@ -1774,7 +1956,12 @@
ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
p->outgoing = 1;
@@ -6219,14 +6300,15 @@
+ set_actual_gain(p->subs[SUB_REAL].zfd, 0, p->rxgain, p->txgain, p->law);
+ }
+
-+ disable_dtmf_detect(p);
switch(p->sig) {
case SIG_FXOLS:
-@@ -1999,6 +2187,25 @@
+@@ -1998,6 +2185,26 @@
+ case SIG_PRI:
/* We'll get it in a moment -- but use dialdest to store pre-setup_ack digits */
p->dialdest[0] = '\0';
- break;
++ disable_dtmf_detect(p);
++ break;
+ case SIG_GSM:
+#ifdef ZAPATA_GSM
+ if (p->gsm.modul) {
@@ -6245,10 +6327,9 @@
+ ast_mutex_unlock(&p->gsm.lock);
+ }
+#endif
-+ break;
+ break;
default:
ast_log(LOG_DEBUG, "not yet implemented\n");
- ast_mutex_unlock(&p->lock);
@@ -2016,6 +2223,12 @@
int ldp_strip;
int exclusive;
@@ -6279,6 +6360,15 @@
}
if (!(sr = pri_sr_new())) {
ast_log(LOG_WARNING, "Failed to allocate setup request channel %d\n", p->channel);
+@@ -2085,7 +2301,7 @@
+ pri_sr_set_channel(sr, p->bearer ? PVT_TO_CHANNEL(p->bearer) : PVT_TO_CHANNEL(p), exclusive, 1);
+ pri_sr_set_bearer(sr, p->digital ? PRI_TRANS_CAP_DIGITAL : ast->transfercapability,
+ (p->digital ? -1 :
+- ((p->law == ZT_LAW_ALAW) ? PRI_LAYER_1_ALAW : PRI_LAYER_1_ULAW)));
++ ((p->law == ZT_LAW_ALAW) ? PRI_LAYER_1_ALAW : PRI_LAYER_1_ULAW)), ast->lowlayercompat);
+ if (p->pri->facilityenable)
+ pri_facility_enable(p->pri->pri);
+
@@ -2287,8 +2503,10 @@
}
if (newslot < 0) {
@@ -6309,18 +6399,84 @@
p->owner = NULL;
p->ringt = 0;
p->distinctivering = 0;
-@@ -2505,6 +2723,26 @@
+@@ -2478,19 +2696,61 @@
+ if (p->call && (!p->bearer || (p->bearer->call == p->call))) {
+ if (!pri_grab(p, p->pri)) {
+ if (p->alreadyhungup) {
++/* char *aoc = pbx_builtin_getvar_helper(ast,"AOCEUNITS");
++ int iaoc = aoc ? atoi(aoc) : -1;
++ char *aocpm = pbx_builtin_getvar_helper(ast,"AOCEUNITSPERMIN");
++ int iaocpm = aocpm ? atoi(aocpm) : -1;
++
++ if (iaocpm > -1) {
++ if (ast->cdr) {
++ long bill_sec = ast->cdr->billsec;
++ long bill_min = 0;
++ if (bill_sec > 0) {
++ bill_min = bill_sec / 60;
++ if (bill_min < 1) bill_min = 1;
++ }
++ iaoc = bill_min * iaocpm;
++ } else {
++ ast_log(LOG_NOTICE, "no cdr \n");
++ }
++ } else {
++ ast_log(LOG_NOTICE, "iaocpm %d \n", iaocpm);
++ }
++*/
+ ast_log(LOG_DEBUG, "Already hungup... Calling hangup once, and clearing call\n");
+
+ #ifdef SUPPORT_USERUSER
+ pri_call_set_useruser(p->call, useruser);
+ #endif
+
+- pri_hangup(p->pri->pri, p->call, -1);
++ pri_hangup(p->pri->pri, p->call, -1, -1);
+ p->call = NULL;
+ if (p->bearer)
+ p->bearer->call = NULL;
+ } else {
+ char *cause = pbx_builtin_getvar_helper(ast,"PRI_CAUSE");
+ int icause = ast->hangupcause ? ast->hangupcause : -1;
++/* char *aoc = pbx_builtin_getvar_helper(ast,"AOCEUNITS");
++ int iaoc = aoc ? atoi(aoc) : -1;
++ char *aocpm = pbx_builtin_getvar_helper(ast,"AOCEUNITSPERMIN");
++ int iaocpm = aocpm ? atoi(aocpm) : -1;
++
++ if (iaocpm > -1) {
++ if (ast->cdr) {
++ long bill_sec = ast->cdr->billsec;
++ long bill_min = 0;
++ if (bill_sec > 0) {
++ bill_min = bill_sec / 60;
++ if (bill_min < 1) bill_min = 1;
++ }
++ iaoc = bill_min * iaocpm;
++ } else {
++ ast_log(LOG_NOTICE, "no cdr \n");
++ }
++ } else {
++ ast_log(LOG_NOTICE, "iaocpm %d \n", iaocpm);
++ }
++*/
+ ast_log(LOG_DEBUG, "Not yet hungup... Calling hangup once with icause, and clearing call\n");
+
+ #ifdef SUPPORT_USERUSER
+@@ -2504,7 +2764,28 @@
+ if (atoi(cause))
icause = atoi(cause);
}
- pri_hangup(p->pri->pri, p->call, icause);
+- pri_hangup(p->pri->pri, p->call, icause);
+
++ pri_hangup(p->pri->pri, p->call, icause, -1);
++
+ /* if we send a release complete we wont ge no hangup event, so clear the call here */
+ if (icause == 34 || icause == 44 || icause == 82 || icause == 1 || icause == 81 || icause == 17) {
+ if ((ast->_state == AST_STATE_RING) || (ast->_state == AST_STATE_RINGING) || (ast->_state == AST_STATE_DIALING)) {
+ p->call = NULL;
+ } else {
+ ast_log(LOG_ERROR, "What is wrong with you? You cannot use cause %d number when in state %d!\n", icause, ast->_state);
-+ icause = 16;
++ icause = 16; /* Note, in pri_hangup() libpri will already override the cause */
+ }
+ }
+
@@ -6336,7 +6492,7 @@
}
if (res < 0)
ast_log(LOG_WARNING, "pri_disconnect failed\n");
-@@ -2532,7 +2770,13 @@
+@@ -2532,7 +2813,13 @@
}
#endif
@@ -6351,7 +6507,7 @@
res = zt_set_hook(p->subs[SUB_REAL].zfd, ZT_ONHOOK);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to hangup line %s\n", ast->name);
-@@ -2701,10 +2945,14 @@
+@@ -2701,10 +2988,14 @@
p->proceeding = 1;
res = pri_answer(p->pri->pri, p->call, 0, !p->digital);
pri_rel(p->pri);
@@ -6366,7 +6522,7 @@
break;
#endif
#ifdef ZAPATA_R2
-@@ -2714,6 +2962,13 @@
+@@ -2714,6 +3005,13 @@
ast_log(LOG_WARNING, "R2 Answer call failed :( on %s\n", ast->name);
break;
#endif
@@ -6380,7 +6536,7 @@
case 0:
ast_mutex_unlock(&p->lock);
return 0;
-@@ -3274,6 +3529,15 @@
+@@ -3274,6 +3572,15 @@
{
struct zt_pvt *p = newchan->tech_pvt;
int x;
@@ -6396,7 +6552,16 @@
ast_mutex_lock(&p->lock);
ast_log(LOG_DEBUG, "New owner for channel %d is %s\n", p->channel, newchan->name);
if (p->owner == oldchan) {
-@@ -4600,7 +4864,7 @@
+@@ -3637,7 +3944,7 @@
+ if (p->call) {
+ if (p->pri && p->pri->pri) {
+ if (!pri_grab(p, p->pri)) {
+- pri_hangup(p->pri->pri, p->call, -1);
++ pri_hangup(p->pri->pri, p->call, -1, -1);
+ pri_destroycall(p->pri->pri, p->call);
+ p->call = NULL;
+ pri_rel(p->pri);
+@@ -4600,7 +4907,7 @@
p->subs[index].f.data = NULL;
p->subs[index].f.datalen= 0;
}
@@ -6405,7 +6570,7 @@
/* Perform busy detection. etc on the zap line */
f = ast_dsp_process(ast, p->dsp, &p->subs[index].f);
if (f) {
-@@ -4612,8 +4876,9 @@
+@@ -4612,8 +4919,9 @@
}
} else if (f->frametype == AST_FRAME_DTMF) {
#ifdef ZAPATA_PRI
@@ -6417,7 +6582,7 @@
f->frametype = AST_FRAME_NULL;
f->subclass = 0;
}
-@@ -4661,8 +4926,10 @@
+@@ -4661,8 +4969,10 @@
pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast->exten);
if (ast_async_goto(ast, target_context, "fax", 1))
ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast->name, target_context);
@@ -6430,7 +6595,7 @@
} else
ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n");
} else
-@@ -4748,7 +5015,9 @@
+@@ -4748,7 +5058,9 @@
#endif
/* Write a frame of (presumably voice) data */
if (frame->frametype != AST_FRAME_VOICE) {
@@ -6441,7 +6606,7 @@
ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
return 0;
}
-@@ -4819,7 +5088,7 @@
+@@ -4819,7 +5131,7 @@
switch(condition) {
case AST_CONTROL_BUSY:
#ifdef ZAPATA_PRI
@@ -6450,7 +6615,7 @@
chan->hangupcause = AST_CAUSE_USER_BUSY;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -4901,7 +5170,7 @@
+@@ -4901,7 +5213,7 @@
case AST_CONTROL_CONGESTION:
chan->hangupcause = AST_CAUSE_CONGESTION;
#ifdef ZAPATA_PRI
@@ -6459,7 +6624,7 @@
chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -5086,8 +5355,12 @@
+@@ -5086,8 +5398,12 @@
if (state == AST_STATE_RING)
tmp->rings = 1;
tmp->tech_pvt = i;
@@ -6474,7 +6639,7 @@
tmp->callgroup = i->callgroup;
tmp->pickupgroup = i->pickupgroup;
}
-@@ -5217,6 +5490,7 @@
+@@ -5217,6 +5533,7 @@
int len = 0;
int res;
int index;
@@ -6482,7 +6647,7 @@
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Starting simple switch on '%s'\n", chan->name);
index = zt_get_index(chan, p, 1);
-@@ -5235,10 +5509,17 @@
+@@ -5235,10 +5552,17 @@
len = strlen(exten);
res = 0;
while((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -6503,7 +6668,7 @@
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
timeout = matchdigittimeout;
else
-@@ -6720,6 +7001,8 @@
+@@ -6719,6 +7043,8 @@
} else {
if (si->totalchans == 31) { /* if it's an E1 */
pris[*span].dchannels[0] = 16 + offset;
@@ -6512,7 +6677,7 @@
} else {
pris[*span].dchannels[0] = 24 + offset;
}
-@@ -6807,6 +7090,10 @@
+@@ -6806,6 +7132,10 @@
#endif
@@ -6523,7 +6688,7 @@
static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_pri *pri, int reloading)
{
/* Make a zt_pvt structure for this interface (or CRV if "pri" is specified) */
-@@ -6965,6 +7252,11 @@
+@@ -6964,6 +7294,11 @@
destroy_zt_pvt(&tmp);
return NULL;
}
@@ -6535,7 +6700,7 @@
if (!ast_strlen_zero(pris[span].idledial) && strcmp(pris[span].idledial, idledial)) {
ast_log(LOG_ERROR, "Span %d already has idledial '%s'.\n", span + 1, idledial);
destroy_zt_pvt(&tmp);
-@@ -6992,6 +7284,17 @@
+@@ -6991,6 +7326,17 @@
return NULL;
}
pris[span].nodetype = pritype;
@@ -6553,7 +6718,7 @@
pris[span].switchtype = myswitchtype;
pris[span].nsf = nsf;
pris[span].dialplan = dialplan;
-@@ -7000,9 +7303,14 @@
+@@ -6999,9 +7345,14 @@
pris[span].minunused = minunused;
pris[span].minidle = minidle;
pris[span].overlapdial = overlapdial;
@@ -6568,7 +6733,7 @@
ast_copy_string(pris[span].internationalprefix, internationalprefix, sizeof(pris[span].internationalprefix));
ast_copy_string(pris[span].nationalprefix, nationalprefix, sizeof(pris[span].nationalprefix));
ast_copy_string(pris[span].localprefix, localprefix, sizeof(pris[span].localprefix));
-@@ -7023,6 +7331,36 @@
+@@ -7022,6 +7373,36 @@
tmp->prioffset = 0;
}
#endif
@@ -6605,7 +6770,7 @@
#ifdef ZAPATA_R2
if (signalling == SIG_R2) {
if (r2prot < 0) {
-@@ -7156,6 +7494,7 @@
+@@ -7155,6 +7536,7 @@
tmp->restrictcid = restrictcid;
tmp->use_callingpres = use_callingpres;
tmp->priindication_oob = priindication_oob;
@@ -6613,7 +6778,7 @@
tmp->priexclusive = cur_priexclusive;
if (tmp->usedistinctiveringdetection) {
if (!tmp->use_callerid) {
-@@ -7429,7 +7768,7 @@
+@@ -7428,7 +7810,7 @@
break;
if (!backwards && (x >= pri->numchans))
break;
@@ -6622,7 +6787,7 @@
ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n",
pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
return x;
-@@ -7476,7 +7815,7 @@
+@@ -7475,7 +7857,7 @@
end = ifend;
/* We do signed linear */
oldformat = format;
@@ -6631,7 +6796,7 @@
if (!format) {
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
return NULL;
-@@ -7636,6 +7975,11 @@
+@@ -7635,6 +8017,11 @@
p->digital = 1;
if (tmp)
tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
@@ -6643,7 +6808,7 @@
} else {
ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
}
-@@ -7675,6 +8019,164 @@
+@@ -7674,6 +8061,164 @@
return tmp;
}
@@ -6808,7 +6973,7 @@
#ifdef ZAPATA_PRI
static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
-@@ -7689,6 +8191,57 @@
+@@ -7688,6 +8233,57 @@
return NULL;
}
@@ -6866,7 +7031,7 @@
static int pri_find_principle(struct zt_pri *pri, int channel)
{
-@@ -7721,7 +8274,9 @@
+@@ -7720,7 +8316,9 @@
static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
{
int x;
@@ -6876,7 +7041,7 @@
if (!c) {
if (principle < 0)
return -1;
-@@ -7735,6 +8290,7 @@
+@@ -7734,6 +8332,7 @@
/* First, check for other bearers */
for (x=0;x<pri->numchans;x++) {
if (!pri->pvts[x]) continue;
@@ -6884,7 +7049,7 @@
if (pri->pvts[x]->call == c) {
/* Found our call */
if (principle != x) {
-@@ -7748,19 +8304,56 @@
+@@ -7747,19 +8346,56 @@
}
/* Fix it all up now */
pri->pvts[principle]->owner = pri->pvts[x]->owner;
@@ -6942,7 +7107,7 @@
}
return principle;
}
-@@ -7789,7 +8382,9 @@
+@@ -7788,7 +8424,9 @@
}
crv = crv->next;
}
@@ -6953,7 +7118,7 @@
return -1;
}
-@@ -7851,86 +8446,33 @@
+@@ -7850,86 +8488,33 @@
#ifndef PRI_RESTART
#error "Upgrade your libpri"
#endif
@@ -7057,7 +7222,7 @@
do {
pri->resetpos++;
} while((pri->resetpos < pri->numchans) &&
-@@ -8013,6 +8555,32 @@
+@@ -8012,6 +8597,32 @@
}
}
@@ -7090,7 +7255,7 @@
static void *pri_dchannel(void *vpri)
{
struct zt_pri *pri = vpri;
-@@ -8104,6 +8672,8 @@
+@@ -8103,6 +8714,8 @@
} else if (pri->pvts[x] && pri->pvts[x]->owner && pri->pvts[x]->isidlecall)
activeidles++;
}
@@ -7099,7 +7264,7 @@
#if 0
printf("nextidle: %d, haveidles: %d, minunsed: %d\n",
nextidle, haveidles, minunused);
-@@ -8205,9 +8775,36 @@
+@@ -8204,9 +8817,36 @@
if (x == ZT_EVENT_ALARM) {
pri->dchanavail[which] &= ~(DCHAN_NOTINALARM | DCHAN_UP);
pri_find_dchan(pri);
@@ -7138,7 +7303,7 @@
}
if (option_debug)
-@@ -8219,8 +8816,7 @@
+@@ -8218,8 +8858,7 @@
break;
}
} else if (errno != EINTR)
@@ -7148,7 +7313,7 @@
if (e) {
if (pri->debug)
pri_dump_event(pri->dchans[which], e);
-@@ -8228,32 +8824,102 @@
+@@ -8227,32 +8866,102 @@
pri->dchanavail[which] |= DCHAN_UP;
switch(e->e) {
case PRI_EVENT_DCHAN_UP:
@@ -7275,7 +7440,7 @@
pri->resetting = 0;
/* Hangup active channels and put them in alarm mode */
for (i=0; i<pri->numchans; i++) {
-@@ -8261,19 +8927,29 @@
+@@ -8260,19 +8969,29 @@
if (p) {
if (p->call) {
if (p->pri && p->pri->pri) {
@@ -7312,7 +7477,7 @@
}
break;
case PRI_EVENT_RESTART:
-@@ -8308,8 +8984,8 @@
+@@ -8307,8 +9026,8 @@
pri_destroycall(pri->pri, pri->pvts[x]->call);
pri->pvts[x]->call = NULL;
}
@@ -7323,7 +7488,7 @@
else if (pri->pvts[x]->owner)
pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8343,7 +9019,6 @@
+@@ -8342,7 +9061,6 @@
}
}
break;
@@ -7331,7 +7496,7 @@
case PRI_EVENT_INFO_RECEIVED:
chanpos = pri_find_principle(pri, e->ring.channel);
if (chanpos < 0) {
-@@ -8352,9 +9027,11 @@
+@@ -8351,9 +9069,11 @@
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
if (chanpos > -1) {
@@ -7344,7 +7509,7 @@
/* how to do that */
int digitlen = strlen(e->ring.callednum);
char digit;
-@@ -8366,6 +9043,14 @@
+@@ -8365,6 +9085,14 @@
zap_queue_frame(pri->pvts[chanpos], &f, pri);
}
}
@@ -7359,7 +7524,7 @@
}
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
-@@ -8373,39 +9058,55 @@
+@@ -8372,39 +9100,55 @@
break;
case PRI_EVENT_RING:
crv = NULL;
@@ -7379,7 +7544,7 @@
+ if (e->ring.channel == -1) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Ignoring callwaiting SETUP on channel %d/%d span %d %d\n", PRI_SPAN(e->ring.channel), PRI_CHANNEL(e->ring.channel), pri->span, e->ring.channel);
-+ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_USER_BUSY);
++ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_USER_BUSY, -1);
+ break;
+ }
} else {
@@ -7437,7 +7602,15 @@
if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
/* Should be safe to lock CRV AFAIK while bearer is still locked */
crv = pri_find_crv(pri, pri_get_crv(pri->pri, e->ring.call, NULL));
-@@ -8426,6 +9127,7 @@
+@@ -8418,13 +9162,14 @@
+ ast_log(LOG_WARNING, "Call received for busy CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
+ } else
+ ast_log(LOG_NOTICE, "Call received for unconfigured CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
+- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_INVALID_CALL_REFERENCE);
++ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_INVALID_CALL_REFERENCE, -1);
+ if (crv)
+ ast_mutex_unlock(&crv->lock);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
break;
}
}
@@ -7445,7 +7618,7 @@
pri->pvts[chanpos]->call = e->ring.call;
apply_plan_to_number(plancallingnum, sizeof(plancallingnum), pri, e->ring.callingnum, e->ring.callingplan);
if (pri->pvts[chanpos]->use_callerid) {
-@@ -8450,29 +9152,78 @@
+@@ -8449,29 +9194,78 @@
}
apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
e->ring.redirectingnum, e->ring.callingplanrdnis);
@@ -7537,7 +7710,7 @@
/* Make sure extension exists (or in overlap dial mode, can exist) */
if ((pri->overlapdial && ast_canmatch_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) ||
ast_exists_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
-@@ -8491,22 +9242,38 @@
+@@ -8490,22 +9284,38 @@
res = zt_setlaw(pri->pvts[chanpos]->subs[SUB_REAL].zfd, law);
if (res < 0)
ast_log(LOG_WARNING, "Unable to set law on channel %d\n", pri->pvts[chanpos]->channel);
@@ -7583,10 +7756,20 @@
if (pri->overlapdial && ast_matchmore_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
/* Release the PRI lock while we create the channel */
ast_mutex_unlock(&pri->lock);
-@@ -8518,10 +9285,21 @@
+@@ -8513,14 +9323,31 @@
+ /* Set bearer and such */
+ pri_assign_bearer(crv, pri, pri->pvts[chanpos]);
+ c = zt_new(crv, AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
++ if (c && (e->ring.lowlayercompat[0] > 0)) {
++ memcpy(c->lowlayercompat, e->ring.lowlayercompat, sizeof(c->lowlayercompat));
++ }
+ pri->pvts[chanpos]->owner = &inuse;
ast_log(LOG_DEBUG, "Started up crv %d:%d on bearer channel %d\n", pri->trunkgroup, crv->channel, crv->bearer->channel);
} else {
c = zt_new(pri->pvts[chanpos], AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
++ if (c && (e->ring.lowlayercompat[0] > 0)) {
++ memcpy(c->lowlayercompat, e->ring.lowlayercompat, sizeof(c->lowlayercompat));
++ }
+ zt_enable_ec(pri->pvts[chanpos]);
}
if (!ast_strlen_zero(e->ring.callingsubaddr)) {
@@ -7605,7 +7788,7 @@
if(e->ring.ani2 >= 0) {
snprintf(ani2str, 5, "%.2d", e->ring.ani2);
pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8541,8 +9319,8 @@
+@@ -8540,8 +9367,8 @@
ast_mutex_lock(&pri->lock);
if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
if (option_verbose > 2)
@@ -7616,7 +7799,13 @@
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
} else {
ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
-@@ -8555,6 +9333,7 @@
+@@ -8549,14 +9376,18 @@
+ if (c)
+ ast_hangup(c);
+ else {
+- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
++ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION, -1);
+ pri->pvts[chanpos]->call = NULL;
}
}
} else {
@@ -7624,7 +7813,13 @@
ast_mutex_unlock(&pri->lock);
/* Release PRI lock while we create the channel */
c = zt_new(pri->pvts[chanpos], AST_STATE_RING, 1, SUB_REAL, law, e->ring.ctype);
-@@ -8578,10 +9357,26 @@
++ if (c && (e->ring.lowlayercompat[0] > 0)) {
++ memcpy(c->lowlayercompat, e->ring.lowlayercompat, sizeof(c->lowlayercompat));
++ }
+ ast_mutex_lock(&pri->lock);
+ if (c) {
+ char calledtonstr[10];
+@@ -8577,23 +9408,40 @@
snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
if (option_verbose > 2)
@@ -7653,7 +7848,9 @@
} else {
ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n",
pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
-@@ -8590,6 +9385,7 @@
+- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION);
++ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_SWITCH_CONGESTION, -1);
+ pri->pvts[chanpos]->call = NULL;
}
}
} else {
@@ -7661,7 +7858,22 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Extension '%s' in context '%s' from '%s' does not exist. Rejecting call on channel %d/%d, span %d\n",
pri->pvts[chanpos]->exten, pri->pvts[chanpos]->context, pri->pvts[chanpos]->cid_num, pri->pvts[chanpos]->logicalspan,
-@@ -8620,7 +9416,7 @@
+ pri->pvts[chanpos]->prioffset, pri->span);
+- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
++ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED, -1);
+ pri->pvts[chanpos]->call = NULL;
+ pri->pvts[chanpos]->exten[0] = '\0';
+ }
+@@ -8601,7 +9449,7 @@
+ ast_mutex_unlock(&crv->lock);
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ } else
+- pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_REQUESTED_CHAN_UNAVAIL);
++ pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_REQUESTED_CHAN_UNAVAIL, -1);
+ break;
+ case PRI_EVENT_RINGING:
+ chanpos = pri_find_principle(pri, e->ringing.channel);
+@@ -8619,7 +9467,7 @@
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
@@ -7670,7 +7882,7 @@
pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
pri->pvts[chanpos]->alerting = 1;
} else
-@@ -8649,9 +9445,15 @@
+@@ -8648,9 +9496,15 @@
}
break;
case PRI_EVENT_PROGRESS:
@@ -7687,7 +7899,7 @@
#ifdef PRI_PROGRESS_MASK
if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
#else
-@@ -8698,6 +9500,12 @@
+@@ -8697,6 +9551,12 @@
case PRI_EVENT_PROCEEDING:
chanpos = pri_find_principle(pri, e->proceeding.channel);
if (chanpos > -1) {
@@ -7700,7 +7912,7 @@
if (!pri->pvts[chanpos]->proceeding) {
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
-@@ -8748,6 +9556,295 @@
+@@ -8747,6 +9607,295 @@
}
}
break;
@@ -7996,7 +8208,7 @@
case PRI_EVENT_ANSWER:
chanpos = pri_find_principle(pri, e->answer.channel);
if (chanpos < 0) {
-@@ -8763,6 +9860,7 @@
+@@ -8762,6 +9911,7 @@
chanpos = -1;
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -8004,12 +8216,13 @@
/* Now we can do call progress detection */
/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -8792,11 +9890,15 @@
+@@ -8791,11 +9941,16 @@
ast_log(LOG_DEBUG, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
pri->pvts[chanpos]->dop.dialstr[0] = '\0';
} else if (pri->pvts[chanpos]->confirmanswer) {
- ast_log(LOG_DEBUG, "Waiting on answer confirmation on channel %d!\n", pri->pvts[chanpos]->channel);
+ ast_log(LOG_DEBUG, "Waiting for answer confirmation on channel %d!\n", pri->pvts[chanpos]->channel);
++ enable_dtmf_detect(pri->pvts[chanpos]);
} else {
+ pri->pvts[chanpos]->dialing = 0;
pri->pvts[chanpos]->subs[SUB_REAL].needanswer =1;
@@ -8021,7 +8234,7 @@
}
#ifdef SUPPORT_USERUSER
-@@ -8845,18 +9947,21 @@
+@@ -8844,23 +9999,32 @@
}
}
if (option_verbose > 2)
@@ -8030,7 +8243,8 @@
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup, cause %d\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, e->hangup.cause);
} else {
- pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
+- pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
++ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause, -1);
pri->pvts[chanpos]->call = NULL;
+ pri->pvts[chanpos]->tei = -1;
}
@@ -8046,10 +8260,22 @@
+ pri->pvts[chanpos]->resetting = 1;
+ }
}
- if (e->hangup.aoc_units > -1)
+- if (e->hangup.aoc_units > -1)
++ if (e->hangup.aoc_units > -1) {
++ if (pri->pvts[chanpos]->owner) {
++ char tmpstr[256];
++ snprintf(tmpstr, sizeof(tmpstr), "%d", (int)e->hangup.aoc_units);
++ pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "AOCEUNITS", tmpstr);
++ }
if (option_verbose > 2)
-@@ -8871,8 +9976,20 @@
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
+ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
++ }
+ #ifdef SUPPORT_USERUSER
+ if (!ast_strlen_zero(e->hangup.useruserinfo)) {
+@@ -8870,8 +10034,20 @@
+
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
- ast_log(LOG_WARNING, "Hangup on bad channel %d/%d on span %d\n",
@@ -8060,7 +8286,7 @@
+
+ if (onhold) {
+ // ast_log(LOG_NOTICE, "hangup, found cref %d, tei %d\n",e->hangup.cref, e->hangup.tei);
-+ pri_hangup(pri->pri, onhold->call, e->hangup.cause);
++ pri_hangup(pri->pri, onhold->call, e->hangup.cause, -1);
+ pri_destroy_callonhold(pri, onhold);
+ onhold = NULL;
+ } else {
@@ -8071,14 +8297,14 @@
}
}
break;
-@@ -8882,17 +9999,25 @@
+@@ -8881,17 +10057,25 @@
case PRI_EVENT_HANGUP_REQ:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
- ast_log(LOG_WARNING, "Hangup REQ requested on unconfigured channel %d/%d span %d\n",
- PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+ if (pri->nodetype == BRI_NETWORK_PTMP) {
-+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
++ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause, -1);
+ } else {
+ ast_log(LOG_WARNING, "Hangup REQ requested on unconfigured channel %d/%d span %d\n",
+ PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
@@ -8100,10 +8326,24 @@
pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
switch(e->hangup.cause) {
case PRI_CAUSE_USER_BUSY:
-@@ -8915,16 +10040,73 @@
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
+@@ -8910,20 +10094,87 @@
+ }
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup request\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+- if (e->hangup.aoc_units > -1)
+- if (option_verbose > 2)
+- ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
+- pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
++ if (e->hangup.aoc_units > -1) {
++ if (pri->pvts[chanpos]->owner) {
++ char tmpstr[256];
++ snprintf(tmpstr, sizeof(tmpstr), "%d", (int)e->hangup.aoc_units);
++ pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "AOCEUNITS", tmpstr);
++ }
++ if (option_verbose > 2)
++ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
++ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
++ }
+ if (pri->nodetype == BRI_NETWORK_PTMP) {
+ // check for bri transfers, not everybody uses ECT...
+ if (pri->pvts[chanpos]->owner) {
@@ -8149,16 +8389,21 @@
+
+ if (transfer_ok) {
+ onhold->alreadyhungup = 1;
-+ pri_hangup(pri->pri, onhold->call, e->hangup.cause);
++ pri_hangup(pri->pri, onhold->call, e->hangup.cause, -1);
+ onhold = NULL;
+ }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ break;
-+ }
++ } else {
++ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause, -1);
++ pri->pvts[chanpos]->call = NULL;
++ pri->pvts[chanpos]->tei = -1;
++ }
+ }
+ }
} else {
- pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
+- pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
++ pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause, -1);
pri->pvts[chanpos]->call = NULL;
+ pri->pvts[chanpos]->tei = -1;
}
@@ -8179,7 +8424,7 @@
}
#ifdef SUPPORT_USERUSER
-@@ -8935,9 +10117,28 @@
+@@ -8934,9 +10185,36 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
@@ -8193,7 +8438,7 @@
+ onhold = pri_get_callonhold(pri, e->hangup.cref, e->hangup.tei);
+
+ if (onhold) {
-+ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause);
++ pri_hangup(pri->pri, e->hangup.call, e->hangup.cause, -1);
+ ast_retrieve_call_to_death(onhold->uniqueid);
+ pri_destroy_callonhold(pri, onhold);
+ onhold = NULL;
@@ -8204,12 +8449,20 @@
}
}
+ if ((chanpos > -1) && (pri->pvts[chanpos]->owner) && (pri->pvts[chanpos]->priindication_oob == 2) && (e->hangup.inband_progress) && (pri->pvts[chanpos]->outgoing)) {
++ if (e->hangup.aoc_units > -1) {
++ char tmpstr[256];
++ snprintf(tmpstr, sizeof(tmpstr), "%d", (int)e->hangup.aoc_units);
++ pbx_builtin_setvar_helper(pri->pvts[chanpos]->owner, "AOCEUNITS", tmpstr);
++ if (option_verbose > 2)
++ ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
++ pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
++ }
+ ast_channel_setwhentohangup(pri->pvts[chanpos]->owner, 5);
+ }
break;
case PRI_EVENT_HANGUP_ACK:
chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -8951,6 +10152,7 @@
+@@ -8950,6 +10228,7 @@
if (chanpos > -1) {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
pri->pvts[chanpos]->call = NULL;
@@ -8217,7 +8470,7 @@
pri->pvts[chanpos]->resetting = 0;
if (pri->pvts[chanpos]->owner) {
if (option_verbose > 2)
-@@ -8964,7 +10166,9 @@
+@@ -8963,7 +10242,9 @@
#endif
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -8227,7 +8480,39 @@
}
break;
case PRI_EVENT_CONFIG_ERR:
-@@ -9067,6 +10271,78 @@
+@@ -9030,7 +10311,7 @@
+ ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n",
+ PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel), pri->span);
+ } else {
+- chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
++ chanpos = pri_fixup_principle(pri, chanpos, e->setup_ack.call);
+ if (chanpos > -1) {
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ pri->pvts[chanpos]->setup_ack = 1;
+@@ -9055,10 +10336,22 @@
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ switch(e->notify.info) {
+ case PRI_NOTIFY_REMOTE_HOLD:
++ if ((pri->nodetype == BRI_NETWORK_PTMP) || (pri->nodetype == BRI_NETWORK)) {
++ ast_log(LOG_DEBUG, "Received REMOTE_HOLD notification on NETWORK channel. Starting MoH\n");
++ ast_moh_start(ast_bridged_channel(pri->pvts[chanpos]->owner), NULL);
++ } else {
++ ast_log(LOG_DEBUG, "Received REMOTE_HOLD notification on CPE channel. Not Starting MoH\n");
++ }
+ f.subclass = AST_CONTROL_HOLD;
+ zap_queue_frame(pri->pvts[chanpos], &f, pri);
+ break;
+ case PRI_NOTIFY_REMOTE_RETRIEVAL:
++ if ((pri->nodetype == BRI_NETWORK_PTMP) || (pri->nodetype == BRI_NETWORK)) {
++ ast_log(LOG_DEBUG, "Received REMOTE_RETRIEVAL notification on NETWORK channel. Stopping MoH\n");
++ ast_moh_stop(ast_bridged_channel(pri->pvts[chanpos]->owner));
++ } else {
++ ast_log(LOG_DEBUG, "Received REMOTE_RETRIEVAL notification on CPE channel.\n");
++ }
+ f.subclass = AST_CONTROL_UNHOLD;
+ zap_queue_frame(pri->pvts[chanpos], &f, pri);
+ break;
+@@ -9066,6 +10359,77 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
@@ -8246,14 +8531,14 @@
+ onhold = NULL;
+ if (!chan) {
+ /* hang up */
-+ pri_hangup(pri->pri, e->facility.call, 16);
++ pri_hangup(pri->pri, e->facility.call, 16, -1);
+ break;
+ }
+ } else {
+ /* unknown cref/tei */
+ ast_log(LOG_WARNING, "did not find call on hold for cref %d tei %d\n", e->facility.tei, e->facility.cref);
+ /* hang up */
-+ pri_hangup(pri->pri, e->facility.call, 16);
++ pri_hangup(pri->pri, e->facility.call, 16, -1);
+ break;
+ }
+
@@ -8289,16 +8574,15 @@
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ }
+ /* disconnect */
-+ pri_hangup(pri->pri, e->facility.call, 16);
++ pri_hangup(pri->pri, e->facility.call, 16, -1);
+ } else if (e->facility.operation == 0x0D) {
+ ast_log(LOG_NOTICE, "call deflection to %s requested.\n", e->facility.forwardnum);
-+ /* mmmmmkay */
-+
-+ /* lock the channel */
-+
-+ /* async goto */
-+
-+ /* disconnect isdn layer */
++ ast_mutex_lock(&pri->pvts[chanpos]->lock);
++ /* transfer */
++ if (pri->pvts[chanpos]->owner) {
++ snprintf(pri->pvts[chanpos]->owner->call_forward, sizeof(pri->pvts[chanpos]->owner->call_forward), "Local/%s@%s", e->facility.forwardnum, pri->pvts[chanpos]->owner->context);
++ }
++ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ } else {
+ ast_log(LOG_WARNING, "Unknown facility operation %#x requested.\n", e->facility.operation);
+ }
@@ -8306,7 +8590,7 @@
default:
ast_log(LOG_DEBUG, "Event: %d\n", e->e);
}
-@@ -9128,7 +10404,7 @@
+@@ -9127,7 +10491,7 @@
pri->fds[i] = -1;
return -1;
}
@@ -8315,7 +8599,7 @@
/* Force overlap dial if we're doing GR-303! */
if (pri->switchtype == PRI_SWITCH_GR303_TMC)
pri->overlapdial = 1;
-@@ -9197,39 +10473,77 @@
+@@ -9196,39 +10560,77 @@
static int handle_pri_set_debug_file(int fd, int argc, char **argv)
{
@@ -8415,7 +8699,7 @@
}
return RESULT_SUCCESS;
-@@ -9261,6 +10575,7 @@
+@@ -9260,6 +10662,7 @@
@@ -8423,7 +8707,7 @@
static int handle_pri_no_debug(int fd, int argc, char *argv[])
{
int span;
-@@ -9367,36 +10682,6 @@
+@@ -9366,36 +10769,6 @@
return RESULT_SUCCESS;
}
@@ -8460,7 +8744,7 @@
static char pri_debug_help[] =
"Usage: pri debug span <span>\n"
" Enables debugging on a given PRI span\n";
-@@ -9413,6 +10698,18 @@
+@@ -9412,6 +10785,18 @@
"Usage: pri show span <span>\n"
" Displays PRI Information\n";
@@ -8479,7 +8763,7 @@
static struct ast_cli_entry zap_pri_cli[] = {
{ { "pri", "debug", "span", NULL }, handle_pri_debug,
"Enables PRI debugging on a span", pri_debug_help, complete_span_4 },
-@@ -9420,19 +10717,207 @@
+@@ -9419,19 +10804,207 @@
"Disables PRI debugging on a span", pri_no_debug_help, complete_span_5 },
{ { "pri", "intense", "debug", "span", NULL }, handle_pri_really_debug,
"Enables REALLY INTENSE PRI debugging", pri_really_debug_help, complete_span_5 },
@@ -8690,7 +8974,7 @@
#ifdef ZAPATA_R2
static int handle_r2_no_debug(int fd, int argc, char *argv[])
{
-@@ -10045,6 +11530,11 @@
+@@ -10044,6 +11617,11 @@
}
ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(zap_pri_cli[0]));
#endif
@@ -8702,7 +8986,7 @@
#ifdef ZAPATA_R2
ast_cli_unregister_multiple(zap_r2_cli, sizeof(zap_r2_cli) / sizeof(zap_r2_cli[0]));
#endif
-@@ -10055,6 +11545,7 @@
+@@ -10054,6 +11632,7 @@
ast_manager_unregister( "ZapDNDoff" );
ast_manager_unregister( "ZapDNDon" );
ast_manager_unregister("ZapShowChannels");
@@ -8710,7 +8994,7 @@
ast_channel_unregister(&zap_tech);
if (!ast_mutex_lock(&iflock)) {
/* Hangup all interfaces if they have an owner */
-@@ -10413,8 +11904,8 @@
+@@ -10412,8 +11991,8 @@
}
} else if (!strcasecmp(v->name, "echotraining")) {
if (sscanf(v->value, "%d", &y) == 1) {
@@ -8721,7 +9005,7 @@
} else {
echotraining = y;
}
-@@ -10600,12 +12091,33 @@
+@@ -10599,12 +12178,33 @@
cur_signalling = SIG_GR303FXSKS;
cur_radio = 0;
pritype = PRI_CPE;
@@ -8755,13 +9039,14 @@
} else {
ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
}
-@@ -10688,8 +12200,20 @@
+@@ -10687,8 +12287,20 @@
priindication_oob = 1;
else if (!strcasecmp(v->value, "inband"))
priindication_oob = 0;
+ else if (!strcasecmp(v->value, "passthrough"))
+ priindication_oob = 2;
-+ else
+ else
+- ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' or 'outofband' at line %d\n",
+ ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' , 'outofband' or 'passthrough' at line %d\n",
+ v->value, v->lineno);
+ } else if (!strcasecmp(v->name, "pritransfer")) {
@@ -8771,13 +9056,12 @@
+ pritransfer = 1;
+ else if (!strcasecmp(v->value, "hangup"))
+ pritransfer = 2;
- else
-- ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' or 'outofband' at line %d\n",
++ else
+ ast_log(LOG_WARNING, "'%s' is not a valid pri transfer value, should be 'no' , 'ect' or 'hangup' at line %d\n",
v->value, v->lineno);
} else if (!strcasecmp(v->name, "priexclusive")) {
cur_priexclusive = ast_true(v->value);
-@@ -10703,6 +12227,14 @@
+@@ -10702,6 +12314,14 @@
ast_copy_string(privateprefix, v->value, sizeof(privateprefix));
} else if (!strcasecmp(v->name, "unknownprefix")) {
ast_copy_string(unknownprefix, v->value, sizeof(unknownprefix));
@@ -8792,7 +9076,7 @@
} else if (!strcasecmp(v->name, "resetinterval")) {
if (!strcasecmp(v->value, "never"))
resetinterval = -1;
-@@ -10717,6 +12249,8 @@
+@@ -10716,6 +12336,8 @@
ast_copy_string(idleext, v->value, sizeof(idleext));
} else if (!strcasecmp(v->name, "idledial")) {
ast_copy_string(idledial, v->value, sizeof(idledial));
@@ -8801,7 +9085,7 @@
} else if (!strcasecmp(v->name, "overlapdial")) {
overlapdial = ast_true(v->value);
} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -10902,6 +12436,7 @@
+@@ -10901,6 +12523,7 @@
#ifdef ZAPATA_PRI
if (!reload) {
for (x=0;x<NUM_SPANS;x++) {
@@ -8809,7 +9093,7 @@
if (pris[x].pvts[0]) {
if (start_pri(pris + x)) {
ast_log(LOG_ERROR, "Unable to start D-channel on span %d\n", x + 1);
-@@ -10934,6 +12469,10 @@
+@@ -10933,6 +12556,10 @@
pri_set_error(zt_pri_error);
pri_set_message(zt_pri_message);
#endif
@@ -8820,7 +9104,7 @@
res = setup_zap(0);
/* Make sure we can register our Zap channel type */
if(res) {
-@@ -10951,6 +12490,11 @@
+@@ -10950,6 +12577,11 @@
ast_cli_register_multiple(zap_r2_cli, sizeof(zap_r2_cli) / sizeof(zap_r2_cli[0]));
#endif
ast_cli_register_multiple(zap_cli, sizeof(zap_cli) / sizeof(zap_cli[0]));
@@ -8832,7 +9116,7 @@
memset(round_robin, 0, sizeof(round_robin));
ast_manager_register( "ZapTransfer", 0, action_transfer, "Transfer Zap Channel" );
-@@ -10959,11 +12503,46 @@
+@@ -10958,11 +12590,46 @@
ast_manager_register( "ZapDNDon", 0, action_zapdndon, "Toggle Zap channel Do Not Disturb status ON" );
ast_manager_register( "ZapDNDoff", 0, action_zapdndoff, "Toggle Zap channel Do Not Disturb status OFF" );
ast_manager_register("ZapShowChannels", 0, action_zapshowchannels, "Show status zapata channels");
@@ -8880,7 +9164,7 @@
{
#define END_SILENCE_LEN 400
#define HEADER_MS 50
-@@ -10982,6 +12561,7 @@
+@@ -10981,6 +12648,7 @@
float scont = 0.0;
int index;
@@ -8888,9 +9172,9 @@
index = zt_get_index(c, p, 0);
if (index < 0) {
ast_log(LOG_WARNING, "Huh? I don't exist?\n");
-diff -urN asterisk-1.2.6.orig/codecs/codec_ilbc.c asterisk-1.2.6/codecs/codec_ilbc.c
---- asterisk-1.2.6.orig/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/codecs/codec_ilbc.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/codecs/codec_ilbc.c asterisk-1.2.7.1/codecs/codec_ilbc.c
+--- asterisk-1.2.7.1.orig/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/codecs/codec_ilbc.c 2006-04-18 14:39:28.000000000 +0200
@@ -49,7 +49,7 @@
#include "slin_ilbc_ex.h"
#include "ilbc_slin_ex.h"
@@ -8900,9 +9184,9 @@
#define ILBC_MS 30
/* #define ILBC_MS 20 */
-diff -urN asterisk-1.2.6.orig/configs/capi.conf.sample asterisk-1.2.6/configs/capi.conf.sample
---- asterisk-1.2.6.orig/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/configs/capi.conf.sample 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/configs/capi.conf.sample asterisk-1.2.7.1/configs/capi.conf.sample
+--- asterisk-1.2.7.1.orig/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/configs/capi.conf.sample 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,44 @@
+;
+; CAPI config
@@ -8948,17 +9232,17 @@
+;msn=55512
+;controller=2
+;devices => 30
-diff -urN asterisk-1.2.6.orig/configs/modules.conf.sample asterisk-1.2.6/configs/modules.conf.sample
---- asterisk-1.2.6.orig/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/configs/modules.conf.sample 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/configs/modules.conf.sample asterisk-1.2.7.1/configs/modules.conf.sample
+--- asterisk-1.2.7.1.orig/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/configs/modules.conf.sample 2006-04-18 14:39:28.000000000 +0200
@@ -51,3 +51,4 @@
; exported to modules loaded after them.
;
[global]
+chan_capi.so=yes
-diff -urN asterisk-1.2.6.orig/configs/watchdog.conf.sample asterisk-1.2.6/configs/watchdog.conf.sample
---- asterisk-1.2.6.orig/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/configs/watchdog.conf.sample 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/configs/watchdog.conf.sample asterisk-1.2.7.1/configs/watchdog.conf.sample
+--- asterisk-1.2.7.1.orig/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/configs/watchdog.conf.sample 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+;
+; Configuration file for res_watchdog
@@ -8982,9 +9266,9 @@
+;device = /dev/watchdog
+;interval = 100
+
-diff -urN asterisk-1.2.6.orig/configs/zapata.conf.sample asterisk-1.2.6/configs/zapata.conf.sample
---- asterisk-1.2.6.orig/configs/zapata.conf.sample 2006-03-06 03:32:35.000000000 +0100
-+++ asterisk-1.2.6/configs/zapata.conf.sample 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/configs/zapata.conf.sample asterisk-1.2.7.1/configs/zapata.conf.sample
+--- asterisk-1.2.7.1.orig/configs/zapata.conf.sample 2006-03-06 03:32:35.000000000 +0100
++++ asterisk-1.2.7.1/configs/zapata.conf.sample 2006-04-18 14:39:28.000000000 +0200
@@ -121,9 +121,20 @@
;
; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT
@@ -9006,9 +9290,9 @@
; If you need to override the existing channels selection routine and force all
; PRI channels to be marked as exclusively selected, set this to yes.
; priexclusive = yes
-diff -urN asterisk-1.2.6.orig/db.c asterisk-1.2.6/db.c
---- asterisk-1.2.6.orig/db.c 2006-01-09 19:09:53.000000000 +0100
-+++ asterisk-1.2.6/db.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/db.c asterisk-1.2.7.1/db.c
+--- asterisk-1.2.7.1.orig/db.c 2006-01-09 19:09:53.000000000 +0100
++++ asterisk-1.2.7.1/db.c 2006-04-18 14:39:28.000000000 +0200
@@ -516,11 +516,18 @@
struct ast_cli_entry cli_database_deltree =
{ { "database", "deltree", NULL }, database_deltree, "Removes database keytree/values", database_deltree_usage };
@@ -9102,9 +9386,9 @@
+ ast_manager_register("DBdel", EVENT_FLAG_SYSTEM, manager_dbdel, mandescr_dbdel);
return 0;
}
-diff -urN asterisk-1.2.6.orig/devicestate.c asterisk-1.2.6/devicestate.c
---- asterisk-1.2.6.orig/devicestate.c 2006-02-10 21:38:59.000000000 +0100
-+++ asterisk-1.2.6/devicestate.c 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/devicestate.c asterisk-1.2.7.1/devicestate.c
+--- asterisk-1.2.7.1.orig/devicestate.c 2006-02-10 21:38:59.000000000 +0100
++++ asterisk-1.2.7.1/devicestate.c 2006-04-18 14:39:28.000000000 +0200
@@ -62,6 +62,8 @@
struct state_change {
@@ -9221,9 +9505,9 @@
free(cur);
AST_LIST_LOCK(&state_changes);
} else {
-diff -urN asterisk-1.2.6.orig/doc/README.asterisk.conf asterisk-1.2.6/doc/README.asterisk.conf
---- asterisk-1.2.6.orig/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/doc/README.asterisk.conf 2006-04-10 10:40:28.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/doc/README.asterisk.conf asterisk-1.2.7.1/doc/README.asterisk.conf
+--- asterisk-1.2.7.1.orig/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/doc/README.asterisk.conf 2006-04-18 14:39:28.000000000 +0200
@@ -62,6 +62,7 @@
maxcalls = 255 ; The maximum number of concurrent calls you want to allow
execincludes = yes | no ; Allow #exec entries in configuration files
@@ -9232,24 +9516,9 @@
[files]
; Changing the following lines may compromise your security
-diff -urN asterisk-1.2.6.orig/editline/cygdef.h asterisk-1.2.6/editline/cygdef.h
---- asterisk-1.2.6.orig/editline/cygdef.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/editline/cygdef.h 2006-04-10 10:40:29.000000000 +0200
-@@ -0,0 +1,11 @@
-+/* cygdef.h. Generated automatically by configure. */
-+#ifndef _CYGDEF_H_
-+#define _CYGDEF_H_ 1
-+#include <sys/ioctl.h>
-+#define __linux__ 1
-+
-+
-+typedef void (*sig_t)(int);
-+
-+
-+#endif /* _CYGDEF_H_ */
-diff -urN asterisk-1.2.6.orig/include/asterisk/agi.h asterisk-1.2.6/include/asterisk/agi.h
---- asterisk-1.2.6.orig/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/agi.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/agi.h asterisk-1.2.7.1/include/asterisk/agi.h
+--- asterisk-1.2.7.1.orig/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/agi.h 2006-04-18 14:39:28.000000000 +0200
@@ -29,7 +29,8 @@
typedef struct agi_state {
@@ -9260,9 +9529,9 @@
int ctrl; /* FD for input control */
} AGI;
-diff -urN asterisk-1.2.6.orig/include/asterisk/chan_capi.h asterisk-1.2.6/include/asterisk/chan_capi.h
---- asterisk-1.2.6.orig/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/chan_capi.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/chan_capi.h asterisk-1.2.7.1/include/asterisk/chan_capi.h
+--- asterisk-1.2.7.1.orig/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/chan_capi.h 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,276 @@
+/*
+ * (CAPI*)
@@ -9540,9 +9809,9 @@
+#define CAPI_ETSI_NPLAN_INTERNAT 0x10
+
+#endif
-diff -urN asterisk-1.2.6.orig/include/asterisk/chan_capi_app.h asterisk-1.2.6/include/asterisk/chan_capi_app.h
---- asterisk-1.2.6.orig/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/chan_capi_app.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/chan_capi_app.h asterisk-1.2.7.1/include/asterisk/chan_capi_app.h
+--- asterisk-1.2.7.1.orig/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/chan_capi_app.h 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,30 @@
+/*
+ * (CAPI*)
@@ -9574,9 +9843,9 @@
+extern MESSAGE_EXCHANGE_ERROR _capi_put_cmsg(_cmsg *CMSG);
+
+#endif
-diff -urN asterisk-1.2.6.orig/include/asterisk/channel.h asterisk-1.2.6/include/asterisk/channel.h
---- asterisk-1.2.6.orig/include/asterisk/channel.h 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/channel.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/channel.h asterisk-1.2.7.1/include/asterisk/channel.h
+--- asterisk-1.2.7.1.orig/include/asterisk/channel.h 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/channel.h 2006-04-18 14:39:28.000000000 +0200
@@ -86,6 +86,9 @@
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
@@ -9596,7 +9865,20 @@
/* Why is the channel hanged up */
int hangupcause;
-@@ -533,6 +536,11 @@
+@@ -397,6 +400,12 @@
+ /*! ISDN Transfer Capbility - AST_FLAG_DIGITAL is not enough */
+ unsigned short transfercapability;
+
++ /*! ISDN Low Layer Compatibility */
++ char lowlayercompat[16];
++
++ /*! ISDN High Layer Compatibility */
++ char highlayercompat[4];
++
+ struct ast_frame *readq;
+ int alertpipe[2];
+ /*! Write translation path */
+@@ -533,6 +542,11 @@
#define AST_STATE_MUTE (1 << 16)
/*! @} */
@@ -9608,7 +9890,7 @@
/*! \brief Change the state of a channel */
int ast_setstate(struct ast_channel *chan, int state);
-@@ -569,7 +577,7 @@
+@@ -569,7 +583,7 @@
* by the low level module
* \return Returns an ast_channel on success, NULL on failure.
*/
@@ -9617,7 +9899,7 @@
/*!
* \brief Request a channel of a given type, with data as optional information used
-@@ -584,9 +592,9 @@
+@@ -584,9 +598,9 @@
* \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
@@ -9629,7 +9911,7 @@
/*!\brief Register a channel technology (a new channel driver)
* Called by a channel module to register the kind of channels it supports.
-@@ -839,6 +847,10 @@
+@@ -839,6 +853,10 @@
/*--- ast_get_channel_by_exten_locked: Get channel by exten (and optionally context) and lock it */
struct ast_channel *ast_get_channel_by_exten_locked(const char *exten, const char *context);
@@ -9640,7 +9922,7 @@
/*! Waits for a digit */
/*!
* \param c channel to wait for a digit on
-@@ -909,6 +921,9 @@
+@@ -909,6 +927,9 @@
p->owner pointer) that is affected by the change. The physical layer of the original
channel is hung up. */
int ast_channel_masquerade(struct ast_channel *original, struct ast_channel *clone);
@@ -9650,9 +9932,9 @@
/*! Gives the string form of a given cause code */
/*!
-diff -urN asterisk-1.2.6.orig/include/asterisk/devicestate.h asterisk-1.2.6/include/asterisk/devicestate.h
---- asterisk-1.2.6.orig/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/devicestate.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/devicestate.h asterisk-1.2.7.1/include/asterisk/devicestate.h
+--- asterisk-1.2.7.1.orig/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/devicestate.h 2006-04-18 14:39:28.000000000 +0200
@@ -42,7 +42,7 @@
/*! Device is ringing */
#define AST_DEVICE_RINGING 6
@@ -9671,9 +9953,9 @@
/*! \brief Registers a device state change callback
* \param callback Callback
-diff -urN asterisk-1.2.6.orig/include/asterisk/features.h asterisk-1.2.6/include/asterisk/features.h
---- asterisk-1.2.6.orig/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/features.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/features.h asterisk-1.2.7.1/include/asterisk/features.h
+--- asterisk-1.2.7.1.orig/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/features.h 2006-04-18 14:39:28.000000000 +0200
@@ -45,6 +45,8 @@
};
@@ -9716,9 +9998,9 @@
+extern struct ast_call_feature *ast_find_builtin_feature(char *name);
+
#endif /* _AST_FEATURES_H */
-diff -urN asterisk-1.2.6.orig/include/asterisk/pbx.h asterisk-1.2.6/include/asterisk/pbx.h
---- asterisk-1.2.6.orig/include/asterisk/pbx.h 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/pbx.h 2006-04-10 13:40:23.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/pbx.h asterisk-1.2.7.1/include/asterisk/pbx.h
+--- asterisk-1.2.7.1.orig/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
++++ asterisk-1.2.7.1/include/asterisk/pbx.h 2006-04-18 14:39:28.000000000 +0200
@@ -57,7 +57,7 @@
AST_EXTENSION_BUSY = 1 << 1,
/*! All devices UNAVAILABLE/UNREGISTERED */
@@ -9758,9 +10040,9 @@
-int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel);
+int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid);
- /* Functions for returning values from structures */
- const char *ast_get_context_name(struct ast_context *con);
-@@ -656,7 +658,7 @@
+ /* Evaluate a condition for non-falseness and return a boolean */
+ int pbx_checkcondition(char *condition);
+@@ -659,7 +661,7 @@
*/
void ast_func_write(struct ast_channel *chan, const char *in, const char *value);
@@ -9769,9 +10051,9 @@
#if defined(__cplusplus) || defined(c_plusplus)
}
-diff -urN asterisk-1.2.6.orig/include/asterisk/xlaw.h asterisk-1.2.6/include/asterisk/xlaw.h
---- asterisk-1.2.6.orig/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk/xlaw.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk/xlaw.h asterisk-1.2.7.1/include/asterisk/xlaw.h
+--- asterisk-1.2.7.1.orig/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk/xlaw.h 2006-04-18 14:39:28.000000000 +0200
@@ -0,0 +1,1665 @@
+#ifndef _ASTERISK_XLAW_H
+#define _ASTERISK_XLAW_H
@@ -11438,9 +11720,9 @@
+#endif // CAPI_ULAW
+#endif
+
-diff -urN asterisk-1.2.6.orig/include/asterisk.h asterisk-1.2.6/include/asterisk.h
---- asterisk-1.2.6.orig/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
-+++ asterisk-1.2.6/include/asterisk.h 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/include/asterisk.h asterisk-1.2.7.1/include/asterisk.h
+--- asterisk-1.2.7.1.orig/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
++++ asterisk-1.2.7.1/include/asterisk.h 2006-04-18 14:39:28.000000000 +0200
@@ -36,6 +36,7 @@
extern char ast_config_AST_PID[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_SOCKET[AST_CONFIG_MAX_PATH];
@@ -11449,9 +11731,9 @@
extern char ast_config_AST_CTL_PERMISSIONS[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_CTL_OWNER[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_CTL_GROUP[AST_CONFIG_MAX_PATH];
-diff -urN asterisk-1.2.6.orig/manager.c asterisk-1.2.6/manager.c
---- asterisk-1.2.6.orig/manager.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.6/manager.c 2006-04-10 11:07:15.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/manager.c asterisk-1.2.7.1/manager.c
+--- asterisk-1.2.7.1.orig/manager.c 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.7.1/manager.c 2006-04-18 14:39:28.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -11704,9 +11986,9 @@
return 0;
}
-diff -urN asterisk-1.2.6.orig/pbx/pbx_spool.c asterisk-1.2.6/pbx/pbx_spool.c
---- asterisk-1.2.6.orig/pbx/pbx_spool.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.6/pbx/pbx_spool.c 2006-04-10 10:56:30.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/pbx/pbx_spool.c asterisk-1.2.7.1/pbx/pbx_spool.c
+--- asterisk-1.2.7.1.orig/pbx/pbx_spool.c 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.7.1/pbx/pbx_spool.c 2006-04-18 14:39:28.000000000 +0200
@@ -259,11 +259,11 @@
if (!ast_strlen_zero(o->app)) {
if (option_verbose > 2)
@@ -11721,10 +12003,10 @@
}
if (res) {
ast_log(LOG_NOTICE, "Call failed to go through, reason %d\n", reason);
-diff -urN asterisk-1.2.6.orig/pbx.c asterisk-1.2.6/pbx.c
---- asterisk-1.2.6.orig/pbx.c 2006-03-22 21:59:21.000000000 +0100
-+++ asterisk-1.2.6/pbx.c 2006-04-10 13:40:34.000000000 +0200
-@@ -351,7 +351,8 @@
+diff -urN asterisk-1.2.7.1.orig/pbx.c asterisk-1.2.7.1/pbx.c
+--- asterisk-1.2.7.1.orig/pbx.c 2006-04-13 17:56:35.000000000 +0200
++++ asterisk-1.2.7.1/pbx.c 2006-04-18 14:39:28.000000000 +0200
+@@ -353,7 +353,8 @@
{ "Hangup", pbx_builtin_hangup,
"Hang up the calling channel",
@@ -11734,7 +12016,7 @@
},
{ "NoOp", pbx_builtin_noop,
-@@ -1871,7 +1872,7 @@
+@@ -1880,7 +1881,7 @@
return ast_extension_state2(e); /* Check all devices in the hint */
}
@@ -11743,7 +12025,7 @@
{
struct ast_hint *hint;
struct ast_state_cb *cblist;
-@@ -1899,11 +1900,11 @@
+@@ -1908,11 +1909,11 @@
/* For general callbacks */
for (cblist = statecbs; cblist; cblist = cblist->next)
@@ -11757,7 +12039,7 @@
hint->laststate = state;
break;
-@@ -2144,7 +2145,7 @@
+@@ -2153,7 +2154,7 @@
/* Notify with -1 and remove all callbacks */
cbprev = cblist;
cblist = cblist->next;
@@ -11766,7 +12048,7 @@
free(cbprev);
}
list->callbacks = NULL;
-@@ -3758,7 +3759,7 @@
+@@ -3774,7 +3775,7 @@
while (thiscb) {
prevcb = thiscb;
thiscb = thiscb->next;
@@ -11775,7 +12057,7 @@
free(prevcb);
}
} else {
-@@ -4958,7 +4959,7 @@
+@@ -4976,7 +4977,7 @@
return 0; /* success */
}
@@ -11784,7 +12066,7 @@
{
struct ast_channel *chan;
struct async_stat *as;
-@@ -4968,7 +4969,7 @@
+@@ -4986,7 +4987,7 @@
if (sync) {
LOAD_OH(oh);
@@ -11793,7 +12075,7 @@
if (channel) {
*channel = chan;
if (chan)
-@@ -5066,7 +5067,7 @@
+@@ -5088,7 +5089,7 @@
goto outgoing_exten_cleanup;
}
memset(as, 0, sizeof(struct async_stat));
@@ -11802,7 +12084,7 @@
if (channel) {
*channel = chan;
if (chan)
-@@ -5110,7 +5111,7 @@
+@@ -5134,7 +5135,7 @@
pthread_t t;
};
@@ -11811,7 +12093,7 @@
{
struct app_tmp *tmp = data;
struct ast_app *app;
-@@ -5126,7 +5127,7 @@
+@@ -5150,7 +5151,7 @@
return NULL;
}
@@ -11820,7 +12102,7 @@
{
struct ast_channel *chan;
struct async_stat *as;
-@@ -5146,7 +5147,7 @@
+@@ -5170,7 +5171,7 @@
goto outgoing_app_cleanup;
}
if (sync) {
@@ -11829,7 +12111,7 @@
if (chan) {
if (chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
ast_log(LOG_WARNING, "%s already has a call record??\n", chan->name);
-@@ -5233,7 +5234,8 @@
+@@ -5257,7 +5258,8 @@
goto outgoing_app_cleanup;
}
memset(as, 0, sizeof(struct async_stat));
@@ -11839,7 +12121,7 @@
if (!chan) {
free(as);
res = -1;
-@@ -5520,6 +5522,9 @@
+@@ -5544,6 +5546,9 @@
*/
static int pbx_builtin_hangup(struct ast_channel *chan, void *data)
{
@@ -11849,7 +12131,7 @@
/* Just return non-zero and it will hang up */
if (!chan->hangupcause)
chan->hangupcause = AST_CAUSE_NORMAL_CLEARING;
-@@ -6176,6 +6181,9 @@
+@@ -6200,6 +6205,9 @@
return -1;
}
}
@@ -11859,7 +12141,7 @@
return res = ast_say_number(chan, atoi((char *) tmp), "", chan->language, options);
}
-@@ -6183,8 +6191,12 @@
+@@ -6207,8 +6215,12 @@
{
int res = 0;
@@ -11873,7 +12155,7 @@
return res;
}
-@@ -6192,8 +6204,12 @@
+@@ -6216,8 +6228,12 @@
{
int res = 0;
@@ -11887,7 +12169,7 @@
return res;
}
-@@ -6201,8 +6217,12 @@
+@@ -6225,8 +6241,12 @@
{
int res = 0;
@@ -11901,9 +12183,9 @@
return res;
}
-diff -urN asterisk-1.2.6.orig/res/Makefile asterisk-1.2.6/res/Makefile
---- asterisk-1.2.6.orig/res/Makefile 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.6/res/Makefile 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/res/Makefile asterisk-1.2.7.1/res/Makefile
+--- asterisk-1.2.7.1.orig/res/Makefile 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.7.1/res/Makefile 2006-04-18 14:39:28.000000000 +0200
@@ -11,7 +11,7 @@
# the GNU General Public License
#
@@ -11913,9 +12195,9 @@
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
ifneq (${OSARCH},FreeBSD)
-diff -urN asterisk-1.2.6.orig/res/res_agi.c asterisk-1.2.6/res/res_agi.c
---- asterisk-1.2.6.orig/res/res_agi.c 2006-02-28 19:31:04.000000000 +0100
-+++ asterisk-1.2.6/res/res_agi.c 2006-04-10 10:59:02.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/res/res_agi.c asterisk-1.2.7.1/res/res_agi.c
+--- asterisk-1.2.7.1.orig/res/res_agi.c 2006-02-28 19:31:04.000000000 +0100
++++ asterisk-1.2.7.1/res/res_agi.c 2006-04-18 14:39:28.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -12292,9 +12574,9 @@
return ast_register_application(app, agi_exec, synopsis, descrip);
}
-diff -urN asterisk-1.2.6.orig/res/res_features.c asterisk-1.2.6/res/res_features.c
---- asterisk-1.2.6.orig/res/res_features.c 2006-03-23 22:51:50.000000000 +0100
-+++ asterisk-1.2.6/res/res_features.c 2006-04-10 11:03:19.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/res/res_features.c asterisk-1.2.7.1/res/res_features.c
+--- asterisk-1.2.7.1.orig/res/res_features.c 2006-04-10 19:29:51.000000000 +0200
++++ asterisk-1.2.7.1/res/res_features.c 2006-04-18 14:39:28.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -13209,7 +13491,7 @@
int ast_pickup_call(struct ast_channel *chan)
{
-@@ -2067,7 +2803,7 @@
+@@ -2068,7 +2804,7 @@
}
{
@@ -13218,7 +13500,7 @@
int mallocd=0;
if (!feature) {
-@@ -2143,14 +2879,22 @@
+@@ -2144,14 +2880,22 @@
if ((res = load_config()))
return res;
ast_cli_register(&showparked);
@@ -13241,7 +13523,7 @@
return res;
}
-@@ -2161,7 +2905,11 @@
+@@ -2162,7 +2906,11 @@
ast_manager_unregister("ParkedCalls");
ast_cli_unregister(&showfeatures);
@@ -13253,10 +13535,10 @@
ast_unregister_application(parkcall);
return ast_unregister_application(parkedcall);
}
-diff -urN asterisk-1.2.6.orig/res/res_watchdog.c asterisk-1.2.6/res/res_watchdog.c
---- asterisk-1.2.6.orig/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.6/res/res_watchdog.c 2006-04-10 10:40:29.000000000 +0200
-@@ -0,0 +1,148 @@
+diff -urN asterisk-1.2.7.1.orig/res/res_watchdog.c asterisk-1.2.7.1/res/res_watchdog.c
+--- asterisk-1.2.7.1.orig/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.7.1/res/res_watchdog.c 2006-04-24 09:39:12.000000000 +0200
+@@ -0,0 +1,149 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
@@ -13384,6 +13666,7 @@
+ dogs = watchdogs;
+ while (dogs) {
+ pthread_cancel(dogs->watchdog_thread);
++ close(dogs->fd);
+ woof = dogs->next;
+ free(dogs);
+ dogs = woof;
@@ -13405,9 +13688,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.6.orig/rtp.c asterisk-1.2.6/rtp.c
---- asterisk-1.2.6.orig/rtp.c 2006-03-15 19:07:06.000000000 +0100
-+++ asterisk-1.2.6/rtp.c 2006-04-10 10:40:29.000000000 +0200
+diff -urN asterisk-1.2.7.1.orig/rtp.c asterisk-1.2.7.1/rtp.c
+--- asterisk-1.2.7.1.orig/rtp.c 2006-03-15 19:07:06.000000000 +0100
++++ asterisk-1.2.7.1/rtp.c 2006-04-18 14:39:28.000000000 +0200
@@ -442,6 +442,11 @@
struct rtpPayloadType rtpPT;
More information about the Pkg-voip-commits
mailing list