Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Asteriskのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Asterisk
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:電話と音声]] [[en:Asterisk]] [http://www.asterisk.org Asterisk] は完全な PBX (電話交換機) ソフトウェアです。Linux, BSD, Windows, OS X などで動作し、PBX が通常備えている機能は全て含まれています。Asterisk は4つのプロトコルによる VoIP ができ、比較的安価なハードウェアでほぼ全ての規格の電話装置と一緒に使うことが可能です。 Asterisk はボイスメールサービス、電話帳、電話会議、自動音声応答、コールキューイングを実現します。また、三者通話、発信者番号通知サービス、ADSI、IAX、SIP、H.323 (クライアントとゲートウェイの両方)、MGCP (コールマネージャのみ)、SCCP/Skinny をサポートしています。 この記事では家庭ネットワークにおけるシンプルな設定を説明し、SIP [[ソフトフォン]]を使って LAN 上の他の SIP ソフトフォンと会話できるようにします。 ==インストール== [[AUR]] から {{AUR|asterisk}} をインストールして、{{ic|asterisk.service}} を使ってサーバーを[[起動]]してください。 {{AUR|asterisk-addons}}{{Broken package link|package not found}} や {{AUR|zaptel-svn}} もインストールすると良いかもしれません。また、SIP [[ソフトフォン]]と最低2つのマシンが必要です。SIP フォンとしては[[公式リポジトリ]]の [http://www.linphone.org/ linphone] {{Pkg|linphone}} や [[AUR]] の [http://www.xten.net/index.php?menu=X-Series x-lite] {{AUR|xlite_bin}} が推奨されます。 ilbc コーデックのサポートを有効にするには PKGBUILD の build セクションの最初に以下を追加してください: {{bc|<nowiki> cd ${srcdir}/${pkgname}-${pkgver}/contrib/scripts echo | ./get_ilbc_source.sh</nowiki>}} ==設定== ===SIP=== asterisk サーバーを動かしたら、後は2つのファイルを編集すれば設定できます: {{ic|sip.conf}} と {{ic|extensions.conf}}。asterisk の設定ディレクトリ ({{ic|/etc/asterisk}}) に移動して、{{ic|sip.conf}} を編集して以下を記述してください: {{bc|1= [me1] type=friend username=me1 secret=PASSWORD host=dynamic context=house [me2] type=friend username=me2 secret=PASSWORD host=dynamic context=house }} これで {{Ic|house}} コンテキストに二人の SIP ユーザー {{Ic|me1}} と {{Ic|me2}} が作成されます。パスワードは {{Ic|PASSWORD}} です。 次にコンテキストを定義します。{{ic|extensions.conf}} を以下のように編集: {{bc|1= [house] exten => 100,1,Dial(SIP/me1) exten => 101,1,Dial(SIP/me2) }} これでコンテキスト {{Ic|house}} が作成され SIP ユーザー {{Ic|me1}} にエクステンション 100 が、SIP ユーザー {{Ic|me2}} にエクステンション 101 が割り当てられます。後は実際に動作するか確認するだけです。 ===保留音=== 保留音はとても楽しい機能です。簡単に設定することができます。{{ic|/etc/asterisk/musiconhold.conf}} を編集して以下を追加してください: {{bc|1= [default] mode=files directory=/var/lib/asterisk/mohmp3 }} Now go into your sip.conf {{bc|1= musiconhold=default }} 後はお気に入りの MP3 を {{ic|/var/lib/asterisk/mohmp3}} にコピーしてください。 ===ボイスメール=== Voicemail is another feature of asterisk. There are many ways to configure it, however this article only covers a simple approach. Create/edit your {{ic|voicemail.conf}}: {{bc|<nowiki> [general] format=gsm|wav49|wav serveremail=asterisk attach=no mailcmd=/usr/sbin/sendmail -t maxmessage=180 maxgreet=60 [default] 100 => 1234,Me,me@mydomain.com </nowiki>}} What does this mean? Most of the {{Ic|[general]}} is pretty self-explanatory. However, do note that if you have postfix set up right the PBX will send an email notifying the user of a new voice-mail and if {{Ic|1=attach=yes}} is defined it will attach the file. Now for the actual mailbox. The format is: mailbox => password,user,email In this case, we gave 'Me' (email me@mydomain.com) mailbox 100, with a password of 1234. Now we have to have a way to leave messages to this voice-mail, and a way to access it. For this, we go back to the {{ic|extensions.conf}} and modify your existing entry as follows: exten => 100,1,Dial(SIP/me1,20) exten =>100,2,Voicemail(100@default) The 20 on the end of the first 'exten' tells 'Dial()' to call for 20 seconds. If no one answers it heads to voice-mail box 100 in the default context. Next is actually accessing your voicemail. For this we add: exten => 600,1,VoiceMailMain,s100@default So when we call 600, the application 'VoiceMailMain' goes to 100 in the default context. The {{Ic|s}} allows for automatic login. {{Note|The 'VoiceMail' applications have a significant amount of options, so it is suggested reading over some additional documentation. This is just for a basic, home use setup. Also note that it is generally a good idea to use extensions higher then your users extensions for accessing 'VoiceMail'. This way someone dialing 208 does not hit someone's voice-mail at 205.}} ===PSTN に接続=== Now that you have the previous setup, it is time to actually connect to the outside world. To do this, you will need a provider such as [http://pstn.junctionnetworks.com/ Junction Networks]. Your provider should have instructions on connecting to asterisk, so this section is very general. ====一般的なセットアップ==== =====sip.conf===== {{bc|1= [general] register => username:password@sip.specific.com [whatever] fromdomain=specific.com host=sip.specific.com insecure=very ; check with provider username=usernameduh secret=passwordduh type=peer }} =====extensions.conf===== {{bc|1= [outboundwithCID] ; this can be whatever exten => _1NXXNXXXXXX,1,SetCIDNum(15555551234) exten => _1NXXNXXXXXX,2,Dial(SIP/${EXTEN}@whatever) exten => _1NXXNXXXXXX,3,Congestion() exten => _1NXXNXXXXXX,103,Busy() [default] ; This should be set in your sip.conf for incoming calls ;These should to be changed to your actual number ; ie 15555555555 exten => 1NXXNXXXXXX,1,Answer() exten => 1NXXNXXXXXX,2,Playback(ttt-weasels) exten => 1NXXNXXXXXX,3,HangUp() }} *In the outbound context, any number dialed will be sent out to your service provider. The 'whatever' in the 2 priority should match what you have in your sip.conf. *Of course, the inbound dial-plan can be modified to do what you want. For instance, you can have {{Ic|Dial(SIP/me1)}} so when someone calls your number they are routed to your SIP phone on your computer. Then add in voice-mail and so on. =====iax.conf===== The first step is to log into FWD and enable their side of IAX. It is under extra features, and keep in mind that the authors claim it takes a little while to activate. Now edit your iax.conf with the following in the 'general' section: {{bc|1= register => FWDNUMBER:PASSWORD@iax2.fwdnet.net disallow = all allow = ulaw }} And at the bottom add: {{bc|1= [iaxfwd] type=user context=fromiaxfwd auth=rsa inkeys=freeworlddialup }} This allows calls from FWD. =====extensions.conf===== Place this at the top under '[globals]': {{bc|1= FWDNUMBER=MYFWDNUMBER ; your calling number FWDCIDNAME="MyName"; your caller id FWDPASSWORD=MYFWDPASSWORD ; your password FWDRINGS=sip/office ; the phone to ring FWDVMBOX=1000 ; the VM box for this user }} Next, add this to a context for outgoing: {{bc|1= exten => _393.,1,SetCallerId,${FWDCIDNAME} exten => _393.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:3},60,r) exten => _393.,3,Congestion }} You can change the '393' to whatever you want. This is what you will dial before dialing a 'fwd' number. For instance, to dial '744561' you would dial '393744561'. And lastly, the incoming calls: {{bc|1= [fromiaxfwd] exten => ${FWDNUMBER},1,Dial(${FWDRINGS},20,r) exten => ${FWDNUMBER},2,Voicemail,u${FWDVMBOX} exten => ${FWDNUMBER},102,Voicemail,b${FWDVMBOX} }} {{Note|If you have problems try removing the variables from {{ic|extensions.conf}}. These instructions are from FWD's site and I have not been tested by this article's author.}} Extensions to try calling are 55555 (a volunteer maned test line) and 514 (conference). ===音声=== 音声は {{ic|/var/lib/asterisk/xx}} フォルダに保存します。{{ic|xx}} は言語コードです。例えば英語なら "en" になります。新しい音声を追加したいときはこのフォルダにコピーしてください。以下のフォルダ構造を守って下さい: {{bc| /var/lib/asterisk/sounds/xx /var/lib/asterisk/sounds/xx/digits /var/lib/asterisk/sounds/xx/letters /var/lib/asterisk/sounds/xx/phonetic }} {{ic|sip.conf}} の language パラメータを編集してください: {{bc|1= [general] ... language=en ... }} 音声が入手できる場所: * http://downloads.asterisk.org/pub/telephony/sounds/ * https://packages.debian.org/wheezy/all/asterisk-prompt-xx ** [https://packages.debian.org/wheezy/all/asterisk-prompt-fr fr] ** [https://packages.debian.org/wheezy/all/asterisk-prompt-de de] ** ... * [http://www.voip-info.org/wiki/view/Asterisk+sound+files+international voip-info.org] ===MeetMe=== MeetMe は電話会議をできるようにするアプリケーションです。設定は簡単です。 {{ic|meetme.conf}} を編集: conf => 1000 {{ic|extensions.conf}} を編集: exten => 999,1,MeetMe(1000|M) 999 にダイアルすることで会議 1000 に入ることができます。{{Ic|<nowiki>|M</nowiki>}} を設定することで誰もいないときは保留音が鳴ります。誰かが会議に参加すると保留音は自動的に消えます。 {{Note|You ''must'' have the zaptel package in order for MeetMe to work. Install it and run {{Ic|modprobe ztdummy}} before running asterisk. This provides digium timing for us without cards so we can utilize TDM.}} ==Asterisk コンソールとソフトフォン== Now lets get Asterisk going: # asterisk -vvvvvvc This will give us the Asterisk CLI with verbose output. If Asterisk is already running you will need to use: # asterisk -r Now fire up your SIP clients and set them up with the information in the sip.conf. Switch back to your Asterisk CLI and you should see: Registered SIP 'me1' at 192.168.0.142 port 5061 expires 60 Now you should be able to dial {{Ic|101}} from {{Ic|me1}} and talk to {{Ic|me2}}. ==トラブルシューティング== 404 Not Found エラーが表示される場合は {{ic|extensions.conf}} とダイアルした電話番号を確認してください。
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
Asterisk
に戻る。
検索
検索
Asteriskのソースを表示
話題を追加