pax_global_header00006660000000000000000000000064114611010070014501gustar00rootroot0000000000000052 comment=af50a6750f9a931903a5dbe9be255990f83017ca priconfig-0.1/000075500000000000000000000000001146110100700133175ustar00rootroot00000000000000priconfig-0.1/.gear-rules000064400000000000000000000000101146110100700153550ustar00rootroot00000000000000tar: . priconfig-0.1/priconfig000075500000000000000000000053711146110100700152330ustar00rootroot00000000000000#!/bin/sh # TODO: добавить поддержку crc # TODO: чтение конфига (для возможности изменения, а не переписывания заново) ZAPTEL=/etc/zaptel.conf set +e T=`mktemp` dialog --menu "Interface type" 0 0 0 \ "E1" "E1" \ "T1" "T1" 2> $T if [ "`cat $T`" = "E1" ]; then IF=E1 dialog \ --default-item "ccs" \ --menu "Framing type" 0 0 0 \ "ccs" "ccs framing" \ "cas" "cas, not supported by Tau32-PCI/Lite" \ 2> $T FT=`cat $T` dialog --menu "Coding type" 0 0 0 \ "hdb3" "hdb3 coding (more common)" \ "ami" "ami coding (rare)" \ 2> $T CT=`cat $T` elif [ "`cat $T`" = "T1" ]; then IF=T1 dialog --menu "Framing type" 0 0 0 \ "sf" "d4 (sf, superframe) framing" \ "esf" "esf framing" \ 2> $T FT=`cat $T` dialog --menu "Coding type" 0 0 0 \ "ami" "ami coding" \ "b8zs" "hdb3 coding" \ 2> $T CT=`cat $T` fi dialog \ --default-item "ru" \ --item-help \ --menu "Tonezone" 0 0 0 \ "ru" "Russian" "" \ "us" "us" "" \ us-old us-old "" \ gr Germany "" \ it it "" \ fr fr "" \ de de "" \ uk uk "" \ "fi" "fi" "" \ jp jp "" \ sp sp "" \ no no "" \ hu hu "" \ lt lt "" \ pl pl "" \ 2> $T TONEZONE=`cat $T` dialog --clear echo "loadzone=$TONEZONE" > $ZAPTEL echo "defaultzone=$TONEZONE" >> $ZAPTEL echo "span=1,1,0,$FT,$CT" >> $ZAPTEL if [ "$IF" = "E1" ]; then echo "dchan=16" >> $ZAPTEL echo "bchan=1-15,17-31" >> $ZAPTEL SWITCHTYPE=euroisdn else SWITCHTYPE=national fi dialog \ --default-item "pri_cpe" \ --item-help \ --menu "Master/slave" 0 0 0 \ "pri_net" "Master" "" \ "pri_cpe" "Slave" "Used, when connecting Asterisk to PSTN" \ 2> $T SIGNALLING=`cat $T` dialog \ --default-item "$SWITCHTYPE" \ --item-help \ --menu "Master/slave" 0 0 0 \ national "National ISDN type2" "Common in the US"\ euroisdn "EuroISDN" ""\ qsig "Minimalistic protocol" "Protocol to build a "network" with two or more PBX of different vendors"\ ni1 "National ISDN type 1" ""\ dms100 "Nortel DMS100" ""\ 4ess "AT&T 4ESS" ""\ 5ess "Lucent 5ESS" ""\ 2> $T SWITCHTYPE=`cat $T` dialog \ --inputbox "Context for inbound calls from $IF" 0 0 \ "pstn" 2> $T CONTEXT=`cat $T` dialog \ --inputbox "rxgain for $IF" 0 0 \ "0" 2> $T RXGAIN=`cat $T` dialog \ --inputbox "txgain for $IF" 0 0 \ "0" 2> $T TXGAIN=`cat $T` cat > /etc/asterisk/zapata.conf << EOF [channels] priindication=outofband echotraining=800 echocancel=256 echocancelwhenbridged=yes relaxdtmf=no context=$CONTEXT switchtype=$SWITCHTYPE signalling=$SIGNALLING usecallerid=yes callerid=asreceived ; If we need to make it big, it is VERY-VERY bad thing jitterbuffer=2 rxgain=$RXGAIN txgain=$TXGAIN group=0 channel => 1-15 channel => 17-31 EOF rm -f "$T" priconfig-0.1/priconfig.spec000064400000000000000000000010421146110100700161500ustar00rootroot00000000000000Name: priconfig Summary: PRI configure script Version: 0.1 Release: alt2 License: GPL3+ Group: System/Servers BuildArch: noarch Packager: Denis Smirnov Source: %name-%version.tar %description %summary %prep %setup %build %install mkdir -p %buildroot/usr/sbin install priconfig %buildroot%_sbindir/priconfig %files %_sbindir/priconfig %changelog * Sun Oct 24 2010 Denis Smirnov 0.1-alt2 - auto rebuild * Sun Sep 16 2007 Denis Smirnov 0.1-alt1 - first build for Sisyphus