[asterisk-commits] branch bweschke/func_realtime_bug_5695 r12835 - in /team/bweschke/func_realti...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Mar 13 15:21:23 MST 2006


Author: bweschke
Date: Mon Mar 13 16:21:13 2006
New Revision: 12835

URL: http://svn.digium.com/view/asterisk?rev=12835&view=rev
Log:
Merged revisions 11850,11889-11890,11914,11947,11983,12011-12012,12025,12031,12041,12073,12107-12108,12136,12162-12165,12197,12232,12260,12287-12288,12315,12344,12371,12400,12430,12456,12459,12464-12465,12471,12475-12476,12478,12481,12483,12491-12494,12496-12497,12501,12544,12546,12572,12610,12647-12648,12688,12714,12740,12766,12793 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r11850 | oej | 2006-03-05 06:57:34 -0600 (Sun, 05 Mar 2006) | 2 lines

Clear almost all of page2 flags at reload (different fix from 1.2 branch)

................
r11889 | oej | 2006-03-05 07:52:26 -0600 (Sun, 05 Mar 2006) | 2 lines

Oops

................
r11890 | oej | 2006-03-05 07:52:58 -0600 (Sun, 05 Mar 2006) | 2 lines

Some days... Sorry.

................
r11914 | oej | 2006-03-05 08:07:06 -0600 (Sun, 05 Mar 2006) | 2 lines

Fix bad fix.

................
r11947 | russell | 2006-03-05 20:33:36 -0600 (Sun, 05 Mar 2006) | 10 lines

Merged revisions 11946 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11946 | russell | 2006-03-05 21:32:35 -0500 (Sun, 05 Mar 2006) | 2 lines

fix a typo in the description of the ringtimeout option

........

................
r11983 | oej | 2006-03-06 03:43:59 -0600 (Mon, 06 Mar 2006) | 2 lines

Initialize variable (fix by Luigi Rizzo)

................
r12011 | oej | 2006-03-06 04:46:36 -0600 (Mon, 06 Mar 2006) | 3 lines

