LoginSignup
9
10

More than 3 years have passed since last update.

Grandstream HT-503でアナログ回線をAsteriskに収容する

Last updated at Posted at 2017-01-22

Grandstream HT-503を利用し、アナログ回線をAsteriskに収容する方法を紹介します。

前提環境

  • Grandstream HT-503 1.0.15.5
  • Asterisk 11.25.1

HT-503の設定

普通に使うところは割愛して、たぶん肝となる設定は次の部分

Basic Settings / Unconditional Call Forward to VOIP

FXO側から着信があった際に、SIPサーバのどのユーザにINVITEを投げるか(Portが5061なのはTLSを利用しているからです)
後で出てくる、extensions.confと合わせます。
CallFwdVoip.png

Advanced Settings / Call Progress Tone

Tone.png

Advanced Settings / FXO Port / Caller ID

ナンバーディスプレイ使っている場合は設定必要
CID.png

Advanced Settings / FXO Port / Caller ID Transport Type

Caller IDをFromヘッダーにマッピングすると、同じIPアドレスからRegistしてる
別のSIP端末と間違って認識するっぽい(?)からPPIで渡すようにしています。(どっか別の設定がおかしい気もするけど。)

2018/8/10 追記:Asteriskのsip.confで「match_auth_username=yes」を追加すると、
標準のRelay via SIP Fromでも上記問題が発生しません。

CidTransport.png

Advanced Settings / FXO Termination / Channel Dialing

いろいろ触ってどれが原因か微妙だけど、FXOから抜けるのに苦労して、
Wait for Dial-ToneとStage Method (1/2): が怪しい気がする。

FXO.png

FXO Port / SRTP Mode

手元の環境では、RTPもSRTPで暗号化しているため、「SRTP Mode」を「Enabled and forced」にしています。
Asterisk側のsip.confの「encryption=yes」と合わせます。

Asterisk側

Asterisk側は別に普通で、こんな感じ

sip.conf

[general]
match_auth_username=yes

[ht503_fxo]
context=ht503demo
fromdomain=voip.example.com
disallow=all
allow=ulaw
allow=gsm
type=peer
insecure=invite,port
host=dynamic
transport=tls
encryption=yes
directmedia=no
nat=force_rport,comedia
qualify=5000
secret=foobar

extensions.conf

exten => 054xxxxxxx,1,NoOp(${CALLERID(num)})
exten => 054xxxxxxx,n,Dial(SIP/client11)
exten => _0.,1,Dial(SIP/${EXTEN}@ht503_fxo)
9
10
3

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
9
10