[svn-commits] murf: branch murf/CDRfix6 r122612 - in /team/murf/CDRfix6: ./ apps/ build_too...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 13 12:30:00 CDT 2008


Author: murf
Date: Fri Jun 13 12:30:00 2008
New Revision: 122612

URL: http://svn.digium.com/view/asterisk?view=rev&rev=122612
Log:
Merged revisions 122091,122128,122131,122174,122228,122232,122234,122240-122241,122243-122244,122262,122312,122315,122371,122399,122433-122434,122461,122493,122523,122526,122557 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r122091 | murf | 2008-06-12 08:28:01 -0600 (Thu, 12 Jun 2008) | 45 lines

Merged revisions 122046 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122046 | murf | 2008-06-12 07:47:34 -0600 (Thu, 12 Jun 2008) | 37 lines

(closes issue #10668)
Reported by: arkadia
Tested by: murf, arkadia

Options added to forkCDR() app and the CDR() func to
remove some roadblocks for CDR applications.

The "show application ForkCDR" output was upgraded
to more fully explain the inner workings of forkCDR.

The A option was added to forkCDR to force the
CDR system to NOT change the disposition on the
original CDR, after the fork. This involves
ast_cdr_answer, _busy, _failed, and so on.

The T option was added to forkCDR to force 
obedience of the cdr LOCKED flag in the
ast_cdr_end, all the disposition changing
funcs (ast_cdr_answer, etc), and in the
ast_cdr_setvar func.

The CHANGES file was updated to explain ALL
the new options added to satisfy this bug report
(and some requests made verbally and via 
email, irc, etc, over the past months/year)

The 's' option was added to the CDR() func,
to force it to skip LOCKED cdr's in the
chain.

Again, the new options should be totally transparent
to existing apps! Current behavior of CDR,
forkCDR, and the rest of the CDR system should
not change one little bit. Until you add the
new options, at least!


........

................
r122128 | murf | 2008-06-12 08:56:26 -0600 (Thu, 12 Jun 2008) | 9 lines

Merged revisions 122127 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122127 | murf | 2008-06-12 08:51:44 -0600 (Thu, 12 Jun 2008) | 1 line

Arkadia tried to warn me, but the code added to ast_cdr_busy, _failed, and _noanswer was redundant. Didn't spot it until I was resolving conflicts in trunk. Ugh. Redundant code removed. It wasn't harmful. Just dumb.
........

................
r122131 | tilghman | 2008-06-12 09:14:37 -0600 (Thu, 12 Jun 2008) | 12 lines

Merged revisions 122130 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122130 | tilghman | 2008-06-12 10:11:30 -0500 (Thu, 12 Jun 2008) | 4 lines

Occasionally, the alertpipe loses its nonblocking status, so detect and correct
that situation before it causes a deadlock.  (Reported and tested by ctooley
via #asterisk-dev)

........

................
r122174 | tilghman | 2008-06-12 09:26:07 -0600 (Thu, 12 Jun 2008) | 16 lines

Merged revisions 122137 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122137 | tilghman | 2008-06-12 10:18:39 -0500 (Thu, 12 Jun 2008) | 8 lines

Flipflop the sections for two options, since the section for 'X' (exit context)
may otherwise absorb keypresses meant for 's' (admin/user menu).
(closes issue #12836)
 Reported by: blitzrage
 Patches: 
       20080611__bug12836.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage

........

................
r122228 | mmichelson | 2008-06-12 10:25:09 -0600 (Thu, 12 Jun 2008) | 12 lines

Merging the work done in the queue-log-atxfer branch. The
net result of this work is that attended transfers made
by queue members will now show up in the queue_log as a 
TRANSFER message instead of COMPLETECALLER as it had been.

As far as the details go, I created a datastore which is
attached to the calling channel just prior to when the caller
is bridged with the queue member. If the calling channel
is masqueraded, then during the "fixup" portion, the TRANSFER
will be logged and the datastore will be removed.


................
r122232 | russell | 2008-06-12 11:14:32 -0600 (Thu, 12 Jun 2008) | 2 lines

Make this build under dev mode

................
r122234 | jpeeler | 2008-06-12 11:27:55 -0600 (Thu, 12 Jun 2008) | 3 lines

Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.


................
r122240 | kpfleming | 2008-06-12 11:30:55 -0600 (Thu, 12 Jun 2008) | 1 line

clarify documentation on how timer intervals should be specified
................
r122241 | russell | 2008-06-12 11:38:27 -0600 (Thu, 12 Jun 2008) | 3 lines

Get default entity ID determination working on Linux again
(closes issue #12839)

................
r122243 | jpeeler | 2008-06-12 11:39:38 -0600 (Thu, 12 Jun 2008) | 2 lines

Make sure we hangup any calls we have and NULL out the ss7call value when we get a reset circuit message.  Fixes crash bug. (from mattf r121857, moving from chan_zap to chan_dahdi)

................
r122244 | jpeeler | 2008-06-12 11:49:37 -0600 (Thu, 12 Jun 2008) | 2 lines

Fix pseudo channel allocation errors on startup when using SS7. (from mattf r121914, moving from chan_zap to chan_dahdi)

................
r122262 | russell | 2008-06-12 12:23:54 -0600 (Thu, 12 Jun 2008) | 11 lines

Merged revisions 122259 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122259 | russell | 2008-06-12 13:22:44 -0500 (Thu, 12 Jun 2008) | 3 lines

Fix some race conditions that cause ast_assert() to report that chan_iax2 tried
to remove an entry that wasn't in the scheduler

........

................
r122312 | mmichelson | 2008-06-12 12:53:17 -0600 (Thu, 12 Jun 2008) | 17 lines

Merged revisions 122311 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122311 | mmichelson | 2008-06-12 13:50:58 -0500 (Thu, 12 Jun 2008) | 9 lines

Properly play a holdtime message if the announce-holdtime option is
set to "once."

(closes issue #12842)
Reported by: ramonpeek
Patches:
      patch001.diff uploaded by ramonpeek (license 266)


........

................
r122315 | jpeeler | 2008-06-12 13:11:23 -0600 (Thu, 12 Jun 2008) | 9 lines

Blocked revisions 122314 via svnmerge

........
r122314 | jpeeler | 2008-06-12 14:08:20 -0500 (Thu, 12 Jun 2008) | 2 lines

Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should continue working. Release announcement to follow.

........

................
r122371 | russell | 2008-06-12 14:38:52 -0600 (Thu, 12 Jun 2008) | 2 lines

Complete the documentation for the timing API.

................
r122399 | mmichelson | 2008-06-12 15:23:02 -0600 (Thu, 12 Jun 2008) | 4 lines

Recommitting revision 122228, which was accidentally reverted
as a result of commit 122234.


................
r122433 | jpeeler | 2008-06-12 17:08:37 -0600 (Thu, 12 Jun 2008) | 4 lines

(closes issue 0012193)
Reported by: davidw
Patch by: Corydon76, modified by me to work properly with ParkAndAnnounce app

................
r122434 | jpeeler | 2008-06-12 17:09:16 -0600 (Thu, 12 Jun 2008) | 12 lines

Blocked revisions 122208 via svnmerge

........
r122208 | jpeeler | 2008-06-12 10:46:08 -0500 (Thu, 12 Jun 2008) | 5 lines

(closes issue #12193)
Reported by: davidw
Patch by: Corydon76, modified by me to work properly with ParkAndAnnounce app


........

................
r122461 | mmichelson | 2008-06-12 17:58:01 -0600 (Thu, 12 Jun 2008) | 5 lines

Fix a segfault by not trying to store a stack address for
long-term use. Instead use the heap. I can't believe this
never happened *once* in my developer branch when I was testing.


................
r122493 | mvanbaak | 2008-06-13 05:20:47 -0600 (Fri, 13 Jun 2008) | 9 lines

Implement call parking in chan_skinny.

(closes issue #11342)
Reported by: DEA
Patches:
      chan_skinny-park.txt uploaded by DEA (license 3)
      chan_skinny-park-v2.diff.txt uploaded by mvanbaak (license 7)
Tested by: DEA, mvanbaak

................
r122523 | russell | 2008-06-13 06:45:50 -0600 (Fri, 13 Jun 2008) | 11 lines

Merge changes from timing branch

 - Convert chan_iax2 to use the timing API
 - Convert usage of timing in the core to use the timing API instead of
   using DAHDI directly
 - Make a change to the timing API to add the set_rate() function
 - change the timing core to use a rwlock
 - merge a timing implementation, res_timing_dahdi

Basic testing was successful using res_timing_dahdi

................
r122526 | russell | 2008-06-13 06:53:08 -0600 (Fri, 13 Jun 2008) | 3 lines

Do not allow res_timing_dahdi to be unloaded.  We can re-enable this once we
add automatic use count handling for timing modules.

................
r122557 | tilghman | 2008-06-13 08:15:07 -0600 (Fri, 13 Jun 2008) | 7 lines

Convert one more delimiter to use comma.
(closes issue #12850)
 Reported by: bcnit
 Patches: 
       20080613__bug12850.diff.txt uploaded by Corydon76 (license 14)
 Tested by: bcnit

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

Added:
    team/murf/CDRfix6/apps/app_dahdibarge.c
      - copied unchanged from r122557, trunk/apps/app_dahdibarge.c
    team/murf/CDRfix6/apps/app_dahdiras.c
      - copied unchanged from r122557, trunk/apps/app_dahdiras.c
    team/murf/CDRfix6/apps/app_dahdiscan.c
      - copied unchanged from r122557, trunk/apps/app_dahdiscan.c
    team/murf/CDRfix6/channels/chan_dahdi.c
      - copied unchanged from r122557, trunk/channels/chan_dahdi.c
    team/murf/CDRfix6/codecs/codec_dahdi.c
      - copied unchanged from r122557, trunk/codecs/codec_dahdi.c
    team/murf/CDRfix6/include/asterisk/dahdi.h
      - copied unchanged from r122557, trunk/include/asterisk/dahdi.h
    team/murf/CDRfix6/res/res_timing_dahdi.c
      - copied unchanged from r122557, trunk/res/res_timing_dahdi.c
Removed:
    team/murf/CDRfix6/apps/app_fax.c
    team/murf/CDRfix6/apps/app_zapbarge.c
    team/murf/CDRfix6/apps/app_zapras.c
    team/murf/CDRfix6/apps/app_zapscan.c
    team/murf/CDRfix6/channels/chan_zap.c
    team/murf/CDRfix6/codecs/codec_zap.c
    team/murf/CDRfix6/include/asterisk/zapata.h
Modified:
    team/murf/CDRfix6/   (props changed)
    team/murf/CDRfix6/CHANGES
    team/murf/CDRfix6/Makefile
    team/murf/CDRfix6/README
    team/murf/CDRfix6/apps/app_chanisavail.c
    team/murf/CDRfix6/apps/app_chanspy.c
    team/murf/CDRfix6/apps/app_dial.c
    team/murf/CDRfix6/apps/app_flash.c
    team/murf/CDRfix6/apps/app_forkcdr.c
    team/murf/CDRfix6/apps/app_getcpeid.c
    team/murf/CDRfix6/apps/app_meetme.c
    team/murf/CDRfix6/apps/app_page.c
    team/murf/CDRfix6/apps/app_parkandannounce.c
    team/murf/CDRfix6/apps/app_queue.c
    team/murf/CDRfix6/apps/app_rpt.c
    team/murf/CDRfix6/build_tools/menuselect-deps.in
    team/murf/CDRfix6/cdr/cdr_csv.c
    team/murf/CDRfix6/channels/chan_iax2.c
    team/murf/CDRfix6/channels/chan_mgcp.c
    team/murf/CDRfix6/channels/chan_skinny.c
    team/murf/CDRfix6/channels/misdn/isdn_lib.c
    team/murf/CDRfix6/configs/extensions.ael.sample
    team/murf/CDRfix6/configs/extensions.conf.sample
    team/murf/CDRfix6/configs/extensions.lua.sample
    team/murf/CDRfix6/configs/meetme.conf.sample
    team/murf/CDRfix6/configs/muted.conf.sample
    team/murf/CDRfix6/configs/queues.conf.sample
    team/murf/CDRfix6/configs/rpt.conf.sample
    team/murf/CDRfix6/configs/sla.conf.sample
    team/murf/CDRfix6/configs/smdi.conf.sample
    team/murf/CDRfix6/configs/users.conf.sample
    team/murf/CDRfix6/configs/vpb.conf.sample
    team/murf/CDRfix6/configs/zapata.conf.sample
    team/murf/CDRfix6/configure
    team/murf/CDRfix6/configure.ac
    team/murf/CDRfix6/contrib/init.d/rc.mandrake.asterisk
    team/murf/CDRfix6/contrib/init.d/rc.mandrake.zaptel
    team/murf/CDRfix6/contrib/init.d/rc.suse.asterisk
    team/murf/CDRfix6/contrib/scripts/autosupport
    team/murf/CDRfix6/contrib/scripts/loadtest.tcl
    team/murf/CDRfix6/contrib/utils/zones2indications.c
    team/murf/CDRfix6/doc/asterisk.8
    team/murf/CDRfix6/doc/asterisk.sgml
    team/murf/CDRfix6/doc/backtrace.txt
    team/murf/CDRfix6/doc/janitor-projects.txt
    team/murf/CDRfix6/doc/manager_1_1.txt
    team/murf/CDRfix6/doc/osp.txt
    team/murf/CDRfix6/doc/sms.txt
    team/murf/CDRfix6/doc/ss7.txt
    team/murf/CDRfix6/doc/tex/ael.tex
    team/murf/CDRfix6/doc/tex/app-sms.tex
    team/murf/CDRfix6/doc/tex/backtrace.tex
    team/murf/CDRfix6/doc/tex/channelvariables.tex
    team/murf/CDRfix6/doc/tex/configuration.tex
    team/murf/CDRfix6/doc/tex/enum.tex
    team/murf/CDRfix6/doc/tex/hardware.tex
    team/murf/CDRfix6/doc/tex/localchannel.tex
    team/murf/CDRfix6/doc/tex/manager.tex
    team/murf/CDRfix6/doc/tex/privacy.tex
    team/murf/CDRfix6/doc/tex/queues-with-callback-members.tex
    team/murf/CDRfix6/doc/tex/security.tex
    team/murf/CDRfix6/doc/tex/sla.tex
    team/murf/CDRfix6/funcs/func_cdr.c
    team/murf/CDRfix6/include/asterisk/autoconfig.h.in
    team/murf/CDRfix6/include/asterisk/cdr.h
    team/murf/CDRfix6/include/asterisk/channel.h
    team/murf/CDRfix6/include/asterisk/doxyref.h
    team/murf/CDRfix6/include/asterisk/dsp.h
    team/murf/CDRfix6/include/asterisk/network.h
    team/murf/CDRfix6/include/asterisk/options.h
    team/murf/CDRfix6/include/asterisk/timing.h
    team/murf/CDRfix6/main/asterisk.c
    team/murf/CDRfix6/main/cdr.c
    team/murf/CDRfix6/main/channel.c
    team/murf/CDRfix6/main/dial.c
    team/murf/CDRfix6/main/features.c
    team/murf/CDRfix6/main/file.c
    team/murf/CDRfix6/main/loader.c
    team/murf/CDRfix6/main/timing.c
    team/murf/CDRfix6/makeopts.in
    team/murf/CDRfix6/pbx/pbx_config.c
    team/murf/CDRfix6/res/res_musiconhold.c
    team/murf/CDRfix6/utils/extconf.c

Propchange: team/murf/CDRfix6/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/murf/CDRfix6/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/CDRfix6/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jun 13 12:30:00 2008
@@ -1,1 +1,1 @@
-/trunk:1-122068
+/trunk:1-122594

Modified: team/murf/CDRfix6/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/CHANGES?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/CHANGES (original)
+++ team/murf/CDRfix6/CHANGES Fri Jun 13 12:30:00 2008
@@ -93,6 +93,12 @@
  * PrivacyManager now takes an option where you can specify a context where the 
    given number will be matched. This way you have more control over who is allowed
    and it stops the people who blindly enter 10 digits.
+ * ForkCDR has new options: 'a' updates the answer time on the new CDR; 'A' locks
+   answer times, disposition, on orig CDR against updates; 'D' Copies the disposition
+   from the orig CDR to the new CDR after reset; 'e' sets the 'end' time on the
+   original CDR; 'R' prevents the new CDR from being reset; 's(var=val)' adds/changes
+   the 'var' variable on the original CDR; 'T' forces ast_cdr_end(), ast_cdr_answer(),
+   obey the LOCKED flag on cdr's in the chain, and also the ast_cdr_setvar() func.
 
 SIP Changes
 -----------

Modified: team/murf/CDRfix6/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/Makefile?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/Makefile (original)
+++ team/murf/CDRfix6/Makefile Fri Jun 13 12:30:00 2008
@@ -680,6 +680,7 @@
 		echo ";transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly" ; \
 		echo ";runuser = asterisk ; The user to run as" ; \
 		echo ";rungroup = asterisk ; The group to run as" ; \
+		echo "dahdichanname = yes" ; Set channel name as DAHDI\
 		echo "" ; \
 		echo "; Changing the following lines may compromise your security." ; \
 		echo ";[files]" ; \

Modified: team/murf/CDRfix6/README
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/README?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/README (original)
+++ team/murf/CDRfix6/README Fri Jun 13 12:30:00 2008
@@ -175,7 +175,7 @@
 understand, and do not affect how it is actually parsed.
 
   Entries of the form 'variable=value' set the value of some parameter in
-asterisk.  For example, in zapata.conf, one might specify:
+asterisk.  For example, in dahdi.conf, one might specify:
 
 	switchtype=national
 

Modified: team/murf/CDRfix6/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_chanisavail.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_chanisavail.c (original)
+++ team/murf/CDRfix6/apps/app_chanisavail.c Fri Jun 13 12:30:00 2008
@@ -75,7 +75,7 @@
 	);
 
 	if (ast_strlen_zero(data)) {
-		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (Zap/1&Zap/2)\n");
+		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (DAHDI/1&DAHDI/2)\n");
 		return -1;
 	}
 

Modified: team/murf/CDRfix6/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_chanspy.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_chanspy.c (original)
+++ team/murf/CDRfix6/apps/app_chanspy.c Fri Jun 13 12:30:00 2008
@@ -47,6 +47,7 @@
 #include "asterisk/translate.h"
 #include "asterisk/module.h"
 #include "asterisk/lock.h"
+#include "asterisk/options.h"
 
 #define AST_NAME_STRLEN 256
 #define NUM_SPYGROUPS 128
@@ -587,6 +588,7 @@
 	const char *exten, const char *context, struct chanspy_ds *chanspy_ds)
 {
 	struct ast_channel *next;
+	char channel_name[AST_CHANNEL_NAME];
 
 redo:
 	if (!ast_strlen_zero(spec))
@@ -599,7 +601,8 @@
 	if (!next)
 		return NULL;
 
-	if (!strncmp(next->name, "Zap/pseudo", 10)) {
+	snprintf(channel_name, AST_CHANNEL_NAME, "%s/pseudo", dahdi_chan_name);
+	if (!strncmp(next->name, channel_name, 10)) {
 		ast_channel_unlock(next);
 		goto redo;
 	} else if (next == chan) {

Modified: team/murf/CDRfix6/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_dial.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_dial.c (original)
+++ team/murf/CDRfix6/apps/app_dial.c Fri Jun 13 12:30:00 2008
@@ -171,8 +171,8 @@
 "    o    - Specify that the CallerID that was present on the *calling* channel\n"
 "           be set as the CallerID on the *called* channel. This was the\n"
 "           behavior of Asterisk 1.0 and earlier.\n"
-"    O([x]) - \"Operator Services\" mode (Zaptel channel to Zaptel channel\n"
-"             only, if specified on non-Zaptel interface, it will be ignored).\n"
+"    O([x]) - \"Operator Services\" mode (DAHDI channel to DAHDI channel\n"
+"             only, if specified on non-DAHDI interface, it will be ignored).\n"
 "             When the destination answers (presumably an operator services\n"
 "             station), the originator no longer has control of their line.\n"
 "             They may hang up, but the switch will not release their line\n"
@@ -1895,9 +1895,9 @@
 				res = -1;
 				goto done;
 			}
-			if (opermode && !strncmp(chan->name, "Zap", 3) && !strncmp(peer->name, "Zap", 3)) {
-				/* what's this special handling for Zap <-> Zap ?
-				 * A: Zap to Zap calls are natively bridged at the kernel driver
+			if (opermode && !strncmp(chan->tech->type, "DAHDI", 3) && !strncmp(peer->name, "DAHDI", 3)) {
+				/* what's this special handling for dahdi <-> dahdi ?
+				 * A: dahdi to dahdi calls are natively bridged at the kernel driver
 				 * level, so we need to ensure that this mode gets propagated
 				 * all the way down. */
 				struct oprmode oprmode;

Modified: team/murf/CDRfix6/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_flash.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_flash.c (original)
+++ team/murf/CDRfix6/apps/app_flash.c Fri Jun 13 12:30:00 2008
@@ -18,7 +18,7 @@
 
 /*! \file
  *
- * \brief App to flash a zap trunk
+ * \brief App to flash a DAHDI trunk
  *
  * \author Mark Spencer <markster at digium.com>
  * 
@@ -26,14 +26,14 @@
  */
  
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include "asterisk/zapata.h"
+#include "asterisk/dahdi.h"
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -45,22 +45,22 @@
 
 static char *app = "Flash";
 
-static char *synopsis = "Flashes a Zap Trunk";
+static char *synopsis = "Flashes a DAHDI Trunk";
 
 static char *descrip = 
-"Performs a flash on a zap trunk.  This can be used\n"
+"Performs a flash on a DAHDI trunk.  This can be used\n"
 "to access features provided on an incoming analogue circuit\n"
 "such as conference and call waiting. Use with SendDTMF() to\n"
 "perform external transfers\n";
 
 
-static inline int zt_wait_event(int fd)
+static inline int dahdi_wait_event(int fd)
 {
-	/* Avoid the silly zt_waitevent which ignores a bunch of events */
+	/* Avoid the silly dahdi_waitevent which ignores a bunch of events */
 	int i,j=0;
-	i = ZT_IOMUX_SIGEVENT;
-	if (ioctl(fd, ZT_IOMUX, &i) == -1) return -1;
-	if (ioctl(fd, ZT_GETEVENT, &j) == -1) return -1;
+	i = DAHDI_IOMUX_SIGEVENT;
+	if (ioctl(fd, DAHDI_IOMUX, &i) == -1) return -1;
+	if (ioctl(fd, DAHDI_GETEVENT, &j) == -1) return -1;
 	return j;
 }
 
@@ -68,23 +68,23 @@
 {
 	int res = -1;
 	int x;
-	struct zt_params ztp;
+	struct dahdi_params dahdip;
 
-	if (strcasecmp(chan->tech->type, "Zap")) {
-		ast_log(LOG_WARNING, "%s is not a Zap channel\n", chan->name);
+	if (strcasecmp(chan->tech->type, "DAHDI")) {
+		ast_log(LOG_WARNING, "%s is not a DAHDI channel\n", chan->name);
 		return -1;
 	}
 	
-	memset(&ztp, 0, sizeof(ztp));
-	res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
+	memset(&dahdip, 0, sizeof(dahdip));
+	res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &dahdip);
 	if (!res) {
-		if (ztp.sigtype & __ZT_SIG_FXS) {
-			x = ZT_FLASH;
-			res = ioctl(chan->fds[0], ZT_HOOK, &x);
+		if (dahdip.sigtype & __DAHDI_SIG_FXS) {
+			x = DAHDI_FLASH;
+			res = ioctl(chan->fds[0], DAHDI_HOOK, &x);
 			if (!res || (errno == EINPROGRESS)) {
 				if (res) {
 					/* Wait for the event to finish */
-					zt_wait_event(chan->fds[0]);
+					dahdi_wait_event(chan->fds[0]);
 				}
 				res = ast_safe_sleep(chan, 1000);
 				ast_verb(3, "Flashed channel %s\n", chan->name);

Modified: team/murf/CDRfix6/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_forkcdr.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_forkcdr.c (original)
+++ team/murf/CDRfix6/apps/app_forkcdr.c Fri Jun 13 12:30:00 2008
@@ -42,21 +42,82 @@
 "Forks the Call Data Record";
 static char *descrip = 
 "  ForkCDR([options]):  Causes the Call Data Record to fork an additional\n"
-"cdr record starting from the time of the fork call\n"
+"cdr record starting from the time of the fork call. This new cdr record will\n"
+"be linked to end of the list of cdr records attached to the channel. The original CDR is\n"
+"has a LOCKED flag set, which forces most cdr operations to skip it, except\n"
+"for the functions that set the answer and end times, which ignore the LOCKED\n"
+"flag. This allows all the cdr records in the channel to be 'ended' together\n"
+"when the channel is closed.\n"
+"The CDR() func (when setting CDR values) normally ignores the LOCKED flag also,\n"
+"but has options to vary its behavior. The 'T' option (described below), can\n"
+"override this behavior, but beware the risks.\n"
+"\n"
+"Detailed Behavior Description:\n"
+"First, this app finds the last cdr record in the list, and makes\n"
+"a copy of it. This new copy will be the newly forked cdr record.\n"
+"Next, this new record is linked to the end of the cdr record list.\n"
+"Next, The new cdr record is RESET (unless you use an option to prevent this)\n"
+"This means that:\n"
+"   1. All flags are unset on the cdr record\n"
+"   2. the start, end, and answer times are all set to zero.\n"
+"   3. the billsec and duration fields are set to zero.\n"
+"   4. the start time is set to the current time.\n"
+"   5. the disposition is set to NULL.\n"
+"Next, unless you specified the 'v' option, all variables will be\n"
+"removed from the original cdr record. Thus, the 'v' option allows\n"
+"any CDR variables to be replicated to all new forked cdr records.\n"
+"Without the 'v' option, the variables on the original are effectively\n"
+"moved to the new forked cdr record.\n"
+"Next, if the 's' option is set, the provided variable and value\n"
+"are set on the original cdr record.\n"
+"Next, if the 'a' option is given, and the original cdr record has an\n"
+"answer time set, then the new forked cdr record will have its answer\n"
+"time set to its start time. If the old answer time were carried forward,\n"
+"the answer time would be earlier than the start time, giving strange\n"
+"duration and billsec times.\n"
+"Next, if the 'd' option was specified, the disposition is copied from\n"
+"the original cdr record to the new forked cdr.\n"
+"Next, if the 'D' option was specified, the destination channel field\n"
+"in the new forked CDR is erased.\n"
+"Next, if the 'e' option was specified, the 'end' time for the original\n"
+"cdr record is set to the current time. Future hang-up or ending events\n"
+"will not override this time stamp.\n"
+"Next, If the 'A' option is specified, the original cdr record will have\n"
+"it ANS_LOCKED flag set, which prevent future answer events\n"
+"from updating the original cdr record's disposition. Normally, an\n"
+"'ANSWERED' event would mark all cdr records in the chain as 'ANSWERED'.\n"
+"Next, if the 'T' option is specified, the original cdr record will have\n"
+"its 'DONT_TOUCH' flag set, which will force the cdr_answer, cdr_end, and\n"
+"cdr_setvar functions to leave that cdr record alone.\n"
+"And, last but not least, the original cdr record has its LOCKED flag\n"
+"set. Almost all internal CDR functions (except for the funcs that set\n"
+"the end, and answer times, and set a variable) will honor this flag\n"
+"and leave a LOCKED cdr record alone.\n"
+"This means that the newly created forked cdr record will affected\n"
+"by events transpiring within Asterisk, with the previously noted\n"
+"exceptions.\n"
 "  Options:\n"
-"    a  - update the answer time on the NEW CDR just after it's been inited..\n"
+"    a - update the answer time on the NEW CDR just after it's been inited..\n"
 "         The new CDR may have been answered already, the reset that forkcdr.\n"
-"         does will erase the answer time. This will bring it back, but.\n"
+"         does will erase the answer time. This will bring it back, but\n"
 "         the answer time will be a copy of the fork/start time. It will.\n"
 "         only do this if the initial cdr was indeed already answered..\n"
-"    D -  Copy the disposition forward from the old cdr, after the .\n"
+"    A - Lock the original CDR against the answer time being updated.\n"
+"         This will allow the disposition on the original CDR to remain the same.\n"
+"    d - Copy the disposition forward from the old cdr, after the .\n"
 "         init..\n"
-"    d -  Clear the dstchannel on the new CDR after reset..\n"
-"    e -  end the original CDR. Do this after all the necc. data.\n"
+"    D - Clear the dstchannel on the new CDR after reset..\n"
+"    e - end the original CDR. Do this after all the necc. data.\n"
 "         is copied from the original CDR to the new forked CDR..\n"
 "    R -  do NOT reset the new cdr..\n"
 "    s(name=val) - Set the CDR var 'name' in the original CDR, with value.\n"
 "                  'val'.\n"
+"    T -  Mark the original CDR with a DONT_TOUCH flag. setvar, answer, and end\n"
+"          cdr funcs will obey this flag; normally they don't honor the LOCKED\n"
+"          flag set on the original CDR record.\n"
+"          Beware-- using this flag may cause CDR's not to have their end times\n"
+"          updated! It is suggested that if you specify this flag, you might\n"
+"          wish to use the 'e' flag as well!\n"
 "    v  - When the new CDR is forked, it gets a copy of the vars attached\n"
 "         to the current CDR. The vars attached to the original CDR are removed\n"
 "         unless this option is specified.\n";
@@ -70,6 +131,8 @@
 	OPT_NORESET =           (1 << 4),
 	OPT_KEEPVARS =          (1 << 5),
 	OPT_VARSET =            (1 << 6),
+	OPT_ANSLOCK =           (1 << 7),
+	OPT_DONTOUCH =          (1 << 8),
 };
 
 enum {
@@ -80,11 +143,13 @@
 
 AST_APP_OPTIONS(forkcdr_exec_options, {
 	AST_APP_OPTION('a', OPT_SETANS),
+	AST_APP_OPTION('A', OPT_ANSLOCK),
 	AST_APP_OPTION('d', OPT_SETDISP),
 	AST_APP_OPTION('D', OPT_RESETDEST),
 	AST_APP_OPTION('e', OPT_ENDCDR),
 	AST_APP_OPTION('R', OPT_NORESET),
 	AST_APP_OPTION_ARG('s', OPT_VARSET, OPT_ARG_VARSET),
+	AST_APP_OPTION('T', OPT_DONTOUCH),
 	AST_APP_OPTION('v', OPT_KEEPVARS),
 });
 
@@ -132,6 +197,12 @@
 	if (ast_test_flag(&optflags, OPT_ENDCDR))
 		ast_cdr_end(cdr);
 
+	if (ast_test_flag(&optflags, OPT_ANSLOCK))
+		ast_set_flag(cdr, AST_CDR_FLAG_ANSLOCKED);
+	
+	if (ast_test_flag(&optflags, OPT_DONTOUCH))
+		ast_set_flag(cdr, AST_CDR_FLAG_DONT_TOUCH);
+		
 	ast_set_flag(cdr, AST_CDR_FLAG_CHILD | AST_CDR_FLAG_LOCKED);
 }
 

Modified: team/murf/CDRfix6/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_getcpeid.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_getcpeid.c (original)
+++ team/murf/CDRfix6/apps/app_getcpeid.c Fri Jun 13 12:30:00 2008
@@ -42,7 +42,7 @@
 
 static char *descrip =
 "  GetCPEID(): Obtains and displays ADSI CPE ID and other information in order\n"
-"to properly setup zapata.conf for on-hook operations.\n";
+"to properly setup dahdi.conf for on-hook operations.\n";
 
 
 static int cpeid_setstatus(struct ast_channel *chan, char *stuff[], int voice)

Modified: team/murf/CDRfix6/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/murf/CDRfix6/apps/app_meetme.c?view=diff&rev=122612&r1=122611&r2=122612
==============================================================================
--- team/murf/CDRfix6/apps/app_meetme.c (original)
+++ team/murf/CDRfix6/apps/app_meetme.c Fri Jun 13 12:30:00 2008
@@ -30,14 +30,14 @@
  */
 
 /*** MODULEINFO
-	<depend>zaptel</depend>
+	<depend>dahdi</depend>
  ***/
 
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include "asterisk/zapata.h"
+#include "asterisk/dahdi.h"
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -228,15 +228,15 @@
 "conference.  If the conference number is omitted, the user will be prompted\n"
 "to enter one.  User can exit the conference by hangup, or if the 'p' option\n"
 "is specified, by pressing '#'.\n"
-"Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)\n"
-"             must be present for conferencing to operate properly. In addition, the chan_zap\n"
+"Please note: The DAHDI kernel modules and at least one hardware driver (or dahdi_dummy)\n"
+"             must be present for conferencing to operate properly. In addition, the chan_dahdi\n"
 "             channel driver must be loaded for the 'i' and 'r' options to operate at all.\n\n"
 "The option string may contain zero or more of the following characters:\n"
 "      'a' -- set admin mode\n"
 "      'A' -- set marked mode\n"
 "      'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}\n"
 "             Default: conf-background.agi  (Note: This does not work with\n"
-"             non-Zap channels in the same conference)\n"
+"             non-DAHDI channels in the same conference)\n"
 "      'c' -- announce user(s) count on joining a conference\n"
 "      'C' -- continue in dialplan when kicked out of conference\n"
 "      'd' -- dynamically add conference\n"
@@ -361,7 +361,7 @@
 	struct ast_channel *chan;               /*!< Announcements channel */
 	struct ast_channel *lchan;              /*!< Listen/Record channel */
 	int fd;                                 /*!< Announcements fd */
-	int zapconf;                            /*!< Zaptel Conf # */
+	int dahdiconf;                            /*!< DAHDI Conf # */
 	int users;                              /*!< Number of active users */
 	int markedusers;                        /*!< Number of marked users */
 	int maxusers;                           /*!< Participant limit if scheduled */
@@ -403,7 +403,7 @@
 	int adminflags;                         /*!< Flags set by the Admin */
 	struct ast_channel *chan;               /*!< Connected channel */
 	int talking;                            /*!< Is user talking */
-	int zapchannel;                         /*!< Is a Zaptel channel */
+	int dahdichannel;                         /*!< Is a DAHDI channel */
 	char usrvalue[50];                      /*!< Custom User Value */
 	char namerecloc[PATH_MAX];				/*!< Name Recorded file Location */
 	time_t jointime;                        /*!< Time the user joined the conference */
@@ -639,8 +639,8 @@
 
 	while (len) {
 		if (block) {
-			x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
-			res = ioctl(fd, ZT_IOMUX, &x);
+			x = DAHDI_IOMUX_WRITE | DAHDI_IOMUX_SIGEVENT;
+			res = ioctl(fd, DAHDI_IOMUX, &x);
 		} else
 			res = 0;
 		if (res >= 0)
@@ -801,7 +801,7 @@
 static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount, const struct ast_channel *chan)
 {
 	struct ast_conference *cnf;
-	struct zt_confinfo ztc = { 0, };
+	struct dahdi_confinfo dahdic = { 0, };
 	int confno_int = 0;
 
 	AST_LIST_LOCK(&confs);
@@ -827,11 +827,11 @@
 	ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
 	ast_copy_string(cnf->uniqueid, chan->uniqueid, sizeof(cnf->uniqueid));
 
-	/* Setup a new zap conference */
-	ztc.confno = -1;
-	ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
-	cnf->fd = open("/dev/zap/pseudo", O_RDWR);
-	if (cnf->fd < 0 || ioctl(cnf->fd, ZT_SETCONF, &ztc)) {
+	/* Setup a new dahdi conference */
+	dahdic.confno = -1;
+	dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+	cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
+	if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
 		ast_log(LOG_WARNING, "Unable to open pseudo device\n");
 		if (cnf->fd >= 0)
 			close(cnf->fd);
@@ -840,17 +840,17 @@
 		goto cnfout;
 	}
 
-	cnf->zapconf = ztc.confno;
+	cnf->dahdiconf = dahdic.confno;
 
 	/* Setup a new channel for playback of audio files */
-	cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
+	cnf->chan = ast_request("DAHDI", AST_FORMAT_SLINEAR, "pseudo", NULL);
 	if (cnf->chan) {
 		ast_set_read_format(cnf->chan, AST_FORMAT_SLINEAR);
 		ast_set_write_format(cnf->chan, AST_FORMAT_SLINEAR);
-		ztc.chan = 0;
-		ztc.confno = cnf->zapconf;
-		ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
-		if (ioctl(cnf->chan->fds[0], ZT_SETCONF, &ztc)) {
+		dahdic.chan = 0;
+		dahdic.confno = cnf->dahdiconf;
+		dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+		if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &dahdic)) {
 			ast_log(LOG_WARNING, "Error setting conference\n");
 			if (cnf->chan)
 				ast_hangup(cnf->chan);
@@ -867,7 +867,7 @@
 	cnf->start = time(NULL);
 	cnf->maxusers = 0x7fffffff;
 	cnf->isdynamic = dynamic ? 1 : 0;
-	ast_verb(3, "Created MeetMe conference %d for conference '%s'\n", cnf->zapconf, cnf->confno);
+	ast_verb(3, "Created MeetMe conference %d for conference '%s'\n", cnf->dahdiconf, cnf->confno);
 	AST_LIST_INSERT_HEAD(&confs, cnf, list);
 
 	/* Reserve conference number in map */
@@ -1309,8 +1309,8 @@
 	}
 
 	/* flush any data sitting in the pseudo channel */
-	x = ZT_FLUSH_ALL;
-	if (ioctl(fd, ZT_FLUSH, &x))
+	x = DAHDI_FLUSH_ALL;
+	if (ioctl(fd, DAHDI_FLUSH, &x))
 		ast_log(LOG_WARNING, "Error flushing channel\n");
 
 }
@@ -1484,7 +1484,7 @@
 	struct ast_conf_user *user = NULL;
 	struct ast_conf_user *usr = NULL;
 	int fd;
-	struct zt_confinfo ztc, ztc_empty;
+	struct dahdi_confinfo dahdic, dahdic_empty;
 	struct ast_frame *f;
 	struct ast_channel *c;
 	struct ast_frame fr;
@@ -1493,7 +1493,7 @@
 	int nfds;
 	int res;
 	int flags;
-	int retryzap;
+	int retrydahdi;
 	int origfd;
 	int musiconhold = 0;
 	int firstpass = 0;
@@ -1520,7 +1520,7 @@
 	char members[10] = "";
 	int dtmf, opt_waitmarked_timeout = 0;
 	time_t timeout = 0;
-	ZT_BUFFERINFO bi;
+	DAHDI_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 	char *exitkeys = NULL;
@@ -1645,13 +1645,13 @@
 	}
 
 	ast_mutex_lock(&conf->recordthreadlock);
-	if ((conf->recordthread == AST_PTHREADT_NULL) && (confflags & CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL)))) {
+	if ((conf->recordthread == AST_PTHREADT_NULL) && (confflags & CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("DAHDI", AST_FORMAT_SLINEAR, "pseudo", NULL)))) {
 		ast_set_read_format(conf->lchan, AST_FORMAT_SLINEAR);
 		ast_set_write_format(conf->lchan, AST_FORMAT_SLINEAR);
-		ztc.chan = 0;
-		ztc.confno = conf->zapconf;
-		ztc.confmode = ZT_CONF_CONFANN | ZT_CONF_CONFANNMON;
-		if (ioctl(conf->lchan->fds[0], ZT_SETCONF, &ztc)) {
+		dahdic.chan = 0;
+		dahdic.confno = conf->dahdiconf;
+		dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
+		if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &dahdic)) {
 			ast_log(LOG_WARNING, "Error starting listen channel\n");
 			ast_hangup(conf->lchan);
 			conf->lchan = NULL;
@@ -1832,13 +1832,13 @@
 		goto outrun;
 	}
 
-	retryzap = (strcasecmp(chan->tech->type, "Zap") || (chan->audiohooks || chan->monitor) ? 1 : 0);
-	user->zapchannel = !retryzap;
-
- zapretry:
+	retrydahdi = (strcasecmp(chan->tech->type, "DAHDI") || (chan->audiohooks || chan->monitor) ? 1 : 0);
+	user->dahdichannel = !retrydahdi;
+
+ dahdiretry:
 	origfd = chan->fds[0];
-	if (retryzap) {
-		fd = open("/dev/zap/pseudo", O_RDWR);
+	if (retrydahdi) {
+		fd = open("/dev/dahdi/pseudo", O_RDWR);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Unable to open pseudo channel: %s\n", strerror(errno));
 			goto outrun;
@@ -1859,16 +1859,16 @@
 		/* Setup buffering information */
 		memset(&bi, 0, sizeof(bi));
 		bi.bufsize = CONF_SIZE / 2;
-		bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
-		bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+		bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+		bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
 		bi.numbufs = audio_buffers;
-		if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+		if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
 			ast_log(LOG_WARNING, "Unable to set buffering information: %s\n", strerror(errno));
 			close(fd);
 			goto outrun;
 		}
 		x = 1;
-		if (ioctl(fd, ZT_SETLINEAR, &x)) {
+		if (ioctl(fd, DAHDI_SETLINEAR, &x)) {
 			ast_log(LOG_WARNING, "Unable to set linear mode: %s\n", strerror(errno));
 			close(fd);
 			goto outrun;
@@ -1879,27 +1879,27 @@
 		fd = chan->fds[0];
 		nfds = 0;
 	}
-	memset(&ztc, 0, sizeof(ztc));
-	memset(&ztc_empty, 0, sizeof(ztc_empty));
+	memset(&dahdic, 0, sizeof(dahdic));
+	memset(&dahdic_empty, 0, sizeof(dahdic_empty));
 	/* Check to see if we're in a conference... */
-	ztc.chan = 0;	
-	if (ioctl(fd, ZT_GETCONF, &ztc)) {
+	dahdic.chan = 0;	
+	if (ioctl(fd, DAHDI_GETCONF, &dahdic)) {
 		ast_log(LOG_WARNING, "Error getting conference\n");

[... 4885 lines stripped ...]



More information about the svn-commits mailing list