Issue #6628 - Disable res_snmp on incompatible platforms until
we have a resolution for the conflict. (Corydon's patch)

................
r12012 | oej | 2006-03-06 04:49:15 -0600 (Mon, 06 Mar 2006) | 2 lines

Portability issue - make stringfields work on FreeBSD 4.x (oej/rizzo)

................
r12025 | oej | 2006-03-06 05:02:12 -0600 (Mon, 06 Mar 2006) | 2 lines

Fix compilation with astmm

................
r12031 | oej | 2006-03-06 05:03:08 -0600 (Mon, 06 Mar 2006) | 2 lines

Revert, needs to be fixed in 1.2 first

................
r12041 | oej | 2006-03-06 05:11:11 -0600 (Mon, 06 Mar 2006) | 2 lines

Make astmm compile (imported from 1.2)

................
r12073 | oej | 2006-03-06 08:27:48 -0600 (Mon, 06 Mar 2006) | 2 lines

Blocking patch for ast_strundup in 1.2

................
r12107 | oej | 2006-03-06 12:43:10 -0600 (Mon, 06 Mar 2006) | 2 lines

Add credit for the poll.c emulation layer for BSD

................
r12108 | oej | 2006-03-06 12:47:43 -0600 (Mon, 06 Mar 2006) | 2 lines

Issue #6659 - bad syntax in the Asterisk mib (fix by tholo)

................
r12136 | tilghman | 2006-03-06 15:16:25 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 6195 - Deadlock solution by Matti

................
r12162 | tilghman | 2006-03-06 17:04:56 -0600 (Mon, 06 Mar 2006) | 10 lines

Merged revisions 12161 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12161 | tilghman | 2006-03-06 17:03:54 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 6664 - More fixes for Solaris

........

................
r12163 | tilghman | 2006-03-06 17:12:48 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 6304 - Add Park command to the manager interface

................
r12164 | tilghman | 2006-03-06 17:39:39 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 4489 - Jukebox AGI

................
r12165 | tilghman | 2006-03-06 17:45:37 -0600 (Mon, 06 Mar 2006) | 2 lines

Oops, didn't get the right meaning of what keywords is supposed to be

................
r12197 | tilghman | 2006-03-06 18:07:27 -0600 (Mon, 06 Mar 2006) | 10 lines

Merged revisions 12195 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12195 | tilghman | 2006-03-06 18:05:27 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 6020 - Race condition where packet could be lost if first packet on list is acked

........

................
r12232 | tilghman | 2006-03-06 19:12:09 -0600 (Mon, 06 Mar 2006) | 2 lines

Bug 5702 - Realtime patch for meetme

................
r12260 | oej | 2006-03-07 03:57:22 -0600 (Tue, 07 Mar 2006) | 2 lines

Add accountcode to sip_peer dialplan function

................
r12287 | crichter | 2006-03-07 05:08:09 -0600 (Tue, 07 Mar 2006) | 1 line

added a bit more detailed description for the echotraining parameter, also changed the default from 1 to 2000. The default for the upper_threshold is now 0
................
r12288 | crichter | 2006-03-07 05:16:56 -0600 (Tue, 07 Mar 2006) | 1 line

added misdn port down to send a L1 Deactivate to a NT Port. changed some default values regarding jitterbuffer.
................
r12315 | crichter | 2006-03-07 06:17:35 -0600 (Tue, 07 Mar 2006) | 1 line

when receiving disconnect with inband info, we don't send release immediately, we also don't inform asterisk with hangup or congestion, since we want to hear the inband message.
................
r12344 | oej | 2006-03-07 11:55:33 -0600 (Tue, 07 Mar 2006) | 2 lines

Doxygen changes

................
r12371 | crichter | 2006-03-07 13:34:23 -0600 (Tue, 07 Mar 2006) | 1 line

fixed #6642 in trunk as well, sorry i really didn't want to copy this issue ... grrrr
................
r12400 | oej | 2006-03-07 14:47:24 -0600 (Tue, 07 Mar 2006) | 2 lines

Issue #6627 - Don't reset port number of active peers at reload

................
r12430 | mogorman | 2006-03-07 16:57:52 -0600 (Tue, 07 Mar 2006) | 3 lines

added show globals and set global from oej's patch
bug 6506

................
r12456 | oej | 2006-03-08 02:36:40 -0600 (Wed, 08 Mar 2006) | 5 lines

Set SIPDOMAIN on 302 redirects. 

This way you can catch 302 redirects in the dial plan and see if
the redirect is to a local extension or a remote URI.

................
r12459 | oej | 2006-03-08 04:54:40 -0600 (Wed, 08 Mar 2006) | 2 lines

Issue #6657 - Ignore 183 Session Progress without SDP (imported from 1.2 rev 12458)

................
r12464 | oej | 2006-03-08 11:41:03 -0600 (Wed, 08 Mar 2006) | 2 lines

- Doxygen formatting

................
r12465 | mogorman | 2006-03-08 12:52:55 -0600 (Wed, 08 Mar 2006) | 2 lines

minor typo in UPGRADE.txt bug number 6679

................
r12471 | oej | 2006-03-08 14:42:47 -0600 (Wed, 08 Mar 2006) | 2 lines

Formatting fix.

................
r12475 | mogorman | 2006-03-08 16:12:20 -0600 (Wed, 08 Mar 2006) | 4 lines

allows the table field to be configurable for
cdr_tds.conf.  patch provided by bug 6629 with
minor change.

................
r12476 | markster | 2006-03-09 06:28:07 -0600 (Thu, 09 Mar 2006) | 3 lines

Make sure we clear our sched value before we actually schedule the 
dereg.

................
r12478 | oej | 2006-03-09 11:41:38 -0600 (Thu, 09 Mar 2006) | 3 lines

Support SIP_CODEC channel variable for early media. (Imported from 1.2, with a small
change for const char* channel variables)

................
r12481 | crichter | 2006-03-09 12:01:27 -0600 (Thu, 09 Mar 2006) | 1 line

added option to change the connected party number dialplan (ton)
................
r12483 | markster | 2006-03-09 15:02:58 -0600 (Thu, 09 Mar 2006) | 2 lines

Minor typo fix

................
r12491 | oej | 2006-03-10 04:28:08 -0600 (Fri, 10 Mar 2006) | 2 lines

Doxygen reformatting

................
r12492 | oej | 2006-03-10 04:38:12 -0600 (Fri, 10 Mar 2006) | 2 lines

Update the readme with AstriBank and mISDN support

................
r12493 | oej | 2006-03-10 04:41:34 -0600 (Fri, 10 Mar 2006) | 2 lines

Doxygen fixes (we renamed a lot of README's recently)

................
r12494 | oej | 2006-03-10 06:13:05 -0600 (Fri, 10 Mar 2006) | 2 lines

Implement enum for retransmit options to various functions.

................
r12496 | oej | 2006-03-10 06:18:00 -0600 (Fri, 10 Mar 2006) | 3 lines

Issue #5937 - Make sure that SIP CANCEL's are retransmitted properly
Importing revision 12495 from 1.2 with changes for svn trunk

................
r12497 | crichter | 2006-03-10 08:37:30 -0600 (Fri, 10 Mar 2006) | 1 line

mISDN mqueue is now head, not a branch anymore
................
r12501 | tilghman | 2006-03-11 09:17:50 -0600 (Sat, 11 Mar 2006) | 2 lines

Bug 6459 - tell manager when queue is abandoned

................
r12544 | kpfleming | 2006-03-12 10:29:24 -0600 (Sun, 12 Mar 2006) | 2 lines

update reference to doc file whose name has changed

................
r12546 | oej | 2006-03-12 10:47:55 -0600 (Sun, 12 Mar 2006) | 3 lines

- Adding some hangupcauses before hangups
- Removing double warning

................
r12572 | oej | 2006-03-12 11:27:57 -0600 (Sun, 12 Mar 2006) | 2 lines

README files have changed names, better change references too :-)

................
r12610 | russell | 2006-03-12 12:07:23 -0600 (Sun, 12 Mar 2006) | 10 lines

Merged revisions 12577 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12577 | russell | 2006-03-12 12:57:37 -0500 (Sun, 12 Mar 2006) | 2 lines

fix build on parisc (issue #6704)

........

................
r12647 | russell | 2006-03-12 13:28:57 -0600 (Sun, 12 Mar 2006) | 2 lines

add locking to protect the list of global dialplan variables

................
r12648 | russell | 2006-03-12 13:29:35 -0600 (Sun, 12 Mar 2006) | 1 line


................
r12688 | russell | 2006-03-12 15:17:58 -0600 (Sun, 12 Mar 2006) | 2 lines

add some missing braces

................
r12714 | tilghman | 2006-03-12 23:24:13 -0600 (Sun, 12 Mar 2006) | 2 lines

Bug 6709 - Simplify extensive embedded ifneq logic (and fix missing endif's)

................
r12740 | oej | 2006-03-13 03:02:55 -0600 (Mon, 13 Mar 2006) | 2 lines

Issue 6710: saydate crash. Fix by Luigi Rizzo. Thanks!

................
r12766 | tilghman | 2006-03-13 07:56:34 -0600 (Mon, 13 Mar 2006) | 2 lines

Bug 6526 - Add a reference count to avoid crash

................
r12793 | tilghman | 2006-03-13 09:30:02 -0600 (Mon, 13 Mar 2006) | 10 lines

Merged revisions 12792 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r12792 | tilghman | 2006-03-13 09:28:35 -0600 (Mon, 13 Mar 2006) | 2 lines

Bug 6667 - Fix for RFC2833 issues

........

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

Added:
    team/bweschke/func_realtime_bug_5695/agi/jukebox.agi   (props changed)
      - copied unchanged from r12793, trunk/agi/jukebox.agi
    team/bweschke/func_realtime_bug_5695/contrib/scripts/meetme.sql   (props changed)
      - copied unchanged from r12793, trunk/contrib/scripts/meetme.sql
Modified:
    team/bweschke/func_realtime_bug_5695/   (props changed)
    team/bweschke/func_realtime_bug_5695/CREDITS
    team/bweschke/func_realtime_bug_5695/README
    team/bweschke/func_realtime_bug_5695/UPGRADE.txt
    team/bweschke/func_realtime_bug_5695/agi/Makefile
    team/bweschke/func_realtime_bug_5695/apps/app_externalivr.c
    team/bweschke/func_realtime_bug_5695/apps/app_meetme.c
    team/bweschke/func_realtime_bug_5695/apps/app_queue.c
    team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c
    team/bweschke/func_realtime_bug_5695/ast_expr2.fl
    team/bweschke/func_realtime_bug_5695/ast_expr2f.c
    team/bweschke/func_realtime_bug_5695/cdr/cdr_tds.c
    team/bweschke/func_realtime_bug_5695/channel.c
    team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c
    team/bweschke/func_realtime_bug_5695/channels/chan_misdn.c
    team/bweschke/func_realtime_bug_5695/channels/chan_phone.c
    team/bweschke/func_realtime_bug_5695/channels/chan_sip.c
    team/bweschke/func_realtime_bug_5695/channels/misdn/chan_misdn_config.h
    team/bweschke/func_realtime_bug_5695/channels/misdn/isdn_lib.c
    team/bweschke/func_realtime_bug_5695/channels/misdn/isdn_lib.h
    team/bweschke/func_realtime_bug_5695/channels/misdn/isdn_msg_parser.c
    team/bweschke/func_realtime_bug_5695/channels/misdn_config.c
    team/bweschke/func_realtime_bug_5695/codecs/gsm/Makefile
    team/bweschke/func_realtime_bug_5695/config.c
    team/bweschke/func_realtime_bug_5695/configs/cdr_tds.conf.sample
    team/bweschke/func_realtime_bug_5695/configs/misdn.conf.sample
    team/bweschke/func_realtime_bug_5695/configs/zapata.conf.sample
    team/bweschke/func_realtime_bug_5695/doc/asterisk-mib.txt
    team/bweschke/func_realtime_bug_5695/doc/billing.txt
    team/bweschke/func_realtime_bug_5695/doc/enum.txt
    team/bweschke/func_realtime_bug_5695/doc/extconfig.txt
    team/bweschke/func_realtime_bug_5695/doc/misdn.txt
    team/bweschke/func_realtime_bug_5695/doc/realtime.txt
    team/bweschke/func_realtime_bug_5695/editline/np/vis.c
    team/bweschke/func_realtime_bug_5695/editline/readline.c
    team/bweschke/func_realtime_bug_5695/funcs/func_enum.c
    team/bweschke/func_realtime_bug_5695/include/asterisk/config.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/doxyref.h
    team/bweschke/func_realtime_bug_5695/include/asterisk/sched.h
    team/bweschke/func_realtime_bug_5695/pbx.c
    team/bweschke/func_realtime_bug_5695/res/Makefile
    team/bweschke/func_realtime_bug_5695/res/res_features.c
    team/bweschke/func_realtime_bug_5695/rtp.c
    team/bweschke/func_realtime_bug_5695/say.c
    team/bweschke/func_realtime_bug_5695/sched.c
    team/bweschke/func_realtime_bug_5695/utils.c

Propchange: team/bweschke/func_realtime_bug_5695/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/bweschke/func_realtime_bug_5695/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/bweschke/func_realtime_bug_5695/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Mar 13 16:21:13 2006
@@ -1,1 +1,1 @@
-/trunk:1-11818
+/trunk:1-12834

Modified: team/bweschke/func_realtime_bug_5695/CREDITS
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/CREDITS?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/CREDITS (original)
+++ team/bweschke/func_realtime_bug_5695/CREDITS Mon Mar 13 16:21:13 2006
@@ -83,6 +83,8 @@
 Michael Jerris - bug marshaling
 Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
 	available under a Creative Commons License at http://www.asteriskdocs.org
+Brian M. Clapper - poll.c emulation
+	This product includes software developed by Brian M. Clapper <bmc at clapper.org>
 
 === HOLD MUSIC ===
 Music provided by www.freeplaymusic.com

Modified: team/bweschke/func_realtime_bug_5695/README
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/README?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/README (original)
+++ team/bweschke/func_realtime_bug_5695/README Mon Mar 13 16:21:13 2006
@@ -51,13 +51,15 @@
 	* All Wildcard (tm) products from Digium (www.digium.com)
 	* QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
 	* any full duplex sound card supported by ALSA or OSS
+	* any ISDN card supported by mISDN on Linux (BRI)
+	* The Xorcom AstriBank channel bank
         * VoiceTronix OpenLine products
 
 The are several drivers for ISDN BRI cards available from third party sources.
-Check the voip-info.org wiki for more information on chan_capi, chan_misdn and 
+Check the voip-info.org wiki for more information on chan_capi and 
 zaphfc.
 
-* UPGRADING FROM VERSION 1.0
+* UPGRADING FROM AN EARLIER VERSION
 
   If you are updating from a previous version of Asterisk, make sure you
 read the UPGRADE.txt file in the source directory. There are some files

Modified: team/bweschke/func_realtime_bug_5695/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/UPGRADE.txt?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/UPGRADE.txt (original)
+++ team/bweschke/func_realtime_bug_5695/UPGRADE.txt Mon Mar 13 16:21:13 2006
@@ -59,7 +59,7 @@
 
 Installation:
 
-* On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr7local/etc/asterisk/asterisk.conf
+* On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr/local/etc/asterisk/asterisk.conf
 If you have an old installation, you might want to remove the binaries and move the configuration files to the new locations. The following directories are now default:
 	ASTLIBDIR	/usr/local/lib/asterisk
 	ASTVARLIBDIR	/usr/local/share/asterisk

Modified: team/bweschke/func_realtime_bug_5695/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/agi/Makefile?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/agi/Makefile (original)
+++ team/bweschke/func_realtime_bug_5695/agi/Makefile Mon Mar 13 16:21:13 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-AGIS=agi-test.agi eagi-test eagi-sphinx-test
+AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 
 CFLAGS+=
 

Propchange: team/bweschke/func_realtime_bug_5695/agi/jukebox.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/bweschke/func_realtime_bug_5695/agi/jukebox.agi
------------------------------------------------------------------------------
    svn:executable = *

Propchange: team/bweschke/func_realtime_bug_5695/agi/jukebox.agi
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: team/bweschke/func_realtime_bug_5695/agi/jukebox.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/bweschke/func_realtime_bug_5695/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_externalivr.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_externalivr.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_externalivr.c Mon Mar 13 16:21:13 2006
@@ -65,7 +65,7 @@
 "will receive all DTMF events received on the channel, and notification\n"
 "if the channel is hung up. The application will not be forcibly terminated\n"
 "when the channel is hung up.\n"
-"See doc/README.externalivr for a protocol specification.\n";
+"See doc/externalivr.txt for a protocol specification.\n";
 
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
 #define ast_chan_log(level, channel, format, ...) ast_log(level, "%s: " format, channel->name , ## __VA_ARGS__)

Modified: team/bweschke/func_realtime_bug_5695/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_meetme.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_meetme.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_meetme.c Mon Mar 13 16:21:13 2006
@@ -1,3 +1,4 @@
+
 /*
  * Asterisk -- An open source telephony toolkit.
  *
@@ -147,9 +148,10 @@
 	struct ast_conf_user *firstuser;	/* Pointer to the first user struct */
 	struct ast_conf_user *lastuser;		/* Pointer to the last user struct */
 	time_t start;				/* Start time (s) */
-	int recording;				/* recording status */
-	int isdynamic;				/* Created on the fly? */
-	int locked;				/* Is the conference locked? */
+	int refcount;				/* reference count of usage */
+	unsigned int recording:2;				/* recording status */
+	unsigned int isdynamic:1;				/* Created on the fly? */
+	unsigned int locked:1;				/* Is the conference locked? */
 	pthread_t recordthread;			/* thread for recording */
 	pthread_attr_t attr;			/* thread attribute */
 	const char *recordingfilename;		/* Filename to record the Conference into */
@@ -452,7 +454,7 @@
 		ast_autoservice_stop(chan);
 }
 
-static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic)
+static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
 {
 	struct ast_conference *cnf;
 	struct zt_confinfo ztc;
@@ -472,6 +474,7 @@
 			ast_copy_string(cnf->confno, confno, sizeof(cnf->confno));
 			ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
 			ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
+			cnf->refcount = 0;
 			cnf->markedusers = 0;
 			cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
 			if (cnf->chan) {
@@ -518,7 +521,7 @@
 			/* Fill the conference struct */
 			cnf->start = time(NULL);
 			cnf->zapconf = ztc.confno;
-			cnf->isdynamic = dynamic;
+			cnf->isdynamic = dynamic ? 1 : 0;
 			cnf->firstuser = NULL;
 			cnf->lastuser = NULL;
 			cnf->locked = 0;
@@ -528,6 +531,9 @@
 		} 
 	}
  cnfout:
+	if (cnf){ 
+		cnf->refcount += refcount;
+	}
 	AST_LIST_UNLOCK(&confs);
 	return cnf;
 }
