[svn-commits] irroot: branch irroot/app_queue_skill r342015 - in /team/irroot/app_queue_ski...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Oct 24 01:54:29 CDT 2011


Author: irroot
Date: Mon Oct 24 01:54:22 2011
New Revision: 342015

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=342015
Log:
Merge with trunk [337927:342014]

Added:
    team/irroot/app_queue_skill/utils/astdb2bdb.c
      - copied unchanged from r342014, trunk/utils/astdb2bdb.c
Modified:
    team/irroot/app_queue_skill/   (props changed)
    team/irroot/app_queue_skill/CHANGES
    team/irroot/app_queue_skill/Makefile
    team/irroot/app_queue_skill/Makefile.moddir_rules
    team/irroot/app_queue_skill/UPGRADE.txt
    team/irroot/app_queue_skill/addons/chan_ooh323.c
    team/irroot/app_queue_skill/addons/ooh323c/src/memheap.c
    team/irroot/app_queue_skill/agi/agi.xml
    team/irroot/app_queue_skill/apps/app_dial.c
    team/irroot/app_queue_skill/apps/app_fax.c
    team/irroot/app_queue_skill/apps/app_macro.c
    team/irroot/app_queue_skill/apps/app_meetme.c
    team/irroot/app_queue_skill/apps/app_minivm.c
    team/irroot/app_queue_skill/apps/app_osplookup.c
    team/irroot/app_queue_skill/apps/app_queue.c
    team/irroot/app_queue_skill/apps/app_url.c
    team/irroot/app_queue_skill/apps/app_voicemail.c
    team/irroot/app_queue_skill/autoconf/ast_ext_lib.m4
    team/irroot/app_queue_skill/build_tools/cflags-devmode.xml
    team/irroot/app_queue_skill/build_tools/cflags.xml
    team/irroot/app_queue_skill/build_tools/embed_modules.xml
    team/irroot/app_queue_skill/build_tools/prep_tarball
    team/irroot/app_queue_skill/cdr/cdr_custom.c
    team/irroot/app_queue_skill/cdr/cdr_manager.c
    team/irroot/app_queue_skill/cdr/cdr_pgsql.c
    team/irroot/app_queue_skill/cdr/cdr_sqlite3_custom.c
    team/irroot/app_queue_skill/cdr/cdr_syslog.c
    team/irroot/app_queue_skill/cel/cel_custom.c
    team/irroot/app_queue_skill/cel/cel_sqlite3_custom.c
    team/irroot/app_queue_skill/channels/chan_dahdi.c
    team/irroot/app_queue_skill/channels/chan_gtalk.c
    team/irroot/app_queue_skill/channels/chan_iax2.c
    team/irroot/app_queue_skill/channels/chan_mgcp.c
    team/irroot/app_queue_skill/channels/chan_sip.c
    team/irroot/app_queue_skill/channels/chan_skinny.c
    team/irroot/app_queue_skill/channels/chan_unistim.c
    team/irroot/app_queue_skill/channels/chan_usbradio.c
    team/irroot/app_queue_skill/channels/sig_analog.c
    team/irroot/app_queue_skill/channels/sig_pri.c
    team/irroot/app_queue_skill/channels/sig_ss7.c
    team/irroot/app_queue_skill/channels/sig_ss7.h
    team/irroot/app_queue_skill/channels/sip/include/dialog.h
    team/irroot/app_queue_skill/channels/sip/include/sip.h
    team/irroot/app_queue_skill/configs/queues.conf.sample
    team/irroot/app_queue_skill/configure
    team/irroot/app_queue_skill/configure.ac
    team/irroot/app_queue_skill/doc/appdocsxml.dtd
    team/irroot/app_queue_skill/funcs/func_callerid.c
    team/irroot/app_queue_skill/funcs/func_channel.c
    team/irroot/app_queue_skill/funcs/func_jitterbuffer.c
    team/irroot/app_queue_skill/funcs/func_odbc.c
    team/irroot/app_queue_skill/include/asterisk/autoconfig.h.in
    team/irroot/app_queue_skill/include/asterisk/cel.h
    team/irroot/app_queue_skill/include/asterisk/channel.h
    team/irroot/app_queue_skill/include/asterisk/features.h
    team/irroot/app_queue_skill/include/asterisk/logger.h
    team/irroot/app_queue_skill/include/asterisk/manager.h
    team/irroot/app_queue_skill/include/asterisk/module.h
    team/irroot/app_queue_skill/include/asterisk/res_fax.h
    team/irroot/app_queue_skill/include/asterisk/sha1.h
    team/irroot/app_queue_skill/include/asterisk/strings.h
    team/irroot/app_queue_skill/include/asterisk/xmldoc.h
    team/irroot/app_queue_skill/main/cel.c
    team/irroot/app_queue_skill/main/channel.c
    team/irroot/app_queue_skill/main/db.c
    team/irroot/app_queue_skill/main/features.c
    team/irroot/app_queue_skill/main/file.c
    team/irroot/app_queue_skill/main/loader.c
    team/irroot/app_queue_skill/main/logger.c
    team/irroot/app_queue_skill/main/manager.c
    team/irroot/app_queue_skill/main/pbx.c
    team/irroot/app_queue_skill/main/say.c
    team/irroot/app_queue_skill/main/sha1.c
    team/irroot/app_queue_skill/main/udptl.c
    team/irroot/app_queue_skill/main/xmldoc.c
    team/irroot/app_queue_skill/pbx/pbx_lua.c
    team/irroot/app_queue_skill/pbx/pbx_realtime.c
    team/irroot/app_queue_skill/res/res_agi.c
    team/irroot/app_queue_skill/res/res_config_sqlite.c
    team/irroot/app_queue_skill/res/res_fax.c
    team/irroot/app_queue_skill/res/res_jabber.c
    team/irroot/app_queue_skill/res/res_rtp_asterisk.c
    team/irroot/app_queue_skill/tests/test_amihooks.c
    team/irroot/app_queue_skill/tests/test_dlinklists.c
    team/irroot/app_queue_skill/tests/test_format_api.c
    team/irroot/app_queue_skill/tests/test_gosub.c
    team/irroot/app_queue_skill/tests/test_linkedlists.c
    team/irroot/app_queue_skill/tests/test_locale.c
    team/irroot/app_queue_skill/tests/test_logger.c
    team/irroot/app_queue_skill/tests/test_security_events.c
    team/irroot/app_queue_skill/utils/Makefile
    team/irroot/app_queue_skill/utils/utils.xml

