[asterisk-commits] may: branch may/chan_ooh323_evo r319936 - in /team/may/chan_ooh323_evo: ./ ap...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 20 03:29:34 CDT 2011


Author: may
Date: Fri May 20 03:29:23 2011
New Revision: 319936

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=319936
Log:
Merged revisions 319470-319471,319530,319564,319661,319759,319813,319867 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r319470 | wedhorn | 2011-05-18 01:59:55 +0400 (Wed, 18 May 2011) | 4 lines
  
  Remove extraneous line variables.
  
  The vars were either explicitly or implicitly not used.
................
  r319471 | rmudgett | 2011-05-18 02:04:59 +0400 (Wed, 18 May 2011) | 29 lines
  
  Merged revisions 319469 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r319469 | rmudgett | 2011-05-17 16:57:56 -0500 (Tue, 17 May 2011) | 22 lines
    
    Merged revision 319468 from
    https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
    
    ..........
      r319468 | rmudgett | 2011-05-17 16:49:31 -0500 (Tue, 17 May 2011) | 15 lines
    
      The mISDN HDLC mode is prevented on dialed channels.
    
      The use of mISDN HDLC mode is prevented if the mISDN dial technology
      option 'h1' is used when config option astdtmf=yes.
    
      There is a bug in channels/misdn/isdn_lib.c which prevents the use of HDLC
      mode.  Instead of setting the channel to HDLC mode it is set to
      transparent(no dsp, no hdlc), although hdlc is not "no hdlc".  I.e the
      logging message is correct, but the if condition is not.
    
      Make check the nodsp and hdlc flags.
    
      JIRA ABE-2787
      JIRA SWP-3437
    ..........
  ................