@@ -851,12 +857,19 @@
 	char meetmesecs[30] = "";
 	char exitcontext[AST_MAX_CONTEXT] = "";
 	char recordingtmp[AST_MAX_EXTENSION] = "";
+	char members[10] = "";
 	int dtmf;
 	ZT_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 
 	if (!(user = ast_calloc(1, sizeof(*user)))) {
+		AST_LIST_LOCK(&confs);
+		conf->refcount--;
+		if (!conf->refcount){
+			conf_free(conf);
+		}
+		AST_LIST_UNLOCK(&confs);
 		return ret;
 	}
 
@@ -920,6 +933,10 @@
 	user->adminflags = 0;
 	user->talking = -1;
 	conf->users++;
+	/* Update table */
+	snprintf(members, sizeof(members), "%d", conf->users);
+	ast_update_realtime("meetme", "confno", conf->confno, "members", members , NULL);
+
 	ast_mutex_unlock(&conf->playlock);
 
 	if (confflags & CONFFLAG_EXIT_CONTEXT) {
@@ -1665,11 +1682,17 @@
 		          "<no name>", hr, min, sec);
 
 		conf->users--;
+		conf->refcount--;
+		/* Update table */
+		snprintf(members, sizeof(members), "%d", conf->users);
+		ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
 		if (confflags & CONFFLAG_MARKEDUSER) 
 			conf->markedusers--;
 		if (!conf->users) {
-			/* No more users -- close this one out */
-			conf_free(conf);
+			/* close this one when no more users and no references*/
+			if (!conf->refcount){
+				conf_free(conf);
+			}
 		} else {
 			/* Remove the user struct */ 
 			if (user == conf->firstuser) {
@@ -1709,7 +1732,56 @@
 	return ret;
 }
 
-static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
+/*
+  This function looks for a conference via the RealTime module
+*/
+static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin, int refcount)
+{
+
+	struct ast_variable *var;
+	struct ast_conference *cnf;
+
+	/* Check first in the conference list */
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, cnf, list) {
+		if (!strcmp(confno, cnf->confno)) 
+			break;
+	}
+	if (cnf){
+		cnf->refcount += refcount;
+	}
+	AST_LIST_UNLOCK(&confs);
+
+	if (!cnf) {
+		char *pin = NULL, *pinadmin = NULL; /* For temp use */
+
+		cnf = ast_calloc(1, sizeof(struct ast_conference));
+		if (!cnf) {
+			ast_log(LOG_ERROR, "Out of memory\n");
+			return NULL;
+		}
+
+		var = ast_load_realtime("meetme", "confno", confno, NULL);
+		while (var) {
+			if (!strcasecmp(var->name, "confno")) {
+				ast_copy_string(cnf->confno, var->value, sizeof(cnf->confno));
+			} else if (!strcasecmp(var->name, "pin")) {
+				pin = ast_strdupa(var->value);
+			} else if (!strcasecmp(var->name, "adminpin")) {
+				pinadmin = ast_strdupa(var->value);
+			}
+			var = var->next;
+		}
+		ast_variables_destroy(var);
+
+		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount);
+	}
+
+	return cnf;
+}
+
+
+static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin, int refcount)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
@@ -1727,6 +1799,9 @@
 		if (!strcmp(confno, cnf->confno)) 
 			break;
 	}