Propchange: team/irroot/app_queue_skill/
------------------------------------------------------------------------------
--- branch-10-blocked (original)
+++ branch-10-blocked Mon Oct 24 01:54:22 2011
@@ -1,1 +1,1 @@
-/branches/10:330492,330514,337433,337640
+/branches/10:330492,330514,337433,337640,338493

Propchange: team/irroot/app_queue_skill/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Propchange: team/irroot/app_queue_skill/
------------------------------------------------------------------------------
    svn:mergeinfo = /trunk:337928-342014

Modified: team/irroot/app_queue_skill/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/CHANGES?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/CHANGES (original)
+++ team/irroot/app_queue_skill/CHANGES Mon Oct 24 01:54:22 2011
@@ -30,6 +30,25 @@
    specification of a list of codecs allowed and disallowed, without the
    requirement to use two different keywords.  For example, to specify all
    codecs except g729 and g723, one need only specify allow=all,!g729,!g723.
+
+Queue changes
+-------------
+ * Added queue options autopausebusy and autopauseunavail for automatically
+   pausing a queue member when their device reports busy or congestion.
+
+CDR postgresql driver changes
+-----------------------------
+ * Added command "cdr show pgsql status" to check connection status
+
+AMI (Asterisk Manager Interface) changes
+----------------------------------------
+ * Originate now generates an error response if the extension given
+   is not found in the dialplan
+
+FAX changes
+-----------
+ * FAXOPT(faxdetect) will enable a generic fax detect framehook for dialplan
+   control of faxdetect.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.8 to Asterisk 10 -------------------
@@ -111,6 +130,13 @@
  * Ability to read raw signed linear files with sample rates
    ranging from 8khz - 192khz.  The new file extensions introduced
    are .sln12, .sln24, .sln32, .sln44, .sln48, .sln96, .sln192.
+ * Due to protocol limitations, channel drivers other than SIP (eg. IAX2, MGCP,
+   Skinny, H.323, etc) can still only support the following codecs:
+   Audio: ulaw, alaw, slin, slin16, g719, g722, g723, g726, g726aal2, g729, gsm,
+          siren7, siren14, speex, speex16, ilbc, lpc10, adpcm
+   Video: h261, h263, h263p, h264, mpeg4
+   Image: jpeg, png
+   Text:  red, t140
 
 ConfBridge
 --------------------------
@@ -146,6 +172,7 @@
    user specifies or just throughout the whole string.
  * Added option to CHANNEL(pickupgroup) allow reading and setting the pickupgroup of channel.
  * Mark VALID_EXTEN() deprecated in favor of DIALPLAN_EXISTS()
+ * Added extensions to chan_ooh323 in function CHANNEL()
 
 libpri channel driver (chan_dahdi) DAHDI changes
 --------------------------
@@ -227,6 +254,8 @@
  * Added member option ignorebusy this when set and ringinuse is not
    will allow per member control of multiple calls as ringinuse does for
    the Queue.
+ * Added global option check_state_unknown to enforce checking of device state
+   when the device state is unknown app_queue will see unknown as available.
 
 Applications
 ------------

Modified: team/irroot/app_queue_skill/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/Makefile?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/Makefile (original)
+++ team/irroot/app_queue_skill/Makefile Mon Oct 24 01:54:22 2011
@@ -556,6 +556,7 @@
 	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/phoneprov"
 	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http"
 	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/sounds"
+	$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/moh"
 	$(INSTALL) -d "$(DESTDIR)$(ASTMANDIR)/man8"
 	$(INSTALL) -d "$(DESTDIR)$(AGI_DIR)"
 	$(INSTALL) -d "$(DESTDIR)$(ASTDBDIR)"

Modified: team/irroot/app_queue_skill/Makefile.moddir_rules
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/Makefile.moddir_rules?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/Makefile.moddir_rules (original)
+++ team/irroot/app_queue_skill/Makefile.moddir_rules Mon Oct 24 01:54:22 2011
@@ -1,6 +1,6 @@
 #
 # Asterisk -- A telephony toolkit for Linux.
-# 
+#
 # Makefile rules for subdirectories containing modules
 #
 # Copyright (C) 2006, Digium, Inc.
@@ -46,7 +46,7 @@
 C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS))
 CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS))
 
-ifneq ($(findstring $(MENUSELECT_CATEGORY),$(MENUSELECT_EMBED)),)
+ifneq ($(findstring EMBED_$(MENUSELECT_CATEGORY),$(MENUSELECT_EMBED)),)
     EMBEDDED_MODS:=$(C_MODS) $(CC_MODS)
 else
     LOADABLE_MODS:=$(C_MODS) $(CC_MODS)

Modified: team/irroot/app_queue_skill/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/UPGRADE.txt?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/UPGRADE.txt (original)
+++ team/irroot/app_queue_skill/UPGRADE.txt Mon Oct 24 01:54:22 2011
@@ -35,6 +35,10 @@
    - cdr.conf: [general] and [csv] sections
    - dnsmgr.conf
    - dsp.conf
