/ added parameter to change ec suppresion threshhold from config
authorBen Kramer <bkramer@voicetronix.com.au>
Mon, 31 Jan 2005 04:51:41 +0000 (04:51 +0000)
committerBen Kramer <bkramer@voicetronix.com.au>
Mon, 31 Jan 2005 04:51:41 +0000 (04:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4935 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_vpb.c
configs/vpb.conf.sample

index 0617b19..55f7acf 100755 (executable)
@@ -144,6 +144,9 @@ static int UseNativeBridge=1;
 /* Use Asterisk Indication or VPB */
 static int use_ast_ind=0;
 
+/* Set EC suppression threshold */
+static int ec_supp_threshold=-1;
+
 #define TIMER_PERIOD_RINGBACK 2000
 #define TIMER_PERIOD_BUSY 700
 #define TIMER_PERIOD_RING 4000
@@ -1286,6 +1289,10 @@ static void mkbrd(vpb_model_t model, int echo_cancel)
                if (model==vpb_model_v4pci) {
                        vpb_echo_canc_enable();
                        ast_log(LOG_NOTICE, "Voicetronix echo cancellation ON\n");
+                       if (ec_supp_threshold > -1){
+                               vpb_echo_canc_set_sup_thresh((short *)&ec_supp_threshold);
+                               ast_log(LOG_NOTICE, "Voicetronix EC Sup Thres set\n");
+                       }
                }
                else {
                /* need to it port by port for OpenSwitch*/
@@ -2445,6 +2452,9 @@ int load_module()
                                use_ast_ind = 1;
                                ast_log(LOG_NOTICE,"VPB driver using Asterisk Indication functions!\n");
                        }
+                       else if (strcasecmp(v->name, "ecsuppthres") ==0) {
+                               ec_supp_threshold = atoi(v->value);
+                       }
                        v = v->next;
                }
        
index 294304f..1920396 100755 (executable)
@@ -4,6 +4,8 @@
 ; type = v12pci|v6pci|v4pci
 ; cards = number of cards
 ; indication = 1 ( To use Asterisk indication tones)
+; ecsuppthres = 0|2048|4096 (none,-24db,-18db only for use with OpenLine4)
+;
 ; For [interface] section
 ; board = board_number (1, 2, 3, ...)
 ; channel = channel_number (1,2,3...)