................
  r319530 | twilson | 2011-05-19 00:07:07 +0400 (Thu, 19 May 2011) | 31 lines
  
  Merged revisions 319529 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r319529 | twilson | 2011-05-18 13:05:34 -0700 (Wed, 18 May 2011) | 24 lines
    
    Merged revisions 319528 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.6.2
    
    ................
      r319528 | twilson | 2011-05-18 13:02:06 -0700 (Wed, 18 May 2011) | 17 lines
      
      Merged revisions 319527 via svnmerge from 
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r319527 | twilson | 2011-05-18 12:56:08 -0700 (Wed, 18 May 2011) | 10 lines
        
        Fix app_dial ring groups
        
        Revert part of r315643. We need to remove the datastore here as well.
        The code in bridging code will catch anything that app_dial might miss.
        
        (closes issue #19311)
        Reported by: mspuhler
        Patches: 
              issue_19311_no_answer.diff uploaded by elguero (license 37)
      ........
    ................
  ................
................
  r319564 | twilson | 2011-05-19 00:25:32 +0400 (Thu, 19 May 2011) | 18 lines
  
  Merged revisions 319552 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r319552 | twilson | 2011-05-18 13:22:36 -0700 (Wed, 18 May 2011) | 11 lines
    
    Unbreak the storing of registrations for restart
    
    The fix for issue 18882 broke retrieving non-realtime peers from the ast_db
    on restart/reload. This patch tries to unbreak things while leaving the intent
    of the original fix intact.
    (closes issue #19318)
    Reported by: remiq
    Patches: 
          diff.txt uploaded by twilson (license 396)
    Tested by: lmadsen, remiq
  ........
................
  r319661 | twilson | 2011-05-19 03:18:32 +0400 (Thu, 19 May 2011) | 29 lines
  
  Merged revisions 319654 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ................
    r319654 | twilson | 2011-05-18 16:15:58 -0700 (Wed, 18 May 2011) | 22 lines
    
    Merged revisions 319653 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.6.2
    
    ................
      r319653 | twilson | 2011-05-18 16:11:57 -0700 (Wed, 18 May 2011) | 15 lines
      
      Merged revisions 319652 via svnmerge from 
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r319652 | twilson | 2011-05-18 16:04:35 -0700 (Wed, 18 May 2011) | 8 lines
        
        Make sure everyone gets an unhold when a transfer succeeds
        
        Some phones, like the Snom phones, send a hold to the transfer target after
        before sending the REFER. We need to make sure that we unhold the parties
        that are being connected after the masquerade. If Local channels with the /nm
        option are used when dialing the parties, hold music would still be playing on
        the transfer target, even after being connected with the transferee.
      ........
    ................
  ................
................
  r319759 | rmudgett | 2011-05-19 20:52:47 +0400 (Thu, 19 May 2011) | 28 lines
  
  Merged revisions 319758 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r319758 | rmudgett | 2011-05-19 11:50:48 -0500 (Thu, 19 May 2011) | 21 lines
    
    CCSS generic agent with POTS and ISDN phones fail caller busy call-back test.
    
    If the following is true after a CCSS activation:
    * The generic agent is for an analog phone or ISDN phone.  (Caller party)
    * The called party becomes available.
    * The caller party is not available.
    
    When the caller party becomes available, the caller is not alerted to the
    called party being available.  The generic agent still thinks the caller
    is busy.
    
    * Fixed the generic agent device state event subscription to look for all
    device states that are considered available.
    
    * Encapsulated the device state test for CCSS generic device available in
    cc_generic_is_device_available().  Made the generic agent and monitor use
    the new function instead of the manually coded inline equivalent.
    
    JIRA AST-559
    JIRA SWP-3462
  ........
................
  r319813 | markm | 2011-05-19 22:12:49 +0400 (Thu, 19 May 2011) | 16 lines
  
  Merged revisions 319812 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r319812 | markm | 2011-05-19 13:59:01 -0400 (Thu, 19 May 2011) | 9 lines
    
    In cel_odbc, an uninitialized RWLIST is attempted to be locked.
    
    Added INIT and DESTROY for the RWLIST odbc_tables
    
    (closes issue #19331)
    Reported by: kobaz
    Patches: 
          odbc_cel.patch uploaded by kobaz (license 834)
  ........
................
  r319867 | jrose | 2011-05-19 22:36:38 +0400 (Thu, 19 May 2011) | 18 lines
  
  Merged revisions 319866 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r319866 | jrose | 2011-05-19 13:32:38 -0500 (Thu, 19 May 2011) | 11 lines
    
    Fix Randomize option on Park()
    
    The randomize option was generally not working like it should have at all on Park().
    This patch restores intended functionality.
    
    (closes issue #18862)
    Reported by: davidw
    Tested by: jrose
    
    Review: https://reviewboard.asterisk.org/r/1222/
  ........
................

Modified:
    team/may/chan_ooh323_evo/   (props changed)
    team/may/chan_ooh323_evo/apps/app_dial.c
    team/may/chan_ooh323_evo/cel/cel_odbc.c   (contents, props changed)
    team/may/chan_ooh323_evo/channels/chan_dahdi.c
    team/may/chan_ooh323_evo/channels/chan_sip.c
    team/may/chan_ooh323_evo/channels/chan_skinny.c
    team/may/chan_ooh323_evo/channels/misdn/isdn_lib.c
    team/may/chan_ooh323_evo/channels/sig_pri.c
    team/may/chan_ooh323_evo/channels/sig_pri.h
    team/may/chan_ooh323_evo/configs/cel_odbc.conf.sample   (props changed)
    team/may/chan_ooh323_evo/configs/chan_dahdi.conf.sample
    team/may/chan_ooh323_evo/configure
    team/may/chan_ooh323_evo/configure.ac
    team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in
    team/may/chan_ooh323_evo/main/ccss.c
    team/may/chan_ooh323_evo/main/features.c
    team/may/chan_ooh323_evo/sounds/Makefile   (props changed)

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
    svn:mergeinfo = /trunk:319427

Propchange: team/may/chan_ooh323_evo/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri May 20 03:29:23 2011
@@ -1,1 +1,1 @@
-/trunk:1-319388
+/trunk:1-319935

Modified: team/may/chan_ooh323_evo/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/apps/app_dial.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/apps/app_dial.c (original)
+++ team/may/chan_ooh323_evo/apps/app_dial.c Fri May 20 03:29:23 2011
@@ -2395,6 +2395,17 @@
 	peer = wait_for_answer(chan, outgoing, &to, peerflags, opt_args, &pa, &num, &result,
 		dtmf_progress, ignore_cc, &forced_clid, &stored_clid);
 
+	/* The ast_channel_datastore_remove() function could fail here if the
+	 * datastore was moved to another channel during a masquerade. If this is
+	 * the case, don't free the datastore here because later, when the channel
+	 * to which the datastore was moved hangs up, it will attempt to free this
+	 * datastore again, causing a crash
+	 */
+	ast_channel_lock(chan);
+	if (!ast_channel_datastore_remove(chan, datastore)) {
+		ast_datastore_free(datastore);
+	}
+	ast_channel_unlock(chan);
 	if (!peer) {
 		if (result) {
 			res = result;

Modified: team/may/chan_ooh323_evo/cel/cel_odbc.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/cel/cel_odbc.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/cel/cel_odbc.c (original)
+++ team/may/chan_ooh323_evo/cel/cel_odbc.c Fri May 20 03:29:23 2011
@@ -751,11 +751,15 @@
 
 	free_config();
 	AST_RWLIST_UNLOCK(&odbc_tables);
+	AST_RWLIST_HEAD_DESTROY(&odbc_tables);
+        
 	return 0;
 }
 
 static int load_module(void)
 {
+	AST_RWLIST_HEAD_INIT(&odbc_tables);
+
 	if (AST_RWLIST_WRLOCK(&odbc_tables)) {
 		ast_log(LOG_ERROR, "Unable to lock column list.  Load failed.\n");
 		return 0;

Propchange: team/may/chan_ooh323_evo/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 20 03:29:23 2011
@@ -1,1 +1,2 @@
 /be/branches/C.3/cel/cel_adaptive_odbc.c:256426
+/trunk/cel/cel_odbc.c:319427

Modified: team/may/chan_ooh323_evo/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/chan_dahdi.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/channels/chan_dahdi.c (original)
+++ team/may/chan_ooh323_evo/channels/chan_dahdi.c Fri May 20 03:29:23 2011
@@ -12522,6 +12522,9 @@
 #if defined(HAVE_PRI_MCID)
 						pris[span].pri.mcid_send = conf->pri.pri.mcid_send;
 #endif	/* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+						pris[span].pri.datetime_send = conf->pri.pri.datetime_send;
+#endif	/* defined(HAVE_PRI_DATETIME_SEND) */
 
 						for (x = 0; x < PRI_MAX_TIMERS; x++) {
 							pris[span].pri.pritimers[x] = conf->pri.pri.pritimers[x];
@@ -16811,6 +16814,40 @@
 	return options;
 }
 #endif	/* defined(HAVE_PRI_DISPLAY_TEXT) */
+#endif	/* defined(HAVE_PRI) */
+
+#if defined(HAVE_PRI)
+#if defined(HAVE_PRI_DATETIME_SEND)
+/*!
+ * \internal
+ * \brief Determine the configured date/time send policy option.
+ * \since 1.10
+ *
+ * \param value Configuration value string.
+ *
+ * \return Configured date/time send policy option.
+ */
+static int dahdi_datetime_send_option(const char *value)
+{
+	int option;
+
+	option = PRI_DATE_TIME_SEND_DEFAULT;
+
+	if (ast_false(value)) {
+		option = PRI_DATE_TIME_SEND_NO;
+	} else if (!strcasecmp(value, "date")) {
+		option = PRI_DATE_TIME_SEND_DATE;
+	} else if (!strcasecmp(value, "date_hh")) {
+		option = PRI_DATE_TIME_SEND_DATE_HH;
+	} else if (!strcasecmp(value, "date_hhmm")) {
+		option = PRI_DATE_TIME_SEND_DATE_HHMM;
+	} else if (!strcasecmp(value, "date_hhmmss")) {
+		option = PRI_DATE_TIME_SEND_DATE_HHMMSS;
+	}
+
+	return option;
+}
+#endif	/* defined(HAVE_PRI_DATETIME_SEND) */
 #endif	/* defined(HAVE_PRI) */
 
 /*! process_dahdi() - ignore keyword 'channel' and similar */
@@ -17633,6 +17670,10 @@
 			} else if (!strcasecmp(v->name, "mcid_send")) {
 				confp->pri.pri.mcid_send = ast_true(v->value);
 #endif	/* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+			} else if (!strcasecmp(v->name, "datetime_send")) {
+				confp->pri.pri.datetime_send = dahdi_datetime_send_option(v->value);
+#endif	/* defined(HAVE_PRI_DATETIME_SEND) */
 #endif /* HAVE_PRI */
 #if defined(HAVE_SS7)
 			} else if (!strcasecmp(v->name, "ss7type")) {

Modified: team/may/chan_ooh323_evo/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/chan_sip.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/channels/chan_sip.c (original)
+++ team/may/chan_ooh323_evo/channels/chan_sip.c Fri May 20 03:29:23 2011
@@ -22659,6 +22659,9 @@
 		sip_pvt_lock(transferer); /* the transferer pvt is expected to remain locked on return */
 
 		ast_indicate(target.chan1, AST_CONTROL_UNHOLD);
+		if (target.chan2) {
+			ast_indicate(target.chan2, AST_CONTROL_UNHOLD);
+		}
 
 		if (current->chan2 && current->chan2->_state == AST_STATE_RING) {
 			ast_indicate(target.chan1, AST_CONTROL_RINGING);
@@ -27089,7 +27092,7 @@
 		sip_cfg.allowsubscribe = TRUE;	/* No global ban any more */
 	}
 	/* If read-only RT backend, then refresh from local DB cache */
-	if (peer->host_dynamic && !sip_cfg.peer_rtupdate) {
+	if (peer->host_dynamic && (!peer->is_realtime || !sip_cfg.peer_rtupdate)) {
 		reg_source_db(peer);
 	}
 

Modified: team/may/chan_ooh323_evo/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/chan_skinny.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/channels/chan_skinny.c (original)
+++ team/may/chan_ooh323_evo/channels/chan_skinny.c Fri May 20 03:29:23 2011
@@ -1244,7 +1244,6 @@
 	char mohinterpret[MAX_MUSICCLASS];		\
 	char mohsuggest[MAX_MUSICCLASS];		\
 	char lastnumberdialed[AST_MAX_EXTENSION];	\
-	int curtone;					\
 	ast_group_t callgroup;				\
 	ast_group_t pickupgroup;			\
 	int callwaiting;				\
@@ -1253,22 +1252,16 @@
 	int mwiblink;					\
 	int cancallforward;				\
 	int getforward;					\
-	int callreturn;					\
 	int dnd;					\
-	int hascallerid;				\
 	int hidecallerid;				\
 	int amaflags;					\
-	int type;					\
 	int instance;					\
 	int group;					\
-	int needdestroy;				\
 	struct ast_format_cap *confcap;				\
 	struct ast_codec_pref confprefs;		\
 	struct ast_format_cap *cap;					\
 	struct ast_codec_pref prefs;			\
 	int nonCodecCapability;				\
-	int onhooktime;					\
-	int msgstate;					\
 	int immediate;					\
 	int nat;					\
 	int directmedia;				\
@@ -1300,7 +1293,6 @@
  	.directmedia = 0,
  	.nat = 0,
 	.getforward = 0,
- 	.needdestroy = 0,
 	.prune = 0,
 };
 static struct skinny_line_options *default_line = &default_line_struct;
@@ -6854,11 +6846,6 @@
  				}
  				continue;
  			}
- 		} else if (!strcasecmp(v->name, "callreturn")) {
- 			if (type & (TYPE_DEF_LINE | TYPE_LINE)) {
- 				CLINE_OPTS->callreturn = ast_true(v->value);
- 				continue;
- 			}
  		} else if (!strcasecmp(v->name, "threewaycalling")) {
  			if (type & (TYPE_DEF_LINE | TYPE_LINE)) {
  				CLINE_OPTS->threewaycalling = ast_true(v->value);

Modified: team/may/chan_ooh323_evo/channels/misdn/isdn_lib.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/misdn/isdn_lib.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/channels/misdn/isdn_lib.c (original)
+++ team/may/chan_ooh323_evo/channels/misdn/isdn_lib.c Fri May 20 03:29:23 2011
@@ -1173,7 +1173,7 @@
 
 	cb_log(4, stack->port," --> Channel is %d\n", bc->channel);
 
-	if (bc->nodsp) {
+	if (bc->nodsp && !bc->hdlc) {
 		cb_log(2, stack->port," --> TRANSPARENT Mode (no DSP, no HDLC)\n");
 		pid.protocol[1] = ISDN_PID_L1_B_64TRANS;
 		pid.protocol[2] = ISDN_PID_L2_B_TRANS;

Modified: team/may/chan_ooh323_evo/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/sig_pri.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/channels/sig_pri.c (original)
+++ team/may/chan_ooh323_evo/channels/sig_pri.c Fri May 20 03:29:23 2011
@@ -8580,6 +8580,9 @@
 	pri_display_options_send(pri->pri, pri->display_flags_send);
 	pri_display_options_receive(pri->pri, pri->display_flags_receive);
 #endif	/* defined(HAVE_PRI_DISPLAY_TEXT) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+	pri_date_time_send_option(pri->pri, pri->datetime_send);
+#endif	/* defined(HAVE_PRI_DATETIME_SEND) */
 
 	pri->resetpos = -1;
 	if (ast_pthread_create_background(&pri->master, NULL, pri_dchannel, pri)) {

Modified: team/may/chan_ooh323_evo/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/channels/sig_pri.h?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/channels/sig_pri.h (original)
+++ team/may/chan_ooh323_evo/channels/sig_pri.h Fri May 20 03:29:23 2011
@@ -441,6 +441,10 @@
 	/*! \brief TRUE if allow sending MCID request on this span. */
 	unsigned int mcid_send:1;
 #endif	/* defined(HAVE_PRI_MCID) */
+#if defined(HAVE_PRI_DATETIME_SEND)
+	/*! \brief Configured date/time ie send policy option. */
+	int datetime_send;
+#endif	/* defined(HAVE_PRI_DATETIME_SEND) */
 	int dialplan;							/*!< Dialing plan */
 	int localdialplan;						/*!< Local dialing plan */
 	int cpndialplan;						/*!< Connected party dialing plan */

Propchange: team/may/chan_ooh323_evo/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 20 03:29:23 2011
@@ -1,1 +1,2 @@
 /be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
+/trunk/configs/cel_odbc.conf.sample:319427

Modified: team/may/chan_ooh323_evo/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/configs/chan_dahdi.conf.sample?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/configs/chan_dahdi.conf.sample (original)
+++ team/may/chan_ooh323_evo/configs/chan_dahdi.conf.sample Fri May 20 03:29:23 2011
@@ -206,6 +206,45 @@
 ;
 ;overlapdial=yes
 ;
+; Send ISDN date/time IE in CONNECT message option.  Only valid on NT spans.
+;
+; no:           Do not send date/time IE in CONNECT message.
+; date:         Send date only.
+; date_hh       Send date and hour.
+; date_hhmm     Send date, hour, and minute.
+; date_hhmmss   Send date, hour, minute, and second.
+;
+; Default is an empty string which lets libpri pick the default
+; date/time IE send policy.
+;
+;datetime_send=
+
+; Send ISDN date/time IE in CONNECT message option.  Only valid on NT spans.
+;
+; no:           Do not send date/time IE in CONNECT message.
+; date:         Send date only.
+; date_hh       Send date and hour.
+; date_hhmm     Send date, hour, and minute.
+; date_hhmmss   Send date, hour, minute, and second.
+;
+; Default is an empty string which lets libpri pick the default
+; date/time IE send policy.
+;
+;datetime_send=
+
+; Send ISDN date/time IE in CONNECT message option.  Only valid on NT spans.
+;
+; no:           Do not send date/time IE in CONNECT message.
+; date:         Send date only.
+; date_hh       Send date and hour.
+; date_hhmm     Send date, hour, and minute.
+; date_hhmmss   Send date, hour, minute, and second.
+;
+; Default is an empty string which lets libpri pick the default
+; date/time IE send policy.
+;
+;datetime_send=
+
 ; Allow inband audio (progress) when a call is DISCONNECTed by the far end of a PRI
 ;
 ;inbanddisconnect=yes

Modified: team/may/chan_ooh323_evo/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/configure.ac?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/configure.ac (original)
+++ team/may/chan_ooh323_evo/configure.ac Fri May 20 03:29:23 2011
@@ -414,6 +414,7 @@
 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
 AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
+AST_EXT_LIB_SETUP_DEPENDENT([PRI_DATETIME_SEND], [ISDN PRI Date/time ie send policy], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI_V2], [ISDN PRI Message Waiting Indication (Fixed)], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_DISPLAY_TEXT], [ISDN PRI user display text IE contents during call], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_MWI], [ISDN PRI Message Waiting Indication], [PRI], [pri])
@@ -1823,6 +1824,7 @@
 AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])
 
 AST_EXT_LIB_CHECK([PRI], [pri], [pri_connected_line_update], [libpri.h])
+AST_EXT_LIB_CHECK([PRI_DATETIME_SEND], [pri], [pri_date_time_send_option], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_MWI_V2], [pri], [pri_mwi_indicate_v2], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_DISPLAY_TEXT], [pri], [pri_display_text], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_MWI], [pri], [pri_mwi_indicate], [libpri.h])

Modified: team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in (original)
+++ team/may/chan_ooh323_evo/include/asterisk/autoconfig.h.in Fri May 20 03:29:23 2011
@@ -576,6 +576,13 @@
    library. */
 #undef HAVE_PRI_CCSS
 
+/* Define to 1 if you have the ISDN PRI Date/time ie send policy library. */
+#undef HAVE_PRI_DATETIME_SEND
+
+/* Define to 1 if you have the ISDN PRI user display text IE contents during
+   call library. */
+#undef HAVE_PRI_DISPLAY_TEXT
+
 /* Define to 1 if you have the ISDN PRI hangup fix library. */
 #undef HAVE_PRI_HANGUP_FIX
 
@@ -823,16 +830,16 @@
 /* Define to 1 if you have the `strtoq' function. */
 #undef HAVE_STRTOQ
 
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
 
-/* Define to 1 if `st_blksize' is a member of `struct stat'. */
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
-/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_CR_UID
 
-/* Define to 1 if `uid' is a member of `struct ucred'. */
+/* Define to 1 if `uid' is member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_UID
 
 /* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1109,9 +1116,6 @@
 
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION

Modified: team/may/chan_ooh323_evo/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/ccss.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/main/ccss.c (original)
+++ team/may/chan_ooh323_evo/main/ccss.c Fri May 20 03:29:23 2011
@@ -1114,6 +1114,20 @@
 	return callbacks;
 }
 
+/*!
+ * \internal
+ * \brief Determine if the given device state is considered available by generic CCSS.
+ * \since 1.8
+ *
+ * \param state Device state to test.
+ *
+ * \return TRUE if the given device state is considered available by generic CCSS.
+ */
+static int cc_generic_is_device_available(enum ast_device_state state)
+{
+	return state == AST_DEVICE_NOT_INUSE || state == AST_DEVICE_UNKNOWN;
+}
+
 static int cc_generic_monitor_request_cc(struct ast_cc_monitor *monitor, int *available_timer_id);
 static int cc_generic_monitor_suspend(struct ast_cc_monitor *monitor);
 static int cc_generic_monitor_unsuspend(struct ast_cc_monitor *monitor);
@@ -1273,7 +1287,7 @@
 	previous_state = generic_list->current_state;
 	generic_list->current_state = new_state;
 
-	if ((new_state == AST_DEVICE_NOT_INUSE || new_state == AST_DEVICE_UNKNOWN) &&
+	if (cc_generic_is_device_available(new_state) &&
 			(previous_state == AST_DEVICE_INUSE || previous_state == AST_DEVICE_UNAVAILABLE ||
 			 previous_state == AST_DEVICE_BUSY)) {
 		AST_LIST_TRAVERSE(&generic_list->list, generic_instance, next) {
@@ -1410,7 +1424,7 @@
 	/* If the device being suspended is currently in use, then we don't need to
 	 * take any further actions
 	 */
-	if (state != AST_DEVICE_NOT_INUSE && state != AST_DEVICE_UNKNOWN) {
+	if (!cc_generic_is_device_available(state)) {
 		cc_unref(generic_list, "Device is in use. Nothing to do. Unref generic list.");
 		return 0;
 	}
@@ -1442,7 +1456,7 @@
 	/* If the device is currently available, we can immediately announce
 	 * its availability
 	 */
-	if (state == AST_DEVICE_NOT_INUSE || state == AST_DEVICE_UNKNOWN) {
+	if (cc_generic_is_device_available(state)) {
 		ast_cc_monitor_callee_available(monitor->core_id, "Generic monitored party has become available");
 	}
 
@@ -1528,8 +1542,8 @@
 		/* First things first. We don't even want to consider this action if
 		 * the device in question isn't available right now.
 		 */
-		if (generic_list->fit_for_recall && (generic_list->current_state == AST_DEVICE_NOT_INUSE ||
-				generic_list->current_state == AST_DEVICE_UNKNOWN)) {
+		if (generic_list->fit_for_recall
+			&& cc_generic_is_device_available(generic_list->current_state)) {
 			AST_LIST_TRAVERSE(&generic_list->list, generic_instance, next) {
 				if (!generic_instance->is_suspended && generic_instance->monitoring) {
 					ast_cc_monitor_callee_available(generic_instance->core_id, "Signaling generic monitor "
@@ -2590,6 +2604,13 @@
 static void generic_agent_devstate_cb(const struct ast_event *event, void *userdata)
 {
 	struct ast_cc_agent *agent = userdata;
+	enum ast_device_state new_state;
+
+	new_state = ast_event_get_ie_uint(event, AST_EVENT_IE_STATE);
+	if (!cc_generic_is_device_available(new_state)) {
+		/* Not interested in this new state of the device.  It is still busy. */
+		return;
+	}
 
 	/* We can't unsubscribe from device state events here because it causes a deadlock */
 	if (ast_taskprocessor_push(cc_core_taskprocessor, generic_agent_devstate_unsubscribe,
@@ -2605,12 +2626,12 @@
 	struct ast_str *str = ast_str_alloca(128);
 
 	ast_assert(generic_pvt->sub == NULL);
-	ast_str_set(&str, 0, "Starting to monitor %s device state since it is busy\n", agent->device_name);
+	ast_str_set(&str, 0, "Agent monitoring %s device state since it is busy\n",
+		agent->device_name);
 
 	if (!(generic_pvt->sub = ast_event_subscribe(
 			AST_EVENT_DEVICE_STATE, generic_agent_devstate_cb, ast_str_buffer(str), agent,
 			AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, agent->device_name,
-			AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_UINT, AST_DEVICE_NOT_INUSE,
 			AST_EVENT_IE_END))) {
 		return -1;
 	}
@@ -2686,7 +2707,7 @@
 	pthread_t clotho;
 	enum ast_device_state current_state = ast_device_state(agent->device_name);
 
-	if (current_state != AST_DEVICE_NOT_INUSE && current_state != AST_DEVICE_UNKNOWN) {
+	if (!cc_generic_is_device_available(current_state)) {
 		/* We can't try to contact the device right now because he's not available
 		 * Let the core know he's busy.
 		 */

Modified: team/may/chan_ooh323_evo/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/may/chan_ooh323_evo/main/features.c?view=diff&rev=319936&r1=319935&r2=319936
==============================================================================
--- team/may/chan_ooh323_evo/main/features.c (original)
+++ team/may/chan_ooh323_evo/main/features.c Fri May 20 03:29:23 2011
@@ -1047,42 +1047,60 @@
 			ast_free(pu);
 			return NULL;
 		}
-	} else {
-		int start;
+	} else { /* parkingexten not length zero, so find a usable extension in the lot to park the call */
+		int start; /* The first slot we look in the parkinglot. It can be randomized. */
+		int start_checked = 0; /* flag raised once the first slot is checked */
 		struct parkeduser *cur = NULL;
 
+		/* If using randomize mode, set start to random position on parking range */
 		if (ast_test_flag(args, AST_PARK_OPT_RANDOMIZE)) {
 			start = ast_random() % (parkinglot->parking_stop - parkinglot->parking_start + 1);
-		} else {
+			start+=parkinglot->parking_start;
+		} else { /* Otherwise, just set it to the start position. */
 			start = parkinglot->parking_start;
 		}
 
+		/* free parking extension linear search: O(n^2) */
 		for (i = start; 1; i++) {
+			/* If we are past the end, wrap around to the first parking slot*/
 			if (i == parkinglot->parking_stop + 1) {
-				i = parkinglot->parking_start - 1;
-				break;
-			}
-
+				i = parkinglot->parking_start;
+			}
+
+			if (i == start) { /* At this point, if start_checked, we've exhausted all the possible slots. */
+				if (start_checked) {
+					i = -1;
+					break;
+				} else {
+					start_checked = 1;
+				}
+			}
+
+			/* Search the list of parked calls already in use for i. If we find it, it's in use. */
 			AST_LIST_TRAVERSE(&parkinglot->parkings, cur, list) {
 				if (cur->parkingnum == i) {
 					break;
 				}
 			}
+
+			/* If list traversal was successful, we can terminate the loop here at parkinglot i */
 			if (!cur) {
 				parking_space = i;
 				break;
 			}
 		}
 
-		if (i == start - 1 && cur) {
+		/* If we exited without a match, our i value was set to -1 and we still have an item in cur. */
+		if (i == -1 && cur) {
 			ast_log(LOG_WARNING, "No more parking spaces\n");
 			ast_free(pu);
 			AST_LIST_UNLOCK(&parkinglot->parkings);
 			parkinglot_unref(parkinglot);
 			return NULL;
 		}
+
 		/* Set pointer for next parking */
-		if (parkinglot->parkfindnext) 
+		if (parkinglot->parkfindnext)
 			parkinglot->parking_offset = parking_space - parkinglot->parking_start + 1;
 		snprintf(pu->parkingexten, sizeof(pu->parkingexten), "%d", parking_space);
 	}

Propchange: team/may/chan_ooh323_evo/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 20 03:29:23 2011
@@ -1,2 +1,2 @@
 /be/branches/C.3/sounds/Makefile:256426
-/trunk/sounds/Makefile:270974
+/trunk/sounds/Makefile:270974,319427




More information about the asterisk-commits mailing list