+
+AMI:
+  - DBDelTree now correctly returns an error when 0 rows are deleted just as
+    the DBDel action does.
 
 SIP
 ===
@@ -87,7 +91,9 @@
    SQLite 3. An existing Berkeley astdb file can be converted with the astdb2sqlite3
    utility in the UTILS section of menuselect. If an existing astdb is found and no
    astdb.sqlite3 exists, astdb2sqlite3 will be compiled automatically. Asterisk will
-   convert an existing astdb to the SQLite3 version automatically at runtime.
+   convert an existing astdb to the SQLite3 version automatically at runtime. If
+   moving back from Asterisk 10 to Asterisk 1.8, the astdb2bdb utility can be used
+   to create a Berkeley DB copy of the SQLite3 astdb that Asterisk 10 uses.
 
 Manager:
  - The AMI protocol version was incremented to 1.2 as a result of changing two

Modified: team/irroot/app_queue_skill/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/addons/chan_ooh323.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/addons/chan_ooh323.c (original)
+++ team/irroot/app_queue_skill/addons/chan_ooh323.c Mon Oct 24 01:54:22 2011
@@ -25,42 +25,6 @@
 #include "chan_ooh323.h"
 #include <math.h>
 
-/*** DOCUMENTATION
-	<function name="OOH323" language="en_US">
-		<synopsis>
-			Allow Setting / Reading OOH323 Settings
-		</synopsis>
-		<syntax>
-			<parameter name="name" required="true">
-				<enumlist>
-					<enum name="faxdetect">
-						<para>Fax Detect [R/W]</para>
-						<para>Returns 0 or 1</para>
-						<para>Write yes or no</para>
-					</enum>
-				</enumlist>
-				<enumlist>
-					<enum name="t38support">
-						<para>t38support [R/W]</para>
-						<para>Returns 0 or 1</para>
-						<para>Write yes or no</para>
-					</enum>
-				</enumlist>
-				<enumlist>
-					<enum name="h323id">
-						<para>Returns h323id [R]</para>
-					</enum>
-				</enumlist>
-			</parameter>
-		</syntax>
-		<description>
-			<para>Read and set channel parameters in the dialplan.
-			<replaceable>name</replaceable> is one of the above only those with a [W] can be writen to.
-			</para>
-		</description>
-	</function>
-***/
-
 #define FORMAT_STRING_SIZE	512
 
 /* Defaults */
@@ -118,6 +82,8 @@
 static int ooh323_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen);
 static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, int *datalen);
 static int ooh323_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
+static int function_ooh323_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
+static int function_ooh323_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);
 
 static enum ast_rtp_glue_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
 static enum ast_rtp_glue_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
@@ -151,7 +117,8 @@
 	.queryoption = ooh323_queryoption,
 	.bridge = ast_rtp_instance_bridge,		/* XXX chan unlocked ? */
 	.early_bridge = ast_rtp_instance_early_bridge,
-
+	.func_channel_read = function_ooh323_read,
+	.func_channel_write = function_ooh323_write,
 };
 
 static struct ast_rtp_glue ooh323_rtp = {
@@ -400,10 +367,10 @@
 	ast_format_clear(&tmpfmt);
 	/* Don't hold a h323 pvt lock while we allocate a channel */
 	ast_mutex_unlock(&i->lock);
+   	ast_mutex_lock(&ooh323c_cn_lock);
    	ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name, 
 				i->accountcode, i->exten, i->context, linkedid, i->amaflags,
 				"OOH323/%s-%ld", host, callnumber);
-   	ast_mutex_lock(&ooh323c_cn_lock);
    	callnumber++;
    	ast_mutex_unlock(&ooh323c_cn_lock);
    
@@ -3518,13 +3485,6 @@
 	return res;
 }
 
-/*! \brief Structure to declare a dialplan function: OOH323 */
-static struct ast_custom_function ooh323_function = {
-        .name = "OOH323",
-        .read = function_ooh323_read,
-        .write = function_ooh323_write,
-};
-
 static int load_module(void)
 {
 	int res;
@@ -3692,9 +3652,6 @@
 		/* And start the monitor for the first time */
 		restart_monitor();
 	}
-
-	/* Register dialplan functions */
-	ast_custom_function_register(&ooh323_function);
 
 	return 0;
 }
@@ -4085,9 +4042,6 @@
 		ast_verbose("	unload_module- destroying OOH323 endpoint \n");
 	}
 	ooH323EpDestroy();
-
-	/* Unregister dial plan functions */
-	ast_custom_function_unregister(&ooh323_function);
 
 	if (gH323Debug) {
 		ast_verbose("+++ ooh323  unload_module \n");

Modified: team/irroot/app_queue_skill/addons/ooh323c/src/memheap.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/addons/ooh323c/src/memheap.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/addons/ooh323c/src/memheap.c (original)
+++ team/irroot/app_queue_skill/addons/ooh323c/src/memheap.c Mon Oct 24 01:54:22 2011
@@ -1062,6 +1062,7 @@
 void memHeapRelease (void** ppvMemHeap)
 {
    OSMemHeap** ppMemHeap = (OSMemHeap**)ppvMemHeap;
+   OSMemHeap* pMemHeap = *ppMemHeap;
 
    if (ppMemHeap != 0 && *ppMemHeap != 0 && --(*ppMemHeap)->refCnt == 0) {
       OSMemLink* pMemLink, *pMemLink2;
@@ -1078,9 +1079,10 @@
          free (pMemLink2);
       }
 
-      if ((*ppMemHeap)->flags & RT_MH_FREEHEAPDESC)
+      if ((*ppMemHeap)->flags & RT_MH_FREEHEAPDESC) {
+         ast_mutex_destroy(&pMemHeap->pLock);
          free (*ppMemHeap);
-
+      }
       *ppMemHeap = 0;
    }
 }

