2008年07月01日

Fon2200をOpenWRT化しAsteriskを入れる

01072008044.jpg 
N82をひかり電話のSIP端末にしたくてFonをAsteriskマシンにしようと思います、ごらんの通りシリアルポート増設版のFon2200です。

 

.tftpサーバを立てておく
 Windows用tftpサーバアプリを探してinstallする
http://philippe.jounin.net/tftpd32.html

.tftpサーバの公開フォルダに下記を格納しておく(7.0.9)
http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/
 openwrt-atheros-2.6-root.jffs2-64k
 openwrt-atheros-2.6-vmlinux.lzma

Ex)今回のLAN環境(各自の自宅環境にあわせてね)
   HostPC(XP) IP address 192.168.0.22
   Fonに割り当てるIPアドレス 192.168.0.254

.redbootコンソール下で下記コマンドを実行する
  redbootコンソールに入りtftpサーバIPアドレス設定とFon自身のアドレス設定をする
 redboot>ip_address -l 192.168.0.254/24 -h 192.168.0.22
 redboot>fis init
 redboot>load -r -b %{FREEMEMLO} openwrt-atheros-2.6-root.jffs2-64k
 redboot>fis create -f 0xA8030000 -l 0x6F0000 rootfs
 redboot>load -r -v -b %{FREEMEMLO} openwrt-atheros-2.6-vmlinux.lzma
 redboot>fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
 redboot>exec
 ※OpenWRTに書いてある通りにするとうまく行かないので適宜修正してあります。
 (7.0.9版はファイルサイズがでかくなっていてrootfsサイズを0x6F0000に減らさないと
  だめです!!)
.rebootしOpenWRTにLoginする
 1)viで/etc/ipkg.confに下記行を追加

src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/7.09/atheros

 2)viで/etc/config/networkを下記の様に修正
 ※固定ipアドレスを設定しgateWay設定をする
------------------------------------------------------
config interface loopback
    option ifname   lo
    option proto    static
    option ipaddr   127.0.0.1
    option netmask  255.0.0.0

config interface lan
    option ifname   eth0

    option type     bridge
    option proto    static
    option ipaddr   192.168.0.254
    option netmask  255.255.255.0
    option gateway  192.168.0.1
    option dns      192.168.0.1
------------------------------------------------------
 2)OpenWRTのshell上で下記コマンド実行
   ipkg update
  ipkg install asterisk14
 ※/etc/config/networkが正しく無いとipkgがファイルをDownload しないよ!!

これでAsteriskマシンの完成です、後は設定だけ・・・きょうはここまでです。
posted by taga at 00:38| Comment(0) | TrackBack(0) | 日記