+	if (cnf){
+		cnf->refcount += refcount;
+	}
 	AST_LIST_UNLOCK(&confs);
 
 	if (!cnf) {
@@ -1739,9 +1814,9 @@
 					if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 1, 0) < 0)
 						return NULL;
 				}
-				cnf = build_conf(confno, dynamic_pin, "", make, dynamic);
+				cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount);
 			} else {
-				cnf = build_conf(confno, "", "", make, dynamic);
+				cnf = build_conf(confno, "", "", make, dynamic, refcount);
 			}
 		} else {
 			/* Check the config */
@@ -1763,14 +1838,14 @@
 					/* Bingo it's a valid conference */
 					if (args.pin) {
 						if (args.pinadmin)
-							cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic);
+							cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic, refcount);
 						else
-							cnf = build_conf(args.confno, args.pin, "", make, dynamic);
+							cnf = build_conf(args.confno, args.pin, "", make, dynamic, refcount);
 					} else {
 						if (args.pinadmin)
-							cnf = build_conf(args.confno, "", args.pinadmin, make, dynamic);
+							cnf = build_conf(args.confno, "", args.pinadmin, make, dynamic, refcount);
 						else
-							cnf = build_conf(args.confno, "", "", make, dynamic);
+							cnf = build_conf(args.confno, "", "", make, dynamic, refcount);
 					}
 					break;
 				}