Modified: team/irroot/app_queue_skill/agi/agi.xml
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/agi/agi.xml?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/agi/agi.xml (original)
+++ team/irroot/app_queue_skill/agi/agi.xml Mon Oct 24 01:54:22 2011
@@ -1,14 +1,18 @@
 <category name="MENUSELECT_AGIS" displayname="AGI Samples" positive_output="yes">
   <member name="agi-test.agi">
 	<defaultenabled>no</defaultenabled>
+	<support_level>extended</support_level>
   </member>
   <member name="eagi-test">
 	<defaultenabled>no</defaultenabled>
+	<support_level>extended</support_level>
   </member>
   <member name="eagi-sphinx-test">
 	<defaultenabled>no</defaultenabled>
+	<support_level>extended</support_level>
   </member>
   <member name="jukebox.agi">
 	<defaultenabled>no</defaultenabled>
+	<support_level>extended</support_level>
   </member>
 </category>

Modified: team/irroot/app_queue_skill/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_dial.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/apps/app_dial.c (original)
+++ team/irroot/app_queue_skill/apps/app_dial.c Mon Oct 24 01:54:22 2011
@@ -152,12 +152,23 @@
 					<argument name="context" required="false" />
 					<argument name="exten" required="false" />
 					<argument name="priority" required="true" />
-					<para>When the caller hangs up, transfer the called party
-					to the specified destination and continue execution at that location.</para>
+					<para>When the caller hangs up, transfer the <emphasis>called</emphasis> party
+					to the specified destination and <emphasis>start</emphasis> execution at that location.</para>
+					<note>
+						<para>Any channel variables you want the called channel to inherit from the caller channel must be
+						prefixed with one or two underbars ('_').</para>
+					</note>
 				</option>
 				<option name="F">
-					<para>Proceed with dialplan execution at the next priority in the current extension if the
-					source channel hangs up.</para>
+					<para>When the caller hangs up, transfer the <emphasis>called</emphasis> party to the next priority of the current extension
+					and <emphasis>start</emphasis> execution at that location.</para>
+					<note>
+						<para>Any channel variables you want the called channel to inherit from the caller channel must be
+						prefixed with one or two underbars ('_').</para>
+					</note>
+					<note>
+						<para>Using this option from a Macro() or GoSub() might not make sense as there would be no return points.</para>
+					</note>
 				</option>
 				<option name="g">
 					<para>Proceed with dialplan execution at the next priority in the current extension if the
@@ -2325,7 +2336,9 @@
 			ast_copy_string(tc->exten, chan->exten, sizeof(tc->exten));
 
 		ast_channel_unlock(tc);
+		ast_channel_unlock(chan);
 		res = ast_call(tc, numsubst, 0); /* Place the call, but don't wait on the answer */
+		ast_channel_lock(chan);
 
 		/* Save the info in cdr's that we called them */
 		if (chan->cdr)

Modified: team/irroot/app_queue_skill/apps/app_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_fax.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/apps/app_fax.c (original)
+++ team/irroot/app_queue_skill/apps/app_fax.c Mon Oct 24 01:54:22 2011
@@ -46,7 +46,7 @@
 #include "asterisk/manager.h"
 
 /*** DOCUMENTATION
-	<application name="SendFAX" language="en_US">
+	<application name="SendFAX" language="en_US" module="app_fax">
 		<synopsis>
 			Send a Fax
 		</synopsis>
@@ -91,7 +91,7 @@
 			</variablelist>
 		</description>
 	</application>
-	<application name="ReceiveFAX" language="en_US">
+	<application name="ReceiveFAX" language="en_US" module="app_fax">
 		<synopsis>
 			Receive a Fax
 		</synopsis>

Modified: team/irroot/app_queue_skill/apps/app_macro.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_macro.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/apps/app_macro.c (original)
+++ team/irroot/app_queue_skill/apps/app_macro.c Mon Oct 24 01:54:22 2011
@@ -26,7 +26,7 @@
  */
 
 /*** MODULEINFO
-	<support_level>deprecated</support_level>
+	<support_level>core</support_level>
 	<replacement>app_stack (GoSub)</replacement>
  */
 

Modified: team/irroot/app_queue_skill/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_meetme.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/apps/app_meetme.c (original)
+++ team/irroot/app_queue_skill/apps/app_meetme.c Mon Oct 24 01:54:22 2011
@@ -147,10 +147,13 @@
 					</option>
 					<option name="p" hasparams="optional">
 						<para>Allow user to exit the conference by pressing <literal>#</literal> (default)
-						or any of the defined keys. If keys contain <literal>*</literal> this will override
-						option <literal>s</literal>. The key used is set to channel variable
+						or any of the defined keys.  The key used is set to channel variable
 						<variable>MEETME_EXIT_KEY</variable>.</para>
 						<argument name="keys" required="true" />
+						<note>
+							<para>Option <literal>s</literal> has priority for <literal>*</literal>
+							since it cannot change its activation code.</para>
+						</note>
 					</option>
 					<option name="P">
 						<para>Always prompt for the pin even if it is specified.</para>
@@ -192,6 +195,10 @@
 						<para>Allow user to exit the conference by entering a valid single digit
 						extension <variable>MEETME_EXIT_CONTEXT</variable> or the current context
 						if that variable is not defined.</para>
