「利用者:MR G」の版間の差分

提供: VoIP-Info.jp
移動先: 案内検索
(mk2fsし忘れてたので追加)
(「利用者:MR G」を保護しました ([編集=管理者のみ許可] (無期限) [移動=管理者のみ許可] (無期限)))
 
(4人の利用者による、間の212版が非表示)
1行目: 1行目:
=注目しているURL=
+
#REDIRECT [[利用者:Gima]]
==Standalone Cisco 7941/7961 without a local PBX==
+
----
[http://voip-info.org/wiki/view/Standalone+Cisco+7941%252F7961+without+a+local+PBX CP-7941/7961を単独で動かす法]
+
中の人は、[[利用者:Gima]]にアカウントを変更したらしいです。
 
+
<!-- 中の人に関する情報がバレ砲台なのと、Mr.Gというアカウント名が時計のブランドと被ってるので変更。
==79XX系電話機とAsterisk==
+
ぐぐりやすいというのもありますわネ
[http://www.voip-info.org/wiki/index.php?page=Asterisk+phone+Cisco+79xx Asterisk phone cisco 79xx]
+
  -->
 
 
==ファームウェア==
 
http://www.xs4all.nl/~graver1/cisco/7905/ 7905のファームウェア<BR>
 
ftp://ftp.cisco.com/pub/voice/ip-phone/sip-7960/ 7961のSIPファームウェア
 
 
 
==Cisco 7905/7912==
 
[http://www.voip-info.org/wiki/view/Cisco+7905%252F7912+IP+Phones Cisco VoIP_INFO 7905/7912の設定]
 
==chan sccp==
 
[http://www.voip-info.org/wiki/view/chan_sccp2 SCCPドライバの解説]<BR>
 
[http://www.voip-info.org/wiki/view/Chan_sccp_faq FAQ]
 
 
 
==Cisco 79XX カスタマイズ==
 
[http://www.cisco.com/japanese/warp/public/3/jp/service/manual_j/ipt/cc/ipcag21/chapter06/13685_01_6.shtml 着メロとか壁紙とかのカスタマイズ(日本語)]<BR>
 
 
 
=いぢくり中=
 
==Cisco IP Phone==
 
===CiscoIP Phone7900シリーズ===
 
マルチライン動かないぞガッデム<BR>
 
SIPファームウェア入れたら、壁紙サイズとか日本語表示用ファイルが変わってた。<BR>
 
とか散々な目に遭ってしまった。
 
===Cisco 7961G(SIPファームウェア)===
 
====ぶち込みかた====
 
#7960/7940のファームウェア(SIP用)を解凍し、TFTPサーバーに置いておく。
 
#(DHCP Optionが指定可能な)DHCPサーバーを立てておく。
 
#DHCPサーバーの設定で、TFTPサーバーのIPを指定しておく。
 
# #キーを押しながら電源(PoEならUTPケーブル)を挿す。(着信ランプが点滅するまで#を押し続けること)
 
#1着信ランプが点滅しはじめたら、23456789*0#の順に押す。(取り消しは、他のキー二度押し)
 
#ファームウェアが真っ白になり、電話機再起動
 
#電話機再起動後、ファームウェアをTFTPサーバーから引っ張ってくる。
 
====設定ファイル(SIP用)====
 
[http://www.voip-info.org/wiki/view/Asterisk+phone+cisco+79x1+xml+configuration+files+for+SIP#Cisco7961with833SR2ConfigurationExamples Asterisk phone cisco 79x1 xml configuration files for SIP]
 
====ソフトキー設定====
 
SEP<MAC Address>.cnf.xml中の<BR>
 
<softKeyFile>SK50719900-3bee-4594-bc3f-6400e1a33bf0.xml</softKeyFile><BR>
 
という箇所が、ソフトキーのテンプレファイル読み込み設定らしい。<BR>
 
[[http://lists.berlios.de/pipermail/chan-sccp-users/2006-March/002099.html 元ネタ]]
 
===AutoAnswer===
 
AutoAnswer機能を利用したスクリプト作成中<BR>
 
プログラム力の無さに絶望した。
 
 
 
==AstLinux==
 
Microclient JRにAstLinux入れてみた。<BR>
 
===AstLinuxとchan_sccp===
 
AstLinuxには、あらかじめchan_sccpが入っているので、ファイルを追加する必要がない。<BR>
 
Forneus ~ # mount -o rw,remount /
 
Forneus ~ # vi /stat/etc/asterisk/sccp.conf
 
という具合に/stat/etc/asterisk/以下にsccp.confを新規作成。<BR>
 
sccp.confを作成したら、再起動かけるか、<BR>
 
下記の手順でファイルを読みこむようにする。
 
Forneus # cp /stat/etc/asterisk/sccp.conf /etc/asterisk/sccp.conf
 
Forneus # asterisk -vvvvvvvvvvvvvvvvvvvvr  (vを16連打)
 
Forneus*CLI> unload chan_sccp.so
 
Forneus*CLI> load chan_sccp.so
 
SEP<MACアドレス>.cnf.xmlの編集も忘れてはいけない<BR>
 
設定が正しければ、Cisco電話機がRegistする。
 
===EXTIF===
 
#EXTIF=eth0
 
/stat/etc/rc.conf内の、EXTIFをコメントアウト解除すると、PBXオンリーモードになり、<BR>
 
HTTPの設定とかTFTPサーバーの設定が効かなくなる。
 
 
 
===INTIF===
 
#INTIF=eth0
 
/stat/etc/rc.conf内の、INTIFをコメントアウト解除すると、ゲートウェイとして使えるモードになるが、<BR>
 
EXTGW="10.0.0.1"
 
DNS="192.168.0.1"
 
デフォルトゲートウェイやDNSの設定が効かなくなる。(rc.confの設定が無視される)<BR>
 
rc.confの設定を見直すのが正攻法ではあるものの、小細工も結構効いたりする。
 
 
 
====DNS====
 
INTIF=eth0を有効にしていると、/etc/resolv.conf
 
Forneus init.d # cat /etc/resolv.conf
 
search hoge.
 
nameserver 127.0.0.1
 
という具合に、外部DNSを参照してくれない。<BR>
 
rc.conf内のDNSの項目が無視される。
 
/etc/init.d/dnsmasqを開くと
 
if [ "$LOCALDNS" ]
 
then
 
RCONF="/tmp/etc/resolv-up.conf"
 
echo "search $DOMAIN
 
nameserver 127.0.0.1" > /tmp/etc/resolv.conf
 
else
 
RCONF="/tmp/etc/resolv.conf"
 
fi
 
とあるので、
 
nameserver 192.168.0.1" > /tmp/etc/resolv.conf
 
と小細工することで任意のDNSサーバーを参照することが出来る。
 
====デフォルトゲートウェイ====
 
vi /etc/init.d/network
 
とやると、/stat/etc/rc.conf内のネットワークの挙動が(ちょっと)わかる<BR>
 
デフォルトルートは
 
route add -net default gw "$EXTGW" dev "$EXTIF"
 
と設定されているようだ。
 
 
 
===余りスペースを活用する===
 
英語版astlinuxが使用する(CFカードの)ディスクスペースは64MB。<BR>
 
1GBのカード使ったとしたら残り900MBは無駄。こいつはMOTTAINAI<BR>
 
TFTPサーバーとして使うため、ディスクスペースを有効活用する事にした。<BR>
 
とりあえずメモ
 
 
 
====スライス====
 
fdisk /dev/hda と入力。
 
fdisk /dev/hda
 
The number of cylinders for this disk is set to 3957.
 
There is nothing wrong with that, but this is larger than 1024,
 
and could in certain setups cause problems with:
 
1) software that runs at boot time (e.g., old versions of LILO)
 
2) booting and partitioning software from other OSs
 
    (e.g., DOS FDISK, OS/2 FDISK)
 
 
 
コマンド?と聞かれたら"n"(Newの略らしい)を押す。<BR>
 
command actionと聞かれたらpを押す。<BR>
 
Command (m for help): n
 
 
  command action
 
    e  extended
 
    p primary partition(1-4)
 
 
 
次に2を押す。パーティション番号らしい<BR>
 
Partition number (1-4):
 
 
 
次はそのままデフォルト値でいいかな。そのままエンターキー<BR>
 
First cylinder (521-3957, default 521):
 
 
 
次はサイズを聞かれる。デフォルト値(全部使う)でいいかな。そのままエンターキー<BR>
 
Last cylinder or +size or +sizeM or +sizeK (521-3957, default 3957):
 
 
 
何も無かったように、最初に戻った。
 
Using default value 3957
 
 
Command (m for help):
 
 
 
pを押したら、スライス切れた気がする。<BR>
 
Command (m for help): p
 
 
Disk /dev/hda: 2042 MB, 2042191872 bytes
 
16 heads, 63 sectors/track, 3957 cylinders
 
Units = cylinders of 1008 * 512 = 516096 bytes
 
 
    Device Boot      Start        End      Blocks  Id System
 
/dev/hda1              1        520      262048+ 83 Linux
 
/dev/hda2            521        3957    1732248  83 Linux
 
 
 
wを押すと、実際に書き込む。
 
そして再起動だ。
 
 
 
文句言われることもある。<BR>
 
使用中ですかそうですか。
 
Command (m for help): w
 
The partition table has been altered!
 
 
Calling ioctl() to re-read partition table
 
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
 
 
 
何か忘れてると思ったら初期化を忘れていた。(だから文句言われる)<BR>
 
この前はどうやって使えてたんだろうか(記憶にございません)<BR>
 
mke2fs -c /dev/hda2 と入力してみる。
 
# mke2fs -c /dev/hda2
 
mke2fs 1.39 (29-May-2006)
 
Filesystem label=
 
OS type: Linux
 
Block size=4096 (log=2)
 
Fragment size=4096 (log=2)
 
216832 inodes, 433062 blocks
 
21653 blocks (5.00%) reserved for the super user
 
First data block=0
 
Maximum filesystem blocks=444596224
 
14 block groups
 
32768 blocks per group, 32768 fragments per group
 
15488 inodes per group
 
Superblock backups stored on blocks:
 
        32768, 98304, 163840, 229376, 294912
 
 
Checking for bad blocks (read-only test): done
 
Writing inode tables: done
 
Writing superblocks and filesystem accounting information: done
 
 
This filesystem will be automatically checked every 20 mounts or
 
180 days, whichever comes first.  Use tune2fs -c or -i to override.
 
 
 
テストとして、/mnt/kbあたりにマウントさせてみた。<BR>
 
 
 
# mount /dev/hda2 /mnt/kd
 
# mount
 
rootfs on / type rootfs (rw)
 
/dev/root on / type ext2 (ro)
 
none on /proc type proc (rw)
 
none on /dev type tmpfs (rw)
 
none on /var type tmpfs (rw)
 
none on /tmp type tmpfs (rw)
 
none on /dev/pts type devpts (rw)
 
none on /sys type sysfs (rw)
 
usbfs on /proc/bus/usb type usbfs (rw)
 
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
 
/dev/hda2 on /mnt/kd type ext2 (rw)
 
 
 
dfでもちゃんと空き表示される。<BR>
 
ちなみに、2GBのフラッシュメモリを使っている。
 
# df -m
 
Filesystem          1M-blocks      Used Available Use% Mounted on
 
rootfs                    248        69      179  28% /
 
/dev/root                  248        69      179  28% /
 
none                        1        0        1  0% /dev
 
none                        5        1        5  3% /var
 
none                        10        3        8  25% /tmp
 
/dev/hda2                1666        3      1578  1% /mnt/kd
 
 
 
====自動でmountさせる====
 
mount /dev/hda2 /mnt
 
とやると、とりあえず/mntにマウントされた。
 
が、さすがに毎回手動マウントする訳には行かない。
 
mount -o rw,remount /
 
vi /etc/rc
 
と入力し、起動スクリプトを直接編集することにした。<BR>
 
ここで注意すべきは"/etc/fstab"を直接編集しても意味が無いということだ。<BR>
 
自動マウントさせたいなら、"/etc/rc"を直接編集すべしである。
 
mount -t ほげ
 
という分を探すと111行目あたりに、それっぽい設定が見つかるので、
 
mount /stat/dev/hda2 /mnt
 
という行をテキトーに追加、保存したのち、再起動<BR>
 
これでAstlinuxが使ってない領域を自由に使えるようになった。
 
Forneus ~ # df -m
 
Filesystem          1M-blocks      Used Available Use% Mounted on
 
/dev/hda1                  62        51        10  83% /
 
none                        0        0        0  0% /dev
 
none                        5        0        5  3% /var
 
none                        10        0        9  5% /tmp
 
/stat/dev/hda2            176        20      147  12% /mnt/hda2
 
====資源(あいたスペース)の有効活用====
 
標準の保留音では「Asteriskでござる」と言わんばかりであり、ちょっち個性に欠けるので、<BR>
 
/mnt/hda2/に保留音をぶちこむ。みっくみくにしてやんYO!!<BR>
 
Astlinuxで使える保留音のファイルフォーマットはMP3ではなく、ulawファイルなので注意が必要である。<BR>
 
/var/lib/asterisk/moh/default以下には収まりきれないので、下記の方法で解決する<BR>
 
======リンク張る======
 
設定要らずで済ますなら、lnコマンドを使う。ファイルが少ないなら問題ないだろう。
 
Forneus # ln -s /mnt/hda2/MoH/clouds.ulaw /var/lib/asterisk/moh/default/
 
======設定変更======
 
/stat/etc/asterisk/musiconhold.confを直接編集しても良い。<BR>
 
Forneus asterisk # vi /stat/etc/asterisk/musiconhold.conf
 
[default]
 
mode=files
 
;directory=/var/lib/asterisk/moh/default
 
directory=/mnt/hda2/MoH
 
 
random=yes      ; Play the files in a random order
 
 
 
===tftpd===
 
Cisco電話機を動かす前にtftpサーバーを動かす必要がある。<BR>
 
Cisco電話機は、tftpサーバーから設定ファイル、壁紙、着信音などを引っ張ってくるからである。<BR>
 
 
 
Forneus # vi /stat/etc/rc.conf
 
 
(略)
 
 
##Configure TFTPD support
 
##Works the same as FTPD above.
 
TFTPD=inetd  ←コメントはずした
 
 
 
##TFTP Server options (flags to pass to TFTP)
 
##This only works in standalone TFTP server mode
 
#TFTPDOPTIONS="-l -s /tftpboot"
 
TFTPDOPTIONS="-l -s /mnt/tftp"   ←付け足しても無視される模様
 
<P>
 
TFTPD=inetdにすると、TFTPDOPTIONSが無視されてしまうようだ。<BR>
 
TFTPD=tftpdにすると、tftpd自体が動かない模様。<BR>
 
tftpの設定も小細工が可能である。
 
</P>
 
/vi/etc/init.d/inet
 
if [ "$TFTPD" -a "$TFTPD" = "inetd" ]
 
then
 
if [ -d /mnt/kd/tftpboot ]
 
then
 
  ln -s /mnt/kd/tftpboot /tmp/tftpboot
 
else
 
mkdir /tmp/tftpboot
 
fi
 
echo "tftp    dgram  udp    wait    root    /usr/sbin/tftpd        tftpd -s
 
/tmp/tftpboot" >> /tmp/etc/inetd.conf   ←ここの行を小細工(Before)
 
fi
 
}
 
 
 
fi
 
echo "tftp    dgram  udp    wait    root    /usr/sbin/tftpd        tftpd -s
 
/mnt/hda2/tftp/" >> /tmp/etc/inetd.conf   ←ここの行を小細工(After)
 
fi
 
}
 
ファイルを変更したら、再起動をかける。<BR>
 
とりあえず動いたらしい
 
Forneus log # ps |grep tftp
 
  1226 root        272 S  tftpd -s /mnt/hda2/tftp/
 
  1364 root        296 S
 

2017年11月18日 (土) 17:51時点における最新版

転送先:


中の人は、利用者:Gimaにアカウントを変更したらしいです。