@@ -1819,7 +1894,7 @@
 
 	AST_STANDARD_APP_ARGS(args, localdata);
 	
-	conf = find_conf(chan, args.confno, 0, 0, NULL);
+	conf = find_conf(chan, args.confno, 0, 0, NULL, 0);
 	if (conf)
 		count = conf->users;
 	else
@@ -2005,7 +2080,10 @@
 		}
 		if (!ast_strlen_zero(confno)) {
 			/* Check the validity of the conference */
-			cnf = find_conf(chan, confno, 1, dynamic, the_pin);
+			cnf = find_conf(chan, confno, 1, dynamic, the_pin, 1);
+			if (!cnf) {
+				cnf = find_conf_realtime(chan, confno, 1, dynamic, the_pin, 1);
+			}
 			if (!cnf) {
 				res = ast_streamfile(chan, "conf-invalid", chan->language);
 				if (!res)
@@ -2046,8 +2124,15 @@
 								res = ast_streamfile(chan, "conf-invalidpin", chan->language);
 								if (!res)
 									ast_waitstream(chan, AST_DIGIT_ANY);
-								if (res < 0)
+								if (res < 0) {
+									AST_LIST_LOCK(&confs);
+									cnf->refcount--;
+									if (!cnf->refcount){
+										conf_free(cnf);
+									}
+									AST_LIST_UNLOCK(&confs);
 									break;
+								}
 								pin[0] = res;
 								pin[1] = '\0';
 								res = -1;
@@ -2060,8 +2145,9 @@
 							allowretry = 0;
 							/* see if we need to get rid of the conference */
 							AST_LIST_LOCK(&confs);
-							if (!cnf->users) {
-								conf_free(cnf);	
+							cnf->refcount--;
+							if (!cnf->refcount) {
+								conf_free(cnf);
 							}
 							AST_LIST_UNLOCK(&confs);
 							break;

Modified: team/bweschke/func_realtime_bug_5695/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_queue.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_queue.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_queue.c Mon Mar 13 16:21:13 2006
@@ -1624,6 +1624,14 @@
 static void record_abandoned(struct queue_ent *qe)
 {
 	ast_mutex_lock(&qe->parent->lock);
+	manager_event(EVENT_FLAG_AGENT, "QueueCallerAbandon",
+	              "Queue: %s\r\n"
+	              "Uniqueid: %s\r\n"
+	              "Position: %d\r\n"
+	              "OriginalPosition: %d\r\n"
+	              "HoldTime: %d\r\n",
+	              qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (int)(time(NULL) - qe->start));
+
 	qe->parent->callsabandoned++;
 	ast_mutex_unlock(&qe->parent->lock);
 }

Modified: team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c (original)
+++ team/bweschke/func_realtime_bug_5695/apps/app_voicemail.c Mon Mar 13 16:21:13 2006
@@ -4508,7 +4508,7 @@
 static int vm_intro_ru(struct ast_channel *chan,struct vm_state *vms)
 {
 	int res;
-	int lastnum;
+	int lastnum = 0;
 	int dcnum;
 
 	res = ast_play_and_wait(chan, "vm-youhave");

Modified: team/bweschke/func_realtime_bug_5695/ast_expr2.fl
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/ast_expr2.fl?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/ast_expr2.fl (original)
+++ team/bweschke/func_realtime_bug_5695/ast_expr2.fl Mon Mar 13 16:21:13 2006
@@ -201,7 +201,7 @@
 			s, parseio->string,spacebuf2);
 #endif
 #ifndef STANDALONE
-	ast_log(LOG_WARNING,"If you have questions, please refer to doc/README.variables in the asterisk source.\n");
+	ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
 #endif
 	return(0);
 }

Modified: team/bweschke/func_realtime_bug_5695/ast_expr2f.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/ast_expr2f.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/ast_expr2f.c (original)
+++ team/bweschke/func_realtime_bug_5695/ast_expr2f.c Mon Mar 13 16:21:13 2006
@@ -2981,7 +2981,7 @@
 			s, parseio->string,spacebuf2);
 #endif
 #ifndef STANDALONE
-	ast_log(LOG_WARNING,"If you have questions, please refer to doc/README.variables in the asterisk source.\n");
+	ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
 #endif
 	return(0);
 }