+						<note>
+							<para>Option <literal>s</literal> has priority for <literal>*</literal>
+							since it cannot change its activation code.</para>
+						</note>
 					</option>
 					<option name="1">
 						<para>Do not play message when first person enters</para>
@@ -3636,7 +3643,10 @@
 					}
 
 					conf_flush(fd, chan);
-				/* Since this option could absorb DTMF meant for the previous (menu), we have to check this one last */
+				/*
+				 * Since options using DTMF could absorb DTMF meant for the
+				 * conference menu, we have to check them after the menu.
+				 */
 				} else if ((f->frametype == AST_FRAME_DTMF) && ast_test_flag64(confflags, CONFFLAG_EXIT_CONTEXT) && ast_exists_extension(chan, exitcontext, dtmfstr, 1, "")) {
 					if (ast_test_flag64(confflags, CONFFLAG_PASS_DTMF)) {
 						conf_queue_dtmf(conf, user, f);

Modified: team/irroot/app_queue_skill/apps/app_minivm.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_minivm.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/apps/app_minivm.c (original)
+++ team/irroot/app_queue_skill/apps/app_minivm.c Mon Oct 24 01:54:22 2011
@@ -1313,6 +1313,9 @@
 	}
 	/* Allocate channel used for chanvar substitution */
 	ast = ast_dummy_channel_alloc();
+	if (!ast) {
+		return -1;
+	}
 
 	snprintf(dur, sizeof(dur), "%d:%02d", duration / 60, duration % 60);
 
@@ -1473,8 +1476,7 @@
 	ast_safe_system(tmp2);
 	ast_debug(1, "Sent message to %s with command '%s' - %s\n", vmu->email, global_mailcmd, template->attachment ? "(media attachment)" : "");
 	ast_debug(3, "Actual command used: %s\n", tmp2);
-	if (ast)
-		ast = ast_channel_release(ast);
+	ast = ast_channel_unref(ast);
 	ast_free(str1);
 	ast_free(str2);
 	return 0;

Modified: team/irroot/app_queue_skill/apps/app_osplookup.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_osplookup.c?view=diff&rev=342015&r1=342014&r2=342015
==============================================================================
--- team/irroot/app_queue_skill/apps/app_osplookup.c (original)
+++ team/irroot/app_queue_skill/apps/app_osplookup.c Mon Oct 24 01:54:22 2011
@@ -138,6 +138,9 @@
 				<variable name="OSPINPEERIP">
 					<para>The last hop IP address.</para>
 				</variable>
+				<variable name="OSPINTECH">
+					<para>The inbound channel technology for the call.</para>
+				</variable>
 				<variable name="OSPINHANDLE">
 					<para>The inbound call OSP transaction handle.</para>
 				</variable>
@@ -177,11 +180,20 @@
 				<variable name="OSPINTOHOST">
 					<para>The inbound To header host part.</para>
 				</variable>
+				<variable name="OSPINRPIDUSER">
+					<para>The inbound Remote-Party-ID header user part.</para>
+				</variable>
+				<variable name="OSPINPAIUSER">
+					<para>The inbound P-Asserted-Identify header user part.</para>
+				</variable>
 				<variable name="OSPINDIVUSER">
 					<para>The inbound Diversion header user part.</para>
 				</variable>
 				<variable name="OSPINDIVHOST">
 					<para>The inbound Diversion header host part.</para>
+				</variable>
+				<variable name="OSPINPCIUSER">
+					<para>The inbound P-Charge-Info header user part.</para>
 				</variable>
 				<variable name="OSPINCUSTOMINFOn">
 					<para>The inbound custom information, where <literal>n</literal> is the index beginning with <literal>1</literal>
@@ -510,7 +522,7 @@
 #define OSP_DEVICE_ID			((const char*)"")			/* OSP device ID */
 #define OSP_DEF_MAXDESTS		((unsigned int)5)			/* OSP default max number of destinations */
 #define OSP_DEF_TIMELIMIT		((unsigned int)0)			/* OSP default duration limit, no limit */
-#define OSP_DEF_PROTOCOL		OSP_PROT_SIP				/* OSP default destination protocol, SIP */
+#define OSP_DEF_PROTOCOL		OSP_PROT_SIP				/* OSP default signaling protocol, SIP */
 #define OSP_DEF_WORKMODE		OSP_MODE_DIRECT				/* OSP default work mode, direct */
 #define OSP_DEF_SRVTYPE			OSP_SRV_VOICE				/* OSP default service type, voice */
 #define OSP_MAX_CUSTOMINFO		((unsigned int)8)			/* OSP max number of custom info */
@@ -533,7 +545,7 @@
 	unsigned int timeout;							/* Timeout in ms */
 	char source[OSP_SIZE_NORSTR];					/* IP of self */
 	enum osp_authpolicy authpolicy;					/* OSP authentication policy */
-	const char* defprotocol;						/* OSP default destination protocol */
+	const char* defprotocol;						/* OSP default signaling protocol */
 	enum osp_workmode workmode;						/* OSP work mode */
 	enum osp_srvtype srvtype;						/* OSP service type */
 	struct osp_provider* next;						/* Pointer to next OSP provider */
@@ -553,10 +565,13 @@
 	const char* opname[OSPC_OPNAME_NUMBER];	/* Operator Names */
 };
 
