0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AsteriskをWSL2でセットアップした手順ー2

Last updated at Posted at 2025-01-21

Asteriskのコンフィグ

  • コンフィグファイル確認

    • /etc/asterisk配下にコンフィグは97ファイルあり

image.png

  • コンフィグファイル編集のためdir移動
cd /etc/asterisk
  • dirごとバックアップ(編集前に念ため)
cp -r /etc/asterisk /etc/asterisk_backup

Asterisk基本設定ガイドでは・・
以下2つのコンフィグを設定すれば内線電話レベルは動くようなので
 ・pjsip.conf
 ・extensions.conf

  • pjsip.confをnanoで編集
root@DESKTOP:/etc/asterisk#nano pjsip.conf

image.png

※スミマセン、pjsip.confのnanoスクショなく上記画面は別物参考用です

  • 以下をalt+6でコピー、ctl+Uでペースト
[transport-udp]
type=transport
protocol=udp    ;udp,tcp,tls,ws,wss,flow
bind=0.0.0.0

[6001]
type=endpoint
transport=transport-udp
context=default
disallow=all
allow=ulaw
allow=gsm
auth=6001
aors=6001
rewrite_contact = yes

[6001]
type=auth
auth_type=userpass
password=6001
username=6001

[6001]
type=aor
max_contacts=1

[6002]
type=endpoint
transport=transport-udp
context=default
disallow=all
allow=ulaw
allow=gsm
auth=6002
aors=6002
rewrite_contact = yes

[6002]
type=auth
auth_type=userpass
password=6002
username=6002

[6002]
type=aor
max_contacts=1
  • nanoをctl+XでExit、Yで上書き、pjsip.conf編集終わり
root@DESKTOP:/etc/asterisk#nano pjsip.conf
root@DESKTOP:/etc/asterisk#
  • extensions.confをnanoで編集、注意!extension s です
root@DESKTOP:/etc/asterisk#nano extensions.conf
  • 同じく以下をalt+6コピー、ctl+Uペースト、nano編集終わり
[default]
exten => 101,1,Answer()
exten => 101,2,Playback(beep)
exten => 101,3,Hangup()

exten => 102,1,Answer()
exten => 102,2,Playback(beep)
exten => 102,3,Hangup()

コンフィグ設定終わり

  • Asteriskを再起動
systemctl restart asterisk
  • 念のためAsterisk起動のステータス確認
systemctl status asterisk
asterisk.service - Asterisk PBX
  Loaded: loaded
    Active: active (running) since........... (省略)

Zoiperで内線電話をかける

  • SIPクライアントソフトZoiperをダウンロードしインストール

    • 内線電話用Winマシン:UserPCを準備
    • この時点最新バージョン:Zoiper5_Installer_v5.6.6
         
  • ZoiperをAsteriskへレジストリする

  • IPアドレスをセット要なのでipconfigで調べる

C:\Usersxxxx\ipconfig /all

screen shot - HP OMEN ipconfig.jpg

  • Ubuntu=WSL2=Win11はClass C Private address: 192.168.1.84

  • Zoiperで 6001@192.168.1.84:5060 をセット

image.png

残念ながら・・
SIP UDPNot found となりレジストリ失敗

screen shot - Zoiper SIP server not found.jpg

AsteriskをWSL2でセットアップした手順ー3・・に続く
AsteriskをWSL2でセットアップした手順ー1・・に戻る

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?