6
5

More than 3 years have passed since last update.

自宅を24 -TWENTY FOUR-のCTU化 CISCO 7960GをSIP化しAsteriskに収容

Last updated at Posted at 2021-03-06

自宅を24 -TWENTY FOUR-のCTU化 CISCO 7960GをSIP化しAsteriskに収容

はじめに

いまさらですが、最近24にはまってます。
24のCTU(Counter Terrorist Unit)で頻繁に登場するCISCOのIP電話を自宅で使いたいということでAsteriskに収容しました。
下記サイトを参考にRaspberry Pi 4 model BのAsterisk(GIT-master-134d2e729d)を使いSIP電話として環境設定しました。
https://ameblo.jp/sentakuc/entry-12468287493.html

CISCO 7960Gを購入

オークションにてCISCO 7960GをACアダプタ付きを4000円で購入。
よく確認せず日本版を買ってしまったので、画面表示やハードキーに日本語表記が・・
SIP化後画面表示は英語表記となり問題なく動作します。

SIP版ファームウェアのダウンロード

デフォルトではSCCP(Skinny Call Control Protocol)版であり、Asteriskに収容できない。
そこで下記サイト
http://www.3cx.com/sip-phones/cisco-7940g-7960g/
でリンクされている
http://downloads.3cx.com/downloads/misc/legacy-phones/cisco-79xx.zip
よりSIP版ファームウェアをダウンロード

TFTPサーバのセットアップ

ファームウェアや背景画像、着信音をCISCO 7960Gにアップロードするため、tftpサーバをインストール

sudo apt-get update
sudo apt-get install tftp-server
sudo systemctl enable tftpd-hpa.service
sudo systemctl start tftpd-hpa.service

TFTPサーバのrootディレクトリ( /srv/tftp)にダウンロードしたcisco-79xx.zipの中身をコピー

Asteriskに端末の設定を追加

/etc/asterisk/sip.confに7960Gの設定を追加

sip.conf

[105]
type=friend
username=105
nat=no ;asteriskがnat内にいる環境だが、本設定でしか動かなかった
secret=password ;端末のパスワードなので変更ください
host=dynamic
canreinvite=no
caninvite=no
context=inside ;extensions.confのcontextに合わせて設定
qualify=yes
callerid="hoge hoge" ;表示名(オプション)

7960Gの設定ファイルの作成

/srv/tftpに下記設定ファイルを作成

XMLDefault.cnf.xml

<Default>
  <callManagerGroup>
     <members>
        <member priority="0">
           <callManager>
              <ports>
                 <ethernetPhonePort>2000</ethernetPhonePort>
                 <mgcpPorts>
                    <listen>2427</listen>
                    <keepAlive>2428</keepAlive>
                 </mgcpPorts>
              </ports>
              <processNodeName></processNodeName>
           </callManager>
        </member>
     </members>
  </callManagerGroup>
  <loadInformation7  model="Cisco 7960">P0S3-8-12-00</loadInformation7>
<authenticationURL></authenticationURL>
 <directoryURL></directoryURL>
 <idleURL></idleURL>
 <informationURL></informationURL>
 <messagesURL></messagesURL>
 <servicesURL></servicesURL>
</Default>                                                      

上の

<loadInformation7  model="Cisco 7960">P0S3-8-12-00</loadInformation7>

にダウンロードしたファームウェアのファイル名から拡張子を除いたものに書き換え

SIPDefault.cnf

image_version: P0S3-8-12-00
proxy1_address: "192.168.1.2"            ; Can be dotted IP or FQDN
proxy1_port: "5080"
proxy2_address: ""              ; Can be dotted IP or FQDN
proxy3_address: ""              ; Can be dotted IP or FQDN
proxy4_address: ""              ; Can be dotted IP or FQDN
proxy5_address: ""              ; Can be dotted IP or FQDN
proxy6_address: ""              ; Can be dotted IP or FQDN
proxy_register: 1
messages_uri:   "1"
phone_password: "cisco" ; Limited to 31 characters (Default - cisco)
sntp_mode: unicast
sntp_server: "192.168.1.1"
time_zone: "JST" ; assuming you're in GMT
time_format_24hr: 1 ; to show the time in 24hour format
date_format: "Y/M/D"  ; format you would like the date in
dial_template: dialplan

上記も同様にファームウェアのバージョンを記入し、proxy1_address,proxy1_portでSIPサーバ(Asterisk)のIPアドレス,port番号を指定。
オプションでsntpサーバがある場合は設定

SEP"7960GのMACアドレス".cnf.xml

<device>
<loadInformation model="IP Phone 7960">P0S3-8-12-00</loadInformation>
</device>

7960GのMACアドレスが001122334455だった場合、ファイル名は
SEP001122334455.cnf.xml

上記も同様にファームウェアのバージョンを記入。
MACアドレスは本体裏面下部にシールで張ってありました。

SIP"7960GのMACアドレス".cnf.xml

image_version: P0S3-8-12-00
line1_name: "105"
line1_authname: 105
line1_shortname: "Line 1" ; displayed on the phones softkey
line1_password: "password"
line1_displayname: "hoge hoge"; the caller id
proxy1_port: "5080"
proxy1_address: "192.168.1.2"
# Line 2 Setup
#line2_name: 1261
#line2_authname: "1261"
#line2_shortname: "Line 2"
#line2_password: "secret"
#line2_displayname: "John Baxendale";
# Phone Label (Text desired to be displayed in upper right corner)
#phone_label: "Siftah.net  " ; add a space at the end, looks neater
phone_password: "cisco" ; Limited to 31 characters (Default - cisco)
user_info: none
telnet_level: 2
logo_url: "http://192.168.1.2:8080/CTU_Logo.bmp"

sip.confで設定したusername,secret,calleridを設定
SIPサーバ(Asterisk)のIPアドレス,port番号も設定
背景画像もオプションで設定できるが、URL指定が必要だったので、ローカルのWebサーバに下記からダウンロードしたCTU_PACK中の画像を置いた
ctu_packには、あのCTUの着信音も入っている。
https://www.ip-phone-forum.de/threads/ctu-style-pack-f%C3%BCrs-7940-7960.78863/
https://www.ip-phone-forum.de/attachments/ctu_pack-zip.4526/

RINGLIST.DAT

着信音を変更する
上記ctu_pack中にある
* RINGLIST.DAT
* Ring1.pcm
* Ring2.pcm
* Ring3.pcm

を/srv/tftpにコピー
本体の設定メニューボタンからRing Typeの設定で選択できる。
ちなみにRINGLIST.DATは

CTU Ring 1      Ring1.pcm
CTU Ring 2      Ring2.pcm
CTU Ring 3      Ring3.pcm

のように、

7960Gでの表示名 ファイル名

というフォーマットとなっている

DHCPオプションでのTFTPサーバアドレスの通知

7960GにTFTPサーバのアドレスを通知します。
7960GはDHCPでIPアドレスを取得するが、DHCPオプションの66 TFTP Server NameでTFTPサーバのIPアドレスを通知できる。
dhcpdで設定する場合は下記等参照
https://kazmax.zpp.jp/cmd/d/dhcp-options.5.html

私はYAMAHAのnvr510で設定したため、下記設定をconfigに追加

dhcp scope option 1 tftp_server_name=192.168.1.2

再起動で設定完了

7960Gを再起動すれば、ファームウェアが更新され下記状態に!
image.jpg

6
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5