Asterisk Inst
isolinux ¶* initrd.img
label auto
kernel vmlinuz
append ks=file:/tmp/ks.cfg initrd=initrd.img
append ks=cdrom:/ks.cfg initrd=initrd.img
asterisk with centos5.1 ¶* pungi 를 사용하여 패키지들의 모음만을 만든다.
* CentOS install disk 1 을 하드디스크에 복사한다.
* 필요한 파일들을 복사한다.
* cd 를 만든다.
* comps.xml 의 core 의 내용이 차이가 있다.
* make iso file
kickstart ¶* ks.cfg
#CentOS Asterisk@Home Kickstart with build env #System language lang en_US lang ko_KR.UTF-8 #Language modules to install(한글 추가 필요한가?) langsupport en_US langsupport --default=ko_KR.UTF-8 ko_KR.UTF-8 #System keyboard keyboard us
#System mouse mouse none
#Sytem timezone(한국시간으로 수정 필요) timezone America/New_York timezone Asia/Seoul
#Root password rootpw --iscrypted $1$ktpzON6C$w9JcCCFIjJY57Uq42mcvW1 #Reboot after installation reboot #Use text mode install text #Install Red Hat Linux instead of upgrade install #Use CDROM installation media cdrom #System bootloader configuration bootloader --location=mbr #Clear the Master Boot Record zerombr yes
#Partition clearing information(시험환경을 위해 어떻게) clearpart --all --initlabel part /boot --fstype ext3 --size=100 part / --fstype ext3 --size=1024 --grow part swap --size=256 --grow --maxsize=768
#System authorization infomation auth --useshadow --enablemd5 #Network information network --bootproto=dhcp --device=eth0 #Firewall configuration firewall --disabled selinux --disabled #Do not configure XWindows skipx
#Package install information %packages --resolvedeps alsa-utils audiofile-devel bison cpp curl curl-devel cvs dhcp flex gcc gd glibc-devel glibc-headers glibc-kernheaders grub httpd kernel kernel-devel kernel-smp-devel krb5-devel libcap libpcap libtermcap-devel libtiff libtiff-devel libxml2 lm_sensors mkisofs mysql mysql-devel mysql-server ncurses-devel newt-devel ntp openssl096b openssl-devel perl perl-libwww-perl perl-DBD-MySQL perl-DBI perl-Time-HiRes perl-XML-Parser php php-mysql php-gd php-mbstring readline readline-devel subversion system-config-date system-config-keyboard rpm-build slang-devel sox tftp-server vsftpd zlib-devel
%post --nochroot mkdir /mnt/source mount /dev/hda /mnt/source(새로 만든 파티션들이 올라 오는 것 같음) mount /tmp/cdrom /mnt/source (/tmp/cdrom 은 누가?) - Install CD 는 /tmp/cdrom mkdir /mnt/sysimage/var/aah_load ( -p 옵션 없이 가능한가? ) cd /mnt/sysimage/var/aah_load tar xvfz /mnt/source/asteriskathome.tar.gz - /mnt/sysimage 는 새로 생성된 하드디스크 파티션의 / 에 해당됨. #unmount CD-ROM umount /mnt/source (CD-ROM 만 unmount ?) # ------------------------------------------ # Post install # ------------------------------------------ %post
echo "/var/aah_load/install_all.sh" >> /etc/rc3.d/S99local
echo "NETWORKING=yes" > /etc/sysconfig/network echo "HOSTNAME=asterisk1.local" >> /etc/sysconfig/network echo "# Do not remove the following line, or various programs" > /etc/hosts echo "# that require network functionality will fail." >> /etc/hosts echo "127.0.0.1 localhost" >> /etc/hosts echo "127.0.0.1 asterisk1.local" >> /etc/hosts
echo "driftfile /var/lib/ntp/drift" > /etc/ntp.conf echo "server 0.pool.ntp.org" >> /etc/ntp.conf echo "server 1.pool.ntp.org" >> /etc/ntp.conf echo "server 2.pool.ntp.org" >> /etc/ntp.conf echo "server 127.127.1.0" >> /etc/ntp.conf echo "fudge 127.127.1.0 stratum 10" >> /etc/ntp.conf
cp -f /var/aah_load/splash.xpm.gz /boot/grub cp -f /boot/grub/grub.conf /boot/grub/grub.conf.old sed -e "s/hiddenmenu/#hiddenmenu/" /boot/grub/grub.conf.old > /boot/grub/grub.conf eject install_all.sh ¶* /root/install_asterisk.log 에 메시지 저장
* install_parts.sh 을 수행하면서 발생하는 출력과 오류를 같은 log 에 저장하도록 tee 사용
asteriskathome 내용 ¶* asteriskathome.tar.gz
ChangeLog.txt ReleaseNotes.txt install.sh install_all.sh install_apple.sh install_fin.sh install_parts.sh install_spandsp.sh asterisk-update.sh php.conf php.ini httpd.conf ez-ipupdate.conf vsftpd.conf AMP.tar.gz CGI-Session-4.00_09.tar.gz Data-UUID-0.11.tar.gz IPC-Signal-1.00.tar.gz Net-Telnet-3.03.tar.gz Open_A2Billing_version_Raccoon.tar.gz Proc-WaitStat-1.00.tar.gz app_notify-0.9.tgz asterisk-perl-0.08.tar.gz asterisk_config.tar asterisk_src.tar.gz build.tar extra_sounds.tar.gz festival-1.96.tar.gz ks_config.tar linksysmon-1.1.3.tar.gz mime-construct-1.8.tar.gz moh-native.zip mpg123-0.59r.tar.gz nwebmail-0.1.80.tar.gz res_bonjour-0.9.tgz scripts.tar.gz sipsak-0.8.11.tar.gz spandsp-0.0.2pre23.tar.gz splash.xpm.gz tftpboot.tar webapps.tar.gz xplast.tar.gz xplhub.tar asterisk.logrotate asterisk.reload resetmwi vmail.cgi voicepulse01.pub vsftpd.user_list extra_apps zaptel zaptel.conf zaptel.patch ztdummy.make.patch asteriskcdr.sql asteriskrealtime.sql fix_sql.sql permissions_amp.sql sugar_crm.sql ez-ipupdate-3.0.11b8-1.i386.rpm lame-3.96.1-2.2.el4.rf.i386.rpm libpcap-0.7.2-7.E3.1.i386.rpm mDNSResponder-98-0.2.rhel3.i386.rpm mDNSResponder-devel-98-0.2.rhel3.i386.rpm mc-4.6.0-2.i386.rpm ngrep-1.43-1.2.el4.rf.i386.rpm perl-suidperl-5.8.0-88.4.i386.rpm install_parts.sh ¶* 몇개의 package 추가 설치
suidperl is a setuid binary copy of perl that allows for (hopefully) more secure running of setuid perl scripts.
LAME is a library that allows some programs to encode MP3 files.
Festival is a general multi-lingual speech synthesis system developed at CSTR http://festvox.org/festival/* 부팅시 자동 실행되도록 설정
* 아파치 설정
allow_call_time_pass_reference = On memory_limit = 12M error_reporting = E_ALL & ~E_NOTICE display_errors = On log_errors = Off register_globals = On upload_max_filesize = 20M > smtp_port = 25 sendmail_from = me@localhost.com mysql.connect_timeout = -1 pgsql.auto_reset_persistent = Off dbx.colnames_case = "unchanged" session.save_path = /tmp session.gc_divisor = 100 session.bug_compat_42 = 1 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
11,15c11,12 < <Files *.php> < SetOutputFilter PHP < SetInputFilter PHP < LimitRequestBody 20000000 < </Files> --- > AddType application/x-httpd-php .php
* ftp 설정
전화기를 booting 하는데 필요한 firmware 를 /tftpboot에 놓고, 전화기를 booting 하면, tftp 를 이용하여 전화기에 download 되는 것 같음. 즉 asterisk server 을 전화기의 tftp server 로 사용하는 것으로 생각됨.
anonymous_enable=NO userlist_deny=NO chroot_local_user=yes
username: ftpuser passwd: asteriskftp* web voice mail 설정 * web gui 설정(install_asterisk.log 947-6116)
[root@localhost html]# ls aah_logo.png crm index.html maint phpmail cisco favicon-16.png mainstyle.css meetme robots.txt crm: http://www.sugarcrm.com/crm/* make asterisk-perl
SpanDSP provides the core functionallity within Asterisk for sending and recieving faxes.
FreePBX http://sourceforge.net/projects/amportal/
* installing AMP app
* install_fin.sh to S99local
* cd /usr/src/nwebmail-0.1.80/src
chmod 666 /etc/zaptel.conf chmod 666 /etc/amportal.conf chmod 666 /etc/ntp.conf chown -R asterisk:asterisk /var/www/html/ chown -R asterisk:asterisk /etc/asterisk* set time /etc/init.d/ntpd stop ntpdate -p 8 -u 66.187.233.4 sleep 2 ntpdate -p 8 -u 66.187.233.4* reboot install_fin.sh ¶* change /etc/rc3.d/S99local
echo "#!/bin/sh" > /etc/rc3.d/S99local echo "#" >> /etc/rc3.d/S99local echo "# This script will be executed *after* all the other init scripts." >> /etc/rc3.d/S99local echo "# You can put your own initialization stuff in here if you don't" >> /etc/rc3.d/S99local echo "# want to do the full Sys V style init stuff." >> /etc/rc3.d/S99local echo "" >> /etc/rc3.d/S99local echo "touch /var/lock/subsys/local" >> /etc/rc3.d/S99local echo "/usr/local/sbin/motd.sh > /etc/motd" >> /etc/rc3.d/S99local echo "/usr/src/zaptel/fxotune -s" >> /etc/rc3.d/S99local echo "/usr/sbin/amportal start" >> /etc/rc3.d/S99local* Finash AMP cd /usr/src/AMP echo a | ./install_amp chown -R asterisk:asterisk /var/www/html/** auto config hardware
metaphony ¶Logged in as root, check which timezone your machine is currently using by executing `date`. You'll see something like "Mon 17 Jan 2005 12:15:08 PM PST", PST in this case is the current timezone. Change to the directory /usr/share/zoneinfo, here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory. If you wish, backup the previous timezone configuration by copying it to a different location. Such as `mv /etc/localtime /etc/localtime-old`. Create a symbolic link from the appropiate timezone to /etc/localtime. Example: `ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime`. If you have the utility rdate, update the current system time by executing `/usr/bin/rdate -s time.nist.gov`. Set the ZONE entry in the file /etc/sysconfig/clock file (e.g. "America/Los_Angeles") Set the hardware clock by executing: `/sbin/hwclock --systohc` [root@localhost var]# ls aah_load cache db ftp local log nis opt run tmp yp account crash empty lib lock mail nwebmail preserve spool www [root@localhost lib]# ls alternatives dhcp logrotate.status nfs php slocate asterisk dhcpv6 misc ntp random-seed supportinfo dav games mysql pcmcia rpm up2date [root@localhost asterisk]# ls agi-bin astdb bin firmware images keys moh-native mohmp3 sounds [root@localhost www]# ls cgi-bin cgi-bin error html icons upload [root@localhost html]# ls _asterisk aah_logo.png crm mainstyle.css nwebmail recordings a2billing admin favicon-16.png maint panel robots.txt a2customer cisco index.html meetme phpmail * /etc/asterisk 는 왜 두 디렉토리 및에 따로 두었나?
* meta_config_install.sh
* cp -f ./usr/local/sbin/backup_asteriskathome.sh /usr/local/sbin/backup_asteriskathome.sh
[root@localhost scripts]# diff backup_asteriskathome.sh /root/META/usr/local/sbin/backup_asteriskathome.sh 5c5 < tar cvf /var/www/html/maint/backup/asteriskathome_backup.tar /etc/zaptel.conf /etc/amportal.conf /etc/modprobe.conf /etc/fxotune.conf /etc/sysconfig/zaptel /etc/asterisk/* /var/lib/asterisk /var/spool/asterisk /var/lib/asterisk/sounds/custom/* /var/www/html/panel/*.cfg /tmp/backup.sql --- > tar cvf /var/www/html/maint/backup/asteriskathome_backup.tar /etc/zaptel.conf /etc/amportal.conf /etc/modprobe.conf /etc/fxotune.conf /etc/my.cnf /etc/php.ini /etc/httpd/conf/httpd.conf /etc/sysconfig/zaptel /etc/asterisk /var/lib/asterisk /var/www/html /tmp/backup.sql * cp -f ./usr/src/asterisk/apps/app_voicemail.c /usr/src/asterisk/apps/app_voicemail.c
* dos2unix < file1 > file2
* iconv -f euc-kr -t utf-8 -o output input
[root@localhost META]# ls etc asterisk httpd my.cnf php.ini* cp -f ./etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf
[root@localhost META]# ls etc/httpd conf [root@localhost META]# ls etc/httpd/conf httpd.conf* /etc/init.d/mysqld restart * /etc/init.d/httpd restart
* /usr/bin/mysql --user=root --password=passw0rd < ./metaphony_program/database_asterisk_init/mysql_init.sql
* asterisk_config.tar
etc/asterisk: cdr_manager.conf manager_custom.conf sip_nat.conf cdr_mysql.conf meetme.conf vm_email.inc extensions.conf meetme_metaphony.conf vm_general.inc extensions_additional.conf meetme_temporary.conf zapata.conf extensions_custom.conf rtp.conf features.conf sip.conf metaphony_program/metaphony_server_program/etc_asterisk: [root@localhost etc_asterisk]# ls aa_1_additional.conf iax_additional.conf aa_1_local_additional.conf meetme_additional.conf aa_1_special_additional.conf meetme_metaphony.conf ext-channel_additional.conf musiconhold(dir) ext-did_additional.conf musiconhold_additional.conf ext-group_additional.conf outbound-allroutes_additional.conf ext-grpext_additional.conf sip ext-local_additional.conf sip_additional.conf extensions_additional.conf sip_custom.conf extensions_custom_trunk.conf sip_register_additional.conf globals_additional.conf trunk_rejection_additional.conf globals_custom.conf voicemail(dir) globals_custom_additional.conf voicemail.conf iax(dir) voicemail_additional.conf * META/etc/asterisk 에서 다음은 새로 만든 것이고, 나머지는 모두 overwrite 임
[root@localhost META]# ls -R home home: enk home/enk: AutoCallBack.jar README.TXT crond_monitor.sh metaphonyBackup OrgProperties.properties autocallback.sh crondaily.txt metaphonyRestore [root@localhost META]# ls -R usr usr: local src usr/local: sbin usr/local/sbin: backup_asteriskathome.sh usr/src: asterisk usr/src/asterisk: apps usr/src/asterisk/apps: app_voicemail.c* cp --reply=yes -fR ./var/lib/asterisk/* /var/lib/asterisk * chown -R asterisk:asterisk /var/lib/asterisk/
* chmod u+x /var/lib/asterisk/agi-bin/*.agi
* chmod u+x /var/lib/asterisk/agi-bin/*.pl
[root@localhost META]# ls var/lib/asterisk agi-bin astdb bin firmware images keys moh-native mohmp3 sounds bin firmware images keys moh-native 변한 것 없음. mohmp3 는 tpds 라는 디렉토리 하나 추가됨. 내용은 tpds.mp3 하나임.
781Invalid 781Password 781msg 781msgPlay 781msgSave 7894sipTrunkInvalid 7894sipTrunkPassword 789sipTrunkInvalid 789sipTrunkPassword 790BroadcastAuth 790BroadcastExternalAuth 790BroadcastOnce 790BroadcastOnceCalling 790BroadcastOnceInvalid 790Invalid 790Password 790msg 790msgPlay 790msgSave a.out app7894DialRestrict appAutoCallBack appCBTOP40 appChannelCallCancel appChannelCallOk appDialRestrict appExpand appExternalDialRestrict appLastCallReturn appMetaSecretary appNoticeAnswerFlag appOrgDialRestrict appTransfer busyRingTime cagisample call-forwarding call-no-forwarding call-no-waiting call-waiting call46-no-forwarding do-not-disturb do-not-nodisturb enkIVR expandConferenceCall expandConferenceInvitationCall ext46Invalid ext46Password ext72Invalid ext78Invalid ext78Password ext79Password ext98Invalid extAutoCallBack extAutoConferenceCall extCF extCallForwarding extCallForwardingOnBusy extCallForwardingOnNoAnswer extCallRelay extDoNotDisturb extExtenBusy extExtenNoanswer extGroup extMeetmeBundleCall extMeetmeInvalid extMeetmeLoginCheck extMeetmePassword extMeetmeTmpLoginCheck extMeetmeTmpRoomCheck extPassword extRecordingCallDB extSequentialRing extVoiceMassage hanaIVR macroClientNoAnswer macroDialDS macroDialOutTrunkCheck macroNoAnswer metaUserOrgASTDB noanswerRingTime on-busy-call-forwarding on-busy-call-no-forwarding originateAction outRecordEnable recordingcheck061129 rejectionCall rejectionCallOrg sameReceipt selectiveCallAcceptance selectiveCallForwarding speedDial trunkDial trunkDialHangup trunkRejectionCall useCheckState conferenceAllCall.php meetMeAllCalling.php queue_clear.php show_hints.php show_trunk_hints.php [root@localhost asterisk]# ls -l astdb -rw-r--r-- 1 5060 502 8192 2008-08-09 00:29 astdb [root@localhost asterisk]# ls -l astdb -r-xr-xr-x 1 root root 20480 2007-06-11 03:52 astdb* webapps.tar.gz
metaphony_program/metaphony_server_program/var_www_html: index.htm mas meta_files metaphony metaphony_program/metaphony_server_program/var_www_html/mas: book common config images information js system branch company css index.htm init.htm pop user metaphony_program/metaphony_server_program/var_www_html/meta_files: metaphony_program/metaphony_server_program/var_www_html/metaphony: board common function image index.htm js phone util call css guide include info personal test* mkdir /var/spool/asterisk/noticecall /var/spool/asterisk/res * chown -R asterisk:asterisk /var/spool/asterisk/noticecall /var/spool/asterisk/res
* /var/lib/asterisk
[root@localhost asterisk]# pwd /var/lib/asterisk [root@localhost asterisk]# ls agi-bin astdb bin firmware images keys moh-native mohmp3 sounds useradd -c "Asterisk PBX" -d /var/lib/asterisk -u 5060 -g asterisk asterisk chmod 777 /var/lib/asterisk/sounds cd /var/lib/asterisk/sounds tar xvfz $LOAD_LOC/extra_sounds.tar.gz cp $LOAD_LOC/voicepulse01.pub /var/lib/asterisk/keys mv /usr/local/sbin/festival-weather-script.pl /var/lib/asterisk/agi-bin/ mv /usr/local/sbin/festival-script.pl /var/lib/asterisk/agi-bin/ mv /usr/local/sbin/weather.agi /var/lib/asterisk/agi-bin/ chown -R asterisk:asterisk /var/lib/asterisk/agi-bin/ chmod u+x /var/lib/asterisk/agi-bin/*.agi chmod u+x /var/lib/asterisk/agi-bin/*.pl mkdir /var/lib/asterisk/sounds/tts chmod 777 /var/lib/asterisk/sounds/tts mkdir /var/lib/asterisk/moh-native cd /var/lib/asterisk/moh-native unzip $LOAD_LOC/moh-native.zip mv /usr/local/sbin/wakeup.php /var/lib/asterisk/agi-bin/ mv /usr/local/sbin/wakeconfirm.agi /var/lib/asterisk/agi-bin/ chmod +x /var/lib/asterisk/agi-bin/* chown asterisk:asterisk /var/lib/asterisk/agi-bin/* mkdir /var/lib/asterisk/sounds/custom mkdir /var/lib/asterisk/mohmp3/acc_1 mkdir /var/lib/asterisk/sounds/a2billing cd ./A2Billing_AGI cp a2billing.php /var/lib/asterisk/agi-bin/. cp ./sounds/* /var/lib/asterisk/sounds/. cp --reply=yes ./sounds/en/* /var/lib/asterisk/sounds/. cp -r libs_a2billing /var/lib/asterisk/agi-bin cd /var/lib/asterisk/agi-bin * /var/www
cp $LOAD_LOC/vmail.cgi /var/www/cgi-bin chmod 4755 /var/www/cgi-bin/vmail.cgi cd /var/www/html mkdir /var/www/upload chmod 777 /var/www/upload tar xzvf $LOAD_LOC/webapps.tar.gz touch /var/www/html/panel/op_buttons_additional.cfg touch /var/www/html/panel/op_buttons_custom.cfg mv ./A2Billing_UI /var/www/html/a2billing mv ./A2BCustomer_UI/ /var/www/html/a2customer chown -R asterisk:asterisk /var/www/html/ interface card ¶* analog interface cards
basic principle ¶* signals and voices
* different times on the same twisted pair of wires
* signaling equipment
|










