Parent Directory
|
Revision Log
Revision 104 - (view) (download) (as text)
| 1 : | jhermanski | 103 | #!/bin/sh |
| 2 : | # | ||
| 3 : | # Video Startup/Demo Kit Installation script | ||
| 4 : | # | ||
| 5 : | ########################################################################## | ||
| 6 : | |||
| 7 : | echo "Installing PowerMedia Video Startup/Demo Kit, package 2" | ||
| 8 : | echo | ||
| 9 : | echo "This should be run on the system built from a Diastar ISO." | ||
| 10 : | echo "The license for the Diastar Media Engine must already be installed." | ||
| 11 : | echo | ||
| 12 : | echo -n "Proceed? " | ||
| 13 : | read ANS | ||
| 14 : | if test $ANS != 'y' | ||
| 15 : | then | ||
| 16 : | echo "Aborting installation!" | ||
| 17 : | exit 1 | ||
| 18 : | fi | ||
| 19 : | |||
| 20 : | unalias -a | ||
| 21 : | |||
| 22 : | # Make sure Diastar or Asterisk is not running... | ||
| 23 : | service diastar stop | ||
| 24 : | service asterisk stop | ||
| 25 : | sleep 4 | ||
| 26 : | |||
| 27 : | # Create Diastar config file | ||
| 28 : | service diastar config | ||
| 29 : | |||
| 30 : | # Copy asterisk sound files into place to avoid downloading them | ||
| 31 : | # during asterisk install | ||
| 32 : | cp asterisk_sounds_cache.tgz /root | ||
| 33 : | pushd /root | ||
| 34 : | tar xvfz asterisk_sounds_cache.tgz | ||
| 35 : | rm -f asterisk_sounds_cache.tgz | ||
| 36 : | popd | ||
| 37 : | |||
| 38 : | # Asterisk install | ||
| 39 : | cp asterisk-1.6.2.13.compiled_32-bit.tgz /usr/src | ||
| 40 : | pushd /usr/src | ||
| 41 : | tar xvfz asterisk-1.6.2.13.compiled_32-bit.tgz | ||
| 42 : | cd asterisk-1.6.2.13 | ||
| 43 : | make install | ||
| 44 : | if test $? -ne 0 | ||
| 45 : | then | ||
| 46 : | echo "Asterisk make install failed. Aborting installation." | ||
| 47 : | exit 1 | ||
| 48 : | fi | ||
| 49 : | popd | ||
| 50 : | |||
| 51 : | # Now Chan_woomera | ||
| 52 : | cp -r chan_woomera /usr/src | ||
| 53 : | export PBXDIR=/usr/src/asterisk-1.6.2.13 | ||
| 54 : | pushd /usr/src/chan_woomera | ||
| 55 : | make install | ||
| 56 : | if test $? -ne 0 | ||
| 57 : | then | ||
| 58 : | echo "chan_woomera make install failed. Aborting installation." | ||
| 59 : | exit 1 | ||
| 60 : | fi | ||
| 61 : | popd | ||
| 62 : | |||
| 63 : | # Demo Media | ||
| 64 : | cp -r ./media /var/lib/diastar | ||
| 65 : | cp -r ./imagemaker /var/lib/diastar | ||
| 66 : | |||
| 67 : | # Animal Conference - SIPp executable, scripts and pcap files | ||
| 68 : | cp -r sipp /usr/sbin | ||
| 69 : | chmod 766 /usr/sbin/sipp/CIF *sh | ||
| 70 : | cp /usr/sbin/sipp/sipp /usr/sbin/sipp/CIF | ||
| 71 : | chmod 766 /usr/sbin/sipp/CIF/sipp | ||
| 72 : | |||
| 73 : | # Asterisk diaplans | ||
| 74 : | cp -r asterisk /etc | ||
| 75 : | |||
| 76 : | # Asterisk Scripts | ||
| 77 : | cp ami_scripts/* /usr/sbin | ||
| 78 : | chmod 766 /usr/sbin/confrec*sh | ||
| 79 : | |||
| 80 : | # Asterisk AGI scripts | ||
| 81 : | cp agi_scripts/* /var/lib/asterisk/agi-bin | ||
| 82 : | chmod 766 /var/lib/asterisk/agi-bin/*agi | ||
| 83 : | |||
| 84 : | # Imagemake init | ||
| 85 : | cp -r imagemaker.d /etc/diastar | ||
| 86 : | |||
| 87 : | # Diastar conference IDs for 4 video conference demos. Append to config file | ||
| 88 : | cat /etc/diastar/diastar.conf | sed '/section is used for conferences/,$ d' > tmp.$$ | ||
| 89 : | mv tmp.$$ /etc/diastar/diastar.conf | ||
| 90 : | cat diastar/diastar.confids >> /etc/diastar/diastar.conf | ||
| 91 : | |||
| 92 : | # Changes for conference recording | ||
| 93 : | cat /etc/diastar/diastar.conf | sed -e 's/audio_format = pcmu/audio_format = g722/' -e 's/; record_audio_format =/record_audio_format = g722/' -e 's/; record_video_format =/record_video_format = h264/' -e 's/; record_video_size =/record_video_size = CIF/' > tmp.$$ | ||
| 94 : | mv tmp.$$ /etc/diastar/diastar.conf | ||
| 95 : | |||
| 96 : | # Couple of useful scripts | ||
| 97 : | cp diastar/active_user.sh /etc/diastar | ||
| 98 : | cp diastar/bounce_diastar.sh /etc/diastar | ||
| 99 : | cp diastar/reset_conf_dbs.sh /etc/diastar | ||
| 100 : | chmod 766 /etc/diastar/active_user.sh /etc/diastar/reset_conf_dbs.sh /etc/diastar/bounce_diastar.sh | ||
| 101 : | |||
| 102 : | # Diastar executable with conference recording fixes | ||
| 103 : | #mv /usr/bin/diastar /usr/bin/diastar.trunk | ||
| 104 : | #cp diastar/diastar_recordhangup_fix2 /usr/bin/diastar | ||
| 105 : | #chmod 766 /usr/bin/diastar | ||
| 106 : | |||
| 107 : | # Set up asterisk as a service | ||
| 108 : | cp asterisk/asterisk_init.d /etc/init.d/asterisk | ||
| 109 : | chmod 766 /etc/init.d/asterisk | ||
| 110 : | chkconfig --add asterisk | ||
| 111 : | |||
| 112 : | echo | ||
| 113 : | echo "Done instaliing Video Startup/Demo Kit package 2" | ||
| 114 : | |||
| 115 : | |||
| 116 : | # If opensips installation directory exists, then we want to install | ||
| 117 : | # the registrar. If not, this system will be behind a BorderNet500 and | ||
| 118 : | # does not need it. | ||
| 119 : | if test -d opensips | ||
| 120 : | then | ||
| 121 : | pushd opensips | ||
| 122 : | ./install.sh | ||
| 123 : | fi | ||
| 124 : | |||
| 125 : | echo | ||
| 126 : | echo -n "Ready to start video conferencing services. Proceed? " | ||
| 127 : | read ANS | ||
| 128 : | if test $ANS != 'y' | ||
| 129 : | then | ||
| 130 : | echo "Video Startup/Demo Kit installed, but Diastar and Asterisk services must be started manually." | ||
| 131 : | exit 0 | ||
| 132 : | fi | ||
| 133 : | |||
| 134 : | jhermanski | 104 | service diastar start |
| 135 : | service asterisk start | ||
| 136 : | jhermanski | 103 | |
| 137 : | exit 0 | ||
| 138 : |
| No admin address has been configured | ViewVC Help |
| Powered by ViewVC 1.0.8 |