-/* SIP Diversion Header Parameters */
-struct osp_diversion {
-	const char* user;						/* Diversion header user info */
-	const char* host;						/* Diversion header host info */
+/* SIP Header Parameters */
+struct osp_headers {
+	const char* rpiduser;					/* Remote-Party-ID header user info */
+	const char* paiuser;					/* P-Asserted-Identity header user info */
+	const char* divuser;					/* Diversion header user info */
+	const char* divhost;					/* Diversion header host info */
+	const char* pciuser;					/* P-Charge-Info header user info */
 };
 
 /* OSP Application In/Output Results */
@@ -565,7 +580,8 @@
 	int outhandle;										/* Outbound transaction handle */
 	unsigned int intimelimit;							/* Inbound duration limit */
 	unsigned int outtimelimit;							/* Outbound duration limit */
-	char tech[OSP_SIZE_TECHSTR];						/* Outbound Asterisk TECH string */
+	char intech[OSP_SIZE_TECHSTR];						/* Inbound Asterisk TECH string */
+	char outtech[OSP_SIZE_TECHSTR];						/* Outbound Asterisk TECH string */
 	char dest[OSP_SIZE_NORSTR];							/* Outbound destination IP address */
 	char calling[OSP_SIZE_NORSTR];						/* Outbound calling number, may be translated */
 	char called[OSP_SIZE_NORSTR];						/* Outbound called number, may be translated */
@@ -1162,7 +1178,7 @@
 {
 	int res;
 	OSPE_DEST_OSPENABLED enabled;
-	OSPE_DEST_PROTOCOL protocol;
+	OSPE_PROTOCOL_NAME protocol;
 	char dest[OSP_SIZE_NORSTR];
 	OSPE_OPERATOR_NAME type;
 	int error;
@@ -1227,48 +1243,48 @@
 	res = OSP_OK;
 	osp_convert_outin(destination, dest, sizeof(dest));
 	switch(protocol) {
-	case OSPC_DPROT_SIP:
+	case OSPC_PROTNAME_SIP:
 		ast_debug(1, "OSP: protocol SIP\n");
-		ast_copy_string(results->tech, OSP_TECH_SIP, sizeof(results->tech));
+		ast_copy_string(results->outtech, OSP_TECH_SIP, sizeof(results->outtech));
 		ast_copy_string(results->dest, dest, sizeof(results->dest));
 		ast_copy_string(results->calling, calling, sizeof(results->calling));
 		ast_copy_string(results->called, called, sizeof(results->called));
 		break;
-	case OSPC_DPROT_Q931:
+	case OSPC_PROTNAME_Q931:
 		ast_debug(1, "OSP: protocol Q.931\n");
-		ast_copy_string(results->tech, OSP_TECH_H323, sizeof(results->tech));
+		ast_copy_string(results->outtech, OSP_TECH_H323, sizeof(results->outtech));
 		ast_copy_string(results->dest, dest, sizeof(results->dest));
 		ast_copy_string(results->calling, calling, sizeof(results->calling));
 		ast_copy_string(results->called, called, sizeof(results->called));
 		break;
-	case OSPC_DPROT_IAX:
+	case OSPC_PROTNAME_IAX:
 		ast_debug(1, "OSP: protocol IAX\n");
-		ast_copy_string(results->tech, OSP_TECH_IAX, sizeof(results->tech));
+		ast_copy_string(results->outtech, OSP_TECH_IAX, sizeof(results->outtech));
 		ast_copy_string(results->dest, dest, sizeof(results->dest));
 		ast_copy_string(results->calling, calling, sizeof(results->calling));
 		ast_copy_string(results->called, called, sizeof(results->called));
 		break;
-	case OSPC_DPROT_SKYPE:
+	case OSPC_PROTNAME_SKYPE:
 		ast_debug(1, "OSP: protocol Skype\n");
-		ast_copy_string(results->tech, OSP_TECH_SKYPE, sizeof(results->tech));
+		ast_copy_string(results->outtech, OSP_TECH_SKYPE, sizeof(results->outtech));
 		ast_copy_string(results->dest, dest, sizeof(results->dest));
 		ast_copy_string(results->calling, calling, sizeof(results->calling));
 		ast_copy_string(results->called, called, sizeof(results->called));
 		break;
-	case OSPC_DPROT_UNDEFINED:
-	case OSPC_DPROT_UNKNOWN:
+	case OSPC_PROTNAME_UNDEFINED:
+	case OSPC_PROTNAME_UNKNOWN:
 		ast_debug(1, "OSP: unknown/undefined protocol '%d'\n", protocol);
 		ast_debug(1, "OSP: use default protocol '%s'\n", provider->defprotocol);
-		ast_copy_string(results->tech, provider->defprotocol, sizeof(results->tech));
+		ast_copy_string(results->outtech, provider->defprotocol, sizeof(results->outtech));
 		ast_copy_string(results->dest, dest, sizeof(results->dest));
 		ast_copy_string(results->calling, calling, sizeof(results->calling));
 		ast_copy_string(results->called, called, sizeof(results->called));
 		break;
-	case OSPC_DPROT_LRQ:
-	case OSPC_DPROT_T37:
-	case OSPC_DPROT_T38:
-	case OSPC_DPROT_SMPP:
-	case OSPC_DPROT_XMPP:
+	case OSPC_PROTNAME_LRQ:
+	case OSPC_PROTNAME_T37:
+	case OSPC_PROTNAME_T38:
+	case OSPC_PROTNAME_SMPP:
+	case OSPC_PROTNAME_XMPP:
 	default:
 		ast_log(LOG_WARNING, "OSP: unsupported protocol '%d'\n", protocol);
 		*reason = OSPC_FAIL_PROTOCOL_ERROR;
@@ -1470,7 +1486,7 @@
  * \param called Called number
  * \param snetid Source network ID
  * \param np NP parameters
- * \param div SIP Diversion header parameters
+ * \param headers SIP header parameters
  * \param cinfo Custom info
  * \param results Lookup results
  * \return OSP_OK Found , OSP_FAILED No route, OSP_ERROR Error
@@ -1484,12 +1500,13 @@
 	const char* called,
 	const char* snetid,
 	struct osp_npdata* np,
-	struct osp_diversion* div,
+	struct osp_headers* headers,
 	const char* cinfo[],
 	struct osp_results* results)
 {
 	int res;
 	struct osp_provider* provider = NULL;
+	OSPE_PROTOCOL_NAME protocol;
 	char source[OSP_SIZE_NORSTR];
 	char callingnum[OSP_SIZE_NORSTR];
 	char callednum[OSP_SIZE_NORSTR];
@@ -1518,7 +1535,7 @@
 	osp_convert_inout(results->dest, dest, sizeof(dest));
 
 	results->outhandle = OSP_INVALID_HANDLE;
-	results->tech[0] = '\0';
+	results->outtech[0] = '\0';
 	results->calling[0] = '\0';
 	results->called[0] = '\0';
 	results->token[0] = '\0';
@@ -1546,6 +1563,19 @@
 		return OSP_ERROR;
 	}
 
+	if (!strcasecmp(results->intech, OSP_TECH_SIP)) {
+		protocol = OSPC_PROTNAME_SIP;
+	} else if (!strcasecmp(results->intech, OSP_TECH_H323)) {
+		protocol = OSPC_PROTNAME_Q931;
+	} else if (!strcasecmp(results->intech, OSP_TECH_IAX)) {
+		protocol = OSPC_PROTNAME_IAX;
+	} else if (!strcasecmp(results->intech, OSP_TECH_SKYPE)) {
+		protocol = OSPC_PROTNAME_SKYPE;
+	} else {
+		protocol = OSPC_PROTNAME_SIP;
+	}
+	OSPPTransactionSetProtocol(results->outhandle, OSPC_PROTTYPE_SOURCE, protocol);
+
 	if (!ast_strlen_zero(snetid)) {
 		OSPPTransactionSetNetworkIds(results->outhandle, snetid, "");
 	}
@@ -1556,8 +1586,11 @@
 		OSPPTransactionSetOperatorName(results->outhandle, type, np->opname[type]);
 	}
 
-	osp_convert_inout(div->host, host, sizeof(host));
-	OSPPTransactionSetDiversion(results->outhandle, div->user, host);
+    OSPPTransactionSetRemotePartyId(results->outhandle, OSPC_NFORMAT_E164, headers->rpiduser);
+    OSPPTransactionSetAssertedId(results->outhandle, OSPC_NFORMAT_E164, headers->paiuser);
+	osp_convert_inout(headers->divhost, host, sizeof(host));
+	OSPPTransactionSetDiversion(results->outhandle, headers->divuser, host);
+    OSPPTransactionSetChargeInfo(results->outhandle, OSPC_NFORMAT_E164, headers->pciuser);
 
 	if (cinfo != NULL) {
 		for (i = 0; i < OSP_MAX_CUSTOMINFO; i++) {
@@ -1607,6 +1640,7 @@
 		OSPPTransactionSetServiceType(results->outhandle, OSPC_SERVICE_VOICE);
 		results->numdests = OSP_DEF_MAXDESTS;
 	}
+
 	error = OSPPTransactionRequestAuthorisation(results->outhandle,
 		src,
 		dev,
@@ -1778,7 +1812,7 @@
 		res = OSP_ERROR;
 	}
 
-	results->tech[0] = '\0';
+	results->outtech[0] = '\0';
 	results->dest[0] = '\0';
 	results->calling[0] = '\0';
 	results->called[0] = '\0';
@@ -2061,20 +2095,20 @@
 		ast_debug(1, "OSP: stdevrtt '%f'\n", rtt.sdev);
 
 		if (leg == OSP_CALL_INBOUND) {
-			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTP, OSPC_SFLOW_DOWNSTREAM, totalpackets[OSP_DIR_RX]);
-			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTCP, OSPC_SFLOW_UPSTREAM, totalpackets[OSP_DIR_TX]);
+			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTP, OSPC_SDIR_SRCREP, totalpackets[OSP_DIR_RX]);
+			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTCP, OSPC_SDIR_DESTREP, totalpackets[OSP_DIR_TX]);
 			if (lost[OSP_DIR_RX].value >= 0) {
 				value = lost[OSP_DIR_RX].value;
 			} else {
 				value = (int)lost[OSP_DIR_RX].avg;
 			}