Modified: team/bweschke/func_realtime_bug_5695/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/cdr/cdr_tds.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/cdr/cdr_tds.c (original)
+++ team/bweschke/func_realtime_bug_5695/cdr/cdr_tds.c Mon Mar 13 16:21:13 2006
@@ -89,6 +89,7 @@
 static char *config = "cdr_tds.conf";
 
 static char *hostname = NULL, *dbname = NULL, *dbuser = NULL, *password = NULL, *charset = NULL, *language = NULL;
+static char *table = NULL;
 
 static int connected = 0;
 
@@ -135,7 +136,7 @@
 
 	sprintf(
 		sqlcmd,
-		"INSERT INTO cdr "
+		"INSERT INTO %s "
 		"("
 			"accountcode, "
 			"src, "
@@ -175,6 +176,7 @@
 			"'%s', "	/* amaflags */
 			"'%s'"		/* uniqueid */
 		")",
+		table,
 		accountcode,
 		src,
 		dst,
@@ -415,6 +417,7 @@
 	if (password) free(password);
 	if (charset) free(charset);
 	if (language) free(language);
+	if (table) free(table);
 
 	return 0;
 }
@@ -475,6 +478,13 @@
 	else
 		language = strdup("us_english");
 
+	ptr = ast_variable_retrieve(cfg,"global","table");
+	if (ptr == NULL) {
+		ast_log(LOG_DEBUG,"cdr_tds: table not specified.  Assuming cdr\n");
+		ptr = "cdr";
+	}
+	table = strdup(ptr);
+
 	ast_config_destroy(cfg);
 
 	mssql_connect();

