[Pkg-voip-commits] r2864 - asterisk/trunk/debian/patches
Kilian Krause
kilian at alioth.debian.org
Thu Dec 28 10:39:57 CET 2006
Author: kilian
Date: 2006-12-28 10:39:56 +0100 (Thu, 28 Dec 2006)
New Revision: 2864
Modified:
asterisk/trunk/debian/patches/30_ast-data-dir.dpatch
asterisk/trunk/debian/patches/bristuff.dpatch
Log:
fix bristuff patch to apply to 1.2.13
update comment in ast-data-dir patch
Modified: asterisk/trunk/debian/patches/30_ast-data-dir.dpatch
===================================================================
--- asterisk/trunk/debian/patches/30_ast-data-dir.dpatch 2006-12-27 23:09:59 UTC (rev 2863)
+++ asterisk/trunk/debian/patches/30_ast-data-dir.dpatch 2006-12-28 09:39:56 UTC (rev 2864)
@@ -6,7 +6,7 @@
## DP: Places read-only architecture-independent data under /usr/share/asterisk (autoconf --datadir)
## DP: not /var/lib/asterisk
## (in short make ASTVARLIBDIR become ASTDATADIR)
-## -- is applied upstream for 1.2
+## -- was applied upstream for 1.2. Full transition in 1.4.
@DPATCH@
diff -urNad asterisk-1.2.14~dfsg~/Makefile asterisk-1.2.14~dfsg/Makefile
Modified: asterisk/trunk/debian/patches/bristuff.dpatch
===================================================================
--- asterisk/trunk/debian/patches/bristuff.dpatch 2006-12-27 23:09:59 UTC (rev 2863)
+++ asterisk/trunk/debian/patches/bristuff.dpatch 2006-12-28 09:39:56 UTC (rev 2864)
@@ -6,9 +6,231 @@
## DP: cygdef.h removed ;-)
@DPATCH@
-diff -urN asterisk-1.2.13.orig/agi/Makefile asterisk-1.2.13/agi/Makefile
---- asterisk-1.2.13.orig/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
-+++ asterisk-1.2.13/agi/Makefile 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/.version.rej asterisk-1.2.14~dfsg/.version.rej
+--- asterisk-1.2.14~dfsg~/.version.rej 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/.version.rej 2006-12-28 10:22:18.405637079 +0100
+@@ -0,0 +1,5 @@
++***************
++*** 1 ****
++- 1.2.13
++--- 1 ----
+++ 1.2.13-BRIstuffed-0.3.0-PRE-1v
+diff -urNad asterisk-1.2.14~dfsg~/HARDWARE asterisk-1.2.14~dfsg/HARDWARE
+--- asterisk-1.2.14~dfsg~/HARDWARE 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/HARDWARE 2006-12-28 10:22:18.385635692 +0100
+@@ -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.
+
++-- Junghanns.NET (Primary author of BRIstuff)
++ http://www.junghanns.net
++
++ * quadBRI PCI ISDN - 4port BRI ISDN interface, supports NT and TE mode
++
++ * octoBRI PCI ISDN - 8port BRI ISDN interface, supports NT and TE mode
++
++ * singleE1 PCI ISDN - Single E1 interface
++
++ * doubleE1 PCI ISDN - Double E1 interface
++
++ * uno/duo/quad GSM PCI - 1/2/4 channel GSM interface cards
++
+ Non-zaptel compatible hardware
+ ==============================
+
+diff -urNad asterisk-1.2.14~dfsg~/LICENSE asterisk-1.2.14~dfsg/LICENSE
+--- asterisk-1.2.14~dfsg~/LICENSE 2006-10-17 19:22:01.000000000 +0200
++++ asterisk-1.2.14~dfsg/LICENSE 2006-12-28 10:22:18.393636246 +0100
+@@ -1,7 +1,7 @@
+-Asterisk is distributed under the GNU General Public License version 2
+-and is also available under alternative licenses negotiated directly
+-with Digium, Inc. If you obtained Asterisk under the GPL, then the GPL
+-applies to all loadable Asterisk modules used on your system as well,
++BRIstuffed Asterisk is distributed under the GNU General Public License version 2
++and is not available under any alternative licenses.
++If you obtained BRIstuffed Asterisk under the GPL, then the GPL
++applies to all loadable BRIstuffed Asterisk modules used on your system as well,
+ except as defined below. The GPL (version 2) is included in this
+ source tree in the file COPYING.
+
+diff -urNad asterisk-1.2.14~dfsg~/Makefile asterisk-1.2.14~dfsg/Makefile
+--- asterisk-1.2.14~dfsg~/Makefile 2006-12-11 22:55:43.000000000 +0100
++++ asterisk-1.2.14~dfsg/Makefile 2006-12-28 10:22:18.393636246 +0100
+@@ -781,6 +781,9 @@
+ echo ";astctlowner = root" ; \
+ echo ";astctlgroup = apache" ; \
+ echo ";astctl = asterisk.ctl" ; \
++ echo "[options]" ; \
++ echo "uniquename = `hostname`" ;\
++ echo "silence_suppression = yes" ;\
+ ) > $(DESTDIR)$(ASTCONFPATH) ; \
+ else \
+ echo "Skipping asterisk.conf creation"; \
+diff -urNad asterisk-1.2.14~dfsg~/README asterisk-1.2.14~dfsg/README
+--- asterisk-1.2.14~dfsg~/README 2006-03-03 09:12:33.000000000 +0100
++++ asterisk-1.2.14~dfsg/README 2006-12-28 10:22:18.397636524 +0100
+@@ -4,6 +4,8 @@
+
+ Copyright (C) 2001-2005 Digium, Inc.
+ and other copyright holders.
++Copyright (C) 2002-2005 Junghanns.NET GmbH
++and other copyright holders.
+ ================================================================
+
+ * SECURITY
+diff -urNad asterisk-1.2.14~dfsg~/README.chan_capi asterisk-1.2.14~dfsg/README.chan_capi
+--- asterisk-1.2.14~dfsg~/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/README.chan_capi 2006-12-28 10:22:18.397636524 +0100
+@@ -0,0 +1,146 @@
++(CAPI*) chan_capi a Common ISDN API 2.0 implementation for Asterisk
++(C) 2002, 2003, 2004, 2005 Junghanns.NET GmbH
++Klaus-Peter Junghanns <kpj at junghanns.net>
++
++This program is free software and may be modified and distributed under
++the terms of the GNU Public License. There is _NO_ warranty for this!
++
++Thanks go to the debuggers and bugfixers (listed in chronological order) :)
++===========================================================================
++Lele Forzani <lele at windmill.it>
++Florian Overkamp <florian at obsimref.com>
++Gareth Watts <gareth at omnipotent.net>
++Jeff Noxon <jeff at planetfall.com>
++Petr Michalek <petr.michalek at aca.cz>
++Jan Stocker
++(...and all the others that i forgot..) :-)
++
++chan_capi version 0.4.0-PRE1 includes:
++======================================
++
++- multiple controller support
++- CID,DNID (callling party, called party)
++- CLIR/CLIP
++- supplementary services, CD,HOLD,RETRIEVE,ECT
++- DTMF (dependend on card) + software DTMF support
++- early B3 connects (always,success,never)
++- digital audio (what did you think?)
++- incoming/outgoing calls
++- overlap sending (dialtone)
++- E(xplicit) C(all) T(ransfer) (...although it's done implicit .. but dont tell!)
++- tuneable latency ;) you can configure the size of B3 blocks at compile time
++ (in chan_capi_pvt.h, AST_CAPI_MAX_B3_BLOCK_SIZE)
++ the default is 160 samples, for non-VoIP use you can tune it down to 130
++- use asterisk's internal dsp functions for dtmf
++- alaw support
++- ulaw support!
++- Eicon CAPI echo cancelation (echocancel=1)
++- reject call waiting (ACO)
++- DID for Point to Point mode (a.k.a overlap receiving)
++- experimental echo squelching (echosquelch=1)
++- call progress, no need to add ||r to your dialstring anymore
++- rx/tx gains (rxgain=1.0)
++- call deflection on circuitbusy (makefile option) (deflect=12345678)
++- (inter)national dialing prefix (for callerid) configurable in capi.conf
++- CLI command "capi info" shows B channel status
++- capiECT will announce the callerID since it gets lost on most isdn pbxes
++ the called party can press # to drop the call
++- audio syncing (timing outgoing dataB3 on incoming dataB3), supposed to fix
++ the DATA_B3_REQ (error = 0x1103) problem
++- catch all MSN (incomingmsn=*)
++- some configuration enhancements (msn=123,124,125 and controller=1,2,3,4)
++- accountcode= added.
++- finally the echo squelching works!
++- callgroup support
++- fixed pipe leak
++- updated to support the new frame->delivery field
++- compiles with latest cvs with a makefile option (LOOK AT THE MAKEFILE)
++- fixed channel name bug in p2p mode
++- added app_capiNoES for disabling the primitive echo suppressor, use this before
++ you start recording voicemail or your files may get choppy
++- fixed for latest cvs (AST_MUTEX_DEFINE_STATIC)
++- fixed for latest cvs (asterisk/parking.h -> asterisk/features.h)
++- fixed for latest cvs ast_pthread_create
++
++- ATTENTION! the dialstring syntax now uses the zaptel dialstring syntax
++ it used to be: Dial(CAPI/[@]<outgoingMSN>:[b|B]<destination>)
++
++ now it is: Dial(CAPI/g<group>/[b|B]<destination>)
++ or: Dial(CAPI/contr<controller>/[b|B]<destination>)
++
++ CLIP/CLIR is now uses the calling presentation of the calling channel, this can
++ be modified using the CallingPres() application. Use CallinPres(32) for CLIR.
++ That is why the msn= param in capi.conf is now obsolete. The callerID is also
++ taken from the calling channel.
++
++- fixes for BSD (Jan Stocker)
++
++Helper applications
++===================
++kapejod says: "No No No, dont use those yet....!" (except maybe HOLD,ECT...)
++
++app_capiCD.c forwards an unanswered call to another phone (does not rely on sservice CD)
++ example:
++ exten => s,1,Wait,1
++ exten => s,2,capiCD,12345678
++
++app_capiHOLD.c puts an answered call on hold, this has nothing to do with asterisk's onhold thingie (music et al)
++ after putting a call onhold, never use the Wait application!
++
++app_capiRETRIEVE.c gets the holded call back
++
++app_capiECT.c explicit call transfer of the holded call (must put call on hold first!)
++ example:
++ exten => s,1,Answer
++ exten => s,2,capiHOLD
++ exten => s,3,capiECT,55:50
++ will ECT the call to 50 using 55 as the callerid/outgoing msn
++
++
++Using CLIR
++==========
++Use the CallingPres() application before you dial:
++exten => _X.,1,CallingPres(32)
++exten => _X.,2,Dial(CAPI/contr1/${EXTEN})
++
++Enjoying early B3 connects (inband call progress, tones and announcements)
++==========================================================================
++early B3 is now configurable in the dialstring :)
++if you prefix the destination number with a 'b' early B3 will always be used, also if the call fails
++because the number is unprovisioned, etc ...
++if you prefix it with a 'B' early B3 will only be used on successful calls, giving you ring indication,etc...
++
++dont use indications in the Dial command, your local exchange will do that for you:
++exten => _X.,1,Dial(CAPI/contr1/B${EXTEN},30) (early B3 on success)
++exten => _X.,1,Dial(CAPI/contr1/b${EXTEN},30) (always early B3)
++exten => _X.,1,Dial(CAPI/contr1/${EXTEN},30,r) (no early B3, fake ring indication)
++
++exten => _X.,1,Dial(CAPI/contr1/b${EXTEN},30,r) (always early B3, fake indicatons if the exchange
++ does not give us indications)
++exten => _X.,1,Dial(CAPI/contr1/B${EXTEN},30,r) (early B3 on success, fake indicatons if the exchange
++ does not give us indications)
++
++you can totally turn B3 off in the Makefile at buildtime (-DNEVER_EVER_EARLY_B3_CONNECTS).
++
++For normal PBX usage you would use the "b" option, always early B3.
++
++Overlap sending (a.k.a. real dialtone)
++======================================
++when you dial an empty number, and have early B3 enabled, with:
++ Dial(CAPI/g1/b)
++the channel will come up at once and give you the dialtone it gets from the local exchange.
++at this point the channel is like a legacy phone, now you can send dtmf digits to dial.
++
++Example context for incoming calls on MSN 12345678:
++===================================================
++
++[capi-in]
++exten => 12345678,1,Dial(SIP/phone1)
++exten => 12345678,2,Hangup
++
++
++More information/documentation and commercial support can be found at:
++ http://www.junghanns.net/asterisk/
++
++
++
+diff -urNad asterisk-1.2.14~dfsg~/agi/Makefile asterisk-1.2.14~dfsg/agi/Makefile
+--- asterisk-1.2.14~dfsg~/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
++++ asterisk-1.2.14~dfsg/agi/Makefile 2006-12-28 10:22:18.325631530 +0100
@@ -11,7 +11,7 @@
# the GNU General Public License
#
@@ -27,9 +249,9 @@
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<
-diff -urN asterisk-1.2.13.orig/agi/xagi-test.c asterisk-1.2.13/agi/xagi-test.c
---- asterisk-1.2.13.orig/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/agi/xagi-test.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/agi/xagi-test.c asterisk-1.2.14~dfsg/agi/xagi-test.c
+--- asterisk-1.2.14~dfsg~/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/agi/xagi-test.c 2006-12-28 10:22:18.325631530 +0100
@@ -0,0 +1,175 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -206,9 +428,29 @@
+ return -1;
+ exit(0);
+}
-diff -urN asterisk-1.2.13.orig/apps/app_callingpres.c asterisk-1.2.13/apps/app_callingpres.c
---- asterisk-1.2.13.orig/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_callingpres.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/Makefile asterisk-1.2.14~dfsg/apps/Makefile
+--- asterisk-1.2.14~dfsg~/apps/Makefile 2006-04-30 15:38:22.000000000 +0200
++++ asterisk-1.2.14~dfsg/apps/Makefile 2006-12-28 10:22:18.333632085 +0100
+@@ -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 \
+ app_md5.so app_readfile.so app_chanspy.so app_settransfercapability.so \
++ app_pickup.so app_segfault.so app_callingpres.so app_devstate.so \
+ app_dictate.so app_externalivr.so app_directed_pickup.so \
+- app_mixmonitor.so app_stack.so
++ app_mixmonitor.so app_stack.so
++
++
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/capi20.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/capi20.h),)
++ APPS+= app_capiNoES.so app_capiCD.so app_capiECT.so
++endif
++
+
+ #
+ # Obsolete things...
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_callingpres.c asterisk-1.2.14~dfsg/apps/app_callingpres.c
+--- asterisk-1.2.14~dfsg~/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_callingpres.c 2006-12-28 10:22:18.325631530 +0100
@@ -0,0 +1,70 @@
+/*
+ * An application to change the CallingPresentation for an Asterisk channel.
@@ -280,9 +522,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_capiCD.c asterisk-1.2.13/apps/app_capiCD.c
---- asterisk-1.2.13.orig/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_capiCD.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_capiCD.c asterisk-1.2.14~dfsg/apps/app_capiCD.c
+--- asterisk-1.2.14~dfsg~/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_capiCD.c 2006-12-28 10:22:18.325631530 +0100
@@ -0,0 +1,172 @@
+/*
+ * (CAPI*)
@@ -456,9 +698,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_capiECT.c asterisk-1.2.13/apps/app_capiECT.c
---- asterisk-1.2.13.orig/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_capiECT.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_capiECT.c asterisk-1.2.14~dfsg/apps/app_capiECT.c
+--- asterisk-1.2.14~dfsg~/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_capiECT.c 2006-12-28 10:22:18.325631530 +0100
@@ -0,0 +1,210 @@
+/*
+ * (CAPI*)
@@ -670,9 +912,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_capiNoES.c asterisk-1.2.13/apps/app_capiNoES.c
---- asterisk-1.2.13.orig/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_capiNoES.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_capiNoES.c asterisk-1.2.14~dfsg/apps/app_capiNoES.c
+--- asterisk-1.2.14~dfsg~/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_capiNoES.c 2006-12-28 10:22:18.325631530 +0100
@@ -0,0 +1,96 @@
+/*
+ * (CAPI*)
@@ -770,9 +1012,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_chanisavail.c asterisk-1.2.13/apps/app_chanisavail.c
---- asterisk-1.2.13.orig/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/apps/app_chanisavail.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_chanisavail.c asterisk-1.2.14~dfsg/apps/app_chanisavail.c
+--- asterisk-1.2.14~dfsg~/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_chanisavail.c 2006-12-28 10:22:18.325631530 +0100
@@ -118,7 +118,7 @@
snprintf(trychan, sizeof(trychan), "%s/%s",cur,number);
status = inuse = ast_device_state(trychan);
@@ -782,9 +1024,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.13.orig/apps/app_chanspy.c asterisk-1.2.13/apps/app_chanspy.c
---- asterisk-1.2.13.orig/apps/app_chanspy.c 2006-10-13 19:01:22.000000000 +0200
-+++ asterisk-1.2.13/apps/app_chanspy.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_chanspy.c asterisk-1.2.14~dfsg/apps/app_chanspy.c
+--- asterisk-1.2.14~dfsg~/apps/app_chanspy.c 2006-10-13 19:01:22.000000000 +0200
++++ asterisk-1.2.14~dfsg/apps/app_chanspy.c 2006-12-28 10:22:18.329631807 +0100
@@ -55,6 +55,7 @@
static const char *synopsis = "Listen to the audio of an active channel\n";
@@ -912,9 +1154,9 @@
}
char *description(void)
-diff -urN asterisk-1.2.13.orig/apps/app_devstate.c asterisk-1.2.13/apps/app_devstate.c
---- asterisk-1.2.13.orig/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_devstate.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_devstate.c asterisk-1.2.14~dfsg/apps/app_devstate.c
+--- asterisk-1.2.14~dfsg~/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_devstate.c 2006-12-28 10:22:18.329631807 +0100
@@ -0,0 +1,225 @@
+/*
+ * Devstate application
@@ -1141,9 +1383,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_dial.c asterisk-1.2.13/apps/app_dial.c
---- asterisk-1.2.13.orig/apps/app_dial.c 2006-09-19 18:21:08.000000000 +0200
-+++ asterisk-1.2.13/apps/app_dial.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_dial.c asterisk-1.2.14~dfsg/apps/app_dial.c
+--- asterisk-1.2.14~dfsg~/apps/app_dial.c 2006-12-02 00:30:59.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_dial.c 2006-12-28 10:22:18.329631807 +0100
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -1315,8 +1557,8 @@
+ ast_copy_string(status, "NOANSWER", sizeof(status));
if (ast_test_flag(outgoing, OPT_MUSICBACK)) {
moh=1;
- ast_moh_start(chan, opt_args[OPT_ARG_MUSICBACK]);
-@@ -1202,8 +1222,11 @@
+ ast_indicate(chan, AST_CONTROL_PROGRESS);
+@@ -1203,8 +1223,11 @@
ast_indicate(chan, AST_CONTROL_RINGING);
sentringing++;
}
@@ -1330,7 +1572,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);
-@@ -1568,18 +1591,22 @@
+@@ -1569,18 +1592,22 @@
ast_set_flag(&(config.features_caller), AST_FEATURE_PLAY_WARNING);
if (play_to_callee)
ast_set_flag(&(config.features_callee), AST_FEATURE_PLAY_WARNING);
@@ -1359,7 +1601,7 @@
config.timelimit = timelimit;
config.play_warning = play_warning;
-@@ -1615,7 +1642,15 @@
+@@ -1616,7 +1643,15 @@
}
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
@@ -1376,9 +1618,9 @@
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)
chan->hangupcause = peer->hangupcause;
-diff -urN asterisk-1.2.13.orig/apps/app_directed_pickup.c asterisk-1.2.13/apps/app_directed_pickup.c
---- asterisk-1.2.13.orig/apps/app_directed_pickup.c 2006-04-06 19:00:10.000000000 +0200
-+++ asterisk-1.2.13/apps/app_directed_pickup.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_directed_pickup.c asterisk-1.2.14~dfsg/apps/app_directed_pickup.c
+--- asterisk-1.2.14~dfsg~/apps/app_directed_pickup.c 2006-04-06 19:00:10.000000000 +0200
++++ asterisk-1.2.14~dfsg/apps/app_directed_pickup.c 2006-12-28 10:22:18.329631807 +0100
@@ -41,7 +41,7 @@
#include "asterisk/app.h"
@@ -1388,9 +1630,9 @@
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.13.orig/apps/app_meetme.c asterisk-1.2.13/apps/app_meetme.c
---- asterisk-1.2.13.orig/apps/app_meetme.c 2006-09-28 18:13:55.000000000 +0200
-+++ asterisk-1.2.13/apps/app_meetme.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_meetme.c asterisk-1.2.14~dfsg/apps/app_meetme.c
+--- asterisk-1.2.14~dfsg~/apps/app_meetme.c 2006-09-28 18:13:55.000000000 +0200
++++ asterisk-1.2.14~dfsg/apps/app_meetme.c 2006-12-28 10:22:18.329631807 +0100
@@ -458,7 +458,7 @@
ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
@@ -1444,9 +1686,9 @@
if (res > 0) {
memset(&fr, 0, sizeof(fr));
fr.frametype = AST_FRAME_VOICE;
-diff -urN asterisk-1.2.13.orig/apps/app_milliwatt.c asterisk-1.2.13/apps/app_milliwatt.c
---- asterisk-1.2.13.orig/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
-+++ asterisk-1.2.13/apps/app_milliwatt.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_milliwatt.c asterisk-1.2.14~dfsg/apps/app_milliwatt.c
+--- asterisk-1.2.14~dfsg~/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_milliwatt.c 2006-12-28 10:22:18.329631807 +0100
@@ -74,20 +74,28 @@
{
struct ast_frame wf;
@@ -1482,9 +1724,9 @@
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
-diff -urN asterisk-1.2.13.orig/apps/app_page.c asterisk-1.2.13/apps/app_page.c
---- asterisk-1.2.13.orig/apps/app_page.c 2006-09-11 23:47:23.000000000 +0200
-+++ asterisk-1.2.13/apps/app_page.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_page.c asterisk-1.2.14~dfsg/apps/app_page.c
+--- asterisk-1.2.14~dfsg~/apps/app_page.c 2006-09-11 23:47:23.000000000 +0200
++++ asterisk-1.2.14~dfsg/apps/app_page.c 2006-12-28 10:22:18.333632085 +0100
@@ -85,7 +85,7 @@
{
struct calloutdata *cd = data;
@@ -1494,9 +1736,9 @@
free(cd);
return NULL;
}
-diff -urN asterisk-1.2.13.orig/apps/app_parkandannounce.c asterisk-1.2.13/apps/app_parkandannounce.c
---- asterisk-1.2.13.orig/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/apps/app_parkandannounce.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_parkandannounce.c asterisk-1.2.14~dfsg/apps/app_parkandannounce.c
+--- asterisk-1.2.14~dfsg~/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_parkandannounce.c 2006-12-28 10:22:18.333632085 +0100
@@ -183,7 +183,7 @@
memset(&oh, 0, sizeof(oh));
@@ -1506,9 +1748,9 @@
if(dchan) {
if(dchan->_state == AST_STATE_UP) {
-diff -urN asterisk-1.2.13.orig/apps/app_pickup.c asterisk-1.2.13/apps/app_pickup.c
---- asterisk-1.2.13.orig/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_pickup.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_pickup.c asterisk-1.2.14~dfsg/apps/app_pickup.c
+--- asterisk-1.2.14~dfsg~/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_pickup.c 2006-12-28 10:22:18.333632085 +0100
@@ -0,0 +1,319 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -1829,9 +2071,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_queue.c asterisk-1.2.13/apps/app_queue.c
---- asterisk-1.2.13.orig/apps/app_queue.c 2006-10-03 22:14:13.000000000 +0200
-+++ asterisk-1.2.13/apps/app_queue.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_queue.c asterisk-1.2.14~dfsg/apps/app_queue.c
+--- asterisk-1.2.14~dfsg~/apps/app_queue.c 2006-10-03 22:14:13.000000000 +0200
++++ asterisk-1.2.14~dfsg/apps/app_queue.c 2006-12-28 10:22:18.333632085 +0100
@@ -543,7 +543,7 @@
return NULL;
}
@@ -1877,9 +2119,9 @@
}
if (qe->parent->monjoin)
ast_monitor_setjoinfiles(which, 1);
-diff -urN asterisk-1.2.13.orig/apps/app_readfile.c asterisk-1.2.13/apps/app_readfile.c
---- asterisk-1.2.13.orig/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
-+++ asterisk-1.2.13/apps/app_readfile.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_readfile.c asterisk-1.2.14~dfsg/apps/app_readfile.c
+--- asterisk-1.2.14~dfsg~/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_readfile.c 2006-12-28 10:22:18.333632085 +0100
@@ -40,7 +40,7 @@
#include "asterisk/app.h"
#include "asterisk/module.h"
@@ -1889,9 +2131,9 @@
static char *app_readfile = "ReadFile";
-diff -urN asterisk-1.2.13.orig/apps/app_segfault.c asterisk-1.2.13/apps/app_segfault.c
---- asterisk-1.2.13.orig/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/apps/app_segfault.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_segfault.c asterisk-1.2.14~dfsg/apps/app_segfault.c
+--- asterisk-1.2.14~dfsg~/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_segfault.c 2006-12-28 10:22:18.333632085 +0100
@@ -0,0 +1,75 @@
+/*
+ * Segfault application
@@ -1968,10 +2210,10 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/apps/app_zapras.c asterisk-1.2.13/apps/app_zapras.c
---- asterisk-1.2.13.orig/apps/app_zapras.c 2006-07-12 15:54:10.000000000 +0200
-+++ asterisk-1.2.13/apps/app_zapras.c 2006-10-19 11:11:39.000000000 +0200
-@@ -180,7 +180,7 @@
+diff -urNad asterisk-1.2.14~dfsg~/apps/app_zapras.c asterisk-1.2.14~dfsg/apps/app_zapras.c
+--- asterisk-1.2.14~dfsg~/apps/app_zapras.c 2006-12-11 01:33:59.000000000 +0100
++++ asterisk-1.2.14~dfsg/apps/app_zapras.c 2006-12-28 10:22:18.333632085 +0100
+@@ -188,7 +188,7 @@
}
}
/* Throw back into audio mode */
@@ -1980,29 +2222,9 @@
ioctl(chan->fds[0], ZT_AUDIOMODE, &x);
/* Restore saved values */
-diff -urN asterisk-1.2.13.orig/apps/Makefile asterisk-1.2.13/apps/Makefile
---- asterisk-1.2.13.orig/apps/Makefile 2006-04-30 15:38:22.000000000 +0200
-+++ asterisk-1.2.13/apps/Makefile 2006-10-19 11:11:39.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 \
- app_md5.so app_readfile.so app_chanspy.so app_settransfercapability.so \
-+ app_pickup.so app_segfault.so app_callingpres.so app_devstate.so \
- app_dictate.so app_externalivr.so app_directed_pickup.so \
-- app_mixmonitor.so app_stack.so
-+ app_mixmonitor.so app_stack.so
-+
-+
-+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/capi20.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/capi20.h),)
-+ APPS+= app_capiNoES.so app_capiCD.so app_capiECT.so
-+endif
-+
-
- #
- # Obsolete things...
-diff -urN asterisk-1.2.13.orig/asterisk.c asterisk-1.2.13/asterisk.c
---- asterisk-1.2.13.orig/asterisk.c 2006-09-26 22:49:21.000000000 +0200
-+++ asterisk-1.2.13/asterisk.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/asterisk.c asterisk-1.2.14~dfsg/asterisk.c
+--- asterisk-1.2.14~dfsg~/asterisk.c 2006-10-27 19:36:07.000000000 +0200
++++ asterisk-1.2.14~dfsg/asterisk.c 2006-12-28 10:22:18.333632085 +0100
@@ -169,7 +169,7 @@
int option_maxcalls = 0; /*!< */
double option_maxload = 0.0; /*!< Max load avg on system */
@@ -2037,9 +2259,9 @@
}
v = v->next;
}
-diff -urN asterisk-1.2.13.orig/build_tools/make_defaults_h asterisk-1.2.13/build_tools/make_defaults_h
---- asterisk-1.2.13.orig/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
-+++ asterisk-1.2.13/build_tools/make_defaults_h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/build_tools/make_defaults_h asterisk-1.2.14~dfsg/build_tools/make_defaults_h
+--- asterisk-1.2.14~dfsg~/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
++++ asterisk-1.2.14~dfsg/build_tools/make_defaults_h 2006-12-28 10:22:18.337632362 +0100
@@ -16,6 +16,7 @@
#define AST_KEY_DIR "${INSTALL_PATH}${ASTVARLIBDIR}/keys"
#define AST_DB "${INSTALL_PATH}${ASTVARLIBDIR}/astdb"
@@ -2048,9 +2270,9 @@
#define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
-diff -urN asterisk-1.2.13.orig/channel.c asterisk-1.2.13/channel.c
---- asterisk-1.2.13.orig/channel.c 2006-09-27 18:54:30.000000000 +0200
-+++ asterisk-1.2.13/channel.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/channel.c asterisk-1.2.14~dfsg/channel.c
+--- asterisk-1.2.14~dfsg~/channel.c 2006-12-13 05:23:17.000000000 +0100
++++ asterisk-1.2.14~dfsg/channel.c 2006-12-28 10:29:05.749932951 +0100
@@ -94,8 +94,8 @@
*/
static int shutting_down = 0;
@@ -2061,7 +2283,7 @@
unsigned long global_fin = 0, global_fout = 0;
-@@ -512,6 +512,17 @@
+@@ -515,6 +515,17 @@
.description = "Null channel (should not see this)",
};
@@ -2079,7 +2301,7 @@
/*--- ast_channel_alloc: Create a new channel structure */
struct ast_channel *ast_channel_alloc(int needqueue)
{
-@@ -519,6 +530,7 @@
+@@ -522,6 +533,7 @@
int x;
int flags;
struct varshead *headp;
@@ -2087,7 +2309,7 @@
/* If shutting down, don't allocate any new channels */
-@@ -584,9 +596,12 @@
+@@ -587,9 +599,12 @@
tmp->data = NULL;
tmp->fin = global_fin;
tmp->fout = global_fout;
@@ -2103,7 +2325,7 @@
headp = &tmp->varshead;
ast_mutex_init(&tmp->lock);
AST_LIST_HEAD_INIT_NOLOCK(headp);
-@@ -729,7 +744,7 @@
+@@ -732,7 +747,7 @@
*/
static struct ast_channel *channel_find_locked(const struct ast_channel *prev,
const char *name, const int namelen,
@@ -2111,25 +2333,18 @@
+ const char *context, const char *exten, const char *uniqueid)
{
const char *msg = prev ? "deadlock" : "initial deadlock";
- int retries, done;
-@@ -740,9 +755,14 @@
- for (c = channels; c; c = c->next) {
- if (!prev) {
- /* want head of list */
-- if (!name && !exten)
-+ if (!name && !exten && !uniqueid)
- break;
-- if (name) {
-+ if (uniqueid) {
-+ if (!strcasecmp(c->uniqueid, uniqueid))
-+ break;
-+ else
+ int retries;
+@@ -753,6 +768,9 @@
+ if ((!namelen && strcasecmp(c->name, name)) ||
+ (namelen && strncasecmp(c->name, name, namelen)))
+ continue; /* name match failed */
++ } else if (uniqueid){
++ if (strcasecmp(c->uniqueid, uniqueid))
+ continue;
-+ } else if (name) {
- /* want match by full name */
- if (!namelen) {
- if (!strcasecmp(c->name, name))
-@@ -793,33 +813,39 @@
+ } else if (exten) {
+ if (context && strcasecmp(c->context, context) &&
+ strcasecmp(c->macrocontext, context))
+@@ -787,33 +805,39 @@
/*--- ast_channel_walk_locked: Browse channels in use */
struct ast_channel *ast_channel_walk_locked(const struct ast_channel *prev)
{
@@ -2163,18 +2378,18 @@
{
- return channel_find_locked(NULL, NULL, 0, context, exten);
+ return channel_find_locked(NULL, NULL, 0, context, exten, NULL);
-+}
-+
+ }
+
+struct ast_channel *ast_get_channel_by_uniqueid_locked(const char *uniqueid)
+{
+ return channel_find_locked(NULL, NULL, 0, NULL, NULL, uniqueid);
- }
-
++}
+
++
/*--- ast_safe_sleep_conditional: Wait, look for hangups and condition arg */
int ast_safe_sleep_conditional( struct ast_channel *chan, int ms,
int (*cond)(void*), void *data )
-@@ -885,8 +911,9 @@
+@@ -879,8 +903,9 @@
char name[AST_CHANNEL_NAME];
headp=&chan->varshead;
@@ -2185,7 +2400,7 @@
cur = channels;
while(cur) {
if (cur == chan) {
-@@ -899,21 +926,20 @@
+@@ -893,21 +918,20 @@
last = cur;
cur = cur->next;
}
@@ -2214,7 +2429,7 @@
ast_copy_string(name, chan->name, sizeof(name));
-@@ -934,6 +960,8 @@
+@@ -928,6 +952,8 @@
if (chan->pbx)
ast_log(LOG_WARNING, "PBX may not have been terminated properly on '%s'\n", chan->name);
free_cid(&chan->cid);
@@ -2223,7 +2438,7 @@
ast_mutex_destroy(&chan->lock);
/* Close pipes if appropriate */
if ((fd = chan->alertpipe[0]) > -1)
-@@ -956,10 +984,10 @@
+@@ -950,10 +976,10 @@
while ((vardata = AST_LIST_REMOVE_HEAD(headp, entries)))
ast_var_delete(vardata);
@@ -2236,7 +2451,7 @@
}
int ast_channel_spy_add(struct ast_channel *chan, struct ast_channel_spy *spy)
-@@ -2423,7 +2451,7 @@
+@@ -2422,7 +2448,7 @@
&chan->writetrans, 1);
}
@@ -2245,7 +2460,7 @@
{
int state = 0;
int cause = 0;
-@@ -2431,7 +2459,7 @@
+@@ -2430,7 +2456,7 @@
struct ast_frame *f;
int res = 0;
@@ -2254,7 +2469,7 @@
if (chan) {
if (oh) {
if (oh->vars)
-@@ -2445,6 +2473,7 @@
+@@ -2444,6 +2470,7 @@
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);
@@ -2262,7 +2477,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)) {
-@@ -2468,6 +2497,7 @@
+@@ -2467,6 +2494,7 @@
if (f->subclass == AST_CONTROL_RINGING)
state = AST_CONTROL_RINGING;
else if ((f->subclass == AST_CONTROL_BUSY) || (f->subclass == AST_CONTROL_CONGESTION)) {
@@ -2270,7 +2485,7 @@
state = f->subclass;
ast_frfree(f);
break;
-@@ -2537,12 +2567,12 @@
+@@ -2536,12 +2564,12 @@
return chan;
}
@@ -2286,7 +2501,7 @@
{
struct chanlist *chan;
struct ast_channel *c;
-@@ -2579,6 +2609,7 @@
+@@ -2578,6 +2606,7 @@
if (!(c = chan->tech->requester(type, capabilities, data, cause)))
return NULL;
@@ -2294,7 +2509,7 @@
if (c->_state == AST_STATE_DOWN) {
manager_event(EVENT_FLAG_CALL, "Newchannel",
"Channel: %s\r\n"
-@@ -2854,6 +2885,29 @@
+@@ -2854,6 +2883,29 @@
return res;
}
@@ -2324,7 +2539,7 @@
void ast_change_name(struct ast_channel *chan, char *newname)
{
char tmp[256];
-@@ -2995,7 +3049,7 @@
+@@ -2995,7 +3047,7 @@
ast_copy_string(clone->name, masqn, sizeof(clone->name));
/* Notify any managers of the change, first the masq then the other */
@@ -2333,7 +2548,7 @@
manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", orig, newn, original->uniqueid);
/* Swap the technlogies */
-@@ -3243,15 +3297,14 @@
+@@ -3243,15 +3295,14 @@
);
}
@@ -2349,9 +2564,9 @@
- ast_device_state_changed_literal(chan->name);
+ ast_device_state_changed_literal(chan->name, cid_num, cid_name);
manager_event(EVENT_FLAG_CALL,
- (oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
+ (oldstate == AST_STATE_DOWN && !ast_test_flag(chan, AST_FLAG_NOTNEW)) ? "Newchannel" : "Newstate",
"Channel: %s\r\n"
-@@ -3267,6 +3320,10 @@
+@@ -3267,6 +3318,10 @@
return 0;
}
@@ -2362,7 +2577,7 @@
/*--- Find bridged channel */
struct ast_channel *ast_bridged_channel(struct ast_channel *chan)
{
-@@ -3443,6 +3500,7 @@
+@@ -3446,6 +3501,7 @@
char caller_warning = 0;
char callee_warning = 0;
@@ -2370,7 +2585,7 @@
if (c0->_bridge) {
ast_log(LOG_WARNING, "%s is already in a bridge with %s\n",
c0->name, c0->_bridge->name);
-@@ -3453,6 +3511,10 @@
+@@ -3456,6 +3512,10 @@
c1->name, c1->_bridge->name);
return -1;
}
@@ -2381,9 +2596,79 @@
/* 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.13.orig/channels/chan_agent.c asterisk-1.2.13/channels/chan_agent.c
---- asterisk-1.2.13.orig/channels/chan_agent.c 2006-09-06 20:16:41.000000000 +0200
-+++ asterisk-1.2.13/channels/chan_agent.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/channels/Makefile asterisk-1.2.14~dfsg/channels/Makefile
+--- asterisk-1.2.14~dfsg~/channels/Makefile 2006-08-17 23:57:19.000000000 +0200
++++ asterisk-1.2.14~dfsg/channels/Makefile 2006-12-28 10:22:18.381635414 +0100
+@@ -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
+
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/capi20.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/capi20.h),)
++ CHANNEL_LIBS+=chan_capi.so
++# uncomment the following line if you really never ever want early b3 connects,
++# you can also configure it in the dialstring, this is just for performance
++# NOTE: this is probably obsolete by using the "R" dial option
++#CFLAGS+=-DCAPI_NEVER_EVER_EARLY_B3_CONNECTS
++
++# uncommnet next line to force dtmf software detection/generation, can also be configured
++# in capi.conf on a perdevice basis (softdtmf=1)
++#CFLAGS+=-DCAPI_FORCE_SOFTWARE_DTMF
++
++# uncomment the next line if you are in the ulaw world
++#CFLAGS+=-DCAPI_ULAW
++
++# very experimental echo squelching
++CFLAGS+=-DCAPI_ES
++
++#gains
++CFLAGS+=-DCAPI_GAIN
++
++# what do to with call waiting connect indications?
++# uncomment the next line for call deflection in that case
++CFLAGS+=-DCAPI_DEFLECT_ON_CIRCUITBUSY
++
++# audio sync
++CFLAGS+=-DCAPI_SYNC
++
++endif
++
+ ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
+ CHANNEL_LIBS+=chan_vpb.so
+ CFLAGS+=-DLINUX
+@@ -204,7 +238,7 @@
+ $(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
+
+ chan_zap.so: chan_zap.o
+- $(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPR2) -ltonezone
++ $(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPGSM) $(ZAPR2) -ltonezone
+
+ chan_sip.so: chan_sip.o
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_sip.o ${CYGSOLIB}
+@@ -220,6 +254,9 @@
+ chan_nbs.so: chan_nbs.o
+ $(CC) $(SOLINK) -o $@ $< -lnbs
+
++chan_capi.so: chan_capi.o
++ $(CC) $(SOLINK) -o $@ $< -lcapi20
++
+ chan_vpb.o: chan_vpb.c
+ $(CXX) -c $(CFLAGS) -o $@ chan_vpb.c
+
+diff -urNad asterisk-1.2.14~dfsg~/channels/chan_agent.c asterisk-1.2.14~dfsg/channels/chan_agent.c
+--- asterisk-1.2.14~dfsg~/channels/chan_agent.c 2006-09-06 20:16:41.000000000 +0200
++++ asterisk-1.2.14~dfsg/channels/chan_agent.c 2006-12-28 10:22:18.341632640 +0100
@@ -440,7 +440,7 @@
if ((pointer = strchr(filename, '.')))
*pointer = '-';
@@ -2402,9 +2687,9 @@
if (p->chan)
chan = agent_new(p, AST_STATE_DOWN);
}
-diff -urN asterisk-1.2.13.orig/channels/chan_capi.c asterisk-1.2.13/channels/chan_capi.c
---- asterisk-1.2.13.orig/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/channels/chan_capi.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/channels/chan_capi.c asterisk-1.2.14~dfsg/channels/chan_capi.c
+--- asterisk-1.2.14~dfsg~/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/channels/chan_capi.c 2006-12-28 10:22:18.345632917 +0100
@@ -0,0 +1,2888 @@
+/*
+ * (CAPI*)
@@ -5294,9 +5579,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/channels/chan_features.c asterisk-1.2.13/channels/chan_features.c
---- asterisk-1.2.13.orig/channels/chan_features.c 2006-08-30 20:59:44.000000000 +0200
-+++ asterisk-1.2.13/channels/chan_features.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/channels/chan_features.c asterisk-1.2.14~dfsg/channels/chan_features.c
+--- asterisk-1.2.14~dfsg~/channels/chan_features.c 2006-08-30 20:59:44.000000000 +0200
++++ asterisk-1.2.14~dfsg/channels/chan_features.c 2006-12-28 10:22:18.345632917 +0100
@@ -427,7 +427,7 @@
}
ast_mutex_unlock(&featurelock);
@@ -5306,9 +5591,9 @@
if (!chan) {
ast_log(LOG_NOTICE, "Unable to allocate subchannel '%s/%s'\n", tech, dest);
return NULL;
-diff -urN asterisk-1.2.13.orig/channels/chan_iax2.c asterisk-1.2.13/channels/chan_iax2.c
---- asterisk-1.2.13.orig/channels/chan_iax2.c 2006-10-13 18:18:08.000000000 +0200
-+++ asterisk-1.2.13/channels/chan_iax2.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/channels/chan_iax2.c asterisk-1.2.14~dfsg/channels/chan_iax2.c
+--- asterisk-1.2.14~dfsg~/channels/chan_iax2.c 2006-12-09 16:45:37.000000000 +0100
++++ asterisk-1.2.14~dfsg/channels/chan_iax2.c 2006-12-28 10:22:18.349633195 +0100
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -5319,7 +5604,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.
-@@ -3101,7 +3104,7 @@
+@@ -3102,7 +3105,7 @@
memset(&ied, 0, sizeof(ied));
ast_mutex_lock(&iaxsl[callno]);
if (callno && iaxs[callno]) {
@@ -5328,7 +5613,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);
-@@ -3153,7 +3156,8 @@
+@@ -3154,7 +3157,8 @@
static struct ast_frame *iax2_read(struct ast_channel *c)
{
static struct ast_frame f = { AST_FRAME_NULL, };
@@ -5338,10 +5623,10 @@
return &f;
}
-diff -urN asterisk-1.2.13.orig/channels/chan_sip.c asterisk-1.2.13/channels/chan_sip.c
---- asterisk-1.2.13.orig/channels/chan_sip.c 2006-10-17 22:37:17.000000000 +0200
-+++ asterisk-1.2.13/channels/chan_sip.c 2006-10-23 18:12:25.000000000 +0200
-@@ -605,6 +605,7 @@
+diff -urNad asterisk-1.2.14~dfsg~/channels/chan_sip.c asterisk-1.2.14~dfsg/channels/chan_sip.c
+--- asterisk-1.2.14~dfsg~/channels/chan_sip.c 2006-12-06 16:42:41.000000000 +0100
++++ asterisk-1.2.14~dfsg/channels/chan_sip.c 2006-12-28 10:33:42.305401768 +0100
+@@ -604,6 +604,7 @@
unsigned int flags; /*!< SIP_ flags */
int timer_t1; /*!< SIP timer T1, ms rtt */
unsigned int sipoptions; /*!< Supported SIP sipoptions on the other end */
@@ -5349,7 +5634,7 @@
int capability; /*!< Special capability (codec) */
int jointcapability; /*!< Supported capability at both ends (codecs ) */
int peercapability; /*!< Supported peer capability */
-@@ -628,6 +629,7 @@
+@@ -627,6 +628,7 @@
char refer_to[AST_MAX_EXTENSION]; /*!< Place to store REFER-TO extension */
char referred_by[AST_MAX_EXTENSION]; /*!< Place to store REFERRED-BY extension */
char refer_contact[SIP_LEN_CONTACT]; /*!< Place to store Contact info from a REFER extension */
@@ -5357,7 +5642,7 @@
struct sip_pvt *refer_call; /*!< Call we are referring */
struct sip_route *route; /*!< Head of linked list of routing steps (fm Record-Route) */
int route_persistant; /*!< Is this the "real" route? */
-@@ -647,6 +649,7 @@
+@@ -646,6 +648,7 @@
char peername[256]; /*!< [peer] name, not set if [user] */
char authname[256]; /*!< Who we use for authentication */
char uri[256]; /*!< Original requested URI */
@@ -5365,7 +5650,7 @@
char okcontacturi[SIP_LEN_CONTACT]; /*!< URI from the 200 OK on INVITE */
char peersecret[256]; /*!< Password */
char peermd5secret[256];
-@@ -770,6 +773,9 @@
+@@ -769,6 +772,9 @@
int callingpres; /*!< Calling id presentation */
int inUse; /*!< Number of calls in use */
int call_limit; /*!< Limit of concurrent calls */
@@ -5375,25 +5660,25 @@
char vmexten[AST_MAX_EXTENSION]; /*!< Dialplan extension for MWI notify message*/
char mailbox[AST_MAX_EXTENSION]; /*!< Mailbox setting for MWI checks */
char language[MAX_LANGUAGE]; /*!< Default language for prompts */
-@@ -930,7 +936,7 @@
+@@ -929,7 +935,7 @@
static int determine_firstline_parts(struct sip_request *req);
static void sip_dump_history(struct sip_pvt *dialog); /* Dump history to LOG_DEBUG at end of dialog, before destroying data */
static const struct cfsubscription_types *find_subscription_type(enum subscriptiontype subtype);
--static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate);
-+static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate, char *cid_num, char *cid_name);
+-static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate, int timeout);
++static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate, int timeout, char *cid_num, char *cid_name);
static char *gettag(struct sip_request *req, char *header, char *tagbuf, int tagbufsize);
/*! \brief Definition of this channel for PBX channel registration */
-@@ -1322,7 +1328,7 @@
+@@ -1323,7 +1329,7 @@
+
/* If this is a subscription, tell the phone that we got a timeout */
if (p->subscribed) {
- p->subscribed = TIMEOUT;
-- transmit_state_notify(p, AST_EXTENSION_DEACTIVATED, 1, 1); /* Send first notification */
-+ transmit_state_notify(p, AST_EXTENSION_DEACTIVATED, 1, 1, NULL, NULL); /* Send first notification */
+- transmit_state_notify(p, AST_EXTENSION_DEACTIVATED, 1, 1, 1); /* Send first notification */
++ transmit_state_notify(p, AST_EXTENSION_DEACTIVATED, 1, 1, 1, NULL, NULL); /* Send first notification */
p->subscribed = NONE;
append_history(p, "Subscribestatus", "timeout");
return 10000; /* Reschedule this destruction so that we know that it's gone */
-@@ -3171,16 +3177,30 @@
+@@ -3179,16 +3185,30 @@
/*! \brief find_call: Connect incoming SIP message to current dialog or create new dialog structure */
/* Called by handle_request, sipsock_read */
@@ -5425,7 +5710,7 @@
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
-@@ -4166,6 +4186,7 @@
+@@ -4203,6 +4223,7 @@
if (sipmethod == SIP_CANCEL) {
c = p->initreq.rlPart2; /* Use original URI */
} else if (sipmethod == SIP_ACK) {
@@ -5433,7 +5718,7 @@
/* Use URI from Contact: in 200 OK (if INVITE)
(we only have the contacturi on INVITEs) */
if (!ast_strlen_zero(p->okcontacturi))
-@@ -4964,13 +4985,15 @@
+@@ -5008,13 +5029,15 @@
ast_build_string(&invite, &invite_max, ";%s", p->options->uri_options);
ast_copy_string(p->uri, invite_buf, sizeof(p->uri));
@@ -5450,7 +5735,7 @@
} else {
snprintf(to, sizeof(to), "<%s>", p->uri);
}
-@@ -5027,6 +5050,11 @@
+@@ -5071,6 +5094,11 @@
if (!ast_strlen_zero(p->referred_by))
add_header(&req, "Referred-By", p->referred_by);
}
@@ -5462,17 +5747,16 @@
#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);
-@@ -5101,8 +5129,7 @@
+@@ -5145,7 +5173,7 @@
}
/*! \brief transmit_state_notify: Used in the SUBSCRIBE notification subsystem ----*/
--static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate)
--{
-+static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate, char *cid_num, char *cid_name) {
+-static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate, int timeout)
++static int transmit_state_notify(struct sip_pvt *p, int state, int full, int substate, int timeout, char *cid_num, char *cid_name)
+ {
char tmp[4000], from[256], to[256];
char *t = tmp, *c, *a, *mfrom, *mto;
- size_t maxbytes = sizeof(tmp);
-@@ -5246,10 +5273,19 @@
+@@ -5290,10 +5318,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);
@@ -5495,7 +5779,7 @@
ast_build_string(&t, &maxbytes, "<state>%s</state>\n", statestring);
ast_build_string(&t, &maxbytes, "</dialog>\n</dialog-info>\n");
break;
-@@ -6076,8 +6112,10 @@
+@@ -6123,8 +6160,10 @@
p->expire = -1;
pvt->expiry = expiry;
snprintf(data, sizeof(data), "%s:%d:%d:%s:%s", ast_inet_ntoa(iabuf, sizeof(iabuf), p->addr.sin_addr), ntohs(p->addr.sin_port), expiry, p->username, p->fullcontact);
@@ -5507,7 +5791,7 @@
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Registered\r\n", p->name);
if (inaddrcmp(&p->addr, &oldsin)) {
sip_poke_peer(p);
-@@ -6468,7 +6506,7 @@
+@@ -6515,7 +6554,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 */
@@ -5516,16 +5800,16 @@
{
struct sip_pvt *p = data;
-@@ -6487,7 +6525,7 @@
+@@ -6534,7 +6573,7 @@
p->laststate = state;
break;
}
-- transmit_state_notify(p, state, 1, 1);
-+ transmit_state_notify(p, state, 1, 1, cid_num, cid_name);
+- transmit_state_notify(p, state, 1, 1, 0);
++ transmit_state_notify(p, state, 1, 1, 0, cid_num, cid_name);
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
-@@ -6513,7 +6551,13 @@
+@@ -6560,7 +6599,13 @@
char *name, *c;
char *t;
char *domain;
@@ -5540,7 +5824,7 @@
/* Terminate URI */
t = uri;
while(*t && (*t > 32) && (*t != ';'))
-@@ -6562,9 +6606,68 @@
+@@ -6611,9 +6656,68 @@
if (!ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)) {
ast_log(LOG_ERROR, "Peer '%s' is trying to register, but not configured as host=dynamic\n", peer->name);
} else {
@@ -5608,9 +5892,9 @@
- if (!(res = check_auth(p, req, p->randdata, sizeof(p->randdata), peer->name, peer->secret, peer->md5secret, SIP_REGISTER, uri, 0, ignore))) {
+ if (!(res = check_auth(p, req, p->randdata, sizeof(p->randdata), peer_name, peer->secret, peer->md5secret, SIP_REGISTER, uri, 0, ignore))) {
sip_cancel_destroy(p);
+
switch (parse_register_contact(p, peer, req)) {
- case PARSE_REGISTER_FAILED:
-@@ -6584,6 +6687,7 @@
+@@ -6634,6 +6738,7 @@
transmit_response_with_date(p, "200 OK", req);
peer->lastmsgssent = -1;
res = 0;
@@ -5618,7 +5902,7 @@
break;
}
}
-@@ -6931,6 +7035,11 @@
+@@ -6981,6 +7086,11 @@
/* XXX The refer_to could contain a call on an entirely different machine, requiring an
INVITE with a replaces header -anthm XXX */
/* The only way to find out is to use the dialplan - oej */
@@ -5630,7 +5914,7 @@
}
} else if (ast_exists_extension(NULL, *transfercontext, refer_to, 1, NULL) || !strcmp(refer_to, ast_parking_ext())) {
/* This is an unsupervised transfer (blind transfer) */
-@@ -7652,6 +7761,8 @@
+@@ -7704,6 +7814,8 @@
int peers_offline = 0;
char *id;
char idtext[256] = "";
@@ -5639,7 +5923,7 @@
if (s) { /* Manager - get ActionID */
id = astman_get_header(m,"ActionID");
-@@ -7694,6 +7805,7 @@
+@@ -7746,6 +7858,7 @@
else
ast_copy_string(name, iterator->name, sizeof(name));
@@ -5647,7 +5931,7 @@
pstatus = peer_status(iterator, status, sizeof(status));
if (pstatus)
peers_online++;
-@@ -7710,14 +7822,24 @@
+@@ -7762,14 +7875,24 @@
}
}
@@ -5673,7 +5957,7 @@
ast_cli(fd, FORMAT, name,
iterator->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), iterator->addr.sin_addr) : "(Unspecified)",
ast_test_flag(&iterator->flags_page2, SIP_PAGE2_DYNAMIC) ? " D " : " ", /* Dynamic or not? */
-@@ -7725,6 +7847,7 @@
+@@ -7777,6 +7900,7 @@
iterator->ha ? " A " : " ", /* permit/deny */
ntohs(iterator->addr.sin_port), status);
@@ -5681,7 +5965,7 @@
} else { /* Manager format */
/* The names here need to be the same as other channels */
ast_cli(fd,
-@@ -7750,7 +7873,9 @@
+@@ -7802,7 +7926,9 @@
ASTOBJ_UNLOCK(iterator);
@@ -5692,7 +5976,7 @@
} while(0) );
if (!s) {
-@@ -8785,6 +8910,7 @@
+@@ -8837,6 +8963,7 @@
char buf[1024];
unsigned int event;
char *c;
@@ -5700,7 +5984,7 @@
/* Need to check the media/type */
if (!strcasecmp(get_header(req, "Content-Type"), "application/dtmf-relay") ||
-@@ -8848,6 +8974,19 @@
+@@ -8900,6 +9027,19 @@
ast_queue_control(p->owner, AST_CONTROL_VIDUPDATE);
transmit_response(p, "200 OK", req);
return;
@@ -5720,7 +6004,7 @@
} else if ((c = get_header(req, "X-ClientCode"))) {
/* Client code (from SNOM phone) */
if (ast_test_flag(p, SIP_USECLIENTCODE)) {
-@@ -8947,12 +9086,63 @@
+@@ -8999,12 +9139,63 @@
return RESULT_SUCCESS;
}
@@ -5785,7 +6069,7 @@
if (argc < 4)
return RESULT_SHOWUSAGE;
-@@ -8969,41 +9159,13 @@
+@@ -9021,41 +9212,13 @@
}
for (i = 3; i < argc; i++) {
@@ -5832,7 +6116,7 @@
/*! \brief sip_do_history: Enable SIP History logging (CLI) ---*/
static int sip_do_history(int fd, int argc, char *argv[])
{
-@@ -9668,7 +9830,7 @@
+@@ -9720,7 +9883,7 @@
if (!ignore && p->owner) {
ast_queue_control(p->owner, AST_CONTROL_RINGING);
if (p->owner->_state != AST_STATE_UP)
@@ -5841,7 +6125,7 @@
}
if (find_sdp(req)) {
process_sdp(p, req);
-@@ -10348,6 +10510,8 @@
+@@ -10411,6 +10574,8 @@
static int attempt_transfer(struct sip_pvt *p1, struct sip_pvt *p2)
{
int res = 0;
@@ -5850,7 +6134,7 @@
struct ast_channel
*chana = NULL,
*chanb = NULL,
-@@ -10357,6 +10521,9 @@
+@@ -10420,6 +10585,9 @@
*peerb = NULL,
*peerc = NULL,
*peerd = NULL;
@@ -5860,7 +6144,7 @@
if (!p1->owner || !p2->owner) {
ast_log(LOG_WARNING, "Transfer attempted without dual ownership?\n");
-@@ -10385,6 +10552,12 @@
+@@ -10448,6 +10616,12 @@
ast_quiet_chan(peerc);
ast_quiet_chan(peerd);
@@ -5873,7 +6157,7 @@
if (peera->cdr && peerb->cdr) {
peerb->cdr = ast_cdr_append(peerb->cdr, peera->cdr);
} else if (peera->cdr) {
-@@ -10403,6 +10576,13 @@
+@@ -10466,6 +10640,13 @@
ast_log(LOG_WARNING, "Failed to masquerade %s into %s\n", peerb->name, peerc->name);
res = -1;
}
@@ -5887,7 +6171,7 @@
return res;
} else {
ast_log(LOG_NOTICE, "Transfer attempted with no appropriate bridged calls to transfer\n");
-@@ -10414,7 +10594,6 @@
+@@ -10477,7 +10658,6 @@
}
return 0;
}
@@ -5895,29 +6179,7 @@
/*! \brief gettag: Get tag from packet */
static char *gettag(struct sip_request *req, char *header, char *tagbuf, int tagbufsize)
{
-@@ -10498,9 +10677,18 @@
- /* 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 */
-- transmit_response(p, "482 Loop Detected", req);
-- /* We do NOT destroy p here, so that our response will be accepted */
-- return 0;
-+/* char tmp[256] = "", *uri;
-+ if (req->rlPart2)
-+ ast_copy_string(tmp, req->rlPart2, sizeof(tmp));
-+ uri = get_in_brackets(tmp);
-+ if (strcmp(p->uri, uri)) {
-+ ast_log(LOG_NOTICE, "SPIRAL DETECTED p->uri: %s uri: %s\n", p->uri, uri);
-+ } else {
-+ ast_log(LOG_NOTICE, "LOOP DETECTED p->uri: %s uri: %s\n", p->uri, uri);*/
-+ transmit_response(p, "482 Loop Detected", req);
-+ /* We do NOT destroy p here, so that our response will be accepted */
-+ return 0;
-+/* }*/
- }
- if (!ignore) {
- /* Use this as the basis */
-@@ -10733,6 +10921,7 @@
+@@ -10777,6 +10957,7 @@
int res;
struct ast_channel *transfer_to;
char *transfercontext = NULL;
@@ -5925,7 +6187,7 @@
if (option_debug > 2)
ast_log(LOG_DEBUG, "SIP call transfer received for call %s (REFER)!\n", p->callid);
-@@ -10743,9 +10932,73 @@
+@@ -10787,9 +10968,73 @@
transfercontext = p->context;
if (res < 0)
transmit_response(p, "603 Declined", req);
@@ -6001,16 +6263,16 @@
int nobye = 0;
if (!ignore) {
if (p->refer_call) {
-@@ -11081,7 +11334,7 @@
+@@ -11128,7 +11373,7 @@
struct sip_pvt *p_old;
transmit_response(p, "200 OK", req);
-- transmit_state_notify(p, firststate, 1, 1); /* Send first notification */
-+ transmit_state_notify(p, firststate, 1, 1, NULL, NULL); /* Send first notification */
+- transmit_state_notify(p, firststate, 1, 1, 0); /* Send first notification */
++ transmit_state_notify(p, firststate, 1, 1, 0, NULL, NULL); /* Send first notification */
append_history(p, "Subscribestatus", ast_extension_state2str(firststate));
/* remove any old subscription from this peer for the same exten/context,
-@@ -11275,6 +11528,8 @@
+@@ -11318,6 +11563,8 @@
res = handle_request_options(p, req, debug);
break;
case SIP_INVITE:
@@ -6019,7 +6281,7 @@
res = handle_request_invite(p, req, debug, ignore, seqno, sin, recount, e);
break;
case SIP_REFER:
-@@ -11392,7 +11647,7 @@
+@@ -11435,7 +11682,7 @@
/* Process request, with netlock held */
retrylock:
ast_mutex_lock(&netlock);
@@ -6028,7 +6290,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)) {
-@@ -11733,6 +11988,52 @@
+@@ -11776,6 +12023,52 @@
return 0;
}
@@ -6081,7 +6343,7 @@
/*! \brief sip_devicestate: Part of PBX channel interface ---*/
/* Return values:---
-@@ -12270,6 +12571,7 @@
+@@ -12313,6 +12606,7 @@
peer->expire = -1;
peer->pokeexpire = -1;
@@ -6089,7 +6351,7 @@
ast_copy_string(peer->name, name, sizeof(peer->name));
ast_copy_flags(peer, &global_flags, SIP_FLAGS_TO_COPY);
strcpy(peer->context, default_context);
-@@ -12315,7 +12617,9 @@
+@@ -12358,7 +12652,9 @@
if (peer) {
/* Already in the list, remove it and it will be added back (or FREE'd) */
@@ -6100,7 +6362,7 @@
} else {
peer = malloc(sizeof(*peer));
if (peer) {
-@@ -12327,6 +12631,7 @@
+@@ -12370,6 +12666,7 @@
ASTOBJ_INIT(peer);
peer->expire = -1;
peer->pokeexpire = -1;
@@ -6108,7 +6370,7 @@
} else {
ast_log(LOG_WARNING, "Can't allocate SIP peer memory\n");
}
-@@ -12472,6 +12777,10 @@
+@@ -12515,6 +12812,10 @@
peer->call_limit = atoi(v->value);
if (peer->call_limit < 0)
peer->call_limit = 0;
@@ -6119,7 +6381,7 @@
} else if (!strcasecmp(v->name, "amaflags")) {
format = ast_cdr_amaflags2int(v->value);
if (format < 0) {
-@@ -12867,8 +13176,24 @@
+@@ -12910,8 +13211,24 @@
if (!strcasecmp(utype, "peer") || !strcasecmp(utype, "friend")) {
peer = build_peer(cat, ast_variable_browse(cfg, cat), 0);
if (peer) {
@@ -6146,7 +6408,7 @@
}
} else if (strcasecmp(utype, "user")) {
ast_log(LOG_WARNING, "Unknown type '%s' for '%s' in %s\n", utype, cat, "sip.conf");
-@@ -13469,6 +13794,8 @@
+@@ -13513,6 +13830,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);
@@ -6155,7 +6417,7 @@
sip_poke_all_peers();
sip_send_all_registers();
-@@ -13499,6 +13826,7 @@
+@@ -13543,6 +13862,7 @@
ast_rtp_proto_unregister(&sip_rtp);
@@ -6163,9 +6425,9 @@
ast_manager_unregister("SIPpeers");
ast_manager_unregister("SIPshowpeer");
-diff -urN asterisk-1.2.13.orig/channels/chan_zap.c asterisk-1.2.13/channels/chan_zap.c
---- asterisk-1.2.13.orig/channels/chan_zap.c 2006-09-15 00:16:31.000000000 +0200
-+++ asterisk-1.2.13/channels/chan_zap.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/channels/chan_zap.c asterisk-1.2.14~dfsg/channels/chan_zap.c
+--- asterisk-1.2.14~dfsg~/channels/chan_zap.c 2006-12-10 03:14:13.000000000 +0100
++++ asterisk-1.2.14~dfsg/channels/chan_zap.c 2006-12-28 10:22:18.381635414 +0100
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -6900,7 +7162,7 @@
chan->hangupcause = AST_CAUSE_USER_BUSY;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -4901,7 +5213,7 @@
+@@ -4900,7 +5212,7 @@
case AST_CONTROL_CONGESTION:
chan->hangupcause = AST_CAUSE_CONGESTION;
#ifdef ZAPATA_PRI
@@ -6909,7 +7171,7 @@
chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -5086,8 +5398,12 @@
+@@ -5085,8 +5397,12 @@
if (state == AST_STATE_RING)
tmp->rings = 1;
tmp->tech_pvt = i;
@@ -6924,7 +7186,7 @@
tmp->callgroup = i->callgroup;
tmp->pickupgroup = i->pickupgroup;
}
-@@ -5229,6 +5545,7 @@
+@@ -5228,6 +5544,7 @@
int len = 0;
int res;
int index;
@@ -6932,7 +7194,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);
-@@ -5247,10 +5564,17 @@
+@@ -5246,10 +5563,17 @@
len = strlen(exten);
res = 0;
while((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -6953,7 +7215,7 @@
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
timeout = matchdigittimeout;
else
-@@ -6345,18 +6669,44 @@
+@@ -6346,18 +6670,44 @@
break;
case ZT_EVENT_NOALARM:
i->inalarm = 0;
@@ -6998,7 +7260,7 @@
/* fall thru intentionally */
case ZT_EVENT_ONHOOK:
if (i->radio) break;
-@@ -6396,8 +6746,10 @@
+@@ -6397,8 +6747,10 @@
zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
break;
case SIG_PRI:
@@ -7011,7 +7273,7 @@
break;
default:
ast_log(LOG_WARNING, "Don't know how to handle on hook with signalling %s on channel %d\n", sig2str(i->sig), i->channel);
-@@ -6720,6 +7072,8 @@
+@@ -6721,6 +7073,8 @@
} else {
if (si->totalchans == 31) { /* if it's an E1 */
pris[*span].dchannels[0] = 16 + offset;
@@ -7020,7 +7282,7 @@
} else {
pris[*span].dchannels[0] = 24 + offset;
}
-@@ -6807,6 +7161,10 @@
+@@ -6808,6 +7162,10 @@
#endif
@@ -7031,7 +7293,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 +7323,11 @@
+@@ -6966,6 +7324,11 @@
destroy_zt_pvt(&tmp);
return NULL;
}
@@ -7043,7 +7305,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 +7355,17 @@
+@@ -6993,6 +7356,17 @@
return NULL;
}
pris[span].nodetype = pritype;
@@ -7061,7 +7323,7 @@
pris[span].switchtype = myswitchtype;
pris[span].nsf = nsf;
pris[span].dialplan = dialplan;
-@@ -7000,9 +7374,14 @@
+@@ -7001,9 +7375,14 @@
pris[span].minunused = minunused;
pris[span].minidle = minidle;
pris[span].overlapdial = overlapdial;
@@ -7076,7 +7338,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 +7402,36 @@
+@@ -7024,6 +7403,36 @@
tmp->prioffset = 0;
}
#endif
@@ -7113,7 +7375,7 @@
#ifdef ZAPATA_R2
if (signalling == SIG_R2) {
if (r2prot < 0) {
-@@ -7156,6 +7565,7 @@
+@@ -7157,6 +7566,7 @@
tmp->restrictcid = restrictcid;
tmp->use_callingpres = use_callingpres;
tmp->priindication_oob = priindication_oob;
@@ -7121,7 +7383,7 @@
tmp->priexclusive = cur_priexclusive;
if (tmp->usedistinctiveringdetection) {
if (!tmp->use_callerid) {
-@@ -7429,7 +7839,7 @@
+@@ -7430,7 +7840,7 @@
break;
if (!backwards && (x >= pri->numchans))
break;
@@ -7130,7 +7392,7 @@
ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n",
pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
return x;
-@@ -7476,7 +7886,7 @@
+@@ -7477,7 +7887,7 @@
end = ifend;
/* We do signed linear */
oldformat = format;
@@ -7139,7 +7401,7 @@
if (!format) {
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
return NULL;
-@@ -7636,6 +8046,11 @@
+@@ -7637,6 +8047,11 @@
p->digital = 1;
if (tmp)
tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
@@ -7151,7 +7413,7 @@
} else {
ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
}
-@@ -7669,12 +8084,174 @@
+@@ -7670,12 +8085,174 @@
*cause = AST_CAUSE_BUSY;
} else if (groupmatched) {
*cause = AST_CAUSE_CONGESTION;
@@ -7326,7 +7588,7 @@
#ifdef ZAPATA_PRI
static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
-@@ -7689,6 +8266,57 @@
+@@ -7690,6 +8267,57 @@
return NULL;
}
@@ -7384,7 +7646,7 @@
static int pri_find_principle(struct zt_pri *pri, int channel)
{
-@@ -7721,7 +8349,9 @@
+@@ -7722,7 +8350,9 @@
static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
{
int x;
@@ -7394,7 +7656,7 @@
if (!c) {
if (principle < 0)
return -1;
-@@ -7735,6 +8365,7 @@
+@@ -7736,6 +8366,7 @@
/* First, check for other bearers */
for (x=0;x<pri->numchans;x++) {
if (!pri->pvts[x]) continue;
@@ -7402,7 +7664,7 @@
if (pri->pvts[x]->call == c) {
/* Found our call */
if (principle != x) {
-@@ -7748,19 +8379,56 @@
+@@ -7749,19 +8380,56 @@
}
/* Fix it all up now */
pri->pvts[principle]->owner = pri->pvts[x]->owner;
@@ -7460,7 +7722,7 @@
}
return principle;
}
-@@ -7789,7 +8457,9 @@
+@@ -7790,7 +8458,9 @@
}
crv = crv->next;
}
@@ -7471,7 +7733,7 @@
return -1;
}
-@@ -7848,86 +8518,33 @@
+@@ -7849,86 +8519,33 @@
#ifndef PRI_RESTART
#error "Upgrade your libpri"
#endif
@@ -7522,9 +7784,7 @@
- int x, y;
- int dchan = -1, span = -1;
- int dchancount = 0;
-+ ast_log(LOG_WARNING, "%d %s", span, s);
-+}
-
+-
- if (pri) {
- for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
@@ -7551,7 +7811,9 @@
- ast_log(LOG_WARNING, "%s", s);
-
- ast_mutex_lock(&pridebugfdlock);
--
++ ast_log(LOG_WARNING, "%d %s", span, s);
++}
+
- if (pridebugfd >= 0)
- write(pridebugfd, s, strlen(s));
+#ifdef ZAPATA_GSM
@@ -7575,7 +7837,7 @@
do {
pri->resetpos++;
} while((pri->resetpos < pri->numchans) &&
-@@ -8010,6 +8627,32 @@
+@@ -8011,6 +8628,32 @@
}
}
@@ -7608,7 +7870,7 @@
static void *pri_dchannel(void *vpri)
{
struct zt_pri *pri = vpri;
-@@ -8190,15 +8833,44 @@
+@@ -8191,15 +8834,44 @@
/* Check for an event */
x = 0;
res = ioctl(pri->fds[which], ZT_GETEVENT, &x);
@@ -7656,7 +7918,7 @@
}
if (option_debug)
-@@ -8210,8 +8882,7 @@
+@@ -8211,8 +8883,7 @@
break;
}
} else if (errno != EINTR)
@@ -7666,7 +7928,7 @@
if (e) {
if (pri->debug)
pri_dump_event(pri->dchans[which], e);
-@@ -8219,32 +8890,102 @@
+@@ -8220,32 +8891,102 @@
pri->dchanavail[which] |= DCHAN_UP;
switch(e->e) {
case PRI_EVENT_DCHAN_UP:
@@ -7793,7 +8055,7 @@
pri->resetting = 0;
/* Hangup active channels and put them in alarm mode */
for (i=0; i<pri->numchans; i++) {
-@@ -8252,19 +8993,29 @@
+@@ -8253,19 +8994,29 @@
if (p) {
if (p->call) {
if (p->pri && p->pri->pri) {
@@ -7830,7 +8092,7 @@
}
break;
case PRI_EVENT_RESTART:
-@@ -8299,8 +9050,8 @@
+@@ -8300,8 +9051,8 @@
pri_destroycall(pri->pri, pri->pvts[x]->call);
pri->pvts[x]->call = NULL;
}
@@ -7841,7 +8103,7 @@
else if (pri->pvts[x]->owner)
pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8334,7 +9085,6 @@
+@@ -8335,7 +9086,6 @@
}
}
break;
@@ -7849,7 +8111,7 @@
case PRI_EVENT_INFO_RECEIVED:
chanpos = pri_find_principle(pri, e->ring.channel);
if (chanpos < 0) {
-@@ -8343,9 +9093,11 @@
+@@ -8344,9 +9094,11 @@
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
if (chanpos > -1) {
@@ -7862,7 +8124,7 @@
/* how to do that */
int digitlen = strlen(e->ring.callednum);
char digit;
-@@ -8357,6 +9109,14 @@
+@@ -8358,6 +9110,14 @@
zap_queue_frame(pri->pvts[chanpos], &f, pri);
}
}
@@ -7877,7 +8139,7 @@
}
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
-@@ -8364,39 +9124,58 @@
+@@ -8365,39 +9125,58 @@
break;
case PRI_EVENT_RING:
crv = NULL;
@@ -7957,7 +8219,7 @@
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));
-@@ -8410,13 +9189,14 @@
+@@ -8411,13 +9190,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);
@@ -7973,7 +8235,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) {
-@@ -8441,29 +9221,78 @@
+@@ -8442,29 +9222,78 @@
}
apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
e->ring.redirectingnum, e->ring.callingplanrdnis);
@@ -8034,7 +8296,6 @@
ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of Complete received\n");
pri->pvts[chanpos]->exten[0] = 's';
pri->pvts[chanpos]->exten[1] = '\0';
-- }
+ }
+ } else {
+ /* Get called number */
@@ -8057,7 +8318,7 @@
+ }
+ }
+ }
-+ }
+ }
+ /* Part 3: create channel, setup audio... */
+ /* Set DNID on all incoming calls -- even immediate */
+ if (!ast_strlen_zero(e->ring.callednum))
@@ -8065,7 +8326,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)) {
-@@ -8482,19 +9311,36 @@
+@@ -8483,19 +9312,36 @@
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);
@@ -8106,7 +8367,7 @@
/* Get the use_callingpres state */
pri->pvts[chanpos]->callingpres = e->ring.callingpres;
-@@ -8506,14 +9352,31 @@
+@@ -8507,14 +9353,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);
@@ -8138,7 +8399,7 @@
if(e->ring.ani2 >= 0) {
snprintf(ani2str, 5, "%.2d", e->ring.ani2);
pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8533,8 +9396,8 @@
+@@ -8534,8 +9397,8 @@
ast_mutex_lock(&pri->lock);
if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
if (option_verbose > 2)
@@ -8149,7 +8410,7 @@
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",
-@@ -8542,14 +9405,18 @@
+@@ -8543,14 +9406,18 @@
if (c)
ast_hangup(c);
else {
@@ -8169,7 +8430,7 @@
ast_mutex_lock(&pri->lock);
if (c) {
char calledtonstr[10];
-@@ -8570,23 +9437,40 @@
+@@ -8571,23 +9438,40 @@
snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
if (option_verbose > 2)
@@ -8214,7 +8475,7 @@
pri->pvts[chanpos]->call = NULL;
pri->pvts[chanpos]->exten[0] = '\0';
}
-@@ -8594,7 +9478,7 @@
+@@ -8595,7 +9479,7 @@
ast_mutex_unlock(&crv->lock);
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else
@@ -8223,7 +8484,7 @@
break;
case PRI_EVENT_RINGING:
chanpos = pri_find_principle(pri, e->ringing.channel);
-@@ -8612,7 +9496,7 @@
+@@ -8613,7 +9497,7 @@
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
@@ -8232,7 +8493,7 @@
pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
pri->pvts[chanpos]->alerting = 1;
} else
-@@ -8641,9 +9525,16 @@
+@@ -8642,9 +9526,16 @@
}
break;
case PRI_EVENT_PROGRESS:
@@ -8250,7 +8511,7 @@
#ifdef PRI_PROGRESS_MASK
if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
#else
-@@ -8690,6 +9581,12 @@
+@@ -8691,6 +9582,12 @@
case PRI_EVENT_PROCEEDING:
chanpos = pri_find_principle(pri, e->proceeding.channel);
if (chanpos > -1) {
@@ -8263,7 +8524,7 @@
if (!pri->pvts[chanpos]->proceeding) {
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
-@@ -8740,6 +9637,295 @@
+@@ -8741,6 +9638,295 @@
}
}
break;
@@ -8559,7 +8820,7 @@
case PRI_EVENT_ANSWER:
chanpos = pri_find_principle(pri, e->answer.channel);
if (chanpos < 0) {
-@@ -8755,6 +9941,7 @@
+@@ -8756,6 +9942,7 @@
chanpos = -1;
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -8567,7 +8828,7 @@
/* Now we can do call progress detection */
/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -8784,11 +9971,16 @@
+@@ -8785,11 +9972,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) {
@@ -8585,7 +8846,7 @@
}
#ifdef SUPPORT_USERUSER
-@@ -8837,23 +10029,32 @@
+@@ -8838,23 +10030,32 @@
}
}
if (option_verbose > 2)
@@ -8625,7 +8886,7 @@
#ifdef SUPPORT_USERUSER
if (!ast_strlen_zero(e->hangup.useruserinfo)) {
-@@ -8863,8 +10064,20 @@
+@@ -8864,8 +10065,20 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
@@ -8648,7 +8909,7 @@
}
}
break;
-@@ -8874,17 +10087,25 @@
+@@ -8875,17 +10088,25 @@
case PRI_EVENT_HANGUP_REQ:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
@@ -8677,7 +8938,7 @@
pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
switch(e->hangup.cause) {
case PRI_CAUSE_USER_BUSY:
-@@ -8903,20 +10124,87 @@
+@@ -8904,20 +10125,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);
@@ -8775,7 +9036,7 @@
}
#ifdef SUPPORT_USERUSER
-@@ -8927,9 +10215,39 @@
+@@ -8928,9 +10216,39 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
@@ -8816,7 +9077,7 @@
break;
case PRI_EVENT_HANGUP_ACK:
chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -8943,6 +10261,7 @@
+@@ -8944,6 +10262,7 @@
if (chanpos > -1) {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
pri->pvts[chanpos]->call = NULL;
@@ -8824,7 +9085,7 @@
pri->pvts[chanpos]->resetting = 0;
if (pri->pvts[chanpos]->owner) {
if (option_verbose > 2)
-@@ -8956,7 +10275,9 @@
+@@ -8957,7 +10276,9 @@
#endif
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -8834,7 +9095,7 @@
}
break;
case PRI_EVENT_CONFIG_ERR:
-@@ -9048,10 +10369,22 @@
+@@ -9049,10 +10370,22 @@
ast_mutex_lock(&pri->pvts[chanpos]->lock);
switch(e->notify.info) {
case PRI_NOTIFY_REMOTE_HOLD:
@@ -8857,7 +9118,7 @@
f.subclass = AST_CONTROL_UNHOLD;
zap_queue_frame(pri->pvts[chanpos], &f, pri);
break;
-@@ -9059,6 +10392,77 @@
+@@ -9060,6 +10393,77 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
@@ -8935,7 +9196,7 @@
default:
ast_log(LOG_DEBUG, "Event: %d\n", e->e);
}
-@@ -9120,7 +10524,7 @@
+@@ -9121,7 +10525,7 @@
pri->fds[i] = -1;
return -1;
}
@@ -8944,7 +9205,7 @@
/* Force overlap dial if we're doing GR-303! */
if (pri->switchtype == PRI_SWITCH_GR303_TMC)
pri->overlapdial = 1;
-@@ -9189,39 +10593,77 @@
+@@ -9190,39 +10594,77 @@
static int handle_pri_set_debug_file(int fd, int argc, char **argv)
{
@@ -9044,7 +9305,7 @@
}
return RESULT_SUCCESS;
-@@ -9253,6 +10695,7 @@
+@@ -9254,6 +10696,7 @@
@@ -9052,7 +9313,7 @@
static int handle_pri_no_debug(int fd, int argc, char *argv[])
{
int span;
-@@ -9359,36 +10802,6 @@
+@@ -9360,36 +10803,6 @@
return RESULT_SUCCESS;
}
@@ -9089,7 +9350,7 @@
static char pri_debug_help[] =
"Usage: pri debug span <span>\n"
" Enables debugging on a given PRI span\n";
-@@ -9405,6 +10818,18 @@
+@@ -9406,6 +10819,18 @@
"Usage: pri show span <span>\n"
" Displays PRI Information\n";
@@ -9108,7 +9369,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 },
-@@ -9412,19 +10837,282 @@
+@@ -9413,19 +10838,282 @@
"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 },
@@ -9394,7 +9655,7 @@
#ifdef ZAPATA_R2
static int handle_r2_no_debug(int fd, int argc, char *argv[])
{
-@@ -10036,6 +11724,14 @@
+@@ -10037,6 +11725,14 @@
pthread_cancel(pris[i].master);
}
ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(zap_pri_cli[0]));
@@ -9409,7 +9670,7 @@
#endif
#ifdef ZAPATA_R2
ast_cli_unregister_multiple(zap_r2_cli, sizeof(zap_r2_cli) / sizeof(zap_r2_cli[0]));
-@@ -10047,6 +11743,7 @@
+@@ -10048,6 +11744,7 @@
ast_manager_unregister( "ZapDNDoff" );
ast_manager_unregister( "ZapDNDon" );
ast_manager_unregister("ZapShowChannels");
@@ -9417,7 +9678,7 @@
ast_channel_unregister(&zap_tech);
if (!ast_mutex_lock(&iflock)) {
/* Hangup all interfaces if they have an owner */
-@@ -10405,8 +12102,8 @@
+@@ -10406,8 +12103,8 @@
}
} else if (!strcasecmp(v->name, "echotraining")) {
if (sscanf(v->value, "%d", &y) == 1) {
@@ -9428,7 +9689,7 @@
} else {
echotraining = y;
}
-@@ -10592,12 +12289,33 @@
+@@ -10593,12 +12290,33 @@
cur_signalling = SIG_GR303FXSKS;
cur_radio = 0;
pritype = PRI_CPE;
@@ -9462,13 +9723,14 @@
} else {
ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
}
-@@ -10680,8 +12398,20 @@
+@@ -10681,8 +12399,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")) {
@@ -9478,13 +9740,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);
-@@ -10695,6 +12425,14 @@
+@@ -10696,6 +12426,14 @@
ast_copy_string(privateprefix, v->value, sizeof(privateprefix));
} else if (!strcasecmp(v->name, "unknownprefix")) {
ast_copy_string(unknownprefix, v->value, sizeof(unknownprefix));
@@ -9499,7 +9760,7 @@
} else if (!strcasecmp(v->name, "resetinterval")) {
if (!strcasecmp(v->value, "never"))
resetinterval = -1;
-@@ -10711,6 +12449,8 @@
+@@ -10712,6 +12450,8 @@
ast_copy_string(idleext, v->value, sizeof(idleext));
} else if (!strcasecmp(v->name, "idledial")) {
ast_copy_string(idledial, v->value, sizeof(idledial));
@@ -9508,7 +9769,7 @@
} else if (!strcasecmp(v->name, "overlapdial")) {
overlapdial = ast_true(v->value);
} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -10896,6 +12636,7 @@
+@@ -10897,6 +12637,7 @@
#ifdef ZAPATA_PRI
if (!reload) {
for (x=0;x<NUM_SPANS;x++) {
@@ -9516,7 +9777,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);
-@@ -10928,6 +12669,10 @@
+@@ -10929,6 +12670,10 @@
pri_set_error(zt_pri_error);
pri_set_message(zt_pri_message);
#endif
@@ -9527,7 +9788,7 @@
res = setup_zap(0);
/* Make sure we can register our Zap channel type */
if(res) {
-@@ -10945,6 +12690,12 @@
+@@ -10946,6 +12691,12 @@
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]));
@@ -9540,7 +9801,7 @@
memset(round_robin, 0, sizeof(round_robin));
ast_manager_register( "ZapTransfer", 0, action_transfer, "Transfer Zap Channel" );
-@@ -10953,11 +12704,47 @@
+@@ -10954,11 +12705,47 @@
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");
@@ -9589,7 +9850,7 @@
{
#define END_SILENCE_LEN 400
#define HEADER_MS 50
-@@ -10976,6 +12763,7 @@
+@@ -10977,6 +12764,7 @@
float scont = 0.0;
int index;
@@ -9597,79 +9858,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.13.orig/channels/Makefile asterisk-1.2.13/channels/Makefile
---- asterisk-1.2.13.orig/channels/Makefile 2006-08-17 23:57:19.000000000 +0200
-+++ asterisk-1.2.13/channels/Makefile 2006-10-19 11:11:39.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
-
-+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/capi20.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/capi20.h),)
-+ CHANNEL_LIBS+=chan_capi.so
-+# uncomment the following line if you really never ever want early b3 connects,
-+# you can also configure it in the dialstring, this is just for performance
-+# NOTE: this is probably obsolete by using the "R" dial option
-+#CFLAGS+=-DCAPI_NEVER_EVER_EARLY_B3_CONNECTS
-+
-+# uncommnet next line to force dtmf software detection/generation, can also be configured
-+# in capi.conf on a perdevice basis (softdtmf=1)
-+#CFLAGS+=-DCAPI_FORCE_SOFTWARE_DTMF
-+
-+# uncomment the next line if you are in the ulaw world
-+#CFLAGS+=-DCAPI_ULAW
-+
-+# very experimental echo squelching
-+CFLAGS+=-DCAPI_ES
-+
-+#gains
-+CFLAGS+=-DCAPI_GAIN
-+
-+# what do to with call waiting connect indications?
-+# uncomment the next line for call deflection in that case
-+CFLAGS+=-DCAPI_DEFLECT_ON_CIRCUITBUSY
-+
-+# audio sync
-+CFLAGS+=-DCAPI_SYNC
-+
-+endif
-+
- ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
- CHANNEL_LIBS+=chan_vpb.so
- CFLAGS+=-DLINUX
-@@ -204,7 +238,7 @@
- $(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
-
- chan_zap.so: chan_zap.o
-- $(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPR2) -ltonezone
-+ $(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPGSM) $(ZAPR2) -ltonezone
-
- chan_sip.so: chan_sip.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_sip.o ${CYGSOLIB}
-@@ -220,6 +254,9 @@
- chan_nbs.so: chan_nbs.o
- $(CC) $(SOLINK) -o $@ $< -lnbs
-
-+chan_capi.so: chan_capi.o
-+ $(CC) $(SOLINK) -o $@ $< -lcapi20
-+
- chan_vpb.o: chan_vpb.c
- $(CXX) -c $(CFLAGS) -o $@ chan_vpb.c
-
-diff -urN asterisk-1.2.13.orig/codecs/codec_ilbc.c asterisk-1.2.13/codecs/codec_ilbc.c
---- asterisk-1.2.13.orig/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/codecs/codec_ilbc.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/codecs/codec_ilbc.c asterisk-1.2.14~dfsg/codecs/codec_ilbc.c
+--- asterisk-1.2.14~dfsg~/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/codecs/codec_ilbc.c 2006-12-28 10:22:18.381635414 +0100
@@ -49,7 +49,7 @@
#include "slin_ilbc_ex.h"
#include "ilbc_slin_ex.h"
@@ -9679,9 +9870,9 @@
#define ILBC_MS 30
/* #define ILBC_MS 20 */
-diff -urN asterisk-1.2.13.orig/configs/capi.conf.sample asterisk-1.2.13/configs/capi.conf.sample
---- asterisk-1.2.13.orig/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/configs/capi.conf.sample 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/configs/capi.conf.sample asterisk-1.2.14~dfsg/configs/capi.conf.sample
+--- asterisk-1.2.14~dfsg~/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/configs/capi.conf.sample 2006-12-28 10:22:18.381635414 +0100
@@ -0,0 +1,44 @@
+;
+; CAPI config
@@ -9727,9 +9918,9 @@
+;msn=55512
+;controller=2
+;devices => 30
-diff -urN asterisk-1.2.13.orig/configs/esel.conf.sample asterisk-1.2.13/configs/esel.conf.sample
---- asterisk-1.2.13.orig/configs/esel.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/configs/esel.conf.sample 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/configs/esel.conf.sample asterisk-1.2.14~dfsg/configs/esel.conf.sample
+--- asterisk-1.2.14~dfsg~/configs/esel.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/configs/esel.conf.sample 2006-12-28 10:22:18.385635692 +0100
@@ -0,0 +1,12 @@
+;
+; Configuration file for res_esel
@@ -9743,9 +9934,9 @@
+
+; export the extension snom in context phones to DS/100 on asterisk-2
+;export => snom at phones,100
-diff -urN asterisk-1.2.13.orig/configs/modules.conf.sample asterisk-1.2.13/configs/modules.conf.sample
---- asterisk-1.2.13.orig/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/configs/modules.conf.sample 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/configs/modules.conf.sample asterisk-1.2.14~dfsg/configs/modules.conf.sample
+--- asterisk-1.2.14~dfsg~/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/configs/modules.conf.sample 2006-12-28 10:22:18.385635692 +0100
@@ -46,8 +46,12 @@
;
noload => chan_alsa.so
@@ -9759,9 +9950,9 @@
;
[global]
+chan_capi.so=yes
-diff -urN asterisk-1.2.13.orig/configs/watchdog.conf.sample asterisk-1.2.13/configs/watchdog.conf.sample
---- asterisk-1.2.13.orig/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/configs/watchdog.conf.sample 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/configs/watchdog.conf.sample asterisk-1.2.14~dfsg/configs/watchdog.conf.sample
+--- asterisk-1.2.14~dfsg~/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/configs/watchdog.conf.sample 2006-12-28 10:22:18.385635692 +0100
@@ -0,0 +1,22 @@
+;
+; Configuration file for res_watchdog
@@ -9785,9 +9976,9 @@
+;device = /dev/watchdog
+;interval = 100
+
-diff -urN asterisk-1.2.13.orig/configs/zapata.conf.sample asterisk-1.2.13/configs/zapata.conf.sample
---- asterisk-1.2.13.orig/configs/zapata.conf.sample 2006-09-18 17:05:56.000000000 +0200
-+++ asterisk-1.2.13/configs/zapata.conf.sample 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/configs/zapata.conf.sample asterisk-1.2.14~dfsg/configs/zapata.conf.sample
+--- asterisk-1.2.14~dfsg~/configs/zapata.conf.sample 2006-09-18 17:05:56.000000000 +0200
++++ asterisk-1.2.14~dfsg/configs/zapata.conf.sample 2006-12-28 10:22:18.385635692 +0100
@@ -123,9 +123,20 @@
;
; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT
@@ -9809,9 +10000,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.13.orig/db.c asterisk-1.2.13/db.c
---- asterisk-1.2.13.orig/db.c 2006-01-09 19:09:53.000000000 +0100
-+++ asterisk-1.2.13/db.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/db.c asterisk-1.2.14~dfsg/db.c
+--- asterisk-1.2.14~dfsg~/db.c 2006-01-09 19:09:53.000000000 +0100
++++ asterisk-1.2.14~dfsg/db.c 2006-12-28 10:22:18.385635692 +0100
@@ -516,11 +516,18 @@
struct ast_cli_entry cli_database_deltree =
{ { "database", "deltree", NULL }, database_deltree, "Removes database keytree/values", database_deltree_usage };
@@ -9905,9 +10096,9 @@
+ ast_manager_register("DBdel", EVENT_FLAG_SYSTEM, manager_dbdel, mandescr_dbdel);
return 0;
}
-diff -urN asterisk-1.2.13.orig/devicestate.c asterisk-1.2.13/devicestate.c
---- asterisk-1.2.13.orig/devicestate.c 2006-02-10 21:38:59.000000000 +0100
-+++ asterisk-1.2.13/devicestate.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/devicestate.c asterisk-1.2.14~dfsg/devicestate.c
+--- asterisk-1.2.14~dfsg~/devicestate.c 2006-02-10 21:38:59.000000000 +0100
++++ asterisk-1.2.14~dfsg/devicestate.c 2006-12-28 10:22:18.385635692 +0100
@@ -62,6 +62,8 @@
struct state_change {
@@ -9999,9 +10190,9 @@
free(cur);
AST_LIST_LOCK(&state_changes);
} else {
-diff -urN asterisk-1.2.13.orig/doc/README.asterisk.conf asterisk-1.2.13/doc/README.asterisk.conf
---- asterisk-1.2.13.orig/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/doc/README.asterisk.conf 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/doc/README.asterisk.conf asterisk-1.2.14~dfsg/doc/README.asterisk.conf
+--- asterisk-1.2.14~dfsg~/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/doc/README.asterisk.conf 2006-12-28 10:22:18.385635692 +0100
@@ -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
@@ -10010,32 +10201,9 @@
[files]
; Changing the following lines may compromise your security
-diff -urN asterisk-1.2.13.orig/HARDWARE asterisk-1.2.13/HARDWARE
---- asterisk-1.2.13.orig/HARDWARE 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/HARDWARE 2006-10-19 11:11:39.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.
-
-+-- Junghanns.NET (Primary author of BRIstuff)
-+ http://www.junghanns.net
-+
-+ * quadBRI PCI ISDN - 4port BRI ISDN interface, supports NT and TE mode
-+
-+ * octoBRI PCI ISDN - 8port BRI ISDN interface, supports NT and TE mode
-+
-+ * singleE1 PCI ISDN - Single E1 interface
-+
-+ * doubleE1 PCI ISDN - Double E1 interface
-+
-+ * uno/duo/quad GSM PCI - 1/2/4 channel GSM interface cards
-+
- Non-zaptel compatible hardware
- ==============================
-
-diff -urN asterisk-1.2.13.orig/include/asterisk/agi.h asterisk-1.2.13/include/asterisk/agi.h
---- asterisk-1.2.13.orig/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/agi.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/agi.h asterisk-1.2.14~dfsg/include/asterisk/agi.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/agi.h 2006-12-28 10:22:18.385635692 +0100
@@ -29,7 +29,8 @@
typedef struct agi_state {
@@ -10046,43 +10214,9 @@
int ctrl; /* FD for input control */
} AGI;
-diff -urN asterisk-1.2.13.orig/include/asterisk/chan_capi_app.h asterisk-1.2.13/include/asterisk/chan_capi_app.h
---- asterisk-1.2.13.orig/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/chan_capi_app.h 2006-10-19 11:11:39.000000000 +0200
-@@ -0,0 +1,30 @@
-+/*
-+ * (CAPI*)
-+ *
-+ * An implementation of Common ISDN API 2.0 for Asterisk
-+ *
-+ * include file for helper applications
-+ *
-+ * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH
-+ *
-+ * Klaus-Peter Junghanns <kapejod at ns1.jnetdns.de>
-+ *
-+ * This program is free software and may be modified and
-+ * distributed under the terms of the GNU Public License.
-+ */
-+
-+#ifndef _ASTERISK_CAPI_IF_H
-+#define _ASTERISK_CAPI_IF_H
-+
-+// exported symbols from chan_capi
-+
-+// important things we need
-+extern unsigned ast_capi_ApplID;
-+extern unsigned ast_capi_MessageNumber;
-+extern int capidebug;
-+
-+extern int capi_call(struct ast_channel *c, char *idest, int timeout);
-+extern int capi_detect_dtmf(struct ast_channel *c, int flag);
-+extern MESSAGE_EXCHANGE_ERROR _capi_put_cmsg(_cmsg *CMSG);
-+
-+#endif
-diff -urN asterisk-1.2.13.orig/include/asterisk/chan_capi.h asterisk-1.2.13/include/asterisk/chan_capi.h
---- asterisk-1.2.13.orig/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/chan_capi.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/chan_capi.h asterisk-1.2.14~dfsg/include/asterisk/chan_capi.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/chan_capi.h 2006-12-28 10:22:18.385635692 +0100
@@ -0,0 +1,276 @@
+/*
+ * (CAPI*)
@@ -10360,9 +10494,43 @@
+#define CAPI_ETSI_NPLAN_INTERNAT 0x10
+
+#endif
-diff -urN asterisk-1.2.13.orig/include/asterisk/channel.h asterisk-1.2.13/include/asterisk/channel.h
---- asterisk-1.2.13.orig/include/asterisk/channel.h 2006-09-26 22:38:06.000000000 +0200
-+++ asterisk-1.2.13/include/asterisk/channel.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/chan_capi_app.h asterisk-1.2.14~dfsg/include/asterisk/chan_capi_app.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/chan_capi_app.h 2006-12-28 10:22:18.385635692 +0100
+@@ -0,0 +1,30 @@
++/*
++ * (CAPI*)
++ *
++ * An implementation of Common ISDN API 2.0 for Asterisk
++ *
++ * include file for helper applications
++ *
++ * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH
++ *
++ * Klaus-Peter Junghanns <kapejod at ns1.jnetdns.de>
++ *
++ * This program is free software and may be modified and
++ * distributed under the terms of the GNU Public License.
++ */
++
++#ifndef _ASTERISK_CAPI_IF_H
++#define _ASTERISK_CAPI_IF_H
++
++// exported symbols from chan_capi
++
++// important things we need
++extern unsigned ast_capi_ApplID;
++extern unsigned ast_capi_MessageNumber;
++extern int capidebug;
++
++extern int capi_call(struct ast_channel *c, char *idest, int timeout);
++extern int capi_detect_dtmf(struct ast_channel *c, int flag);
++extern MESSAGE_EXCHANGE_ERROR _capi_put_cmsg(_cmsg *CMSG);
++
++#endif
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/channel.h asterisk-1.2.14~dfsg/include/asterisk/channel.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/channel.h 2006-11-07 19:22:01.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/channel.h 2006-12-28 10:22:18.385635692 +0100
@@ -86,6 +86,9 @@
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
@@ -10395,7 +10563,7 @@
struct ast_frame *readq;
int alertpipe[2];
/*! Write translation path */
-@@ -534,6 +543,11 @@
+@@ -535,6 +544,11 @@
#define AST_STATE_MUTE (1 << 16)
/*! @} */
@@ -10407,7 +10575,7 @@
/*! \brief Change the state of a channel */
int ast_setstate(struct ast_channel *chan, int state);
-@@ -570,7 +584,7 @@
+@@ -571,7 +585,7 @@
* by the low level module
* \return Returns an ast_channel on success, NULL on failure.
*/
@@ -10416,7 +10584,7 @@
/*!
* \brief Request a channel of a given type, with data as optional information used
-@@ -585,9 +599,9 @@
+@@ -586,9 +600,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.
*/
@@ -10428,7 +10596,7 @@
/*!\brief Register a channel technology (a new channel driver)
* Called by a channel module to register the kind of channels it supports.
-@@ -840,6 +854,10 @@
+@@ -841,6 +855,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);
@@ -10439,7 +10607,7 @@
/*! Waits for a digit */
/*!
* \param c channel to wait for a digit on
-@@ -910,6 +928,9 @@
+@@ -911,6 +929,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);
@@ -10449,9 +10617,9 @@
/*! Gives the string form of a given cause code */
/*!
-diff -urN asterisk-1.2.13.orig/include/asterisk/devicestate.h asterisk-1.2.13/include/asterisk/devicestate.h
---- asterisk-1.2.13.orig/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/devicestate.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/devicestate.h asterisk-1.2.14~dfsg/include/asterisk/devicestate.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/devicestate.h 2006-12-28 10:22:18.385635692 +0100
@@ -42,7 +42,7 @@
/*! Device is ringing */
#define AST_DEVICE_RINGING 6
@@ -10470,9 +10638,9 @@
/*! \brief Registers a device state change callback
* \param callback Callback
-diff -urN asterisk-1.2.13.orig/include/asterisk/features.h asterisk-1.2.13/include/asterisk/features.h
---- asterisk-1.2.13.orig/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/features.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/features.h asterisk-1.2.14~dfsg/include/asterisk/features.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/features.h 2006-12-28 10:22:18.385635692 +0100
@@ -45,6 +45,8 @@
};
@@ -10515,9 +10683,9 @@
+extern struct ast_call_feature *ast_find_builtin_feature(char *name);
+
#endif /* _AST_FEATURES_H */
-diff -urN asterisk-1.2.13.orig/include/asterisk/manager.h asterisk-1.2.13/include/asterisk/manager.h
---- asterisk-1.2.13.orig/include/asterisk/manager.h 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/manager.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/manager.h asterisk-1.2.14~dfsg/include/asterisk/manager.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/manager.h 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/manager.h 2006-12-28 10:22:18.389635969 +0100
@@ -54,6 +54,7 @@
#define EVENT_FLAG_COMMAND (1 << 4) /* Ability to read/set commands */
#define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */
@@ -10526,9 +10694,9 @@
/* Export manager structures */
#define AST_MAX_MANHEADERS 80
-diff -urN asterisk-1.2.13.orig/include/asterisk/monitor.h asterisk-1.2.13/include/asterisk/monitor.h
---- asterisk-1.2.13.orig/include/asterisk/monitor.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/monitor.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/monitor.h asterisk-1.2.14~dfsg/include/asterisk/monitor.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/monitor.h 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/monitor.h 2006-12-28 10:22:18.389635969 +0100
@@ -35,6 +35,8 @@
char write_filename[FILENAME_MAX];
char filename_base[FILENAME_MAX];
@@ -10547,9 +10715,9 @@
/* Stop monitoring a channel */
int ast_monitor_stop(struct ast_channel *chan, int need_lock);
-diff -urN asterisk-1.2.13.orig/include/asterisk/pbx.h asterisk-1.2.13/include/asterisk/pbx.h
---- asterisk-1.2.13.orig/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
-+++ asterisk-1.2.13/include/asterisk/pbx.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/pbx.h asterisk-1.2.14~dfsg/include/asterisk/pbx.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
++++ asterisk-1.2.14~dfsg/include/asterisk/pbx.h 2006-12-28 10:22:18.389635969 +0100
@@ -57,7 +57,7 @@
AST_EXTENSION_BUSY = 1 << 1,
/*! All devices UNAVAILABLE/UNREGISTERED */
@@ -10600,9 +10768,9 @@
#if defined(__cplusplus) || defined(c_plusplus)
}
-diff -urN asterisk-1.2.13.orig/include/asterisk/xlaw.h asterisk-1.2.13/include/asterisk/xlaw.h
---- asterisk-1.2.13.orig/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk/xlaw.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk/xlaw.h asterisk-1.2.14~dfsg/include/asterisk/xlaw.h
+--- asterisk-1.2.14~dfsg~/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk/xlaw.h 2006-12-28 10:22:18.389635969 +0100
@@ -0,0 +1,1665 @@
+#ifndef _ASTERISK_XLAW_H
+#define _ASTERISK_XLAW_H
@@ -12269,9 +12437,9 @@
+#endif // CAPI_ULAW
+#endif
+
-diff -urN asterisk-1.2.13.orig/include/asterisk.h asterisk-1.2.13/include/asterisk.h
---- asterisk-1.2.13.orig/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
-+++ asterisk-1.2.13/include/asterisk.h 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/include/asterisk.h asterisk-1.2.14~dfsg/include/asterisk.h
+--- asterisk-1.2.14~dfsg~/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
++++ asterisk-1.2.14~dfsg/include/asterisk.h 2006-12-28 10:22:18.393636246 +0100
@@ -36,6 +36,7 @@
extern char ast_config_AST_PID[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_SOCKET[AST_CONFIG_MAX_PATH];
@@ -12280,37 +12448,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.13.orig/LICENSE asterisk-1.2.13/LICENSE
---- asterisk-1.2.13.orig/LICENSE 2006-10-17 19:22:01.000000000 +0200
-+++ asterisk-1.2.13/LICENSE 2006-10-19 11:11:39.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
--with Digium, Inc. If you obtained Asterisk under the GPL, then the GPL
--applies to all loadable Asterisk modules used on your system as well,
-+BRIstuffed Asterisk is distributed under the GNU General Public License version 2
-+and is not available under any alternative licenses.
-+If you obtained BRIstuffed Asterisk under the GPL, then the GPL
-+applies to all loadable BRIstuffed Asterisk modules used on your system as well,
- except as defined below. The GPL (version 2) is included in this
- source tree in the file COPYING.
-
-diff -urN asterisk-1.2.13.orig/Makefile asterisk-1.2.13/Makefile
---- asterisk-1.2.13.orig/Makefile 2006-09-06 22:09:10.000000000 +0200
-+++ asterisk-1.2.13/Makefile 2006-10-19 11:11:39.000000000 +0200
-@@ -772,6 +772,9 @@
- echo ";astctlowner = root" ; \
- echo ";astctlgroup = apache" ; \
- echo ";astctl = asterisk.ctl" ; \
-+ echo "[options]" ; \
-+ echo "uniquename = `hostname`" ;\
-+ echo "silence_suppression = yes" ;\
- ) > $(DESTDIR)$(ASTCONFPATH) ; \
- else \
- echo "Skipping asterisk.conf creation"; \
-diff -urN asterisk-1.2.13.orig/manager.c asterisk-1.2.13/manager.c
---- asterisk-1.2.13.orig/manager.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.13/manager.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/manager.c asterisk-1.2.14~dfsg/manager.c
+--- asterisk-1.2.14~dfsg~/manager.c 2006-02-11 19:15:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/manager.c 2006-12-28 10:22:18.393636246 +0100
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -12573,9 +12713,9 @@
return 0;
}
-diff -urN asterisk-1.2.13.orig/pbx/pbx_spool.c asterisk-1.2.13/pbx/pbx_spool.c
---- asterisk-1.2.13.orig/pbx/pbx_spool.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.13/pbx/pbx_spool.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/pbx/pbx_spool.c asterisk-1.2.14~dfsg/pbx/pbx_spool.c
+--- asterisk-1.2.14~dfsg~/pbx/pbx_spool.c 2006-11-27 16:30:37.000000000 +0100
++++ asterisk-1.2.14~dfsg/pbx/pbx_spool.c 2006-12-28 10:22:18.393636246 +0100
@@ -259,11 +259,11 @@
if (!ast_strlen_zero(o->app)) {
if (option_verbose > 2)
@@ -12590,9 +12730,9 @@
}
if (res) {
ast_log(LOG_NOTICE, "Call failed to go through, reason %d\n", reason);
-diff -urN asterisk-1.2.13.orig/pbx.c asterisk-1.2.13/pbx.c
---- asterisk-1.2.13.orig/pbx.c 2006-09-27 21:35:09.000000000 +0200
-+++ asterisk-1.2.13/pbx.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/pbx.c asterisk-1.2.14~dfsg/pbx.c
+--- asterisk-1.2.14~dfsg~/pbx.c 2006-09-27 21:35:09.000000000 +0200
++++ asterisk-1.2.14~dfsg/pbx.c 2006-12-28 10:22:18.397636524 +0100
@@ -353,7 +353,8 @@
{ "Hangup", pbx_builtin_hangup,
@@ -12770,171 +12910,9 @@
return res;
}
-diff -urN asterisk-1.2.13.orig/README asterisk-1.2.13/README
---- asterisk-1.2.13.orig/README 2006-03-03 09:12:33.000000000 +0100
-+++ asterisk-1.2.13/README 2006-10-19 11:11:39.000000000 +0200
-@@ -4,6 +4,8 @@
-
- Copyright (C) 2001-2005 Digium, Inc.
- and other copyright holders.
-+Copyright (C) 2002-2005 Junghanns.NET GmbH
-+and other copyright holders.
- ================================================================
-
- * SECURITY
-diff -urN asterisk-1.2.13.orig/README.chan_capi asterisk-1.2.13/README.chan_capi
---- asterisk-1.2.13.orig/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/README.chan_capi 2006-10-19 11:11:39.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
-+Klaus-Peter Junghanns <kpj at junghanns.net>
-+
-+This program is free software and may be modified and distributed under
-+the terms of the GNU Public License. There is _NO_ warranty for this!
-+
-+Thanks go to the debuggers and bugfixers (listed in chronological order) :)
-+===========================================================================
-+Lele Forzani <lele at windmill.it>
-+Florian Overkamp <florian at obsimref.com>
-+Gareth Watts <gareth at omnipotent.net>
-+Jeff Noxon <jeff at planetfall.com>
-+Petr Michalek <petr.michalek at aca.cz>
-+Jan Stocker
-+(...and all the others that i forgot..) :-)
-+
-+chan_capi version 0.4.0-PRE1 includes:
-+======================================
-+
-+- multiple controller support
-+- CID,DNID (callling party, called party)
-+- CLIR/CLIP
-+- supplementary services, CD,HOLD,RETRIEVE,ECT
-+- DTMF (dependend on card) + software DTMF support
-+- early B3 connects (always,success,never)
-+- digital audio (what did you think?)
-+- incoming/outgoing calls
-+- overlap sending (dialtone)
-+- E(xplicit) C(all) T(ransfer) (...although it's done implicit .. but dont tell!)
-+- tuneable latency ;) you can configure the size of B3 blocks at compile time
-+ (in chan_capi_pvt.h, AST_CAPI_MAX_B3_BLOCK_SIZE)
-+ the default is 160 samples, for non-VoIP use you can tune it down to 130
-+- use asterisk's internal dsp functions for dtmf
-+- alaw support
-+- ulaw support!
-+- Eicon CAPI echo cancelation (echocancel=1)
-+- reject call waiting (ACO)
-+- DID for Point to Point mode (a.k.a overlap receiving)
-+- experimental echo squelching (echosquelch=1)
-+- call progress, no need to add ||r to your dialstring anymore
-+- rx/tx gains (rxgain=1.0)
-+- call deflection on circuitbusy (makefile option) (deflect=12345678)
-+- (inter)national dialing prefix (for callerid) configurable in capi.conf
-+- CLI command "capi info" shows B channel status
-+- capiECT will announce the callerID since it gets lost on most isdn pbxes
-+ the called party can press # to drop the call
-+- audio syncing (timing outgoing dataB3 on incoming dataB3), supposed to fix
-+ the DATA_B3_REQ (error = 0x1103) problem
-+- catch all MSN (incomingmsn=*)
-+- some configuration enhancements (msn=123,124,125 and controller=1,2,3,4)
-+- accountcode= added.
-+- finally the echo squelching works!
-+- callgroup support
-+- fixed pipe leak
-+- updated to support the new frame->delivery field
-+- compiles with latest cvs with a makefile option (LOOK AT THE MAKEFILE)
-+- fixed channel name bug in p2p mode
-+- added app_capiNoES for disabling the primitive echo suppressor, use this before
-+ you start recording voicemail or your files may get choppy
-+- fixed for latest cvs (AST_MUTEX_DEFINE_STATIC)
-+- fixed for latest cvs (asterisk/parking.h -> asterisk/features.h)
-+- fixed for latest cvs ast_pthread_create
-+
-+- ATTENTION! the dialstring syntax now uses the zaptel dialstring syntax
-+ it used to be: Dial(CAPI/[@]<outgoingMSN>:[b|B]<destination>)
-+
-+ now it is: Dial(CAPI/g<group>/[b|B]<destination>)
-+ or: Dial(CAPI/contr<controller>/[b|B]<destination>)
-+
-+ CLIP/CLIR is now uses the calling presentation of the calling channel, this can
-+ be modified using the CallingPres() application. Use CallinPres(32) for CLIR.
-+ That is why the msn= param in capi.conf is now obsolete. The callerID is also
-+ taken from the calling channel.
-+
-+- fixes for BSD (Jan Stocker)
-+
-+Helper applications
-+===================
-+kapejod says: "No No No, dont use those yet....!" (except maybe HOLD,ECT...)
-+
-+app_capiCD.c forwards an unanswered call to another phone (does not rely on sservice CD)
-+ example:
-+ exten => s,1,Wait,1
-+ exten => s,2,capiCD,12345678
-+
-+app_capiHOLD.c puts an answered call on hold, this has nothing to do with asterisk's onhold thingie (music et al)
-+ after putting a call onhold, never use the Wait application!
-+
-+app_capiRETRIEVE.c gets the holded call back
-+
-+app_capiECT.c explicit call transfer of the holded call (must put call on hold first!)
-+ example:
-+ exten => s,1,Answer
-+ exten => s,2,capiHOLD
-+ exten => s,3,capiECT,55:50
-+ will ECT the call to 50 using 55 as the callerid/outgoing msn
-+
-+
-+Using CLIR
-+==========
-+Use the CallingPres() application before you dial:
-+exten => _X.,1,CallingPres(32)
-+exten => _X.,2,Dial(CAPI/contr1/${EXTEN})
-+
-+Enjoying early B3 connects (inband call progress, tones and announcements)
-+==========================================================================
-+early B3 is now configurable in the dialstring :)
-+if you prefix the destination number with a 'b' early B3 will always be used, also if the call fails
-+because the number is unprovisioned, etc ...
-+if you prefix it with a 'B' early B3 will only be used on successful calls, giving you ring indication,etc...
-+
-+dont use indications in the Dial command, your local exchange will do that for you:
-+exten => _X.,1,Dial(CAPI/contr1/B${EXTEN},30) (early B3 on success)
-+exten => _X.,1,Dial(CAPI/contr1/b${EXTEN},30) (always early B3)
-+exten => _X.,1,Dial(CAPI/contr1/${EXTEN},30,r) (no early B3, fake ring indication)
-+
-+exten => _X.,1,Dial(CAPI/contr1/b${EXTEN},30,r) (always early B3, fake indicatons if the exchange
-+ does not give us indications)
-+exten => _X.,1,Dial(CAPI/contr1/B${EXTEN},30,r) (early B3 on success, fake indicatons if the exchange
-+ does not give us indications)
-+
-+you can totally turn B3 off in the Makefile at buildtime (-DNEVER_EVER_EARLY_B3_CONNECTS).
-+
-+For normal PBX usage you would use the "b" option, always early B3.
-+
-+Overlap sending (a.k.a. real dialtone)
-+======================================
-+when you dial an empty number, and have early B3 enabled, with:
-+ Dial(CAPI/g1/b)
-+the channel will come up at once and give you the dialtone it gets from the local exchange.
-+at this point the channel is like a legacy phone, now you can send dtmf digits to dial.
-+
-+Example context for incoming calls on MSN 12345678:
-+===================================================
-+
-+[capi-in]
-+exten => 12345678,1,Dial(SIP/phone1)
-+exten => 12345678,2,Hangup
-+
-+
-+More information/documentation and commercial support can be found at:
-+ http://www.junghanns.net/asterisk/
-+
-+
-+
-diff -urN asterisk-1.2.13.orig/res/Makefile asterisk-1.2.13/res/Makefile
---- asterisk-1.2.13.orig/res/Makefile 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.13/res/Makefile 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/res/Makefile asterisk-1.2.14~dfsg/res/Makefile
+--- asterisk-1.2.14~dfsg~/res/Makefile 2005-11-29 19:24:39.000000000 +0100
++++ asterisk-1.2.14~dfsg/res/Makefile 2006-12-28 10:22:18.397636524 +0100
@@ -11,7 +11,7 @@
# the GNU General Public License
#
@@ -12944,9 +12922,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.13.orig/res/res_agi.c asterisk-1.2.13/res/res_agi.c
---- asterisk-1.2.13.orig/res/res_agi.c 2006-09-06 22:02:59.000000000 +0200
-+++ asterisk-1.2.13/res/res_agi.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/res/res_agi.c asterisk-1.2.14~dfsg/res/res_agi.c
+--- asterisk-1.2.14~dfsg~/res/res_agi.c 2006-12-11 01:33:59.000000000 +0100
++++ asterisk-1.2.14~dfsg/res/res_agi.c 2006-12-28 10:37:49.523060462 +0100
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -13002,7 +12980,7 @@
+ int audio2[2];
int x;
int res;
- sigset_t signal_set;
+ sigset_t signal_set, old_set;
@@ -276,6 +285,33 @@
return -1;
}
@@ -13034,10 +13012,10 @@
+ return -1;
+ }
+ }
- pid = fork();
- if (pid < 0) {
- ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
-@@ -293,15 +329,19 @@
+
+ /* Block SIGHUP during the fork - prevents a race */
+ sigfillset(&signal_set);
+@@ -297,6 +333,11 @@
} else {
close(STDERR_FILENO + 1);
}
@@ -13046,20 +13024,19 @@
+ } else {
+ close(STDERR_FILENO + 2);
+ }
-
- /* unblock important signal handlers */
- if (sigfillset(&signal_set) || pthread_sigmask(SIG_UNBLOCK, &signal_set, NULL)) {
- ast_log(LOG_WARNING, "unable to unblock signals for AGI script: %s\n", strerror(errno));
- exit(1);
+
+ /* Before we unblock our signals, return our trapped signals back to the defaults */
+ signal(SIGHUP, SIG_DFL);
+@@ -314,7 +355,7 @@
}
--
+
/* Close everything but stdin/out/error */
- for (x=STDERR_FILENO + 2;x<1024;x++)
+ for (x=STDERR_FILENO + 3;x<1024;x++)
close(x);
/* Execute script */
-@@ -317,6 +357,9 @@
+@@ -331,6 +372,9 @@
if (efd) {
*efd = audio[1];
}
@@ -13069,7 +13046,7 @@
/* close what we're not using in the parent */
close(toast[1]);
close(fromast[0]);
-@@ -325,6 +368,9 @@
+@@ -339,6 +383,9 @@
/* [PHM 12/18/03] */
close(audio[0]);
}
@@ -13079,7 +13056,7 @@
*opid = pid;
return 0;
-@@ -355,7 +401,7 @@
+@@ -369,7 +416,7 @@
fdprintf(fd, "agi_context: %s\n", chan->context);
fdprintf(fd, "agi_extension: %s\n", chan->exten);
fdprintf(fd, "agi_priority: %d\n", chan->priority);
@@ -13088,7 +13065,7 @@
/* User information */
fdprintf(fd, "agi_accountcode: %s\n", chan->accountcode ? chan->accountcode : "");
-@@ -387,7 +433,7 @@
+@@ -401,7 +448,7 @@
return RESULT_SHOWUSAGE;
if (sscanf(argv[3], "%d", &to) != 1)
return RESULT_SHOWUSAGE;
@@ -13097,7 +13074,7 @@
fdprintf(agi->fd, "200 result=%d\n", res);
if (res >= 0)
return RESULT_SUCCESS;
-@@ -563,7 +609,7 @@
+@@ -577,7 +624,7 @@
else
return RESULT_FAILURE;
}
@@ -13106,7 +13083,7 @@
/* this is to check for if ast_waitstream closed the stream, we probably are at
* the end of the stream, return that amount, else check for the amount */
sample_offset = (chan->stream) ? ast_tellstream(fs) : max_length;
-@@ -623,7 +669,7 @@
+@@ -637,7 +684,7 @@
else
return RESULT_FAILURE;
}
@@ -13115,7 +13092,7 @@
/* this is to check for if ast_waitstream closed the stream, we probably are at
* the end of the stream, return that amount, else check for the amount */
sample_offset = (chan->stream)?ast_tellstream(fs):max_length;
-@@ -635,7 +681,7 @@
+@@ -649,7 +696,7 @@
/* If the user didnt press a key, wait for digitTimeout*/
if (res == 0 ) {
@@ -13124,7 +13101,7 @@
/* Make sure the new result is in the escape digits of the GET OPTION */
if ( !strchr(edigits,res) )
res=0;
-@@ -662,7 +708,7 @@
+@@ -676,7 +723,7 @@
return RESULT_SHOWUSAGE;
if (sscanf(argv[2], "%d", &num) != 1)
return RESULT_SHOWUSAGE;
@@ -13133,7 +13110,7 @@
if (res == 1)
return RESULT_SUCCESS;
fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -682,7 +728,7 @@
+@@ -696,7 +743,7 @@
if (sscanf(argv[2], "%d", &num) != 1)
return RESULT_SHOWUSAGE;
@@ -13142,7 +13119,7 @@
if (res == 1) /* New command */
return RESULT_SUCCESS;
fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -699,7 +745,7 @@
+@@ -713,7 +760,7 @@
if (argc != 4)
return RESULT_SHOWUSAGE;
@@ -13151,7 +13128,7 @@
if (res == 1) /* New command */
return RESULT_SUCCESS;
fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -789,7 +835,7 @@
+@@ -803,7 +850,7 @@
if (argc != 4)
return RESULT_SHOWUSAGE;
@@ -13160,7 +13137,7 @@
if (res == 1) /* New command */
return RESULT_SUCCESS;
fdprintf(agi->fd, "200 result=%d\n", res);
-@@ -816,7 +862,7 @@
+@@ -830,7 +877,7 @@
max = atoi(argv[4]);
else
max = 1024;
@@ -13169,7 +13146,7 @@
if (res == 2) /* New command */
return RESULT_SUCCESS;
else if (res == 1)
-@@ -1854,7 +1900,12 @@
+@@ -1868,7 +1915,12 @@
int ms;
int returnstatus = 0;
struct ast_frame *f;
@@ -13182,7 +13159,7 @@
FILE *readf;
/* how many times we'll retry if ast_waitfor_nandfs will return without either
channel or file descriptor in case select is interrupted by a system call (EINTR) */
-@@ -1868,10 +1919,22 @@
+@@ -1882,10 +1934,22 @@
return -1;
}
setlinebuf(readf);
@@ -13207,7 +13184,7 @@
if (c) {
retry = RETRY;
/* Idle the channel until we get a command */
-@@ -1882,13 +1945,24 @@
+@@ -1896,13 +1960,24 @@
break;
} else {
/* If it's voice, write it to the audio pipe */
@@ -13234,7 +13211,7 @@
retry = RETRY;
if (!fgets(buf, sizeof(buf), readf)) {
/* Program terminated */
-@@ -1910,6 +1984,7 @@
+@@ -1924,6 +1999,7 @@
if ((returnstatus < 0) || (returnstatus == AST_PBX_KEEPALIVE)) {
break;
}
@@ -13242,7 +13219,7 @@
} else {
if (--retry <= 0) {
ast_log(LOG_WARNING, "No channel, no fd?\n");
-@@ -2016,6 +2091,7 @@
+@@ -2030,6 +2106,7 @@
int argc = 0;
int fds[2];
int efd = -1;
@@ -13250,7 +13227,7 @@
int pid;
char *stringp;
AGI agi;
-@@ -2041,16 +2117,19 @@
+@@ -2055,16 +2132,19 @@
}
}
#endif
@@ -13272,7 +13249,7 @@
}
LOCAL_USER_REMOVE(u);
return res;
-@@ -2084,6 +2163,35 @@
+@@ -2098,6 +2178,35 @@
return res;
}
@@ -13308,7 +13285,7 @@
static int deadagi_exec(struct ast_channel *chan, void *data)
{
return agi_exec_full(chan, data, 0, 1);
-@@ -2113,6 +2221,7 @@
+@@ -2127,6 +2236,7 @@
ast_cli_unregister(&dumpagihtml);
ast_cli_unregister(&cli_debug);
ast_cli_unregister(&cli_no_debug);
@@ -13316,7 +13293,7 @@
ast_unregister_application(eapp);
ast_unregister_application(deadapp);
return ast_unregister_application(app);
-@@ -2126,6 +2235,7 @@
+@@ -2140,6 +2250,7 @@
ast_cli_register(&cli_no_debug);
ast_register_application(deadapp, deadagi_exec, deadsynopsis, descrip);
ast_register_application(eapp, eagi_exec, esynopsis, descrip);
@@ -13324,9 +13301,9 @@
return ast_register_application(app, agi_exec, synopsis, descrip);
}
-diff -urN asterisk-1.2.13.orig/res/res_esel.c asterisk-1.2.13/res/res_esel.c
---- asterisk-1.2.13.orig/res/res_esel.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/res/res_esel.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/res/res_esel.c asterisk-1.2.14~dfsg/res/res_esel.c
+--- asterisk-1.2.14~dfsg~/res/res_esel.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/res/res_esel.c 2006-12-28 10:22:18.401636801 +0100
@@ -0,0 +1,399 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -13727,9 +13704,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/res/res_features.c asterisk-1.2.13/res/res_features.c
---- asterisk-1.2.13.orig/res/res_features.c 2006-09-28 20:00:30.000000000 +0200
-+++ asterisk-1.2.13/res/res_features.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/res/res_features.c asterisk-1.2.14~dfsg/res/res_features.c
+--- asterisk-1.2.14~dfsg~/res/res_features.c 2006-11-30 20:04:11.000000000 +0100
++++ asterisk-1.2.14~dfsg/res/res_features.c 2006-12-28 10:22:18.405637079 +0100
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -14244,7 +14221,7 @@
);
free(pu);
-@@ -1906,12 +2263,13 @@
+@@ -1900,12 +2257,13 @@
"Timeout: %ld\r\n"
"CallerID: %s\r\n"
"CallerIDName: %s\r\n"
@@ -14259,7 +14236,7 @@
,idText);
cur = cur->next;
-@@ -1927,6 +2285,416 @@
+@@ -1921,6 +2279,416 @@
return RESULT_SUCCESS;
}
@@ -14676,7 +14653,7 @@
int ast_pickup_call(struct ast_channel *chan)
{
-@@ -2081,7 +2849,7 @@
+@@ -2076,7 +2844,7 @@
}
{
@@ -14685,7 +14662,7 @@
int mallocd=0;
if (!feature) {
-@@ -2143,6 +2911,7 @@
+@@ -2139,6 +2907,7 @@
}
int reload(void) {
@@ -14693,7 +14670,7 @@
return load_config();
}
-@@ -2156,14 +2925,22 @@
+@@ -2152,14 +2921,22 @@
if ((res = load_config()))
return res;
ast_cli_register(&showparked);
@@ -14716,7 +14693,7 @@
return res;
}
-@@ -2174,7 +2951,11 @@
+@@ -2170,7 +2947,11 @@
ast_manager_unregister("ParkedCalls");
ast_cli_unregister(&showfeatures);
@@ -14728,9 +14705,9 @@
ast_unregister_application(parkcall);
return ast_unregister_application(parkedcall);
}
-diff -urN asterisk-1.2.13.orig/res/res_monitor.c asterisk-1.2.13/res/res_monitor.c
---- asterisk-1.2.13.orig/res/res_monitor.c 2006-09-28 20:00:30.000000000 +0200
-+++ asterisk-1.2.13/res/res_monitor.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/res/res_monitor.c asterisk-1.2.14~dfsg/res/res_monitor.c
+--- asterisk-1.2.14~dfsg~/res/res_monitor.c 2006-11-01 19:24:17.000000000 +0100
++++ asterisk-1.2.14~dfsg/res/res_monitor.c 2006-12-28 10:34:59.414909328 +0100
@@ -90,7 +90,7 @@
/* Start monitoring a channel */
@@ -14752,16 +14729,16 @@
/* Determine file names */
if (!ast_strlen_zero(fname_base)) {
int directory = strchr(fname_base, '/') ? 1 : 0;
-@@ -257,6 +262,8 @@
+@@ -274,6 +279,8 @@
if (chan->monitor->joinfiles && !ast_strlen_zero(chan->monitor->filename_base)) {
char tmp[1024];
char tmp2[1024];
+ char tmp3[1024];
-+ int result;
- char *format = !strcasecmp(chan->monitor->format,"wav49") ? "WAV" : chan->monitor->format;
++ char result[1024];
+ const char *format = !strcasecmp(chan->monitor->format,"wav49") ? "WAV" : chan->monitor->format;
char *name = chan->monitor->filename_base;
int directory = strchr(name, '/') ? 1 : 0;
-@@ -278,9 +285,19 @@
+@@ -296,9 +303,19 @@
snprintf(tmp2,sizeof(tmp2), "( %s& rm -f \"%s/%s-\"* ) &",tmp, dir ,name); /* remove legs when done mixing */
ast_copy_string(tmp, tmp2, sizeof(tmp));
}
@@ -14783,7 +14760,7 @@
}
free(chan->monitor->format);
-@@ -392,7 +409,7 @@
+@@ -410,7 +427,7 @@
return 0;
}
@@ -14792,7 +14769,7 @@
if (res < 0)
res = ast_monitor_change_fname(chan, fname_base, 1);
ast_monitor_setjoinfiles(chan, joinfiles);
-@@ -428,19 +445,30 @@
+@@ -446,19 +463,30 @@
{
struct ast_channel *c = NULL;
char *name = astman_get_header(m, "Channel");
@@ -14827,7 +14804,7 @@
}
if (ast_strlen_zero(fname)) {
-@@ -457,7 +485,7 @@
+@@ -475,7 +503,7 @@
if ((d=strchr(fname, '/'))) *d='-';
}
@@ -14836,7 +14813,7 @@
if (ast_monitor_change_fname(c, fname, 1)) {
astman_send_error(s, m, "Could not start monitoring channel");
ast_mutex_unlock(&c->lock);
-@@ -483,16 +511,26 @@
+@@ -501,16 +529,26 @@
{
struct ast_channel *c = NULL;
char *name = astman_get_header(m, "Channel");
@@ -14867,9 +14844,9 @@
res = ast_monitor_stop(c, 1);
ast_mutex_unlock(&c->lock);
if (res) {
-diff -urN asterisk-1.2.13.orig/res/res_watchdog.c asterisk-1.2.13/res/res_watchdog.c
---- asterisk-1.2.13.orig/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.13/res/res_watchdog.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/res/res_watchdog.c asterisk-1.2.14~dfsg/res/res_watchdog.c
+--- asterisk-1.2.14~dfsg~/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
++++ asterisk-1.2.14~dfsg/res/res_watchdog.c 2006-12-28 10:22:18.405637079 +0100
@@ -0,0 +1,149 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -15020,9 +14997,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.13.orig/rtp.c asterisk-1.2.13/rtp.c
---- asterisk-1.2.13.orig/rtp.c 2006-09-01 19:35:06.000000000 +0200
-+++ asterisk-1.2.13/rtp.c 2006-10-19 11:11:39.000000000 +0200
+diff -urNad asterisk-1.2.14~dfsg~/rtp.c asterisk-1.2.14~dfsg/rtp.c
+--- asterisk-1.2.14~dfsg~/rtp.c 2006-11-29 17:47:10.000000000 +0100
++++ asterisk-1.2.14~dfsg/rtp.c 2006-12-28 10:22:18.405637079 +0100
@@ -445,6 +445,11 @@
struct rtpPayloadType rtpPT;
@@ -15035,9 +15012,3 @@
/* Cache where the header will go */
res = recvfrom(rtp->s, rtp->rawdata + AST_FRIENDLY_OFFSET, sizeof(rtp->rawdata) - AST_FRIENDLY_OFFSET,
-diff -urN asterisk-1.2.13.orig/.version asterisk-1.2.13/.version
---- asterisk-1.2.13.orig/.version 2006-10-18 00:56:18.000000000 +0200
-+++ asterisk-1.2.13/.version 2006-10-24 10:40:37.000000000 +0200
-@@ -1 +1 @@
--1.2.13
-+1.2.13-BRIstuffed-0.3.0-PRE-1v
More information about the Pkg-voip-commits
mailing list