[Pkg-voip-commits] r3132 - in asterisk/trunk/debian: . patches
Tzafrir Cohen
tzafrir-guest at alioth.debian.org
Sun Feb 11 15:15:24 CET 2007
Author: tzafrir-guest
Date: 2007-02-11 15:15:21 +0100 (Sun, 11 Feb 2007)
New Revision: 3132
Modified:
asterisk/trunk/debian/changelog
asterisk/trunk/debian/patches/bristuff.dpatch
asterisk/trunk/debian/patches/ukcid.dpatch
Log:
* New upstream release: 1.2.15 .
* ukcid.dpatch: adapted to chan_conf.
* bristuff.dpatch: adapted to chan_conf.
Modified: asterisk/trunk/debian/changelog
===================================================================
--- asterisk/trunk/debian/changelog 2007-02-11 07:20:01 UTC (rev 3131)
+++ asterisk/trunk/debian/changelog 2007-02-11 14:15:21 UTC (rev 3132)
@@ -1,8 +1,17 @@
+asterisk (1:1.2.15~dfsg-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+ * ukcid.dpatch: adapted to chan_conf.
+ * bristuff.dpatch: adapted to chan_conf.
+
+ -- Tzafrir Cohen <tzafrir at boomtime.cohens.org.il> Sat, 10 Feb 2007 15:58:33 +0200
+
asterisk (1:1.2.14~dfsg-5) UNRELEASED; urgency=low
- * NOT RELEASED YET
+ [ Tzafrir Cohen ]
+ * Bristuff 0.3.0-PRE-1x
- -- Kilian Krause <kilian at debian.org> Mon, 15 Jan 2007 13:36:51 +0100
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Mon, 22 Jan 2007 23:30:34 +0200
asterisk (1:1.2.14~dfsg-4) unstable; urgency=high
Modified: asterisk/trunk/debian/patches/bristuff.dpatch
===================================================================
--- asterisk/trunk/debian/patches/bristuff.dpatch 2007-02-11 07:20:01 UTC (rev 3131)
+++ asterisk/trunk/debian/patches/bristuff.dpatch 2007-02-11 14:15:21 UTC (rev 3132)
@@ -4,11 +4,231 @@
## All lines beginning with `## DP:' are a description of the patch.
## DP: bristuff support in asterisk: asterisk.patch from bristuff-0.3.0-PRE-1x
## DP: cygdef.h removed ;-)
+## DP: Updated version: 1.2.15
@DPATCH@
-diff -urN asterisk-1.2.14.orig/agi/Makefile asterisk-1.2.14/agi/Makefile
---- asterisk-1.2.14.orig/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
-+++ asterisk-1.2.14/agi/Makefile 2007-01-11 15:26:50.811486902 +0100
+diff -urNad asterisk-1.2.15~dfsg~/.version asterisk-1.2.15~dfsg/.version
+--- asterisk-1.2.15~dfsg~/.version 2007-02-09 01:35:53.000000000 +0200
++++ asterisk-1.2.15~dfsg/.version 2007-02-11 06:04:58.000000000 +0200
+@@ -1 +1 @@
+-1.2.15
++1.2.15-BRIstuffed-0.3.0-PRE-1x
+diff -urNad asterisk-1.2.15~dfsg~/HARDWARE asterisk-1.2.15~dfsg/HARDWARE
+--- asterisk-1.2.15~dfsg~/HARDWARE 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/HARDWARE 2007-02-11 06:04:58.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 -urNad asterisk-1.2.15~dfsg~/LICENSE asterisk-1.2.15~dfsg/LICENSE
+--- asterisk-1.2.15~dfsg~/LICENSE 2006-10-17 19:22:01.000000000 +0200
++++ asterisk-1.2.15~dfsg/LICENSE 2007-02-11 06:04:58.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 -urNad asterisk-1.2.15~dfsg~/Makefile asterisk-1.2.15~dfsg/Makefile
+--- asterisk-1.2.15~dfsg~/Makefile 2007-02-11 06:04:48.000000000 +0200
++++ asterisk-1.2.15~dfsg/Makefile 2007-02-11 06:04:58.000000000 +0200
+@@ -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.15~dfsg~/README asterisk-1.2.15~dfsg/README
+--- asterisk-1.2.15~dfsg~/README 2006-03-03 10:12:33.000000000 +0200
++++ asterisk-1.2.15~dfsg/README 2007-02-11 06:04:58.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 -urNad asterisk-1.2.15~dfsg~/README.chan_capi asterisk-1.2.15~dfsg/README.chan_capi
+--- asterisk-1.2.15~dfsg~/README.chan_capi 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/README.chan_capi 2007-02-11 06:04:58.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 -urNad asterisk-1.2.15~dfsg~/agi/Makefile asterisk-1.2.15~dfsg/agi/Makefile
+--- asterisk-1.2.15~dfsg~/agi/Makefile 2006-03-28 22:22:05.000000000 +0200
++++ asterisk-1.2.15~dfsg/agi/Makefile 2007-02-11 06:04:58.000000000 +0200
@@ -11,7 +11,7 @@
# the GNU General Public License
#
@@ -27,9 +247,9 @@
%.so : %.o
$(CC) -shared -Xlinker -x -o $@ $<
-diff -urN asterisk-1.2.14.orig/agi/xagi-test.c asterisk-1.2.14/agi/xagi-test.c
---- asterisk-1.2.14.orig/agi/xagi-test.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/agi/xagi-test.c 2007-01-11 15:26:50.815487847 +0100
+diff -urNad asterisk-1.2.15~dfsg~/agi/xagi-test.c asterisk-1.2.15~dfsg/agi/xagi-test.c
+--- asterisk-1.2.15~dfsg~/agi/xagi-test.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/agi/xagi-test.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,175 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -206,9 +426,29 @@
+ return -1;
+ exit(0);
+}
-diff -urN asterisk-1.2.14.orig/apps/app_callingpres.c asterisk-1.2.14/apps/app_callingpres.c
---- asterisk-1.2.14.orig/apps/app_callingpres.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_callingpres.c 2007-01-11 15:26:50.827490682 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/Makefile asterisk-1.2.15~dfsg/apps/Makefile
+--- asterisk-1.2.15~dfsg~/apps/Makefile 2006-04-30 16:38:22.000000000 +0300
++++ asterisk-1.2.15~dfsg/apps/Makefile 2007-02-11 06:04:58.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 -urNad asterisk-1.2.15~dfsg~/apps/app_callingpres.c asterisk-1.2.15~dfsg/apps/app_callingpres.c
+--- asterisk-1.2.15~dfsg~/apps/app_callingpres.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_callingpres.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,70 @@
+/*
+ * An application to change the CallingPresentation for an Asterisk channel.
@@ -280,9 +520,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_capiCD.c asterisk-1.2.14/apps/app_capiCD.c
---- asterisk-1.2.14.orig/apps/app_capiCD.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_capiCD.c 2007-01-11 15:26:50.831491628 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_capiCD.c asterisk-1.2.15~dfsg/apps/app_capiCD.c
+--- asterisk-1.2.15~dfsg~/apps/app_capiCD.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_capiCD.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,172 @@
+/*
+ * (CAPI*)
@@ -456,9 +696,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_capiECT.c asterisk-1.2.14/apps/app_capiECT.c
---- asterisk-1.2.14.orig/apps/app_capiECT.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_capiECT.c 2007-01-11 15:26:50.831491628 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_capiECT.c asterisk-1.2.15~dfsg/apps/app_capiECT.c
+--- asterisk-1.2.15~dfsg~/apps/app_capiECT.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_capiECT.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,210 @@
+/*
+ * (CAPI*)
@@ -670,9 +910,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_capiNoES.c asterisk-1.2.14/apps/app_capiNoES.c
---- asterisk-1.2.14.orig/apps/app_capiNoES.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_capiNoES.c 2007-01-11 15:26:50.831491628 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_capiNoES.c asterisk-1.2.15~dfsg/apps/app_capiNoES.c
+--- asterisk-1.2.15~dfsg~/apps/app_capiNoES.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_capiNoES.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,96 @@
+/*
+ * (CAPI*)
@@ -770,9 +1010,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_chanisavail.c asterisk-1.2.14/apps/app_chanisavail.c
---- asterisk-1.2.14.orig/apps/app_chanisavail.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/apps/app_chanisavail.c 2007-01-11 15:26:50.831491628 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_chanisavail.c asterisk-1.2.15~dfsg/apps/app_chanisavail.c
+--- asterisk-1.2.15~dfsg~/apps/app_chanisavail.c 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_chanisavail.c 2007-02-11 06:04:58.000000000 +0200
@@ -118,7 +118,7 @@
snprintf(trychan, sizeof(trychan), "%s/%s",cur,number);
status = inuse = ast_device_state(trychan);
@@ -782,12 +1022,12 @@
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.14.orig/apps/app_chanspy.c asterisk-1.2.14/apps/app_chanspy.c
---- asterisk-1.2.14.orig/apps/app_chanspy.c 2006-10-13 19:01:22.000000000 +0200
-+++ asterisk-1.2.14/apps/app_chanspy.c 2007-01-11 15:26:50.831491628 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_chanspy.c asterisk-1.2.15~dfsg/apps/app_chanspy.c
+--- asterisk-1.2.15~dfsg~/apps/app_chanspy.c 2007-02-02 01:14:09.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_chanspy.c 2007-02-11 06:04:58.000000000 +0200
@@ -55,6 +55,7 @@
- static const char *synopsis = "Listen to the audio of an active channel\n";
+ static const char *synopsis = "Listen to the audio of an active channel";
static const char *app = "ChanSpy";
+static const char *app2 = "ChanSpyChan";
static const char *desc =
@@ -912,9 +1152,9 @@
}
char *description(void)
-diff -urN asterisk-1.2.14.orig/apps/app_devstate.c asterisk-1.2.14/apps/app_devstate.c
---- asterisk-1.2.14.orig/apps/app_devstate.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_devstate.c 2007-01-11 15:26:50.831491628 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_devstate.c asterisk-1.2.15~dfsg/apps/app_devstate.c
+--- asterisk-1.2.15~dfsg~/apps/app_devstate.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_devstate.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,225 @@
+/*
+ * Devstate application
@@ -1141,9 +1381,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_dial.c asterisk-1.2.14/apps/app_dial.c
---- asterisk-1.2.14.orig/apps/app_dial.c 2006-12-02 00:30:59.000000000 +0100
-+++ asterisk-1.2.14/apps/app_dial.c 2007-01-11 15:26:50.835492573 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_dial.c asterisk-1.2.15~dfsg/apps/app_dial.c
+--- asterisk-1.2.15~dfsg~/apps/app_dial.c 2007-02-11 06:04:48.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_dial.c 2007-02-11 06:04:58.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -1255,7 +1495,7 @@
char *parse;
AST_DECLARE_APP_ARGS(args,
-@@ -940,13 +960,13 @@
+@@ -939,13 +959,13 @@
}
if( privdb_val == AST_PRIVACY_DENY ) {
@@ -1271,7 +1511,7 @@
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
}
-@@ -954,7 +974,7 @@
+@@ -953,7 +973,7 @@
goto out; /* Is this right? */
}
else if( privdb_val == AST_PRIVACY_TORTURE ) {
@@ -1280,7 +1520,7 @@
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
}
-@@ -1008,7 +1028,7 @@
+@@ -1007,7 +1027,7 @@
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
@@ -1289,7 +1529,7 @@
cur = args.peers;
do {
/* Remember where to start next time */
-@@ -1050,7 +1070,7 @@
+@@ -1049,7 +1069,7 @@
ast_log(LOG_DEBUG, "Dialing by extension %s\n", numsubst);
}
/* Request the peer */
@@ -1307,7 +1547,7 @@
if (!tmp->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
else
-@@ -1194,7 +1214,7 @@
+@@ -1196,7 +1216,7 @@
if (outgoing) {
/* Our status will at least be NOANSWER */
@@ -1316,7 +1556,7 @@
if (ast_test_flag(outgoing, OPT_MUSICBACK)) {
moh=1;
ast_indicate(chan, AST_CONTROL_PROGRESS);
-@@ -1203,8 +1223,11 @@
+@@ -1205,8 +1225,11 @@
ast_indicate(chan, AST_CONTROL_RINGING);
sentringing++;
}
@@ -1330,7 +1570,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);
-@@ -1569,18 +1592,22 @@
+@@ -1571,18 +1594,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 +1599,7 @@
config.timelimit = timelimit;
config.play_warning = play_warning;
-@@ -1616,7 +1643,15 @@
+@@ -1618,7 +1645,15 @@
}
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
@@ -1376,9 +1616,9 @@
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)
chan->hangupcause = peer->hangupcause;
-diff -urN asterisk-1.2.14.orig/apps/app_directed_pickup.c asterisk-1.2.14/apps/app_directed_pickup.c
---- asterisk-1.2.14.orig/apps/app_directed_pickup.c 2006-04-06 19:00:10.000000000 +0200
-+++ asterisk-1.2.14/apps/app_directed_pickup.c 2007-01-11 15:26:50.835492573 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_directed_pickup.c asterisk-1.2.15~dfsg/apps/app_directed_pickup.c
+--- asterisk-1.2.15~dfsg~/apps/app_directed_pickup.c 2006-04-06 20:00:10.000000000 +0300
++++ asterisk-1.2.15~dfsg/apps/app_directed_pickup.c 2007-02-11 06:04:58.000000000 +0200
@@ -41,7 +41,7 @@
#include "asterisk/app.h"
@@ -1388,9 +1628,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.14.orig/apps/app_meetme.c asterisk-1.2.14/apps/app_meetme.c
---- asterisk-1.2.14.orig/apps/app_meetme.c 2006-09-28 18:13:55.000000000 +0200
-+++ asterisk-1.2.14/apps/app_meetme.c 2007-01-11 15:26:50.839493518 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_meetme.c asterisk-1.2.15~dfsg/apps/app_meetme.c
+--- asterisk-1.2.15~dfsg~/apps/app_meetme.c 2007-02-03 22:39:45.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_meetme.c 2007-02-11 06:04:58.000000000 +0200
@@ -458,7 +458,7 @@
ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
@@ -1411,7 +1651,7 @@
char *buf = __buf + AST_FRIENDLY_OFFSET;
if (!user) {
-@@ -1007,7 +1008,7 @@
+@@ -1008,7 +1009,7 @@
}
/* Setup buffering information */
memset(&bi, 0, sizeof(bi));
@@ -1420,7 +1660,7 @@
bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
bi.numbufs = audio_buffers;
-@@ -1297,6 +1298,14 @@
+@@ -1298,6 +1299,14 @@
f = ast_read(c);
if (!f)
break;
@@ -1435,7 +1675,7 @@
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
if (user->talk.actual)
ast_frame_adjust_volume(f, user->talk.actual);
-@@ -1531,7 +1540,7 @@
+@@ -1532,7 +1541,7 @@
}
ast_frfree(f);
} else if (outfd > -1) {
@@ -1444,9 +1684,9 @@
if (res > 0) {
memset(&fr, 0, sizeof(fr));
fr.frametype = AST_FRAME_VOICE;
-diff -urN asterisk-1.2.14.orig/apps/app_milliwatt.c asterisk-1.2.14/apps/app_milliwatt.c
---- asterisk-1.2.14.orig/apps/app_milliwatt.c 2006-01-19 05:17:45.000000000 +0100
-+++ asterisk-1.2.14/apps/app_milliwatt.c 2007-01-11 15:26:50.839493518 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_milliwatt.c asterisk-1.2.15~dfsg/apps/app_milliwatt.c
+--- asterisk-1.2.15~dfsg~/apps/app_milliwatt.c 2006-01-19 06:17:45.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_milliwatt.c 2007-02-11 06:04:58.000000000 +0200
@@ -74,20 +74,28 @@
{
struct ast_frame wf;
@@ -1482,9 +1722,9 @@
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
-diff -urN asterisk-1.2.14.orig/apps/app_page.c asterisk-1.2.14/apps/app_page.c
---- asterisk-1.2.14.orig/apps/app_page.c 2006-09-11 23:47:23.000000000 +0200
-+++ asterisk-1.2.14/apps/app_page.c 2007-01-11 15:26:50.839493518 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_page.c asterisk-1.2.15~dfsg/apps/app_page.c
+--- asterisk-1.2.15~dfsg~/apps/app_page.c 2007-01-31 23:25:11.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_page.c 2007-02-11 06:04:58.000000000 +0200
@@ -85,7 +85,7 @@
{
struct calloutdata *cd = data;
@@ -1494,9 +1734,9 @@
free(cd);
return NULL;
}
-diff -urN asterisk-1.2.14.orig/apps/app_parkandannounce.c asterisk-1.2.14/apps/app_parkandannounce.c
---- asterisk-1.2.14.orig/apps/app_parkandannounce.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/apps/app_parkandannounce.c 2007-01-11 15:26:50.839493518 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_parkandannounce.c asterisk-1.2.15~dfsg/apps/app_parkandannounce.c
+--- asterisk-1.2.15~dfsg~/apps/app_parkandannounce.c 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_parkandannounce.c 2007-02-11 06:04:58.000000000 +0200
@@ -183,7 +183,7 @@
memset(&oh, 0, sizeof(oh));
@@ -1506,9 +1746,9 @@
if(dchan) {
if(dchan->_state == AST_STATE_UP) {
-diff -urN asterisk-1.2.14.orig/apps/app_pickup.c asterisk-1.2.14/apps/app_pickup.c
---- asterisk-1.2.14.orig/apps/app_pickup.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_pickup.c 2007-01-11 15:26:50.843494463 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_pickup.c asterisk-1.2.15~dfsg/apps/app_pickup.c
+--- asterisk-1.2.15~dfsg~/apps/app_pickup.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_pickup.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,319 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -1829,9 +2069,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_queue.c asterisk-1.2.14/apps/app_queue.c
---- asterisk-1.2.14.orig/apps/app_queue.c 2006-10-03 22:14:13.000000000 +0200
-+++ asterisk-1.2.14/apps/app_queue.c 2007-01-11 15:26:50.843494463 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_queue.c asterisk-1.2.15~dfsg/apps/app_queue.c
+--- asterisk-1.2.15~dfsg~/apps/app_queue.c 2007-01-31 23:25:11.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_queue.c 2007-02-11 06:04:58.000000000 +0200
@@ -543,7 +543,7 @@
return NULL;
}
@@ -1841,7 +2081,7 @@
{
/* Avoid potential for deadlocks by spawning a new thread to handle
the event */
-@@ -1526,7 +1526,7 @@
+@@ -1527,7 +1527,7 @@
location = "";
/* Request the peer */
@@ -1850,7 +2090,7 @@
if (!tmp->chan) { /* If we can't, just go on to the next call */
#if 0
ast_log(LOG_NOTICE, "Unable to create channel of type '%s' for Queue\n", cur->tech);
-@@ -1838,7 +1838,7 @@
+@@ -1839,7 +1839,7 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
@@ -1859,7 +2099,7 @@
if (status != o->oldstatus)
update_dial_status(qe->parent, o->member, status);
if (!o->chan) {
-@@ -2382,14 +2382,14 @@
+@@ -2383,14 +2383,14 @@
else
which = peer;
if (monitorfilename)
@@ -1877,9 +2117,9 @@
}
if (qe->parent->monjoin)
ast_monitor_setjoinfiles(which, 1);
-diff -urN asterisk-1.2.14.orig/apps/app_readfile.c asterisk-1.2.14/apps/app_readfile.c
---- asterisk-1.2.14.orig/apps/app_readfile.c 2006-03-23 21:13:48.000000000 +0100
-+++ asterisk-1.2.14/apps/app_readfile.c 2007-01-11 15:26:50.843494463 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_readfile.c asterisk-1.2.15~dfsg/apps/app_readfile.c
+--- asterisk-1.2.15~dfsg~/apps/app_readfile.c 2006-03-23 22:13:48.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_readfile.c 2007-02-11 06:04:58.000000000 +0200
@@ -40,7 +40,7 @@
#include "asterisk/app.h"
#include "asterisk/module.h"
@@ -1889,9 +2129,9 @@
static char *app_readfile = "ReadFile";
-diff -urN asterisk-1.2.14.orig/apps/app_segfault.c asterisk-1.2.14/apps/app_segfault.c
---- asterisk-1.2.14.orig/apps/app_segfault.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/apps/app_segfault.c 2007-01-11 15:26:50.847495408 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_segfault.c asterisk-1.2.15~dfsg/apps/app_segfault.c
+--- asterisk-1.2.15~dfsg~/apps/app_segfault.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_segfault.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,75 @@
+/*
+ * Segfault application
@@ -1968,9 +2208,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/apps/app_sendtext.c asterisk-1.2.14/apps/app_sendtext.c
---- asterisk-1.2.14.orig/apps/app_sendtext.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/apps/app_sendtext.c 2007-01-11 15:26:50.847495408 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_sendtext.c asterisk-1.2.15~dfsg/apps/app_sendtext.c
+--- asterisk-1.2.15~dfsg~/apps/app_sendtext.c 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_sendtext.c 2007-02-11 06:04:58.000000000 +0200
@@ -112,7 +112,7 @@
}
status = "FAILURE";
@@ -1980,9 +2220,9 @@
if (!res)
status = "SUCCESS";
pbx_builtin_setvar_helper(chan, "SENDTEXTSTATUS", status);
-diff -urN asterisk-1.2.14.orig/apps/app_zapras.c asterisk-1.2.14/apps/app_zapras.c
---- asterisk-1.2.14.orig/apps/app_zapras.c 2006-12-11 01:33:59.000000000 +0100
-+++ asterisk-1.2.14/apps/app_zapras.c 2007-01-11 15:26:50.847495408 +0100
+diff -urNad asterisk-1.2.15~dfsg~/apps/app_zapras.c asterisk-1.2.15~dfsg/apps/app_zapras.c
+--- asterisk-1.2.15~dfsg~/apps/app_zapras.c 2006-12-11 02:33:59.000000000 +0200
++++ asterisk-1.2.15~dfsg/apps/app_zapras.c 2007-02-11 06:04:58.000000000 +0200
@@ -188,7 +188,7 @@
}
}
@@ -1992,29 +2232,9 @@
ioctl(chan->fds[0], ZT_AUDIOMODE, &x);
/* Restore saved values */
-diff -urN asterisk-1.2.14.orig/apps/Makefile asterisk-1.2.14/apps/Makefile
---- asterisk-1.2.14.orig/apps/Makefile 2006-04-30 15:38:22.000000000 +0200
-+++ asterisk-1.2.14/apps/Makefile 2007-01-11 15:26:50.847495408 +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 -urN asterisk-1.2.14.orig/asterisk.c asterisk-1.2.14/asterisk.c
---- asterisk-1.2.14.orig/asterisk.c 2006-10-27 19:36:07.000000000 +0200
-+++ asterisk-1.2.14/asterisk.c 2007-01-11 15:26:50.851496353 +0100
+diff -urNad asterisk-1.2.15~dfsg~/asterisk.c asterisk-1.2.15~dfsg/asterisk.c
+--- asterisk-1.2.15~dfsg~/asterisk.c 2007-02-11 06:04:48.000000000 +0200
++++ asterisk-1.2.15~dfsg/asterisk.c 2007-02-11 06:04:58.000000000 +0200
@@ -169,7 +169,7 @@
int option_maxcalls = 0; /*!< */
double option_maxload = 0.0; /*!< Max load avg on system */
@@ -2032,7 +2252,7 @@
static char *_argv[256];
static int shuttingdown = 0;
-@@ -1877,6 +1878,7 @@
+@@ -1885,6 +1886,7 @@
ast_copy_string(ast_config_AST_PID, AST_PID, sizeof(ast_config_AST_PID));
ast_copy_string(ast_config_AST_SOCKET, AST_SOCKET, sizeof(ast_config_AST_SOCKET));
ast_copy_string(ast_config_AST_RUN_DIR, AST_RUN_DIR, sizeof(ast_config_AST_RUN_DIR));
@@ -2040,7 +2260,7 @@
/* no asterisk.conf? no problem, use buildtime config! */
if (!cfg) {
-@@ -1991,6 +1993,8 @@
+@@ -1999,6 +2001,8 @@
/* What group to run as */
} else if (!strcasecmp(v->name, "rungroup")) {
ast_copy_string(ast_config_AST_RUN_GROUP, v->value, sizeof(ast_config_AST_RUN_GROUP));
@@ -2049,9 +2269,9 @@
}
v = v->next;
}
-diff -urN asterisk-1.2.14.orig/build_tools/make_defaults_h asterisk-1.2.14/build_tools/make_defaults_h
---- asterisk-1.2.14.orig/build_tools/make_defaults_h 2005-06-20 19:26:08.000000000 +0200
-+++ asterisk-1.2.14/build_tools/make_defaults_h 2007-01-11 15:26:50.851496353 +0100
+diff -urNad asterisk-1.2.15~dfsg~/build_tools/make_defaults_h asterisk-1.2.15~dfsg/build_tools/make_defaults_h
+--- asterisk-1.2.15~dfsg~/build_tools/make_defaults_h 2007-02-11 06:04:48.000000000 +0200
++++ asterisk-1.2.15~dfsg/build_tools/make_defaults_h 2007-02-11 06:04:58.000000000 +0200
@@ -16,6 +16,7 @@
#define AST_KEY_DIR "${INSTALL_PATH}${ASTVARLIBDIR}/keys"
#define AST_DB "${INSTALL_PATH}${ASTVARLIBDIR}/astdb"
@@ -2060,9 +2280,9 @@
#define AST_CONFIG_FILE "${INSTALL_PATH}${ASTCONFPATH}"
-diff -urN asterisk-1.2.14.orig/channel.c asterisk-1.2.14/channel.c
---- asterisk-1.2.14.orig/channel.c 2006-12-13 05:23:17.000000000 +0100
-+++ asterisk-1.2.14/channel.c 2007-01-11 15:32:39.797922081 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channel.c asterisk-1.2.15~dfsg/channel.c
+--- asterisk-1.2.15~dfsg~/channel.c 2007-01-30 21:41:52.000000000 +0200
++++ asterisk-1.2.15~dfsg/channel.c 2007-02-11 06:04:58.000000000 +0200
@@ -94,8 +94,8 @@
*/
static int shutting_down = 0;
@@ -2245,7 +2465,7 @@
}
int ast_channel_spy_add(struct ast_channel *chan, struct ast_channel_spy *spy)
-@@ -2141,7 +2169,7 @@
+@@ -2142,7 +2170,7 @@
return buf;
}
@@ -2254,7 +2474,7 @@
{
int res = 0;
/* Stop if we're a zombie or need a soft hangup */
-@@ -2149,7 +2177,7 @@
+@@ -2150,7 +2178,7 @@
return -1;
CHECK_BLOCKING(chan);
if (chan->tech->send_text)
@@ -2263,7 +2483,7 @@
ast_clear_flag(chan, AST_FLAG_BLOCKING);
return res;
}
-@@ -2279,7 +2307,7 @@
+@@ -2280,7 +2308,7 @@
break;
case AST_FRAME_TEXT:
if (chan->tech->send_text)
@@ -2272,7 +2492,7 @@
else
res = 0;
break;
-@@ -2422,7 +2450,7 @@
+@@ -2424,7 +2452,7 @@
&chan->writetrans, 1);
}
@@ -2281,7 +2501,7 @@
{
int state = 0;
int cause = 0;
-@@ -2430,7 +2458,7 @@
+@@ -2432,7 +2460,7 @@
struct ast_frame *f;
int res = 0;
@@ -2290,7 +2510,7 @@
if (chan) {
if (oh) {
if (oh->vars)
-@@ -2444,6 +2472,7 @@
+@@ -2446,6 +2474,7 @@
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);
@@ -2298,7 +2518,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)) {
-@@ -2467,6 +2496,7 @@
+@@ -2469,6 +2498,7 @@
if (f->subclass == AST_CONTROL_RINGING)
state = AST_CONTROL_RINGING;
else if ((f->subclass == AST_CONTROL_BUSY) || (f->subclass == AST_CONTROL_CONGESTION)) {
@@ -2306,7 +2526,7 @@
state = f->subclass;
ast_frfree(f);
break;
-@@ -2536,12 +2566,12 @@
+@@ -2538,12 +2568,12 @@
return chan;
}
@@ -2322,7 +2542,7 @@
{
struct chanlist *chan;
struct ast_channel *c;
-@@ -2578,6 +2608,7 @@
+@@ -2580,6 +2610,7 @@
if (!(c = chan->tech->requester(type, capabilities, data, cause)))
return NULL;
@@ -2330,7 +2550,7 @@
if (c->_state == AST_STATE_DOWN) {
manager_event(EVENT_FLAG_CALL, "Newchannel",
"Channel: %s\r\n"
-@@ -2854,6 +2885,29 @@
+@@ -2856,6 +2887,29 @@
return res;
}
@@ -2360,7 +2580,7 @@
void ast_change_name(struct ast_channel *chan, char *newname)
{
char tmp[256];
-@@ -2995,7 +3049,7 @@
+@@ -2997,7 +3051,7 @@
ast_copy_string(clone->name, masqn, sizeof(clone->name));
/* Notify any managers of the change, first the masq then the other */
@@ -2369,7 +2589,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 @@
+@@ -3245,15 +3299,14 @@
);
}
@@ -2387,7 +2607,7 @@
manager_event(EVENT_FLAG_CALL,
(oldstate == AST_STATE_DOWN && !ast_test_flag(chan, AST_FLAG_NOTNEW)) ? "Newchannel" : "Newstate",
"Channel: %s\r\n"
-@@ -3267,6 +3320,10 @@
+@@ -3269,6 +3322,10 @@
return 0;
}
@@ -2398,7 +2618,7 @@
/*--- Find bridged channel */
struct ast_channel *ast_bridged_channel(struct ast_channel *chan)
{
-@@ -3446,6 +3503,7 @@
+@@ -3448,6 +3505,7 @@
char caller_warning = 0;
char callee_warning = 0;
@@ -2406,7 +2626,7 @@
if (c0->_bridge) {
ast_log(LOG_WARNING, "%s is already in a bridge with %s\n",
c0->name, c0->_bridge->name);
-@@ -3456,6 +3514,10 @@
+@@ -3458,6 +3516,10 @@
c1->name, c1->_bridge->name);
return -1;
}
@@ -2417,7 +2637,7 @@
/* Stop if we're a zombie or need a soft hangup */
if (ast_test_flag(c0, AST_FLAG_ZOMBIE) || ast_check_hangup_locked(c0) ||
-@@ -4179,3 +4241,22 @@
+@@ -4181,3 +4243,22 @@
free(state);
}
@@ -2440,9 +2660,79 @@
+
+ return res;
+}
-diff -urN asterisk-1.2.14.orig/channels/chan_agent.c asterisk-1.2.14/channels/chan_agent.c
---- asterisk-1.2.14.orig/channels/chan_agent.c 2006-09-06 20:16:41.000000000 +0200
-+++ asterisk-1.2.14/channels/chan_agent.c 2007-01-11 15:26:50.859498244 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/Makefile asterisk-1.2.15~dfsg/channels/Makefile
+--- asterisk-1.2.15~dfsg~/channels/Makefile 2007-02-11 06:04:47.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/Makefile 2007-02-11 06:04:58.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 -urNad asterisk-1.2.15~dfsg~/channels/chan_agent.c asterisk-1.2.15~dfsg/channels/chan_agent.c
+--- asterisk-1.2.15~dfsg~/channels/chan_agent.c 2006-09-06 21:16:41.000000000 +0300
++++ asterisk-1.2.15~dfsg/channels/chan_agent.c 2007-02-11 06:04:58.000000000 +0200
@@ -248,7 +248,7 @@
static struct ast_frame *agent_read(struct ast_channel *ast);
static int agent_write(struct ast_channel *ast, struct ast_frame *f);
@@ -2486,9 +2776,9 @@
if (p->chan)
chan = agent_new(p, AST_STATE_DOWN);
}
-diff -urN asterisk-1.2.14.orig/channels/chan_alsa.c asterisk-1.2.14/channels/chan_alsa.c
---- asterisk-1.2.14.orig/channels/chan_alsa.c 2005-12-21 21:01:16.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_alsa.c 2007-01-11 15:26:50.863499189 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_alsa.c asterisk-1.2.15~dfsg/channels/chan_alsa.c
+--- asterisk-1.2.15~dfsg~/channels/chan_alsa.c 2005-12-21 22:01:16.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_alsa.c 2007-02-11 06:04:58.000000000 +0200
@@ -172,7 +172,7 @@
/* ZZ */
static struct ast_channel *alsa_request(const char *type, int format, void *data, int *cause);
@@ -2507,9 +2797,9 @@
{
ast_mutex_lock(&alsalock);
ast_verbose( " << Console Received text %s >> \n", text);
-diff -urN asterisk-1.2.14.orig/channels/chan_capi.c asterisk-1.2.14/channels/chan_capi.c
---- asterisk-1.2.14.orig/channels/chan_capi.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_capi.c 2007-01-11 15:26:50.867500134 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_capi.c asterisk-1.2.15~dfsg/channels/chan_capi.c
+--- asterisk-1.2.15~dfsg~/channels/chan_capi.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_capi.c 2007-02-11 06:04:58.000000000 +0200
@@ -0,0 +1,2888 @@
+/*
+ * (CAPI*)
@@ -5399,9 +5689,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/channels/chan_features.c asterisk-1.2.14/channels/chan_features.c
---- asterisk-1.2.14.orig/channels/chan_features.c 2006-08-30 20:59:44.000000000 +0200
-+++ asterisk-1.2.14/channels/chan_features.c 2007-01-11 15:26:50.867500134 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_features.c asterisk-1.2.15~dfsg/channels/chan_features.c
+--- asterisk-1.2.15~dfsg~/channels/chan_features.c 2006-08-30 21:59:44.000000000 +0300
++++ asterisk-1.2.15~dfsg/channels/chan_features.c 2007-02-11 06:04:58.000000000 +0200
@@ -427,7 +427,7 @@
}
ast_mutex_unlock(&featurelock);
@@ -5411,9 +5701,9 @@
if (!chan) {
ast_log(LOG_NOTICE, "Unable to allocate subchannel '%s/%s'\n", tech, dest);
return NULL;
-diff -urN asterisk-1.2.14.orig/channels/chan_iax2.c asterisk-1.2.14/channels/chan_iax2.c
---- asterisk-1.2.14.orig/channels/chan_iax2.c 2006-12-09 16:45:37.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_iax2.c 2007-01-11 15:26:50.875502024 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_iax2.c asterisk-1.2.15~dfsg/channels/chan_iax2.c
+--- asterisk-1.2.15~dfsg~/channels/chan_iax2.c 2007-02-11 06:04:49.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_iax2.c 2007-02-11 06:04:58.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -5442,7 +5732,7 @@
{
return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_TEXT,
-@@ -3102,7 +3105,7 @@
+@@ -3106,7 +3109,7 @@
memset(&ied, 0, sizeof(ied));
ast_mutex_lock(&iaxsl[callno]);
if (callno && iaxs[callno]) {
@@ -5451,7 +5741,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);
-@@ -3154,7 +3157,8 @@
+@@ -3158,7 +3161,8 @@
static struct ast_frame *iax2_read(struct ast_channel *c)
{
static struct ast_frame f = { AST_FRAME_NULL, };
@@ -5461,9 +5751,9 @@
return &f;
}
-diff -urN asterisk-1.2.14.orig/channels/chan_oss.c asterisk-1.2.14/channels/chan_oss.c
---- asterisk-1.2.14.orig/channels/chan_oss.c 2006-07-05 17:31:01.000000000 +0200
-+++ asterisk-1.2.14/channels/chan_oss.c 2007-01-11 15:26:50.879502969 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_oss.c asterisk-1.2.15~dfsg/channels/chan_oss.c
+--- asterisk-1.2.15~dfsg~/channels/chan_oss.c 2006-07-05 18:31:01.000000000 +0300
++++ asterisk-1.2.15~dfsg/channels/chan_oss.c 2007-02-11 06:04:58.000000000 +0200
@@ -318,7 +318,7 @@
static struct ast_channel *oss_request(const char *type, int format, void *data
, int *cause);
@@ -5482,9 +5772,9 @@
{
/* print received messages */
ast_verbose( " << Console Received text %s >> \n", text);
-diff -urN asterisk-1.2.14.orig/channels/chan_oss_old.c asterisk-1.2.14/channels/chan_oss_old.c
---- asterisk-1.2.14.orig/channels/chan_oss_old.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_oss_old.c 2007-01-11 15:26:50.879502969 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_oss_old.c asterisk-1.2.15~dfsg/channels/chan_oss_old.c
+--- asterisk-1.2.15~dfsg~/channels/chan_oss_old.c 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_oss_old.c 2007-02-11 06:04:58.000000000 +0200
@@ -136,7 +136,7 @@
static struct ast_channel *oss_request(const char *type, int format, void *data, int *cause);
@@ -5503,9 +5793,9 @@
{
ast_verbose( " << Console Received text %s >> \n", text);
return 0;
-diff -urN asterisk-1.2.14.orig/channels/chan_phone.c asterisk-1.2.14/channels/chan_phone.c
---- asterisk-1.2.14.orig/channels/chan_phone.c 2006-11-28 17:56:01.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_phone.c 2007-01-11 15:26:50.879502969 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_phone.c asterisk-1.2.15~dfsg/channels/chan_phone.c
+--- asterisk-1.2.15~dfsg~/channels/chan_phone.c 2006-11-28 18:56:01.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_phone.c 2007-02-11 06:04:58.000000000 +0200
@@ -153,7 +153,7 @@
static struct ast_frame *phone_read(struct ast_channel *ast);
static int phone_write(struct ast_channel *ast, struct ast_frame *frame);
@@ -5524,10 +5814,10 @@
{
int length = strlen(text);
return phone_write_buf(ast->tech_pvt, text, length, length, 0) ==
-diff -urN asterisk-1.2.14.orig/channels/chan_sip.c asterisk-1.2.14/channels/chan_sip.c
---- asterisk-1.2.14.orig/channels/chan_sip.c 2006-12-06 16:42:41.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_sip.c 2007-01-11 15:36:42.459235222 +0100
-@@ -604,6 +604,7 @@
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_sip.c asterisk-1.2.15~dfsg/channels/chan_sip.c
+--- asterisk-1.2.15~dfsg~/channels/chan_sip.c 2007-02-02 00:21:56.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_sip.c 2007-02-11 06:04:58.000000000 +0200
+@@ -602,6 +602,7 @@
unsigned int flags; /*!< SIP_ flags */
int timer_t1; /*!< SIP timer T1, ms rtt */
unsigned int sipoptions; /*!< Supported SIP sipoptions on the other end */
@@ -5535,7 +5825,7 @@
int capability; /*!< Special capability (codec) */
int jointcapability; /*!< Supported capability at both ends (codecs ) */
int peercapability; /*!< Supported peer capability */
-@@ -627,6 +628,7 @@
+@@ -626,6 +627,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 */
@@ -5543,7 +5833,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? */
-@@ -646,6 +648,7 @@
+@@ -645,6 +647,7 @@
char peername[256]; /*!< [peer] name, not set if [user] */
char authname[256]; /*!< Who we use for authentication */
char uri[256]; /*!< Original requested URI */
@@ -5551,7 +5841,7 @@
char okcontacturi[SIP_LEN_CONTACT]; /*!< URI from the 200 OK on INVITE */
char peersecret[256]; /*!< Password */
char peermd5secret[256];
-@@ -769,6 +772,9 @@
+@@ -768,6 +771,9 @@
int callingpres; /*!< Calling id presentation */
int inUse; /*!< Number of calls in use */
int call_limit; /*!< Limit of concurrent calls */
@@ -5561,7 +5851,7 @@
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 */
-@@ -911,7 +917,7 @@
+@@ -910,7 +916,7 @@
static struct ast_channel *sip_request_call(const char *type, int format, void *data, int *cause);
static int sip_devicestate(void *data);
@@ -5570,7 +5860,7 @@
static int sip_call(struct ast_channel *ast, char *dest, int timeout);
static int sip_hangup(struct ast_channel *ast);
static int sip_answer(struct ast_channel *ast);
-@@ -929,7 +935,7 @@
+@@ -928,7 +934,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);
@@ -5579,7 +5869,7 @@
static char *gettag(struct sip_request *req, char *header, char *tagbuf, int tagbufsize);
/*! \brief Definition of this channel for PBX channel registration */
-@@ -1323,7 +1329,7 @@
+@@ -1322,7 +1328,7 @@
/* If this is a subscription, tell the phone that we got a timeout */
if (p->subscribed) {
@@ -5588,7 +5878,7 @@
p->subscribed = NONE;
append_history(p, "Subscribestatus", "timeout");
return 10000; /* Reschedule this destruction so that we know that it's gone */
-@@ -1589,24 +1595,6 @@
+@@ -1588,24 +1594,6 @@
}
}
@@ -5613,7 +5903,7 @@
/*! \brief realtime_update_peer: Update peer object in realtime storage ---*/
static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *username, const char *fullcontact, int expirey)
-@@ -3179,16 +3167,30 @@
+@@ -3188,16 +3176,30 @@
/*! \brief find_call: Connect incoming SIP message to current dialog or create new dialog structure */
/* Called by handle_request, sipsock_read */
@@ -5645,7 +5935,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
-@@ -4203,6 +4205,7 @@
+@@ -4212,6 +4214,7 @@
if (sipmethod == SIP_CANCEL) {
c = p->initreq.rlPart2; /* Use original URI */
} else if (sipmethod == SIP_ACK) {
@@ -5653,7 +5943,7 @@
/* Use URI from Contact: in 200 OK (if INVITE)
(we only have the contacturi on INVITEs) */
if (!ast_strlen_zero(p->okcontacturi))
-@@ -5008,13 +5011,15 @@
+@@ -5019,13 +5022,15 @@
ast_build_string(&invite, &invite_max, ";%s", p->options->uri_options);
ast_copy_string(p->uri, invite_buf, sizeof(p->uri));
@@ -5670,7 +5960,7 @@
} else {
snprintf(to, sizeof(to), "<%s>", p->uri);
}
-@@ -5045,6 +5050,45 @@
+@@ -5056,6 +5061,45 @@
add_header(req, "Remote-Party-ID", p->rpid);
}
@@ -5716,7 +6006,7 @@
/*! \brief transmit_invite: Build REFER/INVITE/OPTIONS message and transmit it ---*/
static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
{
-@@ -5071,6 +5115,11 @@
+@@ -5082,6 +5126,11 @@
if (!ast_strlen_zero(p->referred_by))
add_header(&req, "Referred-By", p->referred_by);
}
@@ -5728,7 +6018,7 @@
#ifdef OSP_SUPPORT
if ((req.method != SIP_OPTIONS) && p->options && !ast_strlen_zero(p->options->osptoken)) {
ast_log(LOG_DEBUG,"Adding OSP Token: %s\n", p->options->osptoken);
-@@ -5145,7 +5194,7 @@
+@@ -5156,7 +5205,7 @@
}
/*! \brief transmit_state_notify: Used in the SUBSCRIBE notification subsystem ----*/
@@ -5737,7 +6027,7 @@
{
char tmp[4000], from[256], to[256];
char *t = tmp, *c, *a, *mfrom, *mto;
-@@ -5290,10 +5339,19 @@
+@@ -5301,10 +5350,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);
@@ -5760,7 +6050,7 @@
ast_build_string(&t, &maxbytes, "<state>%s</state>\n", statestring);
ast_build_string(&t, &maxbytes, "</dialog>\n</dialog-info>\n");
break;
-@@ -6123,8 +6181,10 @@
+@@ -6134,8 +6192,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);
@@ -5772,7 +6062,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);
-@@ -6515,7 +6575,7 @@
+@@ -6526,7 +6586,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 */
@@ -5781,7 +6071,7 @@
{
struct sip_pvt *p = data;
-@@ -6534,7 +6594,7 @@
+@@ -6545,7 +6605,7 @@
p->laststate = state;
break;
}
@@ -5790,7 +6080,7 @@
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);
-@@ -6560,7 +6620,13 @@
+@@ -6571,7 +6631,13 @@
char *name, *c;
char *t;
char *domain;
@@ -5805,7 +6095,7 @@
/* Terminate URI */
t = uri;
while(*t && (*t > 32) && (*t != ';'))
-@@ -6611,9 +6677,68 @@
+@@ -6622,9 +6688,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 {
@@ -5875,7 +6165,7 @@
sip_cancel_destroy(p);
switch (parse_register_contact(p, peer, req)) {
-@@ -6634,6 +6759,7 @@
+@@ -6645,6 +6770,7 @@
transmit_response_with_date(p, "200 OK", req);
peer->lastmsgssent = -1;
res = 0;
@@ -5883,7 +6173,7 @@
break;
}
}
-@@ -6981,6 +7107,11 @@
+@@ -6992,6 +7118,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 */
@@ -5895,7 +6185,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) */
-@@ -7704,6 +7835,8 @@
+@@ -7715,6 +7846,8 @@
int peers_offline = 0;
char *id;
char idtext[256] = "";
@@ -5904,7 +6194,7 @@
if (s) { /* Manager - get ActionID */
id = astman_get_header(m,"ActionID");
-@@ -7746,6 +7879,7 @@
+@@ -7757,6 +7890,7 @@
else
ast_copy_string(name, iterator->name, sizeof(name));
@@ -5912,7 +6202,7 @@
pstatus = peer_status(iterator, status, sizeof(status));
if (pstatus)
peers_online++;
-@@ -7762,14 +7896,24 @@
+@@ -7773,14 +7907,24 @@
}
}
@@ -5938,7 +6228,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? */
-@@ -7777,6 +7921,7 @@
+@@ -7788,6 +7932,7 @@
iterator->ha ? " A " : " ", /* permit/deny */
ntohs(iterator->addr.sin_port), status);
@@ -5946,7 +6236,7 @@
} else { /* Manager format */
/* The names here need to be the same as other channels */
ast_cli(fd,
-@@ -7802,7 +7947,9 @@
+@@ -7813,7 +7958,9 @@
ASTOBJ_UNLOCK(iterator);
@@ -5957,7 +6247,7 @@
} while(0) );
if (!s) {
-@@ -8837,6 +8984,7 @@
+@@ -8848,6 +8995,7 @@
char buf[1024];
unsigned int event;
char *c;
@@ -5965,7 +6255,7 @@
/* Need to check the media/type */
if (!strcasecmp(get_header(req, "Content-Type"), "application/dtmf-relay") ||
-@@ -8900,6 +9048,19 @@
+@@ -8911,6 +9059,19 @@
ast_queue_control(p->owner, AST_CONTROL_VIDUPDATE);
transmit_response(p, "200 OK", req);
return;
@@ -5985,7 +6275,7 @@
} else if ((c = get_header(req, "X-ClientCode"))) {
/* Client code (from SNOM phone) */
if (ast_test_flag(p, SIP_USECLIENTCODE)) {
-@@ -8999,12 +9160,63 @@
+@@ -9010,12 +9171,63 @@
return RESULT_SUCCESS;
}
@@ -6050,7 +6340,7 @@
if (argc < 4)
return RESULT_SHOWUSAGE;
-@@ -9021,41 +9233,13 @@
+@@ -9032,41 +9244,13 @@
}
for (i = 3; i < argc; i++) {
@@ -6072,15 +6362,15 @@
- }
-
- initreqprep(&req, p, SIP_NOTIFY);
+-
+- for (var = varlist; var; var = var->next)
+- add_header(&req, var->name, var->value);
+ if (sip_send_notify(fd, argv[2], argv[i]) == RESULT_FAILURE)
+ res = RESULT_FAILURE;
+ }
+ return res;
+}
-- for (var = varlist; var; var = var->next)
-- add_header(&req, var->name, var->value);
-
- add_blank_header(&req);
- /* Recalculate our side, and recalculate Call ID */
- if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip))
@@ -6091,13 +6381,13 @@
- transmit_sip_request(p, &req);
- sip_scheddestroy(p, 15000);
- }
--
+
- return RESULT_SUCCESS;
-}
/*! \brief sip_do_history: Enable SIP History logging (CLI) ---*/
static int sip_do_history(int fd, int argc, char *argv[])
{
-@@ -9720,7 +9904,7 @@
+@@ -9732,7 +9916,7 @@
if (!ignore && p->owner) {
ast_queue_control(p->owner, AST_CONTROL_RINGING);
if (p->owner->_state != AST_STATE_UP)
@@ -6106,7 +6396,7 @@
}
if (find_sdp(req)) {
process_sdp(p, req);
-@@ -10411,6 +10595,8 @@
+@@ -10433,6 +10617,8 @@
static int attempt_transfer(struct sip_pvt *p1, struct sip_pvt *p2)
{
int res = 0;
@@ -6115,7 +6405,7 @@
struct ast_channel
*chana = NULL,
*chanb = NULL,
-@@ -10420,6 +10606,9 @@
+@@ -10442,6 +10628,9 @@
*peerb = NULL,
*peerc = NULL,
*peerd = NULL;
@@ -6125,7 +6415,7 @@
if (!p1->owner || !p2->owner) {
ast_log(LOG_WARNING, "Transfer attempted without dual ownership?\n");
-@@ -10448,6 +10637,12 @@
+@@ -10470,6 +10659,12 @@
ast_quiet_chan(peerc);
ast_quiet_chan(peerd);
@@ -6138,7 +6428,7 @@
if (peera->cdr && peerb->cdr) {
peerb->cdr = ast_cdr_append(peerb->cdr, peera->cdr);
} else if (peera->cdr) {
-@@ -10466,6 +10661,13 @@
+@@ -10488,6 +10683,13 @@
ast_log(LOG_WARNING, "Failed to masquerade %s into %s\n", peerb->name, peerc->name);
res = -1;
}
@@ -6152,7 +6442,7 @@
return res;
} else {
ast_log(LOG_NOTICE, "Transfer attempted with no appropriate bridged calls to transfer\n");
-@@ -10477,7 +10679,6 @@
+@@ -10499,7 +10701,6 @@
}
return 0;
}
@@ -6160,7 +6450,7 @@
/*! \brief gettag: Get tag from packet */
static char *gettag(struct sip_request *req, char *header, char *tagbuf, int tagbufsize)
{
-@@ -10777,6 +10978,7 @@
+@@ -10799,6 +11000,7 @@
int res;
struct ast_channel *transfer_to;
char *transfercontext = NULL;
@@ -6168,7 +6458,7 @@
if (option_debug > 2)
ast_log(LOG_DEBUG, "SIP call transfer received for call %s (REFER)!\n", p->callid);
-@@ -10787,9 +10989,73 @@
+@@ -10809,9 +11011,73 @@
transfercontext = p->context;
if (res < 0)
transmit_response(p, "603 Declined", req);
@@ -6244,7 +6534,7 @@
int nobye = 0;
if (!ignore) {
if (p->refer_call) {
-@@ -11128,7 +11394,7 @@
+@@ -11150,7 +11416,7 @@
struct sip_pvt *p_old;
transmit_response(p, "200 OK", req);
@@ -6253,7 +6543,7 @@
append_history(p, "Subscribestatus", ast_extension_state2str(firststate));
/* remove any old subscription from this peer for the same exten/context,
-@@ -11318,6 +11584,8 @@
+@@ -11340,6 +11606,8 @@
res = handle_request_options(p, req, debug);
break;
case SIP_INVITE:
@@ -6262,7 +6552,7 @@
res = handle_request_invite(p, req, debug, ignore, seqno, sin, recount, e);
break;
case SIP_REFER:
-@@ -11435,7 +11703,7 @@
+@@ -11457,7 +11725,7 @@
/* Process request, with netlock held */
retrylock:
ast_mutex_lock(&netlock);
@@ -6271,7 +6561,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)) {
-@@ -11776,6 +12044,52 @@
+@@ -11798,6 +12066,52 @@
return 0;
}
@@ -6324,7 +6614,7 @@
/*! \brief sip_devicestate: Part of PBX channel interface ---*/
/* Return values:---
-@@ -12313,6 +12627,7 @@
+@@ -12335,6 +12649,7 @@
peer->expire = -1;
peer->pokeexpire = -1;
@@ -6332,7 +6622,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);
-@@ -12358,7 +12673,9 @@
+@@ -12380,7 +12695,9 @@
if (peer) {
/* Already in the list, remove it and it will be added back (or FREE'd) */
@@ -6343,7 +6633,7 @@
} else {
peer = malloc(sizeof(*peer));
if (peer) {
-@@ -12370,6 +12687,7 @@
+@@ -12392,6 +12709,7 @@
ASTOBJ_INIT(peer);
peer->expire = -1;
peer->pokeexpire = -1;
@@ -6351,7 +6641,7 @@
} else {
ast_log(LOG_WARNING, "Can't allocate SIP peer memory\n");
}
-@@ -12515,6 +12833,10 @@
+@@ -12537,6 +12855,10 @@
peer->call_limit = atoi(v->value);
if (peer->call_limit < 0)
peer->call_limit = 0;
@@ -6362,7 +6652,7 @@
} else if (!strcasecmp(v->name, "amaflags")) {
format = ast_cdr_amaflags2int(v->value);
if (format < 0) {
-@@ -12910,8 +13232,24 @@
+@@ -12932,8 +13254,24 @@
if (!strcasecmp(utype, "peer") || !strcasecmp(utype, "friend")) {
peer = build_peer(cat, ast_variable_browse(cfg, cat), 0);
if (peer) {
@@ -6389,7 +6679,7 @@
}
} else if (strcasecmp(utype, "user")) {
ast_log(LOG_WARNING, "Unknown type '%s' for '%s' in %s\n", utype, cat, "sip.conf");
-@@ -13513,6 +13851,8 @@
+@@ -13535,6 +13873,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);
@@ -6398,7 +6688,7 @@
sip_poke_all_peers();
sip_send_all_registers();
-@@ -13543,6 +13883,7 @@
+@@ -13565,6 +13905,7 @@
ast_rtp_proto_unregister(&sip_rtp);
@@ -6406,9 +6696,9 @@
ast_manager_unregister("SIPpeers");
ast_manager_unregister("SIPshowpeer");
-diff -urN asterisk-1.2.14.orig/channels/chan_zap.c asterisk-1.2.14/channels/chan_zap.c
---- asterisk-1.2.14.orig/channels/chan_zap.c 2006-12-10 03:14:13.000000000 +0100
-+++ asterisk-1.2.14/channels/chan_zap.c 2007-01-11 15:26:50.931515256 +0100
+diff -urNad asterisk-1.2.15~dfsg~/channels/chan_zap.c asterisk-1.2.15~dfsg/channels/chan_zap.c
+--- asterisk-1.2.15~dfsg~/channels/chan_zap.c 2007-02-11 06:04:49.000000000 +0200
++++ asterisk-1.2.15~dfsg/channels/chan_zap.c 2007-02-11 13:34:34.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -6455,35 +6745,7 @@
#define NUM_DCHANS 4 /*!< No more than 4 d-channels */
#define MAX_CHANNELS 672 /*!< No more than a DS3 per trunk group */
-@@ -201,6 +210,11 @@
- static char defaultcic[64] = "";
- static char defaultozz[64] = "";
-
-+static char nocid[256] = "No CID available";
-+static char withheldcid[256] = "CID withheld";
-+static char gsm_modem_pin[20];
-+static char gsm_modem_exten[AST_MAX_EXTENSION];
-+
- static char language[MAX_LANGUAGE] = "";
- static char musicclass[MAX_MUSICCLASS] = "";
- static char progzone[10]= "";
-@@ -287,6 +301,7 @@
- static int cur_priexclusive = 0;
-
- static int priindication_oob = 0;
-+static int pritransfer = 0;
-
- #ifdef ZAPATA_PRI
- static int minunused = 2;
-@@ -294,6 +309,7 @@
- static char idleext[AST_MAX_EXTENSION];
- static char idledial[AST_MAX_EXTENSION];
- static int overlapdial = 0;
-+static int usercid = 0;
- static int facilityenable = 0;
- static char internationalprefix[10] = "";
- static char nationalprefix[10] = "";
-@@ -305,8 +321,6 @@
+@@ -210,8 +219,6 @@
#ifdef PRI_GETSET_TIMERS
static int pritimers[PRI_MAX_TIMERS];
#endif
@@ -6492,7 +6754,7 @@
#endif
/*! \brief Wait up to 16 seconds for first digit (FXO logic) */
-@@ -327,10 +341,6 @@
+@@ -232,10 +239,6 @@
static int ifcount = 0;
@@ -6500,11 +6762,11 @@
-AST_MUTEX_DEFINE_STATIC(pridebugfdlock);
-#endif
-
- /*! \brief Whether we answer on a Polarity Switch event */
- static int answeronpolarityswitch = 0;
+ /*! \brief Protect the monitoring thread, so only one process can kill or start it, and not
+ when it's doing something critical. */
+ AST_MUTEX_DEFINE_STATIC(monlock);
+@@ -248,7 +251,7 @@
-@@ -355,7 +365,7 @@
-
static enum ast_bridge_result zt_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms);
-static int zt_sendtext(struct ast_channel *c, const char *text);
@@ -6512,7 +6774,7 @@
/*! \brief Avoid the silly zt_getevent which ignores a bunch of events */
static inline int zt_get_event(int fd)
-@@ -389,6 +399,19 @@
+@@ -282,6 +285,19 @@
struct zt_pvt;
@@ -6532,7 +6794,7 @@
#ifdef ZAPATA_R2
static int r2prot = -1;
-@@ -403,6 +426,28 @@
+@@ -296,6 +312,28 @@
#define PRI_SPAN(p) (((p) >> 8) & 0xff)
#define PRI_EXPLICIT(p) (((p) >> 16) & 0x01)
@@ -6561,16 +6823,16 @@
struct zt_pri {
pthread_t master; /*!< Thread of master */
ast_mutex_t lock; /*!< Mutex */
-@@ -416,6 +461,8 @@
+@@ -309,6 +347,8 @@
int nsf; /*!< Network-Specific Facilities */
int dialplan; /*!< Dialing plan */
int localdialplan; /*!< Local dialing plan */
-+ char nocid[256];
-+ char withheldcid[256];
++ char nocid[256]; /*!< (Bristuff) Caller ID to use when none availble (?) */
++ char withheldcid[256]; /*!< (Bristuff) Caller ID to use when caller ID is withheld (?) */
char internationalprefix[10]; /*!< country access code ('00' for european dialplans) */
char nationalprefix[10]; /*!< area access code ('0' for european dialplans) */
char localprefix[20]; /*!< area access code + area code ('0'+area code for european dialplans) */
-@@ -435,6 +482,7 @@
+@@ -328,6 +368,7 @@
int fds[NUM_DCHANS]; /*!< FD's for d-channels */
int offset;
int span;
@@ -6578,7 +6840,7 @@
int resetting;
int resetpos;
time_t lastreset; /*!< time when unused channels were last reset */
-@@ -442,6 +490,9 @@
+@@ -335,6 +376,9 @@
struct zt_pvt *pvts[MAX_CHANNELS]; /*!< Member channel pvt structs */
struct zt_pvt *crvs; /*!< Member CRV structs */
struct zt_pvt *crvend; /*!< Pointer to end of CRV structs */
@@ -6588,7 +6850,45 @@
};
-@@ -561,6 +612,8 @@
+@@ -422,6 +466,9 @@
+ int minidle;
+ char idleext[AST_MAX_EXTENSION];
+ char idledial[AST_MAX_EXTENSION];
++ char nocid[256];
++ char withheldcid[256];
++ int usercid;
+ int overlapdial;
+ int facilityenable;
+ char internationalprefix[10];
+@@ -445,6 +492,10 @@
+ */
+ struct zt_chan_conf {
+ struct zt_pri_conf pri;
++#ifdef ZAPATA_GSM
++ /* \todo: when converting to 1.4, this is already part of the zt_pvt */
++ struct zt_gsm gsm;
++#endif
+ char context[AST_MAX_CONTEXT];
+ char cid_num[AST_MAX_EXTENSION];
+ char cid_name[AST_MAX_EXTENSION];
+@@ -534,6 +585,7 @@
+ int polarityonanswerdelay;
+ int sendcalleridafter;
+
++ int pritransfer;
+ int priindication_oob;
+ int radio;
+ };
+@@ -547,6 +599,8 @@
+ .minidle = 0,
+ .idleext = "",
+ .idledial = "",
++ .nocid = "No CID available",
++ .withheldcid = "CID withheld",
+ .overlapdial = 0,
+ .facilityenable = 0,
+ .internationalprefix = "",
+@@ -712,6 +766,8 @@
unsigned int echocanbridged:1;
unsigned int echocanon:1;
unsigned int faxhandled:1; /*!< Has a fax tone already been handled? */
@@ -6597,7 +6897,7 @@
unsigned int firstradio:1;
unsigned int hanguponpolarityswitch:1;
unsigned int hardwaredtmf:1;
-@@ -573,7 +626,8 @@
+@@ -724,7 +780,8 @@
unsigned int overlapdial:1;
unsigned int permcallwaiting:1;
unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
@@ -6607,7 +6907,7 @@
unsigned int priexclusive:1;
unsigned int pulse:1;
unsigned int pulsedial:1; /*!< whether a pulse dial phone is detected */
-@@ -612,6 +666,7 @@
+@@ -763,6 +820,7 @@
#endif
char cid_num[AST_MAX_EXTENSION];
int cid_ton; /*!< Type Of Number (TON) */
@@ -6615,7 +6915,7 @@
char cid_name[AST_MAX_EXTENSION];
char lastcid_num[AST_MAX_EXTENSION];
char lastcid_name[AST_MAX_EXTENSION];
-@@ -672,10 +727,15 @@
+@@ -823,10 +881,15 @@
int polarityonanswerdelay;
struct timeval polaritydelaytv;
int sendcalleridafter;
@@ -6631,7 +6931,7 @@
q931_call *call;
int prioffset;
int logicalspan;
-@@ -691,7 +751,7 @@
+@@ -842,7 +905,7 @@
static struct ast_channel *zt_request(const char *type, int format, void *data, int *cause);
static int zt_digit(struct ast_channel *ast, char digit);
@@ -6640,7 +6940,7 @@
static int zt_call(struct ast_channel *ast, char *rdest, int timeout);
static int zt_hangup(struct ast_channel *ast);
static int zt_answer(struct ast_channel *ast);
-@@ -701,11 +761,14 @@
+@@ -852,11 +915,14 @@
static int zt_indicate(struct ast_channel *chan, int condition);
static int zt_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
static int zt_setoption(struct ast_channel *chan, int option, void *data, int datalen);
@@ -6656,7 +6956,7 @@
.requester = zt_request,
.send_digit = zt_digit,
.send_text = zt_sendtext,
-@@ -719,6 +782,7 @@
+@@ -870,6 +936,7 @@
.indicate = zt_indicate,
.fixup = zt_fixup,
.setoption = zt_setoption,
@@ -6664,7 +6964,7 @@
};
#ifdef ZAPATA_PRI
-@@ -730,6 +794,13 @@
+@@ -881,6 +948,13 @@
struct zt_pvt *round_robin[32];
#ifdef ZAPATA_PRI
@@ -6678,7 +6978,7 @@
static inline int pri_grab(struct zt_pvt *pvt, struct zt_pri *pri)
{
int res;
-@@ -777,6 +848,112 @@
+@@ -928,6 +1002,112 @@
#define CANBUSYDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __ZT_SIG_FXO) */)
#define CANPROGRESSDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __ZT_SIG_FXO) */)
@@ -6791,7 +7091,7 @@
static int zt_get_index(struct ast_channel *ast, struct zt_pvt *p, int nullok)
{
int res;
-@@ -1179,6 +1356,8 @@
+@@ -1330,6 +1510,8 @@
return "GR-303 Signalling with FXOKS";
case SIG_GR303FXSKS:
return "GR-303 Signalling with FXSKS";
@@ -6800,7 +7100,7 @@
case 0:
return "Pseudo Signalling";
default:
-@@ -1379,12 +1558,16 @@
+@@ -1530,12 +1712,16 @@
int res;
if (!p)
return;
@@ -6818,7 +7118,7 @@
return;
}
if (p->echocancel) {
-@@ -1410,7 +1593,7 @@
+@@ -1561,7 +1747,7 @@
{
int x;
int res;
@@ -6827,7 +7127,7 @@
x = p->echotraining;
res = ioctl(p->subs[SUB_REAL].zfd, ZT_ECHOTRAIN, &x);
if (res)
-@@ -1590,7 +1773,7 @@
+@@ -1741,7 +1927,7 @@
{
int x, y, res;
x = muted;
@@ -6836,7 +7136,7 @@
y = 1;
res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &y);
if (res)
-@@ -1772,7 +1955,12 @@
+@@ -1923,7 +2109,12 @@
ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
p->outgoing = 1;
@@ -6850,7 +7150,7 @@
switch(p->sig) {
case SIG_FXOLS:
-@@ -1996,6 +2184,26 @@
+@@ -2147,6 +2338,26 @@
case SIG_PRI:
/* We'll get it in a moment -- but use dialdest to store pre-setup_ack digits */
p->dialdest[0] = '\0';
@@ -6877,7 +7177,7 @@
break;
default:
ast_log(LOG_DEBUG, "not yet implemented\n");
-@@ -2014,6 +2222,12 @@
+@@ -2165,6 +2376,12 @@
int ldp_strip;
int exclusive;
@@ -6890,7 +7190,7 @@
c = strchr(dest, '/');
if (c)
c++;
-@@ -2031,6 +2245,7 @@
+@@ -2182,6 +2399,7 @@
ast_mutex_unlock(&p->lock);
return -1;
}
@@ -6898,7 +7198,7 @@
if (p->sig != SIG_FXSKS) {
p->dop.op = ZT_DIAL_OP_REPLACE;
s = strchr(c + p->stripmsd, 'w');
-@@ -2054,6 +2269,8 @@
+@@ -2205,6 +2423,8 @@
pri_rel(p->pri);
ast_mutex_unlock(&p->lock);
return -1;
@@ -6907,7 +7207,7 @@
}
if (!(sr = pri_sr_new())) {
ast_log(LOG_WARNING, "Failed to allocate setup request channel %d\n", p->channel);
-@@ -2083,7 +2300,7 @@
+@@ -2234,7 +2454,7 @@
pri_sr_set_channel(sr, p->bearer ? PVT_TO_CHANNEL(p->bearer) : PVT_TO_CHANNEL(p), exclusive, 1);
pri_sr_set_bearer(sr, p->digital ? PRI_TRANS_CAP_DIGITAL : ast->transfercapability,
(p->digital ? -1 :
@@ -6916,7 +7216,7 @@
if (p->pri->facilityenable)
pri_facility_enable(p->pri->pri);
-@@ -2284,8 +2501,10 @@
+@@ -2435,8 +2655,10 @@
}
if (newslot < 0) {
newslot = 0;
@@ -6928,7 +7228,7 @@
}
if (old && (oldslot != newslot))
ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n",
-@@ -2341,8 +2560,7 @@
+@@ -2492,8 +2714,7 @@
ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
p->channel, index, p->subs[SUB_REAL].zfd, p->subs[SUB_CALLWAIT].zfd, p->subs[SUB_THREEWAY].zfd);
@@ -6938,7 +7238,7 @@
if (index > -1) {
/* Real channel, do some fixup */
p->subs[index].owner = NULL;
-@@ -2439,6 +2657,7 @@
+@@ -2590,6 +2811,7 @@
if (!p->subs[SUB_REAL].owner && !p->subs[SUB_CALLWAIT].owner && !p->subs[SUB_THREEWAY].owner) {
@@ -6946,7 +7246,7 @@
p->owner = NULL;
p->ringt = 0;
p->distinctivering = 0;
-@@ -2475,19 +2694,61 @@
+@@ -2626,19 +2848,61 @@
if (p->call && (!p->bearer || (p->bearer->call == p->call))) {
if (!pri_grab(p, p->pri)) {
if (p->alreadyhungup) {
@@ -7009,7 +7309,7 @@
ast_log(LOG_DEBUG, "Not yet hungup... Calling hangup once with icause, and clearing call\n");
#ifdef SUPPORT_USERUSER
-@@ -2501,7 +2762,28 @@
+@@ -2652,7 +2916,28 @@
if (atoi(cause))
icause = atoi(cause);
}
@@ -7039,7 +7339,7 @@
}
if (res < 0)
ast_log(LOG_WARNING, "pri_disconnect failed\n");
-@@ -2529,7 +2811,13 @@
+@@ -2680,7 +2965,13 @@
}
#endif
@@ -7054,7 +7354,7 @@
res = zt_set_hook(p->subs[SUB_REAL].zfd, ZT_ONHOOK);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to hangup line %s\n", ast->name);
-@@ -2698,10 +2986,14 @@
+@@ -2849,10 +3140,14 @@
p->proceeding = 1;
res = pri_answer(p->pri->pri, p->call, 0, !p->digital);
pri_rel(p->pri);
@@ -7069,7 +7369,7 @@
break;
#endif
#ifdef ZAPATA_R2
-@@ -2711,6 +3003,13 @@
+@@ -2862,6 +3157,13 @@
ast_log(LOG_WARNING, "R2 Answer call failed :( on %s\n", ast->name);
break;
#endif
@@ -7083,7 +7383,7 @@
case 0:
ast_mutex_unlock(&p->lock);
return 0;
-@@ -3277,6 +3576,15 @@
+@@ -3428,6 +3730,15 @@
{
struct zt_pvt *p = newchan->tech_pvt;
int x;
@@ -7099,7 +7399,7 @@
ast_mutex_lock(&p->lock);
ast_log(LOG_DEBUG, "New owner for channel %d is %s\n", p->channel, newchan->name);
if (p->owner == oldchan) {
-@@ -3637,7 +3945,7 @@
+@@ -3785,7 +4096,7 @@
if (p->call) {
if (p->pri && p->pri->pri) {
if (!pri_grab(p, p->pri)) {
@@ -7108,7 +7408,7 @@
pri_destroycall(p->pri->pri, p->call);
p->call = NULL;
pri_rel(p->pri);
-@@ -4600,7 +4908,7 @@
+@@ -4751,7 +5062,7 @@
p->subs[index].f.data = NULL;
p->subs[index].f.datalen= 0;
}
@@ -7117,7 +7417,7 @@
/* Perform busy detection. etc on the zap line */
f = ast_dsp_process(ast, p->dsp, &p->subs[index].f);
if (f) {
-@@ -4612,8 +4920,9 @@
+@@ -4763,8 +5074,9 @@
}
} else if (f->frametype == AST_FRAME_DTMF) {
#ifdef ZAPATA_PRI
@@ -7129,7 +7429,7 @@
f->frametype = AST_FRAME_NULL;
f->subclass = 0;
}
-@@ -4661,8 +4970,10 @@
+@@ -4812,8 +5124,10 @@
pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast->exten);
if (ast_async_goto(ast, target_context, "fax", 1))
ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast->name, target_context);
@@ -7142,7 +7442,7 @@
} else
ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n");
} else
-@@ -4748,7 +5059,9 @@
+@@ -4899,7 +5213,9 @@
#endif
/* Write a frame of (presumably voice) data */
if (frame->frametype != AST_FRAME_VOICE) {
@@ -7153,7 +7453,7 @@
ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
return 0;
}
-@@ -4819,7 +5132,7 @@
+@@ -4970,7 +5286,7 @@
switch(condition) {
case AST_CONTROL_BUSY:
#ifdef ZAPATA_PRI
@@ -7162,7 +7462,7 @@
chan->hangupcause = AST_CAUSE_USER_BUSY;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -4900,7 +5213,7 @@
+@@ -5051,7 +5367,7 @@
case AST_CONTROL_CONGESTION:
chan->hangupcause = AST_CAUSE_CONGESTION;
#ifdef ZAPATA_PRI
@@ -7171,7 +7471,7 @@
chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
chan->_softhangup |= AST_SOFTHANGUP_DEV;
res = 0;
-@@ -5085,8 +5398,12 @@
+@@ -5236,8 +5552,12 @@
if (state == AST_STATE_RING)
tmp->rings = 1;
tmp->tech_pvt = i;
@@ -7186,7 +7486,7 @@
tmp->callgroup = i->callgroup;
tmp->pickupgroup = i->pickupgroup;
}
-@@ -5228,6 +5545,7 @@
+@@ -5379,6 +5699,7 @@
int len = 0;
int res;
int index;
@@ -7194,7 +7494,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);
-@@ -5246,10 +5564,17 @@
+@@ -5397,10 +5718,17 @@
len = strlen(exten);
res = 0;
while((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -7215,7 +7515,7 @@
if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
timeout = matchdigittimeout;
else
-@@ -6346,18 +6671,44 @@
+@@ -6497,18 +6825,44 @@
break;
case ZT_EVENT_NOALARM:
i->inalarm = 0;
@@ -7260,7 +7560,7 @@
/* fall thru intentionally */
case ZT_EVENT_ONHOOK:
if (i->radio) break;
-@@ -6397,8 +6748,10 @@
+@@ -6548,8 +6902,10 @@
zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
break;
case SIG_PRI:
@@ -7273,7 +7573,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);
-@@ -6721,6 +7074,8 @@
+@@ -6875,6 +7231,8 @@
} else {
if (si->totalchans == 31) { /* if it's an E1 */
pris[*span].dchannels[0] = 16 + offset;
@@ -7282,7 +7582,7 @@
} else {
pris[*span].dchannels[0] = 24 + offset;
}
-@@ -6808,6 +7163,10 @@
+@@ -6962,6 +7320,10 @@
#endif
@@ -7290,22 +7590,22 @@
+static void *gsm_dchannel(void *vgsm);
+#endif
+
- static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_pri *pri, int reloading)
+ static struct zt_pvt *mkintf(int channel, struct zt_chan_conf chan_conf, struct zt_pri *pri, int reloading)
{
/* Make a zt_pvt structure for this interface (or CRV if "pri" is specified) */
-@@ -6966,6 +7325,11 @@
+@@ -7120,6 +7482,11 @@
destroy_zt_pvt(&tmp);
return NULL;
}
-+ if ((pris[span].localdialplan) && (pris[span].localdialplan != localdialplan)) {
-+ ast_log(LOG_ERROR, "Span %d is already a %s local dialing plan\n", span + 1, dialplan2str(pris[span].localdialplan));
-+ destroy_zt_pvt(&tmp);
-+ return NULL;
-+ }
- 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);
++ if ((pris[span].localdialplan) && (pris[span].localdialplan != localdialplan)) {
++ ast_log(LOG_ERROR, "Span %d is already a %s local dialing plan\n", span + 1, dialplan2str(pris[span].localdialplan));
++ destroy_zt_pvt(&tmp);
++ return NULL;
++ }
+ if (!ast_strlen_zero(pris[span].idledial) && strcmp(pris[span].idledial, chan_conf.pri.idledial)) {
+ ast_log(LOG_ERROR, "Span %d already has idledial '%s'.\n", span + 1, chan_conf.pri.idledial);
destroy_zt_pvt(&tmp);
-@@ -6993,6 +7357,17 @@
+@@ -7147,6 +7514,17 @@
return NULL;
}
pris[span].nodetype = pritype;
@@ -7323,31 +7623,31 @@
pris[span].switchtype = myswitchtype;
pris[span].nsf = nsf;
pris[span].dialplan = dialplan;
-@@ -7001,9 +7376,14 @@
- pris[span].minunused = minunused;
- pris[span].minidle = minidle;
- pris[span].overlapdial = overlapdial;
-+ pris[span].usercid = usercid;
-+ pris[span].suspended_calls = NULL;
-+ pris[span].holded_calls = NULL;
- pris[span].facilityenable = facilityenable;
- ast_copy_string(pris[span].idledial, idledial, sizeof(pris[span].idledial));
- ast_copy_string(pris[span].idleext, idleext, sizeof(pris[span].idleext));
-+ ast_copy_string(pris[span].nocid, nocid, sizeof(pris[span].nocid) - 1);
-+ ast_copy_string(pris[span].withheldcid, withheldcid, sizeof(pris[span].withheldcid) - 1);
- 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));
-@@ -7024,6 +7404,37 @@
+@@ -7155,9 +7533,14 @@
+ pris[span].minunused = chan_conf.pri.minunused;
+ pris[span].minidle = chan_conf.pri.minidle;
+ pris[span].overlapdial = chan_conf.pri.overlapdial;
++ pris[span].usercid = chan_conf.pri.usercid;
++ pris[span].suspended_calls = NULL;
++ pris[span].holded_calls = NULL;
+ pris[span].facilityenable = chan_conf.pri.facilityenable;
+ ast_copy_string(pris[span].idledial, chan_conf.pri.idledial, sizeof(pris[span].idledial));
+ ast_copy_string(pris[span].idleext, chan_conf.pri.idleext, sizeof(pris[span].idleext));
++ ast_copy_string(pris[span].nocid, chan_conf.pri.nocid, sizeof(pris[span].nocid) - 1);
++ ast_copy_string(pris[span].withheldcid, chan_conf.pri.withheldcid, sizeof(pris[span].withheldcid) - 1);
+ ast_copy_string(pris[span].internationalprefix, chan_conf.pri.internationalprefix, sizeof(pris[span].internationalprefix));
+ ast_copy_string(pris[span].nationalprefix, chan_conf.pri.nationalprefix, sizeof(pris[span].nationalprefix));
+ ast_copy_string(pris[span].localprefix, chan_conf.pri.localprefix, sizeof(pris[span].localprefix));
+@@ -7178,6 +7561,37 @@
tmp->prioffset = 0;
}
#endif
+#ifdef ZAPATA_GSM
-+ if (signalling == SIG_GSM) {
++ if (chan_conf.signalling == SIG_GSM) {
+ struct zt_bufferinfo bi;
+ ast_mutex_init(&tmp->gsm.lock);
-+ strncpy(tmp->gsm.pin, gsm_modem_pin, sizeof(tmp->gsm.pin) - 1);
-+ strncpy(tmp->gsm.exten, gsm_modem_exten, sizeof(tmp->gsm.exten) - 1);
++ strncpy(tmp->gsm.pin, chan_conf.gsm.pin, sizeof(tmp->gsm.pin) - 1);
++ strncpy(tmp->gsm.exten, chan_conf.gsm.exten, sizeof(tmp->gsm.exten) - 1);
+ tmp->gsm.available = 0;
+ snprintf(fn, sizeof(fn), "%d", channel + 1);
+ /* Open non-blocking */
@@ -7374,17 +7674,17 @@
+ }
+#endif
#ifdef ZAPATA_R2
- if (signalling == SIG_R2) {
+ if (chan_conf.signalling == SIG_R2) {
if (r2prot < 0) {
-@@ -7157,6 +7568,7 @@
- tmp->restrictcid = restrictcid;
- tmp->use_callingpres = use_callingpres;
- tmp->priindication_oob = priindication_oob;
-+ tmp->pritransfer = pritransfer;
- tmp->priexclusive = cur_priexclusive;
+@@ -7311,6 +7725,7 @@
+ tmp->restrictcid = chan_conf.restrictcid;
+ tmp->use_callingpres = chan_conf.use_callingpres;
+ tmp->priindication_oob = chan_conf.priindication_oob;
++ tmp->pritransfer = chan_conf.pritransfer;
+ tmp->priexclusive = chan_conf.priexclusive;
if (tmp->usedistinctiveringdetection) {
if (!tmp->use_callerid) {
-@@ -7309,6 +7721,12 @@
+@@ -7463,6 +7878,12 @@
return 1;
}
#endif
@@ -7397,7 +7697,7 @@
#ifdef ZAPATA_R2
/* Trust R2 as well */
if (p->r2) {
-@@ -7430,7 +7848,7 @@
+@@ -7584,7 +8005,7 @@
break;
if (!backwards && (x >= pri->numchans))
break;
@@ -7406,7 +7706,7 @@
ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n",
pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
return x;
-@@ -7477,7 +7895,7 @@
+@@ -7631,7 +8052,7 @@
end = ifend;
/* We do signed linear */
oldformat = format;
@@ -7415,7 +7715,7 @@
if (!format) {
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
return NULL;
-@@ -7637,6 +8055,11 @@
+@@ -7791,6 +8212,11 @@
p->digital = 1;
if (tmp)
tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
@@ -7427,7 +7727,7 @@
} else {
ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
}
-@@ -7670,12 +8093,189 @@
+@@ -7824,12 +8250,189 @@
*cause = AST_CAUSE_BUSY;
} else if (groupmatched) {
*cause = AST_CAUSE_CONGESTION;
@@ -7617,7 +7917,7 @@
#ifdef ZAPATA_PRI
static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
-@@ -7690,6 +8290,57 @@
+@@ -7844,6 +8447,57 @@
return NULL;
}
@@ -7675,7 +7975,7 @@
static int pri_find_principle(struct zt_pri *pri, int channel)
{
-@@ -7722,7 +8373,9 @@
+@@ -7876,7 +8530,9 @@
static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
{
int x;
@@ -7685,7 +7985,7 @@
if (!c) {
if (principle < 0)
return -1;
-@@ -7736,6 +8389,7 @@
+@@ -7890,6 +8546,7 @@
/* First, check for other bearers */
for (x=0;x<pri->numchans;x++) {
if (!pri->pvts[x]) continue;
@@ -7693,7 +7993,7 @@
if (pri->pvts[x]->call == c) {
/* Found our call */
if (principle != x) {
-@@ -7749,19 +8403,56 @@
+@@ -7903,19 +8560,56 @@
}
/* Fix it all up now */
pri->pvts[principle]->owner = pri->pvts[x]->owner;
@@ -7751,7 +8051,7 @@
}
return principle;
}
-@@ -7790,7 +8481,9 @@
+@@ -7944,7 +8638,9 @@
}
crv = crv->next;
}
@@ -7762,7 +8062,7 @@
return -1;
}
-@@ -7849,86 +8542,33 @@
+@@ -8003,86 +8699,33 @@
#ifndef PRI_RESTART
#error "Upgrade your libpri"
#endif
@@ -7772,19 +8072,13 @@
- int x, y;
- int dchan = -1, span = -1;
- int dchancount = 0;
-+ ast_verbose("%d %s", span, s);
-+}
-
+-
- if (pri) {
- for (x = 0; x < NUM_SPANS; x++) {
- for (y = 0; y < NUM_DCHANS; y++) {
- if (pris[x].dchans[y])
- dchancount++;
-+static void zt_pri_error(char *s, int span)
-+{
-+ ast_log(LOG_WARNING, "%d %s", span, s);
-+}
-
+-
- if (pris[x].dchans[y] == pri)
- dchan = y;
- }
@@ -7810,14 +8104,11 @@
- write(pridebugfd, s, strlen(s));
-
- ast_mutex_unlock(&pridebugfdlock);
-+#ifdef ZAPATA_GSM
-+static void zt_gsm_message(char *s, int channel)
-+{
-+ ast_verbose("GSM %d: %s", channel, s);
++ ast_verbose("%d %s", span, s);
}
-static void zt_pri_error(struct pri *pri, char *s)
-+static void zt_gsm_error(char *s, int channel)
++static void zt_pri_error(char *s, int span)
{
- int x, y;
- int dchan = -1, span = -1;
@@ -7849,11 +8140,20 @@
- 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
++static void zt_gsm_message(char *s, int channel)
++{
++ ast_verbose("GSM %d: %s", channel, s);
++}
+
- ast_mutex_unlock(&pridebugfdlock);
++static void zt_gsm_error(char *s, int channel)
++{
+ ast_log(LOG_WARNING, "GSM %d: %s", channel, s);
}
+#endif
@@ -7866,7 +8166,7 @@
do {
pri->resetpos++;
} while((pri->resetpos < pri->numchans) &&
-@@ -8011,6 +8651,32 @@
+@@ -8165,6 +8808,32 @@
}
}
@@ -7899,7 +8199,7 @@
static void *pri_dchannel(void *vpri)
{
struct zt_pri *pri = vpri;
-@@ -8191,15 +8857,44 @@
+@@ -8342,15 +9011,44 @@
/* Check for an event */
x = 0;
res = ioctl(pri->fds[which], ZT_GETEVENT, &x);
@@ -7947,7 +8247,7 @@
}
if (option_debug)
-@@ -8211,8 +8906,7 @@
+@@ -8362,8 +9060,7 @@
break;
}
} else if (errno != EINTR)
@@ -7957,7 +8257,7 @@
if (e) {
if (pri->debug)
pri_dump_event(pri->dchans[which], e);
-@@ -8220,32 +8914,102 @@
+@@ -8371,32 +9068,102 @@
pri->dchanavail[which] |= DCHAN_UP;
switch(e->e) {
case PRI_EVENT_DCHAN_UP:
@@ -8084,7 +8384,7 @@
pri->resetting = 0;
/* Hangup active channels and put them in alarm mode */
for (i=0; i<pri->numchans; i++) {
-@@ -8253,19 +9017,29 @@
+@@ -8404,19 +9171,29 @@
if (p) {
if (p->call) {
if (p->pri && p->pri->pri) {
@@ -8121,7 +8421,7 @@
}
break;
case PRI_EVENT_RESTART:
-@@ -8300,8 +9074,8 @@
+@@ -8451,8 +9228,8 @@
pri_destroycall(pri->pri, pri->pvts[x]->call);
pri->pvts[x]->call = NULL;
}
@@ -8132,7 +8432,7 @@
else if (pri->pvts[x]->owner)
pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8335,7 +9109,6 @@
+@@ -8486,7 +9263,6 @@
}
}
break;
@@ -8140,7 +8440,7 @@
case PRI_EVENT_INFO_RECEIVED:
chanpos = pri_find_principle(pri, e->ring.channel);
if (chanpos < 0) {
-@@ -8344,9 +9117,11 @@
+@@ -8495,9 +9271,11 @@
} else {
chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
if (chanpos > -1) {
@@ -8153,7 +8453,7 @@
/* how to do that */
int digitlen = strlen(e->ring.callednum);
char digit;
-@@ -8358,6 +9133,14 @@
+@@ -8509,6 +9287,14 @@
zap_queue_frame(pri->pvts[chanpos], &f, pri);
}
}
@@ -8168,7 +8468,7 @@
}
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
-@@ -8365,39 +9148,58 @@
+@@ -8516,39 +9302,58 @@
break;
case PRI_EVENT_RING:
crv = NULL;
@@ -8248,7 +8548,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));
-@@ -8411,13 +9213,14 @@
+@@ -8562,13 +9367,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);
@@ -8264,7 +8564,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) {
-@@ -8442,29 +9245,78 @@
+@@ -8593,29 +9399,78 @@
}
apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
e->ring.redirectingnum, e->ring.callingplanrdnis);
@@ -8325,7 +8625,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 */
@@ -8348,7 +8647,7 @@
+ }
+ }
+ }
-+ }
+ }
+ /* Part 3: create channel, setup audio... */
+ /* Set DNID on all incoming calls -- even immediate */
+ if (!ast_strlen_zero(e->ring.callednum))
@@ -8356,7 +8655,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)) {
-@@ -8483,19 +9335,36 @@
+@@ -8634,19 +9489,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);
@@ -8397,7 +8696,7 @@
/* Get the use_callingpres state */
pri->pvts[chanpos]->callingpres = e->ring.callingpres;
-@@ -8507,14 +9376,31 @@
+@@ -8658,14 +9530,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);
@@ -8429,8 +8728,8 @@
if(e->ring.ani2 >= 0) {
snprintf(ani2str, 5, "%.2d", e->ring.ani2);
pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8534,8 +9420,8 @@
- ast_mutex_lock(&pri->lock);
+@@ -8687,8 +9576,8 @@
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Accepting overlap call from '%s' to '%s' on channel %d/%d, span %d\n",
@@ -8440,7 +8739,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",
-@@ -8543,14 +9429,18 @@
+@@ -8696,15 +9585,19 @@
if (c)
ast_hangup(c);
else {
@@ -8449,18 +8748,19 @@
pri->pvts[chanpos]->call = NULL;
}
}
+ pthread_attr_destroy(&attr);
} else {
-+ /* overlapdial = no */
++ /* overlapdial = no */
ast_mutex_unlock(&pri->lock);
/* Release PRI lock while we create the channel */
c = zt_new(pri->pvts[chanpos], AST_STATE_RING, 1, SUB_REAL, law, e->ring.ctype);
+ if (c && (e->ring.lowlayercompat[0] > 0)) {
-+ memcpy(c->lowlayercompat, e->ring.lowlayercompat, sizeof(c->lowlayercompat));
++ memcpy(c->lowlayercompat, e->ring.lowlayercompat, sizeof(c->lowlayercompat));
+ }
ast_mutex_lock(&pri->lock);
if (c) {
char calledtonstr[10];
-@@ -8571,23 +9461,40 @@
+@@ -8725,23 +9618,40 @@
snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
if (option_verbose > 2)
@@ -8505,7 +8805,7 @@
pri->pvts[chanpos]->call = NULL;
pri->pvts[chanpos]->exten[0] = '\0';
}
-@@ -8595,7 +9502,7 @@
+@@ -8749,7 +9659,7 @@
ast_mutex_unlock(&crv->lock);
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else
@@ -8514,7 +8814,7 @@
break;
case PRI_EVENT_RINGING:
chanpos = pri_find_principle(pri, e->ringing.channel);
-@@ -8613,7 +9520,7 @@
+@@ -8767,7 +9677,7 @@
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
@@ -8523,7 +8823,7 @@
pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
pri->pvts[chanpos]->alerting = 1;
} else
-@@ -8642,9 +9549,16 @@
+@@ -8796,9 +9706,16 @@
}
break;
case PRI_EVENT_PROGRESS:
@@ -8541,7 +8841,7 @@
#ifdef PRI_PROGRESS_MASK
if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
#else
-@@ -8691,6 +9605,12 @@
+@@ -8845,6 +9762,12 @@
case PRI_EVENT_PROCEEDING:
chanpos = pri_find_principle(pri, e->proceeding.channel);
if (chanpos > -1) {
@@ -8554,7 +8854,7 @@
if (!pri->pvts[chanpos]->proceeding) {
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
-@@ -8741,6 +9661,295 @@
+@@ -8895,6 +9818,295 @@
}
}
break;
@@ -8850,7 +9150,7 @@
case PRI_EVENT_ANSWER:
chanpos = pri_find_principle(pri, e->answer.channel);
if (chanpos < 0) {
-@@ -8756,6 +9965,7 @@
+@@ -8910,6 +10122,7 @@
chanpos = -1;
} else {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -8858,7 +9158,7 @@
/* Now we can do call progress detection */
/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -8785,11 +9995,16 @@
+@@ -8939,11 +10152,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) {
@@ -8876,7 +9176,7 @@
}
#ifdef SUPPORT_USERUSER
-@@ -8838,23 +10053,32 @@
+@@ -8992,23 +10210,32 @@
}
}
if (option_verbose > 2)
@@ -8916,7 +9216,7 @@
#ifdef SUPPORT_USERUSER
if (!ast_strlen_zero(e->hangup.useruserinfo)) {
-@@ -8864,8 +10088,20 @@
+@@ -9018,8 +10245,20 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
@@ -8939,7 +9239,7 @@
}
}
break;
-@@ -8875,17 +10111,25 @@
+@@ -9029,17 +10268,25 @@
case PRI_EVENT_HANGUP_REQ:
chanpos = pri_find_principle(pri, e->hangup.channel);
if (chanpos < 0) {
@@ -8968,7 +9268,7 @@
pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
switch(e->hangup.cause) {
case PRI_CAUSE_USER_BUSY:
-@@ -8904,20 +10148,87 @@
+@@ -9058,20 +10305,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);
@@ -9066,7 +9366,7 @@
}
#ifdef SUPPORT_USERUSER
-@@ -8928,9 +10239,39 @@
+@@ -9082,9 +10396,39 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
} else {
@@ -9107,7 +9407,7 @@
break;
case PRI_EVENT_HANGUP_ACK:
chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -8944,6 +10285,7 @@
+@@ -9098,6 +10442,7 @@
if (chanpos > -1) {
ast_mutex_lock(&pri->pvts[chanpos]->lock);
pri->pvts[chanpos]->call = NULL;
@@ -9115,7 +9415,7 @@
pri->pvts[chanpos]->resetting = 0;
if (pri->pvts[chanpos]->owner) {
if (option_verbose > 2)
-@@ -8957,7 +10299,9 @@
+@@ -9111,7 +10456,9 @@
#endif
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -9125,7 +9425,7 @@
}
break;
case PRI_EVENT_CONFIG_ERR:
-@@ -9049,10 +10393,22 @@
+@@ -9203,10 +10550,22 @@
ast_mutex_lock(&pri->pvts[chanpos]->lock);
switch(e->notify.info) {
case PRI_NOTIFY_REMOTE_HOLD:
@@ -9148,7 +9448,7 @@
f.subclass = AST_CONTROL_UNHOLD;
zap_queue_frame(pri->pvts[chanpos], &f, pri);
break;
-@@ -9060,6 +10416,77 @@
+@@ -9214,6 +10573,77 @@
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
}
break;
@@ -9226,7 +9526,7 @@
default:
ast_log(LOG_DEBUG, "Event: %d\n", e->e);
}
-@@ -9121,7 +10548,7 @@
+@@ -9275,7 +10705,7 @@
pri->fds[i] = -1;
return -1;
}
@@ -9235,7 +9535,7 @@
/* Force overlap dial if we're doing GR-303! */
if (pri->switchtype == PRI_SWITCH_GR303_TMC)
pri->overlapdial = 1;
-@@ -9190,39 +10617,77 @@
+@@ -9344,39 +10774,77 @@
static int handle_pri_set_debug_file(int fd, int argc, char **argv)
{
@@ -9335,7 +9635,7 @@
}
return RESULT_SUCCESS;
-@@ -9254,6 +10719,7 @@
+@@ -9408,6 +10876,7 @@
@@ -9343,7 +9643,7 @@
static int handle_pri_no_debug(int fd, int argc, char *argv[])
{
int span;
-@@ -9360,36 +10826,6 @@
+@@ -9514,36 +10983,6 @@
return RESULT_SUCCESS;
}
@@ -9380,7 +9680,7 @@
static char pri_debug_help[] =
"Usage: pri debug span <span>\n"
" Enables debugging on a given PRI span\n";
-@@ -9406,6 +10842,18 @@
+@@ -9560,6 +10999,18 @@
"Usage: pri show span <span>\n"
" Displays PRI Information\n";
@@ -9399,7 +9699,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 },
-@@ -9413,19 +10861,301 @@
+@@ -9567,19 +11018,301 @@
"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 },
@@ -9704,7 +10004,7 @@
#ifdef ZAPATA_R2
static int handle_r2_no_debug(int fd, int argc, char *argv[])
{
-@@ -10037,6 +11767,14 @@
+@@ -10191,6 +11924,14 @@
pthread_cancel(pris[i].master);
}
ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(zap_pri_cli[0]));
@@ -9719,7 +10019,7 @@
#endif
#ifdef ZAPATA_R2
ast_cli_unregister_multiple(zap_r2_cli, sizeof(zap_r2_cli) / sizeof(zap_r2_cli[0]));
-@@ -10048,6 +11786,7 @@
+@@ -10202,6 +11943,7 @@
ast_manager_unregister( "ZapDNDoff" );
ast_manager_unregister( "ZapDNDon" );
ast_manager_unregister("ZapShowChannels");
@@ -9727,7 +10027,7 @@
ast_channel_unregister(&zap_tech);
if (!ast_mutex_lock(&iflock)) {
/* Hangup all interfaces if they have an owner */
-@@ -10406,8 +12145,8 @@
+@@ -10560,8 +12302,8 @@
}
} else if (!strcasecmp(v->name, "echotraining")) {
if (sscanf(v->value, "%d", &y) == 1) {
@@ -9736,89 +10036,92 @@
+ if ((y < 10) || (y > 1000)) {
+ ast_log(LOG_WARNING, "Echo training time must be within the range of 10 to 1000 ms at line %d\n", v->lineno);
} else {
- echotraining = y;
+ chan_conf.echotraining = y;
}
-@@ -10593,12 +12332,33 @@
- cur_signalling = SIG_GR303FXSKS;
- cur_radio = 0;
+@@ -10747,12 +12489,33 @@
+ chan_conf.signalling = SIG_GR303FXSKS;
+ chan_conf.radio = 0;
pritype = PRI_CPE;
-+ } else if (!strcasecmp(v->value, "bri_net_ptmp")) {
-+ cur_radio = 0;
-+ cur_signalling = SIG_PRI;
-+ pritype = BRI_NETWORK_PTMP;
-+ } else if (!strcasecmp(v->value, "bri_cpe_ptmp")) {
-+ cur_signalling = SIG_PRI;
-+ cur_radio = 0;
-+ pritype = BRI_CPE_PTMP;
-+ } else if (!strcasecmp(v->value, "bri_net")) {
-+ cur_radio = 0;
-+ cur_signalling = SIG_PRI;
-+ pritype = BRI_NETWORK;
-+ } else if (!strcasecmp(v->value, "bri_cpe")) {
-+ cur_signalling = SIG_PRI;
-+ cur_radio = 0;
-+ pritype = BRI_CPE;
++ } else if (!strcasecmp(v->value, "bri_net_ptmp")) {
++ chan_conf.radio = 0;
++ chan_conf.signalling = SIG_PRI;
++ pritype = BRI_NETWORK_PTMP;
++ } else if (!strcasecmp(v->value, "bri_cpe_ptmp")) {
++ chan_conf.signalling = SIG_PRI;
++ chan_conf.radio = 0;
++ pritype = BRI_CPE_PTMP;
++ } else if (!strcasecmp(v->value, "bri_net")) {
++ chan_conf.radio = 0;
++ chan_conf.signalling = SIG_PRI;
++ pritype = BRI_NETWORK;
++ } else if (!strcasecmp(v->value, "bri_cpe")) {
++ chan_conf.signalling = SIG_PRI;
++ chan_conf.radio = 0;
++ pritype = BRI_CPE;
#endif
#ifdef ZAPATA_R2
} else if (!strcasecmp(v->value, "r2")) {
- cur_signalling = SIG_R2;
- cur_radio = 0;
+ chan_conf.signalling = SIG_R2;
+ chan_conf.radio = 0;
#endif
+#ifdef ZAPATA_GSM
+ } else if (!strcasecmp(v->value, "gsm")) {
-+ cur_signalling = SIG_GSM;
-+ cur_radio = 0;
++ chan_conf.signalling = SIG_GSM;
++ chan_conf.radio = 0;
+#endif
} else {
ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
}
-@@ -10681,8 +12441,20 @@
- priindication_oob = 1;
+@@ -10835,8 +12598,20 @@
+ chan_conf.priindication_oob = 1;
else if (!strcasecmp(v->value, "inband"))
- priindication_oob = 0;
+ chan_conf.priindication_oob = 0;
+- else
+- ast_log(LOG_WARNING, "'%s' is not a valid pri indication value, should be 'inband' or 'outofband' at line %d\n",
+ else if (!strcasecmp(v->value, "passthrough"))
-+ priindication_oob = 2;
++ chan_conf.priindication_oob = 2;
+ else
+ 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")) {
+ if (!strcasecmp(v->value, "no"))
-+ pritransfer = 0;
++ chan_conf.pritransfer = 0;
+ else if (!strcasecmp(v->value, "ect"))
-+ pritransfer = 1;
++ chan_conf.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",
++ chan_conf.pritransfer = 2;
++ 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);
-@@ -10696,6 +12468,14 @@
- ast_copy_string(privateprefix, v->value, sizeof(privateprefix));
+ chan_conf.priexclusive = ast_true(v->value);
+@@ -10850,6 +12626,16 @@
+ ast_copy_string(chan_conf.pri.privateprefix, v->value, sizeof(chan_conf.pri.privateprefix));
} else if (!strcasecmp(v->name, "unknownprefix")) {
- ast_copy_string(unknownprefix, v->value, sizeof(unknownprefix));
+ ast_copy_string(chan_conf.pri.unknownprefix, v->value, sizeof(chan_conf.pri.unknownprefix));
+ } else if (!strcasecmp(v->name, "nocid")) {
-+ ast_copy_string(nocid, v->value, sizeof(nocid) - 1);
++ ast_copy_string(chan_conf.pri.nocid, v->value, sizeof(chan_conf.pri.nocid) - 1);
+ } else if (!strcasecmp(v->name, "withheldcid")) {
-+ ast_copy_string(withheldcid, v->value, sizeof(withheldcid) - 1);
++ ast_copy_string(chan_conf.pri.withheldcid, v->value, sizeof(chan_conf.pri.withheldcid) - 1);
++#ifdef ZAPATA_GSM
+ } else if (!strcasecmp(v->name, "pin")) {
-+ ast_copy_string(gsm_modem_pin, v->value, sizeof(gsm_modem_pin) - 1);
++ ast_copy_string(chan_conf.gsm.pin, v->value, sizeof(chan_conf.gsm.pin) - 1);
+ } else if (!strcasecmp(v->name, "exten")) {
-+ ast_copy_string(gsm_modem_exten, v->value, sizeof(gsm_modem_exten) - 1);
++ ast_copy_string(chan_conf.gsm.exten, v->value, sizeof(chan_conf.gsm.exten) - 1);
++#endif
} else if (!strcasecmp(v->name, "resetinterval")) {
if (!strcasecmp(v->value, "never"))
- resetinterval = -1;
-@@ -10712,6 +12492,8 @@
- ast_copy_string(idleext, v->value, sizeof(idleext));
+ chan_conf.pri.resetinterval = -1;
+@@ -10866,6 +12650,8 @@
+ ast_copy_string(chan_conf.pri.idleext, v->value, sizeof(chan_conf.pri.idleext));
} else if (!strcasecmp(v->name, "idledial")) {
- ast_copy_string(idledial, v->value, sizeof(idledial));
-+ } else if (!strcasecmp(v->name, "pritrustusercid")) {
-+ usercid = ast_true(v->value);
+ ast_copy_string(chan_conf.pri.idledial, v->value, sizeof(chan_conf.pri.idledial));
++ } else if (!strcasecmp(v->name, "pritrustusercid")) {
++ chan_conf.pri.usercid = ast_true(v->value);
} else if (!strcasecmp(v->name, "overlapdial")) {
- overlapdial = ast_true(v->value);
+ chan_conf.pri.overlapdial = ast_true(v->value);
} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -10897,6 +12679,7 @@
+@@ -11051,6 +12837,7 @@
#ifdef ZAPATA_PRI
if (!reload) {
for (x=0;x<NUM_SPANS;x++) {
@@ -9826,7 +10129,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);
-@@ -10929,6 +12712,10 @@
+@@ -11083,6 +12870,10 @@
pri_set_error(zt_pri_error);
pri_set_message(zt_pri_message);
#endif
@@ -9837,7 +10140,7 @@
res = setup_zap(0);
/* Make sure we can register our Zap channel type */
if(res) {
-@@ -10946,6 +12733,12 @@
+@@ -11100,6 +12891,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]));
@@ -9850,7 +10153,7 @@
memset(round_robin, 0, sizeof(round_robin));
ast_manager_register( "ZapTransfer", 0, action_transfer, "Transfer Zap Channel" );
-@@ -10954,11 +12747,56 @@
+@@ -11108,11 +12905,56 @@
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");
@@ -9909,7 +10212,7 @@
{
#define END_SILENCE_LEN 400
#define HEADER_MS 50
-@@ -10977,6 +12815,7 @@
+@@ -11131,6 +12973,7 @@
float scont = 0.0;
int index;
@@ -9917,79 +10220,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.14.orig/channels/Makefile asterisk-1.2.14/channels/Makefile
---- asterisk-1.2.14.orig/channels/Makefile 2006-08-17 23:57:19.000000000 +0200
-+++ asterisk-1.2.14/channels/Makefile 2007-01-11 15:26:50.931515256 +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 -urN asterisk-1.2.14.orig/codecs/codec_ilbc.c asterisk-1.2.14/codecs/codec_ilbc.c
---- asterisk-1.2.14.orig/codecs/codec_ilbc.c 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/codecs/codec_ilbc.c 2007-01-11 15:26:50.939517146 +0100
+diff -urNad asterisk-1.2.15~dfsg~/codecs/codec_ilbc.c asterisk-1.2.15~dfsg/codecs/codec_ilbc.c
+--- asterisk-1.2.15~dfsg~/codecs/codec_ilbc.c 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/codecs/codec_ilbc.c 2007-02-11 06:04:59.000000000 +0200
@@ -49,7 +49,7 @@
#include "slin_ilbc_ex.h"
#include "ilbc_slin_ex.h"
@@ -9999,9 +10232,9 @@
#define ILBC_MS 30
/* #define ILBC_MS 20 */
-diff -urN asterisk-1.2.14.orig/configs/capi.conf.sample asterisk-1.2.14/configs/capi.conf.sample
---- asterisk-1.2.14.orig/configs/capi.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/configs/capi.conf.sample 2007-01-11 15:26:50.939517146 +0100
+diff -urNad asterisk-1.2.15~dfsg~/configs/capi.conf.sample asterisk-1.2.15~dfsg/configs/capi.conf.sample
+--- asterisk-1.2.15~dfsg~/configs/capi.conf.sample 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/configs/capi.conf.sample 2007-02-11 06:04:59.000000000 +0200
@@ -0,0 +1,44 @@
+;
+; CAPI config
@@ -10047,9 +10280,9 @@
+;msn=55512
+;controller=2
+;devices => 30
-diff -urN asterisk-1.2.14.orig/configs/esel.conf.sample asterisk-1.2.14/configs/esel.conf.sample
---- asterisk-1.2.14.orig/configs/esel.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/configs/esel.conf.sample 2007-01-11 15:26:50.939517146 +0100
+diff -urNad asterisk-1.2.15~dfsg~/configs/esel.conf.sample asterisk-1.2.15~dfsg/configs/esel.conf.sample
+--- asterisk-1.2.15~dfsg~/configs/esel.conf.sample 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/configs/esel.conf.sample 2007-02-11 06:04:59.000000000 +0200
@@ -0,0 +1,12 @@
+;
+; Configuration file for res_esel
@@ -10063,9 +10296,9 @@
+
+; export the extension snom in context phones to DS/100 on asterisk-2
+;export => snom at phones,100
-diff -urN asterisk-1.2.14.orig/configs/modules.conf.sample asterisk-1.2.14/configs/modules.conf.sample
---- asterisk-1.2.14.orig/configs/modules.conf.sample 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/configs/modules.conf.sample 2007-01-11 15:26:50.939517146 +0100
+diff -urNad asterisk-1.2.15~dfsg~/configs/modules.conf.sample asterisk-1.2.15~dfsg/configs/modules.conf.sample
+--- asterisk-1.2.15~dfsg~/configs/modules.conf.sample 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/configs/modules.conf.sample 2007-02-11 06:04:59.000000000 +0200
@@ -46,8 +46,12 @@
;
noload => chan_alsa.so
@@ -10079,9 +10312,9 @@
;
[global]
+chan_capi.so=yes
-diff -urN asterisk-1.2.14.orig/configs/watchdog.conf.sample asterisk-1.2.14/configs/watchdog.conf.sample
---- asterisk-1.2.14.orig/configs/watchdog.conf.sample 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/configs/watchdog.conf.sample 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/configs/watchdog.conf.sample asterisk-1.2.15~dfsg/configs/watchdog.conf.sample
+--- asterisk-1.2.15~dfsg~/configs/watchdog.conf.sample 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/configs/watchdog.conf.sample 2007-02-11 06:04:59.000000000 +0200
@@ -0,0 +1,22 @@
+;
+; Configuration file for res_watchdog
@@ -10105,9 +10338,9 @@
+;device = /dev/watchdog
+;interval = 100
+
-diff -urN asterisk-1.2.14.orig/configs/zapata.conf.sample asterisk-1.2.14/configs/zapata.conf.sample
---- asterisk-1.2.14.orig/configs/zapata.conf.sample 2006-09-18 17:05:56.000000000 +0200
-+++ asterisk-1.2.14/configs/zapata.conf.sample 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/configs/zapata.conf.sample asterisk-1.2.15~dfsg/configs/zapata.conf.sample
+--- asterisk-1.2.15~dfsg~/configs/zapata.conf.sample 2006-09-18 18:05:56.000000000 +0300
++++ asterisk-1.2.15~dfsg/configs/zapata.conf.sample 2007-02-11 06:04:59.000000000 +0200
@@ -123,9 +123,20 @@
;
; outofband: Signal Busy/Congestion out of band with RELEASE/DISCONNECT
@@ -10129,9 +10362,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.14.orig/db.c asterisk-1.2.14/db.c
---- asterisk-1.2.14.orig/db.c 2006-01-09 19:09:53.000000000 +0100
-+++ asterisk-1.2.14/db.c 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/db.c asterisk-1.2.15~dfsg/db.c
+--- asterisk-1.2.15~dfsg~/db.c 2006-01-09 20:09:53.000000000 +0200
++++ asterisk-1.2.15~dfsg/db.c 2007-02-11 06:04:59.000000000 +0200
@@ -516,11 +516,18 @@
struct ast_cli_entry cli_database_deltree =
{ { "database", "deltree", NULL }, database_deltree, "Removes database keytree/values", database_deltree_usage };
@@ -10225,9 +10458,9 @@
+ ast_manager_register("DBdel", EVENT_FLAG_SYSTEM, manager_dbdel, mandescr_dbdel);
return 0;
}
-diff -urN asterisk-1.2.14.orig/devicestate.c asterisk-1.2.14/devicestate.c
---- asterisk-1.2.14.orig/devicestate.c 2006-02-10 21:38:59.000000000 +0100
-+++ asterisk-1.2.14/devicestate.c 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/devicestate.c asterisk-1.2.15~dfsg/devicestate.c
+--- asterisk-1.2.15~dfsg~/devicestate.c 2006-02-10 22:38:59.000000000 +0200
++++ asterisk-1.2.15~dfsg/devicestate.c 2007-02-11 06:04:59.000000000 +0200
@@ -62,6 +62,8 @@
struct state_change {
@@ -10319,9 +10552,9 @@
free(cur);
AST_LIST_LOCK(&state_changes);
} else {
-diff -urN asterisk-1.2.14.orig/doc/README.asterisk.conf asterisk-1.2.14/doc/README.asterisk.conf
---- asterisk-1.2.14.orig/doc/README.asterisk.conf 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/doc/README.asterisk.conf 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/doc/README.asterisk.conf asterisk-1.2.15~dfsg/doc/README.asterisk.conf
+--- asterisk-1.2.15~dfsg~/doc/README.asterisk.conf 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/doc/README.asterisk.conf 2007-02-11 06:04:59.000000000 +0200
@@ -62,6 +62,7 @@
maxcalls = 255 ; The maximum number of concurrent calls you want to allow
execincludes = yes | no ; Allow #exec entries in configuration files
@@ -10330,32 +10563,9 @@
[files]
; Changing the following lines may compromise your security
-diff -urN asterisk-1.2.14.orig/HARDWARE asterisk-1.2.14/HARDWARE
---- asterisk-1.2.14.orig/HARDWARE 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/HARDWARE 2007-01-11 15:26:50.943518092 +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 -urN asterisk-1.2.14.orig/include/asterisk/agi.h asterisk-1.2.14/include/asterisk/agi.h
---- asterisk-1.2.14.orig/include/asterisk/agi.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/agi.h 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/agi.h asterisk-1.2.15~dfsg/include/asterisk/agi.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/agi.h 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/agi.h 2007-02-11 06:04:59.000000000 +0200
@@ -29,7 +29,8 @@
typedef struct agi_state {
@@ -10366,43 +10576,9 @@
int ctrl; /* FD for input control */
} AGI;
-diff -urN asterisk-1.2.14.orig/include/asterisk/chan_capi_app.h asterisk-1.2.14/include/asterisk/chan_capi_app.h
---- asterisk-1.2.14.orig/include/asterisk/chan_capi_app.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/chan_capi_app.h 2007-01-11 15:26:50.943518092 +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 -urN asterisk-1.2.14.orig/include/asterisk/chan_capi.h asterisk-1.2.14/include/asterisk/chan_capi.h
---- asterisk-1.2.14.orig/include/asterisk/chan_capi.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/chan_capi.h 2007-01-11 15:26:50.943518092 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/chan_capi.h asterisk-1.2.15~dfsg/include/asterisk/chan_capi.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/chan_capi.h 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/chan_capi.h 2007-02-11 06:04:59.000000000 +0200
@@ -0,0 +1,276 @@
+/*
+ * (CAPI*)
@@ -10680,9 +10856,43 @@
+#define CAPI_ETSI_NPLAN_INTERNAT 0x10
+
+#endif
-diff -urN asterisk-1.2.14.orig/include/asterisk/channel.h asterisk-1.2.14/include/asterisk/channel.h
---- asterisk-1.2.14.orig/include/asterisk/channel.h 2006-11-07 19:22:01.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/channel.h 2007-01-11 15:26:50.947519037 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/chan_capi_app.h asterisk-1.2.15~dfsg/include/asterisk/chan_capi_app.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/chan_capi_app.h 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/chan_capi_app.h 2007-02-11 06:04:59.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 -urNad asterisk-1.2.15~dfsg~/include/asterisk/channel.h asterisk-1.2.15~dfsg/include/asterisk/channel.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/channel.h 2006-11-07 20:22:01.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/channel.h 2007-02-11 06:04:59.000000000 +0200
@@ -86,6 +86,9 @@
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
@@ -10751,10 +10961,10 @@
*/
-struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname);
+struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, char *uniqueid);
-+
-+struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, struct outgoing_helper *oh, char *uniqueid);
-struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
++struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, struct outgoing_helper *oh, char *uniqueid);
++
+/*! \brief "Requests" a channel for sending a message
+ * \param type type of channel to request
+ * \param data data to pass to the channel requester
@@ -10803,9 +11013,9 @@
/*! Gives the string form of a given cause code */
/*!
-diff -urN asterisk-1.2.14.orig/include/asterisk/devicestate.h asterisk-1.2.14/include/asterisk/devicestate.h
---- asterisk-1.2.14.orig/include/asterisk/devicestate.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/devicestate.h 2007-01-11 15:26:50.947519037 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/devicestate.h asterisk-1.2.15~dfsg/include/asterisk/devicestate.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/devicestate.h 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/devicestate.h 2007-02-11 06:05:00.000000000 +0200
@@ -42,7 +42,7 @@
/*! Device is ringing */
#define AST_DEVICE_RINGING 6
@@ -10824,9 +11034,9 @@
/*! \brief Registers a device state change callback
* \param callback Callback
-diff -urN asterisk-1.2.14.orig/include/asterisk/features.h asterisk-1.2.14/include/asterisk/features.h
---- asterisk-1.2.14.orig/include/asterisk/features.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/features.h 2007-01-11 15:26:50.947519037 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/features.h asterisk-1.2.15~dfsg/include/asterisk/features.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/features.h 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/features.h 2007-02-11 06:05:00.000000000 +0200
@@ -45,6 +45,8 @@
};
@@ -10869,9 +11079,9 @@
+extern struct ast_call_feature *ast_find_builtin_feature(char *name);
+
#endif /* _AST_FEATURES_H */
-diff -urN asterisk-1.2.14.orig/include/asterisk/manager.h asterisk-1.2.14/include/asterisk/manager.h
---- asterisk-1.2.14.orig/include/asterisk/manager.h 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/manager.h 2007-01-11 15:26:50.947519037 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/manager.h asterisk-1.2.15~dfsg/include/asterisk/manager.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/manager.h 2006-02-11 20:15:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/manager.h 2007-02-11 06:05:00.000000000 +0200
@@ -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 */
@@ -10880,9 +11090,9 @@
/* Export manager structures */
#define AST_MAX_MANHEADERS 80
-diff -urN asterisk-1.2.14.orig/include/asterisk/monitor.h asterisk-1.2.14/include/asterisk/monitor.h
---- asterisk-1.2.14.orig/include/asterisk/monitor.h 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/monitor.h 2007-01-11 15:26:50.947519037 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/monitor.h asterisk-1.2.15~dfsg/include/asterisk/monitor.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/monitor.h 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/monitor.h 2007-02-11 06:05:00.000000000 +0200
@@ -35,6 +35,8 @@
char write_filename[FILENAME_MAX];
char filename_base[FILENAME_MAX];
@@ -10901,9 +11111,9 @@
/* Stop monitoring a channel */
int ast_monitor_stop(struct ast_channel *chan, int need_lock);
-diff -urN asterisk-1.2.14.orig/include/asterisk/pbx.h asterisk-1.2.14/include/asterisk/pbx.h
---- asterisk-1.2.14.orig/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
-+++ asterisk-1.2.14/include/asterisk/pbx.h 2007-01-11 15:26:50.947519037 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/pbx.h asterisk-1.2.15~dfsg/include/asterisk/pbx.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/pbx.h 2006-03-29 21:11:18.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/pbx.h 2007-02-11 06:05:00.000000000 +0200
@@ -57,7 +57,7 @@
AST_EXTENSION_BUSY = 1 << 1,
/*! All devices UNAVAILABLE/UNREGISTERED */
@@ -10954,9 +11164,9 @@
#if defined(__cplusplus) || defined(c_plusplus)
}
-diff -urN asterisk-1.2.14.orig/include/asterisk/xlaw.h asterisk-1.2.14/include/asterisk/xlaw.h
---- asterisk-1.2.14.orig/include/asterisk/xlaw.h 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk/xlaw.h 2007-01-11 15:26:50.951519982 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk/xlaw.h asterisk-1.2.15~dfsg/include/asterisk/xlaw.h
+--- asterisk-1.2.15~dfsg~/include/asterisk/xlaw.h 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk/xlaw.h 2007-02-11 06:05:00.000000000 +0200
@@ -0,0 +1,1665 @@
+#ifndef _ASTERISK_XLAW_H
+#define _ASTERISK_XLAW_H
@@ -12623,9 +12833,9 @@
+#endif // CAPI_ULAW
+#endif
+
-diff -urN asterisk-1.2.14.orig/include/asterisk.h asterisk-1.2.14/include/asterisk.h
---- asterisk-1.2.14.orig/include/asterisk.h 2005-11-30 04:37:37.000000000 +0100
-+++ asterisk-1.2.14/include/asterisk.h 2007-01-11 15:26:50.951519982 +0100
+diff -urNad asterisk-1.2.15~dfsg~/include/asterisk.h asterisk-1.2.15~dfsg/include/asterisk.h
+--- asterisk-1.2.15~dfsg~/include/asterisk.h 2007-02-11 06:04:48.000000000 +0200
++++ asterisk-1.2.15~dfsg/include/asterisk.h 2007-02-11 06:05:00.000000000 +0200
@@ -36,6 +36,7 @@
extern char ast_config_AST_PID[AST_CONFIG_MAX_PATH];
extern char ast_config_AST_SOCKET[AST_CONFIG_MAX_PATH];
@@ -12634,37 +12844,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.14.orig/LICENSE asterisk-1.2.14/LICENSE
---- asterisk-1.2.14.orig/LICENSE 2006-10-17 19:22:01.000000000 +0200
-+++ asterisk-1.2.14/LICENSE 2007-01-11 15:26:50.951519982 +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 -urN asterisk-1.2.14.orig/Makefile asterisk-1.2.14/Makefile
---- asterisk-1.2.14.orig/Makefile 2006-12-11 22:55:43.000000000 +0100
-+++ asterisk-1.2.14/Makefile 2007-01-11 15:26:50.951519982 +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 -urN asterisk-1.2.14.orig/manager.c asterisk-1.2.14/manager.c
---- asterisk-1.2.14.orig/manager.c 2006-02-11 19:15:00.000000000 +0100
-+++ asterisk-1.2.14/manager.c 2007-01-11 15:26:50.955520927 +0100
+diff -urNad asterisk-1.2.15~dfsg~/manager.c asterisk-1.2.15~dfsg/manager.c
+--- asterisk-1.2.15~dfsg~/manager.c 2007-02-06 08:58:28.000000000 +0200
++++ asterisk-1.2.15~dfsg/manager.c 2007-02-11 06:05:00.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -12928,8 +13110,8 @@
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&th, &attr, fast_originate, fast)) {
-@@ -1079,19 +1165,28 @@
- }
+@@ -1080,19 +1166,28 @@
+ pthread_attr_destroy(&attr);
}
} else if (!ast_strlen_zero(app)) {
- res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL);
@@ -12962,7 +13144,7 @@
return 0;
}
-@@ -1565,10 +1660,12 @@
+@@ -1566,10 +1661,12 @@
return 0;
}
@@ -12977,7 +13159,7 @@
return 0;
}
-@@ -1653,6 +1750,7 @@
+@@ -1654,6 +1751,7 @@
ast_manager_register2("Events", 0, action_events, "Control Event Flow", mandescr_events);
ast_manager_register2("Logoff", 0, action_logoff, "Logoff Manager", mandescr_logoff);
ast_manager_register2("Hangup", EVENT_FLAG_CALL, action_hangup, "Hangup Channel", mandescr_hangup);
@@ -12985,9 +13167,9 @@
ast_manager_register("Status", EVENT_FLAG_CALL, action_status, "Lists channel status" );
ast_manager_register2("Setvar", EVENT_FLAG_CALL, action_setvar, "Set Channel Variable", mandescr_setvar );
ast_manager_register2("Getvar", EVENT_FLAG_CALL, action_getvar, "Gets a Channel Variable", mandescr_getvar );
-diff -urN asterisk-1.2.14.orig/pbx/pbx_spool.c asterisk-1.2.14/pbx/pbx_spool.c
---- asterisk-1.2.14.orig/pbx/pbx_spool.c 2006-11-27 16:30:37.000000000 +0100
-+++ asterisk-1.2.14/pbx/pbx_spool.c 2007-01-11 15:26:50.955520927 +0100
+diff -urNad asterisk-1.2.15~dfsg~/pbx/pbx_spool.c asterisk-1.2.15~dfsg/pbx/pbx_spool.c
+--- asterisk-1.2.15~dfsg~/pbx/pbx_spool.c 2007-01-31 23:25:11.000000000 +0200
++++ asterisk-1.2.15~dfsg/pbx/pbx_spool.c 2007-02-11 06:05:00.000000000 +0200
@@ -77,6 +77,10 @@
char app[256];
char data[256];
@@ -13059,10 +13241,10 @@
}
free_outgoing(o);
return NULL;
-diff -urN asterisk-1.2.14.orig/pbx.c asterisk-1.2.14/pbx.c
---- asterisk-1.2.14.orig/pbx.c 2006-09-27 21:35:09.000000000 +0200
-+++ asterisk-1.2.14/pbx.c 2007-01-11 15:26:50.959521872 +0100
-@@ -353,7 +353,8 @@
+diff -urNad asterisk-1.2.15~dfsg~/pbx.c asterisk-1.2.15~dfsg/pbx.c
+--- asterisk-1.2.15~dfsg~/pbx.c 2007-02-01 21:13:53.000000000 +0200
++++ asterisk-1.2.15~dfsg/pbx.c 2007-02-11 06:05:00.000000000 +0200
+@@ -354,7 +354,8 @@
{ "Hangup", pbx_builtin_hangup,
"Hang up the calling channel",
@@ -13104,7 +13286,7 @@
free(cbprev);
}
list->callbacks = NULL;
-@@ -3777,7 +3778,7 @@
+@@ -3779,7 +3780,7 @@
while (thiscb) {
prevcb = thiscb;
thiscb = thiscb->next;
@@ -13113,7 +13295,7 @@
free(prevcb);
}
} else {
-@@ -4982,7 +4983,7 @@
+@@ -4984,7 +4985,7 @@
return 0; /* success */
}
@@ -13122,7 +13304,7 @@
{
struct ast_channel *chan;
struct async_stat *as;
-@@ -4992,7 +4993,7 @@
+@@ -4994,7 +4995,7 @@
if (sync) {
LOAD_OH(oh);
@@ -13131,7 +13313,7 @@
if (channel) {
*channel = chan;
if (chan)
-@@ -5094,7 +5095,7 @@
+@@ -5096,7 +5097,7 @@
goto outgoing_exten_cleanup;
}
memset(as, 0, sizeof(struct async_stat));
@@ -13140,7 +13322,7 @@
if (channel) {
*channel = chan;
if (chan)
-@@ -5140,7 +5141,7 @@
+@@ -5144,7 +5145,7 @@
pthread_t t;
};
@@ -13149,7 +13331,7 @@
{
struct app_tmp *tmp = data;
struct ast_app *app;
-@@ -5156,7 +5157,7 @@
+@@ -5160,7 +5161,7 @@
return NULL;
}
@@ -13158,7 +13340,7 @@
{
struct ast_channel *chan;
struct async_stat *as;
-@@ -5176,7 +5177,7 @@
+@@ -5180,7 +5181,7 @@
goto outgoing_app_cleanup;
}
if (sync) {
@@ -13167,7 +13349,7 @@
if (chan) {
if (chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
ast_log(LOG_WARNING, "%s already has a call record??\n", chan->name);
-@@ -5263,7 +5264,8 @@
+@@ -5268,7 +5269,8 @@
goto outgoing_app_cleanup;
}
memset(as, 0, sizeof(struct async_stat));
@@ -13177,7 +13359,7 @@
if (!chan) {
free(as);
res = -1;
-@@ -5552,6 +5554,9 @@
+@@ -5559,6 +5561,9 @@
*/
static int pbx_builtin_hangup(struct ast_channel *chan, void *data)
{
@@ -13187,7 +13369,7 @@
/* Just return non-zero and it will hang up */
if (!chan->hangupcause)
chan->hangupcause = AST_CAUSE_NORMAL_CLEARING;
-@@ -6206,6 +6211,9 @@
+@@ -6213,6 +6218,9 @@
return -1;
}
}
@@ -13197,7 +13379,7 @@
return res = ast_say_number(chan, atoi((char *) tmp), "", chan->language, options);
}
-@@ -6213,8 +6221,12 @@
+@@ -6220,8 +6228,12 @@
{
int res = 0;
@@ -13211,7 +13393,7 @@
return res;
}
-@@ -6222,8 +6234,12 @@
+@@ -6229,8 +6241,12 @@
{
int res = 0;
@@ -13225,7 +13407,7 @@
return res;
}
-@@ -6231,8 +6247,12 @@
+@@ -6238,8 +6254,12 @@
{
int res = 0;
@@ -13239,171 +13421,9 @@
return res;
}
-diff -urN asterisk-1.2.14.orig/README asterisk-1.2.14/README
---- asterisk-1.2.14.orig/README 2006-03-03 09:12:33.000000000 +0100
-+++ asterisk-1.2.14/README 2007-01-11 15:26:50.959521872 +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 -urN asterisk-1.2.14.orig/README.chan_capi asterisk-1.2.14/README.chan_capi
---- asterisk-1.2.14.orig/README.chan_capi 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/README.chan_capi 2007-01-11 15:26:50.959521872 +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 -urN asterisk-1.2.14.orig/res/Makefile asterisk-1.2.14/res/Makefile
---- asterisk-1.2.14.orig/res/Makefile 2005-11-29 19:24:39.000000000 +0100
-+++ asterisk-1.2.14/res/Makefile 2007-01-11 15:26:50.959521872 +0100
+diff -urNad asterisk-1.2.15~dfsg~/res/Makefile asterisk-1.2.15~dfsg/res/Makefile
+--- asterisk-1.2.15~dfsg~/res/Makefile 2005-11-29 20:24:39.000000000 +0200
++++ asterisk-1.2.15~dfsg/res/Makefile 2007-02-11 06:05:00.000000000 +0200
@@ -11,7 +11,7 @@
# the GNU General Public License
#
@@ -13413,9 +13433,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.14.orig/res/res_agi.c asterisk-1.2.14/res/res_agi.c
---- asterisk-1.2.14.orig/res/res_agi.c 2006-12-11 01:33:59.000000000 +0100
-+++ asterisk-1.2.14/res/res_agi.c 2007-01-11 15:43:00.528452246 +0100
+diff -urNad asterisk-1.2.15~dfsg~/res/res_agi.c asterisk-1.2.15~dfsg/res/res_agi.c
+--- asterisk-1.2.15~dfsg~/res/res_agi.c 2006-12-11 02:33:59.000000000 +0200
++++ asterisk-1.2.15~dfsg/res/res_agi.c 2007-02-11 06:05:00.000000000 +0200
@@ -11,6 +11,9 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -13802,9 +13822,9 @@
return ast_register_application(app, agi_exec, synopsis, descrip);
}
-diff -urN asterisk-1.2.14.orig/res/res_esel.c asterisk-1.2.14/res/res_esel.c
---- asterisk-1.2.14.orig/res/res_esel.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/res/res_esel.c 2007-01-11 15:26:50.963522817 +0100
+diff -urNad asterisk-1.2.15~dfsg~/res/res_esel.c asterisk-1.2.15~dfsg/res/res_esel.c
+--- asterisk-1.2.15~dfsg~/res/res_esel.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/res/res_esel.c 2007-02-11 06:05:00.000000000 +0200
@@ -0,0 +1,399 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -14205,9 +14225,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/res/res_features.c asterisk-1.2.14/res/res_features.c
---- asterisk-1.2.14.orig/res/res_features.c 2006-11-30 20:04:11.000000000 +0100
-+++ asterisk-1.2.14/res/res_features.c 2007-01-11 15:26:50.967523762 +0100
+diff -urNad asterisk-1.2.15~dfsg~/res/res_features.c asterisk-1.2.15~dfsg/res/res_features.c
+--- asterisk-1.2.15~dfsg~/res/res_features.c 2007-01-16 19:36:50.000000000 +0200
++++ asterisk-1.2.15~dfsg/res/res_features.c 2007-02-11 06:05:00.000000000 +0200
@@ -11,6 +11,10 @@
* the project provides a web site, mailing lists and IRC
* channels for your use.
@@ -14722,7 +14742,7 @@
);
free(pu);
-@@ -1900,12 +2257,13 @@
+@@ -1902,12 +2259,13 @@
"Timeout: %ld\r\n"
"CallerID: %s\r\n"
"CallerIDName: %s\r\n"
@@ -14737,7 +14757,7 @@
,idText);
cur = cur->next;
-@@ -1921,6 +2279,416 @@
+@@ -1923,6 +2281,416 @@
return RESULT_SUCCESS;
}
@@ -15154,7 +15174,7 @@
int ast_pickup_call(struct ast_channel *chan)
{
-@@ -2076,7 +2844,7 @@
+@@ -2078,7 +2846,7 @@
}
{
@@ -15163,7 +15183,7 @@
int mallocd=0;
if (!feature) {
-@@ -2139,6 +2907,7 @@
+@@ -2141,6 +2909,7 @@
}
int reload(void) {
@@ -15171,7 +15191,7 @@
return load_config();
}
-@@ -2152,14 +2921,22 @@
+@@ -2154,14 +2923,22 @@
if ((res = load_config()))
return res;
ast_cli_register(&showparked);
@@ -15194,7 +15214,7 @@
return res;
}
-@@ -2170,7 +2947,11 @@
+@@ -2172,7 +2949,11 @@
ast_manager_unregister("ParkedCalls");
ast_cli_unregister(&showfeatures);
@@ -15206,9 +15226,9 @@
ast_unregister_application(parkcall);
return ast_unregister_application(parkedcall);
}
-diff -urN asterisk-1.2.14.orig/res/res_monitor.c asterisk-1.2.14/res/res_monitor.c
---- asterisk-1.2.14.orig/res/res_monitor.c 2006-11-01 19:24:17.000000000 +0100
-+++ asterisk-1.2.14/res/res_monitor.c 2007-01-11 15:43:56.093560605 +0100
+diff -urNad asterisk-1.2.15~dfsg~/res/res_monitor.c asterisk-1.2.15~dfsg/res/res_monitor.c
+--- asterisk-1.2.15~dfsg~/res/res_monitor.c 2006-11-01 20:24:17.000000000 +0200
++++ asterisk-1.2.15~dfsg/res/res_monitor.c 2007-02-11 06:05:00.000000000 +0200
@@ -90,7 +90,7 @@
/* Start monitoring a channel */
@@ -15345,9 +15365,9 @@
res = ast_monitor_stop(c, 1);
ast_mutex_unlock(&c->lock);
if (res) {
-diff -urN asterisk-1.2.14.orig/res/res_watchdog.c asterisk-1.2.14/res/res_watchdog.c
---- asterisk-1.2.14.orig/res/res_watchdog.c 1970-01-01 01:00:00.000000000 +0100
-+++ asterisk-1.2.14/res/res_watchdog.c 2007-01-11 15:26:50.967523762 +0100
+diff -urNad asterisk-1.2.15~dfsg~/res/res_watchdog.c asterisk-1.2.15~dfsg/res/res_watchdog.c
+--- asterisk-1.2.15~dfsg~/res/res_watchdog.c 1970-01-01 02:00:00.000000000 +0200
++++ asterisk-1.2.15~dfsg/res/res_watchdog.c 2007-02-11 06:05:00.000000000 +0200
@@ -0,0 +1,149 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
@@ -15498,9 +15518,9 @@
+{
+ return ASTERISK_GPL_KEY;
+}
-diff -urN asterisk-1.2.14.orig/rtp.c asterisk-1.2.14/rtp.c
---- asterisk-1.2.14.orig/rtp.c 2006-11-29 17:47:10.000000000 +0100
-+++ asterisk-1.2.14/rtp.c 2007-01-11 15:26:50.967523762 +0100
+diff -urNad asterisk-1.2.15~dfsg~/rtp.c asterisk-1.2.15~dfsg/rtp.c
+--- asterisk-1.2.15~dfsg~/rtp.c 2007-01-31 19:41:51.000000000 +0200
++++ asterisk-1.2.15~dfsg/rtp.c 2007-02-11 06:05:00.000000000 +0200
@@ -445,6 +445,11 @@
struct rtpPayloadType rtpPT;
@@ -15513,9 +15533,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.14.orig/.version asterisk-1.2.14/.version
---- asterisk-1.2.14.orig/.version 2006-12-14 14:06:45.000000000 +0100
-+++ asterisk-1.2.14/.version 2007-01-11 15:29:51.530176485 +0100
-@@ -1 +1 @@
--1.2.14
-+1.2.14-BRIstuffed-0.3.0-PRE-1x
Modified: asterisk/trunk/debian/patches/ukcid.dpatch
===================================================================
--- asterisk/trunk/debian/patches/ukcid.dpatch 2007-02-11 07:20:01 UTC (rev 3131)
+++ asterisk/trunk/debian/patches/ukcid.dpatch 2007-02-11 14:15:21 UTC (rev 3132)
@@ -4,6 +4,7 @@
## All lines beginning with `## DP:' are a description of the patch.
## DP: Support for UK Caller-ID in X100P cards: asterisk part.
## DP: From: http://www.lusyn.com/asterisk/patches.html
+## DP: Updated for Asterisk 1.2.15: the chan_conf struct.
@DPATCH@
diff -urNad asterisk/channels/chan_zap.c /tmp/dpep.KK0kwq/asterisk/channels/chan_zap.c
@@ -32,7 +33,7 @@
+ * the history buffer */
+ if (p->use_callerid && p->cid_start == CID_START_USEHIST) {
+ ast_log(LOG_DEBUG,"Using history buffer to extract UK caller ID\n");
-+ cs = callerid_new(cid_signalling);
++ cs = callerid_new(p->cid_signalling);
+ if (cs) {
+ unsigned char cidbuf[16384];
+ res=0;
@@ -146,13 +147,13 @@
* and we're set to use a polarity reversal to trigger the start of caller id,
* grab the caller id and wait for ringing to start... */
@@ -10299,6 +10421,8 @@
- cid_start = CID_START_RING;
+ chan_conf.cid_start = CID_START_RING;
else if (!strcasecmp(v->value, "polarity"))
- cid_start = CID_START_POLARITY;
+ chan_conf.cid_start = CID_START_POLARITY;
+ else if (!strcasecmp(v->value, "usehist"))
-+ cid_start = CID_START_USEHIST;
++ chan_conf.cid_start = CID_START_USEHIST;
else if (ast_true(v->value))
- cid_start = CID_START_RING;
+ chan_conf.cid_start = CID_START_RING;
} else if (!strcasecmp(v->name, "threewaycalling")) {
diff -urNad asterisk/include/asterisk/callerid.h /tmp/dpep.KK0kwq/asterisk/include/asterisk/callerid.h
--- asterisk/include/asterisk/callerid.h 2006-01-06 00:41:06.000000000 +0200
More information about the Pkg-voip-commits
mailing list