Modified: team/bweschke/func_realtime_bug_5695/channel.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channel.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channel.c (original)
+++ team/bweschke/func_realtime_bug_5695/channel.c Mon Mar 13 16:21:13 2006
@@ -2122,7 +2122,7 @@
 		if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HANGUP)
 			done = 1;	/* force a break */
 		else if (f->frametype == AST_FRAME_TEXT) {		/* what we want */
-			buf = strndup((char *) f->data, f->datalen);	/* dup and break */
+			buf = ast_strndup((char *) f->data, f->datalen);	/* dup and break */
 			done = 1;
 		}
 		ast_frfree(f);

Modified: team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c (original)
+++ team/bweschke/func_realtime_bug_5695/channels/chan_iax2.c Mon Mar 13 16:21:13 2006
@@ -5759,8 +5759,6 @@
 	ast_log(LOG_DEBUG, "Expiring registration for peer '%s'\n", p->name);
 	/* Reset the address */
 	memset(&p->addr, 0, sizeof(p->addr));
-	/* Reset expire notice */
-	p->expire = -1;
 	/* Reset expiry value */
 	p->expiry = min_reg_expire;
 	if (!ast_test_flag(p, IAX_TEMPONLY))
@@ -5778,6 +5776,9 @@
 
 static int expire_registry(void *data)
 {
+	struct iax2_peer *p = data;
+	/* Reset expire notice */
+	p->expire = -1;
 #ifdef SCHED_MULTITHREADED
 	if (schedule_action(__expire_registry, data))
 #endif		

Modified: team/bweschke/func_realtime_bug_5695/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channels/chan_misdn.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channels/chan_misdn.c (original)
+++ team/bweschke/func_realtime_bug_5695/channels/chan_misdn.c Mon Mar 13 16:21:13 2006
@@ -130,6 +130,7 @@
 	MISDN_ALERTING, /*!<  when Alerting */
 	MISDN_BUSY, /*!<  when BUSY */
 	MISDN_CONNECTED, /*!<  when connected */
+	MISDN_DISCONNECTED, /*!<  when connected */
 	MISDN_BRIDGED, /*!<  when bridged */
 	MISDN_CLEANING, /*!< when hangup from * but we were connected before */
 	MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
@@ -515,6 +516,20 @@
 	return 0;
 }
 
