[asterisk-commits] igorg: trunk r370165 - in /trunk: ./ channels/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 18 02:17:03 CDT 2012


Author: igorg
Date: Wed Jul 18 02:17:00 2012
New Revision: 370165

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370165
Log:

Added option 'interdigit_timer' to unistim.conf to make able controll hardcoded dial timeout constant.


Modified:
    trunk/CHANGES
    trunk/channels/chan_unistim.c
    trunk/configs/unistim.conf.sample

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=370165&r1=370164&r2=370165
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed Jul 18 02:17:00 2012
@@ -140,6 +140,7 @@
    configuration multiple lines can be defined, it allows to have multiple calls
    on one phone, callwaiting and switching between calls.
  * Added option 'sharpdial' allowing end dialing by pressing # key
+ * Added option 'interdigit_timer' for controll phone dial timeout
  * Added options 'cwstyle', 'cwvolume' controlling callwaiting appearance
  * Added global 'debug' option, that enables debug in channel driver
  * Added ability for translation on-screen menu to multiple languages. Tested on
@@ -149,7 +150,7 @@
  * In addition to English added French and Russian languages for on-screen menus
  * Reworked dialing number input: added dialing by timeout, immediate dial on 
    on dialplan compare, phone number length now not limited by screen size
- * Added ability for pickup a call using fetures.conf defined value and 
+ * Added ability for pickup a call using features.conf defined value and 
    on-screen key
 
 Codec changes

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=370165&r1=370164&r2=370165
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Wed Jul 18 02:17:00 2012
@@ -99,8 +99,9 @@
 #define RETRANSMIT_TIMER	2000
 /*! How often the mailbox is checked for new messages */
 #define TIMER_MWI	       5000
-/*! How often the mailbox is checked for new messages */
-#define TIMER_DIAL	       4000
+/*! Timeout value for entered number being dialed */
+#define DEFAULT_INTERDIGIT_TIMER	4000
+
 /*! Not used */
 #define DEFAULT_CODEC	   0x00
 #define SIZE_PAGE	       4096
@@ -399,6 +400,7 @@
 	char ringstyle;			 /*!< Ring melody */
 	char cwvolume;			/*!< Ring volume on call waiting */
 	char cwstyle;			 /*!< Ring melody on call waiting */
+	int interdigit_timer;		/*!< Interdigit timer for dialing number by timeout */
 	time_t nextdial;		/*!< Timer used for dial by timeout */
 	int rtp_port;			   /*!< RTP port used by the phone */
 	int rtp_method;			 /*!< Select the unistim data used to establish a RTP session */
@@ -3475,7 +3477,9 @@
 			!ast_matchmore_extension(NULL, pte->device->context, pte->device->phone_number, 1, NULL)) {
 		    keycode = KEY_FUNC1;
 		} else {
-		    pte->device->nextdial = get_tick_count() + TIMER_DIAL;
+			if (pte->device->interdigit_timer) {
+				pte->device->nextdial = get_tick_count() + pte->device->interdigit_timer;
+			}
 		}
 	}
 	if (keycode == KEY_FUNC4) {
@@ -6288,6 +6292,7 @@
 	d->mute = MUTE_OFF;
 	d->height = DEFAULTHEIGHT;
 	d->selected = -1;
+	d->interdigit_timer = DEFAULT_INTERDIGIT_TIMER;
 	linelabel[0] = '\0';
 	dateformat = 1;
 	timeformat = 1;
@@ -6346,6 +6351,8 @@
 			callhistory = atoi(v->value);
 		} else if (!strcasecmp(v->name, "sharpdial")) {
 			sharpdial = ast_true(v->value) ? 1 : 0;
+		} else if (!strcasecmp(v->name, "interdigit_timer")) {
+			d->interdigit_timer = atoi(v->value);
 		} else if (!strcasecmp(v->name, "callerid")) {
 			if (!strcasecmp(v->value, "asreceived")) {
 				lt->cid_num[0] = '\0';

Modified: trunk/configs/unistim.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/unistim.conf.sample?view=diff&rev=370165&r1=370164&r2=370165
==============================================================================
--- trunk/configs/unistim.conf.sample (original)
+++ trunk/configs/unistim.conf.sample Wed Jul 18 02:17:00 2012
@@ -66,6 +66,7 @@
 ;cwvolume=2                  ; ring volume : 0,1,2,3, default = 0
 ;cwstyle=3                   ; ring style : 0 to 7, default = 2
 ;sharpdial=1                 ; dial number by pressing #, default = 0
+;interdigit_timer=4000       ; timer for automatic dial after several digits of number entered (in ms, 0 is off)
 ;callhistory=1               ; 0 = disable, 1 = enable call history, default = 1
 ;callerid="Customer Support" <555-234-5678>
 ;context=default             ; context, default="default"




More information about the asterisk-commits mailing list