-			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTP, OSPC_SFLOW_DOWNSTREAM, value, OSP_DEF_INTSTATS);
+			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTP, OSPC_SDIR_SRCREP, value, OSP_DEF_INTSTATS);
 			if (lost[OSP_DIR_TX].value >= 0) {
 				value = lost[OSP_DIR_TX].value;
 			} else {
 				value = (int)lost[OSP_DIR_TX].avg;
 			}
-			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTCP, OSPC_SFLOW_UPSTREAM, value, OSP_DEF_INTSTATS);
+			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTCP, OSPC_SDIR_DESTREP, value, OSP_DEF_INTSTATS);
 			if (jitter[OSP_DIR_RX].value >= 0) {
 				value = jitter[OSP_DIR_RX].value;
 			} else {
@@ -2082,7 +2116,7 @@
 			}
 			OSPPTransactionSetJitter(trans,
 				OSPC_SMETRIC_RTP,
-				OSPC_SFLOW_DOWNSTREAM,
+				OSPC_SDIR_SRCREP,
 				OSP_DEF_INTSTATS,
 				(int)jitter[OSP_DIR_RX].min,
 				(int)jitter[OSP_DIR_RX].max,
@@ -2092,13 +2126,13 @@
 			} else {
 				value = (int)jitter[OSP_DIR_TX].avg;
 			}