+static int misdn_port_down (int fd, int argc, char *argv[])
+{
+	int port;
+	
+	if (argc != 4)
+		return RESULT_SHOWUSAGE;
+	
+	port = atoi(argv[3]);
+	
+	misdn_lib_get_port_down(port);
+  
+	return 0;
+}
+
 
 static int misdn_show_config (int fd, int argc, char *argv[])
 {
@@ -633,13 +648,14 @@
 {
 	struct ast_channel *ast=help->ast;
 	ast_cli(fd,
-		"* Pid:%d Prt:%d Ch:%d Mode:%s Org:%s dad:%s oad:%s ctx:%s state:%s\n",
+		"* Pid:%d Prt:%d Ch:%d Mode:%s Org:%s dad:%s oad:%s rad:%s ctx:%s state:%s\n",
 
 		bc->pid, bc->port, bc->channel,
 		bc->nt?"NT":"TE",
 		help->orginator == ORG_AST?"*":"I",
 		ast?ast->exten:NULL,
 		ast?AST_CID_P(ast):NULL,
+		bc->rad,
 		ast?ast->context:NULL,
 		misdn_get_ch_state(help)
 		);
@@ -1031,6 +1047,15 @@
   "Usage: misdn port up <port>\n"
 };
 
+static struct ast_cli_entry cli_port_down =
+{ {"misdn","port","down", NULL},
+  misdn_port_down,
+  "Tries to deacivate the L1 on the given port", 
+  "Usage: misdn port down <port>\n"
+};
+
+
+
 static struct ast_cli_entry cli_show_stacks =
 { {"misdn","show","stacks", NULL},
   misdn_show_stacks,
@@ -1316,26 +1341,47 @@
 			misdn_cfg_get( port, MISDN_CFG_LOCALDIALPLAN, &bc->onumplan, sizeof(int));
 			switch (bc->onumplan) {
 			case NUMPLAN_INTERNATIONAL:
-				chan_misdn_log(2, port, " --> TON: International\n");
+				chan_misdn_log(2, port, " --> LTON: International\n");
 				break;
 			case NUMPLAN_NATIONAL:
-				chan_misdn_log(2, port, " --> TON: National\n");
+				chan_misdn_log(2, port, " --> LTON: National\n");
 				break;
 			case NUMPLAN_SUBSCRIBER:
-				chan_misdn_log(2, port, " --> TON: Subscriber\n");
+				chan_misdn_log(2, port, " --> LTON: Subscriber\n");
 				break;
 			case NUMPLAN_UNKNOWN:
-				chan_misdn_log(2, port, " --> TON: Unknown\n");
+				chan_misdn_log(2, port, " --> LTON: Unknown\n");
 				break;
 				/* Maybe we should cut off the prefix if present ? */
 			default:
 					chan_misdn_log(0, port, " --> !!!! Wrong dialplan setting, please see the misdn.conf sample file\n ");
 					break;
 			}
-		}
-
-		
-				
+
+			misdn_cfg_get( port, MISDN_CFG_CPNDIALPLAN, &bc->cpnnumplan, sizeof(int));
+
+			switch (bc->cpnnumplan) {
+			case NUMPLAN_INTERNATIONAL:
+				chan_misdn_log(2, port, " --> CTON: International\n");
+				break;
+			case NUMPLAN_NATIONAL:
+				chan_misdn_log(2, port, " --> CTON: National\n");
+				break;
+			case NUMPLAN_SUBSCRIBER:
+				chan_misdn_log(2, port, " --> CTON: Subscriber\n");
+				break;
+			case NUMPLAN_UNKNOWN:
+				chan_misdn_log(2, port, " --> CTON: Unknown\n");
+				break;
+				/* Maybe we should cut off the prefix if present ? */
+			default:
+					chan_misdn_log(0, port, " --> !!!! Wrong dialplan setting, please see the misdn.conf sample file\n ");
+					break;
+			}
+
+		}
+
+		
 		
 	} else { /** ORIGINATOR MISDN **/
 		
@@ -1904,6 +1950,11 @@
 			tone_indicate(p, TONE_BUSY);
 			misdn_lib_send_event( bc, EVENT_DISCONNECT);
       
+			p->state=MISDN_CLEANING; /* MISDN_HUNGUP_FROM_AST; */
+			break;
+		case MISDN_DISCONNECTED:
+			chan_misdn_log(2, bc->port, " --> * State Disconnected\n");
+			misdn_lib_send_event( bc, EVENT_RELEASE);
 			p->state=MISDN_CLEANING; /* MISDN_HUNGUP_FROM_AST; */
 			break;
 
@@ -2807,9 +2858,7 @@
 				default:
 					chan_misdn_log(2,  bc->port, "* --> In State Default\n");
 					chan_misdn_log(2,  bc->port, "* --> Queue Hangup\n");
-	
-					
-					if (ast && MISDN_ASTERISK_PVT(ast)) {
+					if (ast) {
 						ast_queue_hangup(ast);
 					} else {
 						chan_misdn_log (0,  bc->port, "!! Not really queued!\n");
@@ -2915,9 +2964,14 @@
  	case 4:
  	case 22:
  	case 27:
+		/*
+		 * Not Queueing the Congestion anymore, since we want to hear
+		 * the inband message
+		 *
 		chan_misdn_log(1, bc?bc->port:0, " --> * SEND: Queue Congestion pid:%d\n", bc?bc->pid:-1);
 		
 		ast_queue_control(ast, AST_CONTROL_CONGESTION);
+		*/
 		break;
 		
 	case 21:
@@ -3403,6 +3457,8 @@
 			   dialled number, or perhaps even giving an
 			   alternative number, then play it instead of
 			   immediately releasing the call */
+			chan_misdn_log(0,bc->port, " --> Inband Info Avail, not sending RELEASE\n");
+			ch->state = MISDN_DISCONNECTED;
 			start_bc_tones(ch);
 			break;
 		}
@@ -3735,6 +3791,7 @@
 
 	ast_cli_register(&cli_restart_port);
 	ast_cli_register(&cli_port_up);
+	ast_cli_register(&cli_port_down);
 	ast_cli_register(&cli_set_debug);
 	ast_cli_register(&cli_set_crypt_debug);
 	ast_cli_register(&cli_reload);
@@ -3789,6 +3846,7 @@
 	ast_cli_unregister(&cli_show_stacks);
 	ast_cli_unregister(&cli_restart_port);
 	ast_cli_unregister(&cli_port_up);
+	ast_cli_unregister(&cli_port_down);
 	ast_cli_unregister(&cli_set_debug);
 	ast_cli_unregister(&cli_set_crypt_debug);
 	ast_cli_unregister(&cli_reload);

Modified: team/bweschke/func_realtime_bug_5695/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/func_realtime_bug_5695/channels/chan_phone.c?rev=12835&r1=12834&r2=12835&view=diff
==============================================================================
--- team/bweschke/func_realtime_bug_5695/channels/chan_phone.c (original)
+++ team/bweschke/func_realtime_bug_5695/channels/chan_phone.c Mon Mar 13 16:21:13 2006
@@ -36,6 +36,7 @@
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
+#include <signal.h>
 #include <linux/telephony.h>
 /* Still use some IXJ specific stuff */
 #include <linux/version.h>
@@ -107,6 +108,9 @@
 /* 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);
+

[... 2525 lines stripped ...]


More information about the asterisk-commits mailing list