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?

More than 1 year has passed since last update.

ひかり電話ルータ (RT-400NE) に Asterisk をつないでハマったことまとめ

Last updated at Posted at 2022-09-22

概要

  • Asterisk/Pjsip は endpoint に outbound_proxy = sip:<HGWのIPアドレス> が設定されていると Invite の Request URI にそれを送る。
  • ひかり電話のインタフェースでは,ダイヤルされた番号を Request URI の userinfo 部に含めなくてはならない。
  • したがって,ひかり電話ルータに Asterisk をつなぐ際には,この設定を使用してはならない。

ここをミスると,HGW から 400 Bad Request が返ってくる。Asterisk には「Everyone is busy/congested at this time」しかログされないことに注意。(pjsip set history on/off で SIP メッセージのロギングを有効化/無効化できる。)

設定

pjsip_hikari.conf

;ひかり電話HGW
;
[hikari-hgw]
type = aor
contact = sip:4@10.198.1.1 ;<- 内線番号@HGWのIPアドレス:内線番号はHGW内の内線番号で1桁の数字
qualify_frequency = 30
authenticate_qualify = no
outbound_proxy = sip:10.198.1.1 ;lr <- HGWのIPアドレス

[hikari-hgw]
type = auth
auth_type = userpass
username = 0004 ;<- HGWの内線ユーザ(通常は0003とかになるもの)
password = ZjoCLk9d ;<- HGWの内線パスワード

[hikari-hgw]
type = identify
endpoint = hikari-hgw
match = 10.198.1.1 ;<- HGWのIPアドレス

[hikari-hgw]
type = registration
transport = transport-udp ;<- 別途設定したtransportを指定
outbound_auth = hikari-hgw
server_uri = sip:10.198.1.1 ;<- HGWのIPアドレス
client_uri = sip:4@10.198.1.1 ;<- 内線番号@HGWのIPアドレス:内線番号はHGW内の内線番号で1桁の数字
retry_interval = 60

[hikari-hgw]
type = endpoint
transport = transport-udp
context = from-hikari
dtmf_mode = inband
disallow = all
allow = ulaw
direct_media = no
send_pai = yes
;rtp_symmetric = no
;force_rport = no
;rewrite_contact = no
inband_progress = yes
from_user = 4 ;<- HGW内の内線番号
from_domain = 10.198.1.1 ;<- HGWのIPアドレス
;outbound_proxy = sip:10.198.1.1 ; <- HGWのIPアドレス
language = ja
outbound_auth = hikari-hgw
aors = hikari-hgw
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?