-			OSPPTransactionSetJitter(trans, OSPC_SMETRIC_RTCP, OSPC_SFLOW_UPSTREAM,
+			OSPPTransactionSetJitter(trans, OSPC_SMETRIC_RTCP, OSPC_SDIR_DESTREP,
 				OSP_DEF_INTSTATS, (int)jitter[OSP_DIR_TX].min, (int)jitter[OSP_DIR_TX].max, value, jitter[OSP_DIR_TX].sdev);
 		} else {
-			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTP, OSPC_SFLOW_UPSTREAM, totalpackets[OSP_DIR_RX]);
-			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTCP, OSPC_SFLOW_DOWNSTREAM, totalpackets[OSP_DIR_TX]);
-			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTP, OSPC_SFLOW_UPSTREAM, lost[OSP_DIR_RX].value, OSP_DEF_INTSTATS);
-			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTCP, OSPC_SFLOW_DOWNSTREAM, lost[OSP_DIR_TX].value, OSP_DEF_INTSTATS);
+			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTP, OSPC_SDIR_DESTREP, totalpackets[OSP_DIR_RX]);
+			OSPPTransactionSetPackets(trans, OSPC_SMETRIC_RTCP, OSPC_SDIR_SRCREP, totalpackets[OSP_DIR_TX]);
+			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTP, OSPC_SDIR_DESTREP, lost[OSP_DIR_RX].value, OSP_DEF_INTSTATS);
+			OSPPTransactionSetLost(trans, OSPC_SMETRIC_RTCP, OSPC_SDIR_SRCREP, lost[OSP_DIR_TX].value, OSP_DEF_INTSTATS);
 			if (jitter[OSP_DIR_RX].value >= 0) {
 				value = jitter[OSP_DIR_RX].value;
 			} else {
@@ -2106,7 +2140,7 @@
 			}
 			OSPPTransactionSetJitter(trans,
 				OSPC_SMETRIC_RTP,
-				OSPC_SFLOW_UPSTREAM,
+				OSPC_SDIR_DESTREP,
 				OSP_DEF_INTSTATS,
 				(int)jitter[OSP_DIR_RX].min,
 				(int)jitter[OSP_DIR_RX].max,
@@ -2119,19 +2153,13 @@
 			}
 			OSPPTransactionSetJitter(trans,
 				OSPC_SMETRIC_RTCP,
-				OSPC_SFLOW_DOWNSTREAM,
+				OSPC_SDIR_SRCREP,
 				OSP_DEF_INTSTATS,
 				(int)jitter[OSP_DIR_TX].min,
 				(int)jitter[OSP_DIR_TX].max,
 				value,
 				jitter[OSP_DIR_TX].sdev);
 		}
-		if (rtt.value >= 0) {
-			value = rtt.value;
-		} else {
-			value = (int)rtt.avg;
-		}
-		OSPPTransactionSetRoundTripDelay(trans, OSP_DEF_INTSTATS, (int)rtt.min, (int)rtt.max, value, rtt.sdev);
 
 		res = OSP_OK;
 	}
@@ -2175,6 +2203,8 @@
 		return OSP_FAILED;
 	}
 
+	OSPPTransactionSetRoleInfo(trans, OSPC_RSTATE_STOP, OSPC_RFORMAT_OSP, OSPC_RVENDOR_ASTERISK);
+
 	if (!recorded) {
 		reason = asterisk2osp(cause);
 		OSPPTransactionRecordFailure(trans, reason);
@@ -2316,7 +2346,7 @@
 	const char* snetid = "";
 	struct osp_npdata np;
 	OSPE_OPERATOR_NAME type;
-	struct osp_diversion div;
+	struct osp_headers headers;
 	unsigned int i;
 	const char* cinfo[OSP_MAX_CUSTOMINFO] = { NULL };
 	char buffer[OSP_SIZE_TOKSTR];
@@ -2373,8 +2403,11 @@
 		np.opname[type] = "";
 	}
 
-	div.user = "";
-	div.host = "";
+	headers.rpiduser = "";
+	headers.paiuser = "";
+	headers.divuser = "";
+	headers.divhost = "";
+	headers.pciuser = "";
 
 	headp = &chan->varshead;
 	AST_LIST_TRAVERSE(headp, current, entries) {
@@ -2382,6 +2415,8 @@
 			actualsrc = ast_var_value(current);
 		} else if (!strcasecmp(ast_var_name(current), "OSPINPEERIP")) {
 			srcdev = ast_var_value(current);
+		} else if (!strcasecmp(ast_var_name(current), "OSPINTECH")) {
+			ast_copy_string(results.intech, ast_var_value(current), sizeof(results.intech));
 		} else if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
 			if (sscanf(ast_var_value(current), "%30d", &results.inhandle) != 1) {
 				results.inhandle = OSP_INVALID_HANDLE;
@@ -2414,10 +2449,16 @@
 			np.opname[OSPC_OPNAME_MNC] = ast_var_value(current);
 		} else if (!strcasecmp(ast_var_name(current), "OSPINTOHOST")) {
 			ast_copy_string(results.dest, ast_var_value(current), sizeof(results.dest));
+		} else if (!strcasecmp(ast_var_name(current), "OSPINRPIDUSER")) {
+			headers.rpiduser = ast_var_value(current);
+		} else if (!strcasecmp(ast_var_name(current), "OSPINPAIUSER")) {
+			headers.paiuser = ast_var_value(current);
 		} else if (!strcasecmp(ast_var_name(current), "OSPINDIVUSER")) {
-			div.user = ast_var_value(current);
+			headers.divuser = ast_var_value(current);
 		} else if (!strcasecmp(ast_var_name(current), "OSPINDIVHOST")) {
-			div.host = ast_var_value(current);

[... 9834 lines stripped ...]



More information about the svn-commits mailing list