2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

1. Asterisk11をソースからインストール

Last updated at Posted at 2014-06-15
  • sip.confについては今回は触れてません。
  • Ubuntu14.04 64bit にて実施。

ビルド

ビルドに必要なライブラリをインストール
sudo apt-get build-dep -y asterisk
ソースをダウンロード
wget -q http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
ビルド
tar xzf asterisk-11-current.tar.gz
cd asterisk-11.*
./configure -q --prefix=/srv/asterisk11
make menuselect
make -s
sudo make install
sudo make samples
sudo make config
現状を保存
cd /srv/asterisk11/etc/asterisk/
sudo git init
sudo git add -A
sudo git commit -m "init"
asterisk実行ユーザを作成
sudo adduser --system --disabled-login asterisk
sudo groupadd asterisk
sudo usermod -g asterisk asterisk
sudo chown -R asterisk:asterisk /srv/asterisk11/var/log

設定

/etc/default/asterisk
-#AST_USER="asterisk"
-#AST_GROUP="asterisk"
+AST_USER="asterisk"
+AST_GROUP="asterisk"
asterisk.conf
-;[files]
-;astctlpermissions = 0660
-;astctlowner = root
-;astctlgroup = apache
-;astctl = asterisk.ctl
+[files]
+astctlpermissions = 0660
+astctlowner = asterisk
+astctlgroup = asterisk
+astctl = asterisk.ctl

PATH追加

~/.bashrc
+export PATH=$PATH:/srv/asterisk11/sbin
PATH追加
source ~/.bashrc

起動

起動
sudo /etc/init.d/asterisk start

コンソールの使い方

asteriskコンソール接続
sudo usermod -a -G asterisk `whoami`
# asteriskグループ権限を得るため一回ログアウト/ログインしてから
asterisk -r
  • 接続できない場合、/srv/asterisk/var/run/asterisk/asterisk.ctlが存在することを確認。
helpの使い方
help core
help core show
help core show settings
  • コマンドリストが絞れていることがわかる。
実行例
core show settings
alias一覧。下位互換性のためか。
vim -R etc/asterisk/cli_aliases.conf

その他設定ファイル

  • sip.conf : 外線発信用にregisterを記述する。
  • extensions.(ael|conf|lua) : PBX設定
  • modules.conf : pbx_lua.so などloadする用。
  • res_config_mysql.conf : mysql接続
  • lib/asterisk/modules/*so : モジュール一覧
    • *mysql.soがないので*odbc.soを使えということか。

用語

  • cdr : Call Detail Record
  • ulaw : 電話で使われるコーデック
    • G.711 μ-law, PCMU/PCMA とも言われる。
    • 8kHz、8ビット、モノラル。64kbps
    • G.711の方式でA-lawは欧米、μ-lawは日本,米国で使われている。
    • ひかり電話もこれを使っている。
  • G.729 : 050plusアプリで使われている。8kbpsと圧縮率が高い。
  • SILK : skypeで使われている。可変長
2
2
0

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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?