diff options
Diffstat (limited to 'xpp/utils/genzaptelconf')
-rwxr-xr-x | xpp/utils/genzaptelconf | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf index 03c28be..a5fb0b0 100755 --- a/xpp/utils/genzaptelconf +++ b/xpp/utils/genzaptelconf @@ -50,10 +50,6 @@ context_output=astbank-output # useless, but helps marking the channels :-) #group_manual=yes group_phones=5 # group for phones group_lines=0 # group for lines -# set 'immediate=yes' for Asteribank input channels and 'immediate=no' -# for others. Note that if an Astribank is not detected, the script -# will set this to "no", so you can safely leave it as "yes". -set_immediate=yes # Set fxs_immediate to 'yes' to make all FXS lines answer immediately. fxs_immediate=no @@ -231,15 +227,6 @@ zap_reg_xpp() { } -check_for_astribank(){ - if ! grep -q XPP_IN/ /proc/zaptel/* 2>/dev/null - then - # we only get here is if we find no Astribank input channels - # in /proc/zaptel . Hence we can safely disable their special settings: - set_immediate=no - fi -} - usage() { program=`basename $0` @@ -395,14 +382,11 @@ print_pattern() { fi fi - if [ "$set_immediate" = 'yes' ] - then - if [ "$astbank_type" = 'input' ] || \ - ( [ "$fxs_immediate" = 'yes' ] && [ "$sig" = "fxo" ] ) - then - echo 'immediate=yes' >> $zapata_file - reset_values="$reset_values immediate" - fi + if [ "$astbank_type" = 'input' ] || \ + ( [ "$fxs_immediate" = 'yes' ] && [ "$sig" = "fxo" ] ) + then + echo 'immediate=yes' >> $zapata_file + reset_values="$reset_values immediate" fi echo "channel => $chan" >> $zapata_file reset_zapata_entry $zapata_file $reset_values @@ -1028,14 +1012,10 @@ if [ "$mode" = list ]; then genconf list else zap_reg_xpp - check_for_astribank wait_for_zapctl say "Generating '${ZAPCONF_FILE} and ${ZAPATA_FILE}'" genconf files - if [ "$set_immediate" = 'yes' ] && [ -x /etc/init.d/zaptel ] - then /etc/init.d/zaptel start - else run_ztcfg - fi + run_ztcfg fi if [ "$tmp_dir" != '' ] |