「Asterisk pjsip parameters」の版間の差分

提供: VoIP-Info.jp
移動先: 案内検索
(ENDPOINT)
(ENDPOINT)
(同じ利用者による、間の14版が非表示)
32行目: 32行目:
 
Registerのセクションにはtransport-udpが指定されていますが、endpointのセクションにはtransportが指定されていません。<BR>
 
Registerのセクションにはtransport-udpが指定されていますが、endpointのセクションにはtransportが指定されていません。<BR>
 
ですがtransportセクションとしてtransport-udpが定義されているので、省略時にはこれが用いられます。
 
ですがtransportセクションとしてtransport-udpが定義されているので、省略時にはこれが用いられます。
<BR>
 
十分な裏取りができていないのですが、ACL指定の挙動もおそらくこの通りです。acl=が指定できるセクションで、ACLの指定をしていない場合、デフォルト解釈として「最初に出てくるACL」が採用されることでグローバルなACLとして動作していると考えられます。
 
  
 
=res_pjsip=
 
=res_pjsip=
47行目: 45行目:
 
|user_agent||SIPのUA名||文字列||Asterisk PBX {Version}||-
 
|user_agent||SIPのUA名||文字列||Asterisk PBX {Version}||-
 
|-
 
|-
|default_outbound_endpoint||デフォルトで使用するエンドポイント||文字列||-||-
+
|default_outbound_endpoint||デフォルトで使用するエンドポイント(発信)||文字列||-||-
 
|-
 
|-
 
|debug||デバッグ設定(nまたはIPアドレス)||文字列||n||-
 
|debug||デバッグ設定(nまたはIPアドレス)||文字列||n||-
79行目: 77行目:
  
 
==ACL(res_pjsip_acl)==
 
==ACL(res_pjsip_acl)==
type.acl
+
type=acl
 
{| border="1" cellspacing="0"
 
{| border="1" cellspacing="0"
 
!項目名!!内容!!種類!!デフォルト!!記述例
 
!項目名!!内容!!種類!!デフォルト!!記述例
159行目: 157行目:
 
!項目名!!内容!!種類!!デフォルト!!記述例
 
!項目名!!内容!!種類!!デフォルト!!記述例
 
|-
 
|-
|100rel||RFC3252タグを許可||Custom||no||-
+
|100rel||RFC3252タグを許可||Custom||yes||-
 
|-
 
|-
 
|accept_multiple_sdp_answers||非100relレスポンスで複数のSDP応答を許||Bool||no||-
 
|accept_multiple_sdp_answers||非100relレスポンスで複数のSDP応答を許||Bool||no||-
165行目: 163行目:
 
|acl||acl.confのセクション名||Custom||-||-
 
|acl||acl.confのセクション名||Custom||-||-
 
|-
 
|-
|aggregate_mwi||MWの通知をひとつのNITIFYにまとめる||Bool||yes||-
+
|aggregate_mwi||MWの通知をひとつのNOTIFYにまとめる||Bool||yes||-
 
|-
 
|-
 
|allow||許可するCODEC||Codec||-||allow=ulaw<br>allow=ulaw,gsm
 
|allow||許可するCODEC||Codec||-||allow=ulaw<br>allow=ulaw,gsm
 +
|-
 +
|deny||許可しないCODEC||Codec||-||deny=all<br>deny=alaw
 
|-
 
|-
 
|allow_overlap||RFC3578オーバラップダイヤルを許可||Bool||yes||-
 
|allow_overlap||RFC3578オーバラップダイヤルを許可||Bool||yes||-
185行目: 185行目:
 
|call_group||コールグループ(数値)||Custom||-||-
 
|call_group||コールグループ(数値)||Custom||-||-
 
|-
 
|-
|callerid||このエンドポイントのCID||文字列||-||-
+
|callerid||このエンドポイントのCID||Custom||-||-
 +
|-
 +
|callerid_privacy||デフォルトのプライバシーレベル||Custom||allowed_not_screened||-
 
|-
 
|-
|callerid_privacy||
+
|callerid_tag||エンドポイントの内部id_tag||Custom||-||-
 
|-
 
|-
|callerid_tag||
+
|connected_line_method||コネクテッドラインのメソッド||Custom||invite||-
 
|-
 
|-
|connected_line_method||
+
|contact_acl||acl.conf内のセクション名(コンタクトACL)||Custom||-||-
 
|-
 
|-
|contact_acl||
+
|contact_user||||Custom||-||-
 
|-
 
|-
|context||
+
|context||ダイヤルプランのcontext||文字列||default||-
 
|-
 
|-
|cos_audio||
+
|cos_audio||音声のCOS値||uint||0||-
 
|-
 
|-
|cos_video||
+
|cos_video||ビデオのCOS値||uint||0||-
 
|-
 
|-
|device_state_busy_at||
+
|device_state_busy_at||使用中のチャネル数がこの値に達した際にBUSY応答する||uint||0||-
 
|-
 
|-
|direct_media||
+
|direct_media||エンドポイント間でのダイレクトメディアを許可||Bool||yes||-
 
|-
 
|-
|direct_media_glare_mitigation||
+
|direct_media_glare_mitigation||-||Custom||-||-
 
|-
 
|-
|direct_media_method||
+
|direct_media_method||ダイレクトメディアのメソッド||Custom||invite||-
 
|-
 
|-
|disable_direct_media_on_nat||
+
|disable_direct_media_on_nat||NAT環境下で使用する場合にはダイレクトメディアを無効化||Bool||no||-
 
|-
 
|-
|dtls_ca_file||
+
|dtls_ca_file||認証証書(CA)ファイル名へのパス||Custom||-||-
 
|-
 
|-
|dtls_ca_path||
+
|dtls_ca_path||認証証書(CA)ファイルのあるディレクトリへのパス||Custom||-||-
 
|-
 
|-
|dtls_cert_file||
+
|dtls_cert_file||現在のピアの認証証書||Custom||-||-
 
|-
 
|-
|dtls_cipher||
+
|dtls_cipher||DTLSネゴシエーションで使用する暗号化||Custom||-||-
 
|-
 
|-
|dtls_fingerprint||
+
|dtls_fingerprint||SDPで使用するDTLSフィンガープリントのハッシュ||Custom||-||-
 
|-
 
|-
|dtls_private_key||
+
|dtls_private_key||認証証書のプライベートキー||Custom||-||-
 
|-
 
|-
|dtls_rekey||
+
|dtls_rekey||TLSセッションとSRTPセッションのrekeyまでの間隔||Custom||0||-
 
|-
 
|-
|dtls_setup||
+
|dtls_setup||接続の方向||Custom||-||-
 
|-
 
|-
|dtls_verify||
+
|dtls_verify||ピアの認証証書を検証するかどうか||Custom||no||-
 
|-
 
|-
|dtmf_mode||
+
|dtmf_mode||DTMFモード||Custom||RFC4733||-
 
|-
 
|-
|fax_detect||
+
|fax_detect||CNGトーン検出||Bool||no||-
 
|-
 
|-
|fax_detect_timeout||
+
|fax_detect_timeout||CNGトーン検出タイムアウト||uint||0||-
 
|-
 
|-
|follow_early_media_fork||
+
|follow_early_media_fork||Toタグが異なっていてもSDPに追従する||bool||no||-
 
|-
 
|-
|force_avp||
+
|force_avp||このエンドポイントでAVPを使用するかどうか||Bool||no||-
 
|-
 
|-
|force_rport||
+
|force_rport||このエンドポイントでAVP使用を強制するかどうか||Bool||no||-
 
|-
 
|-
|from_domain||
+
|from_domain||SIPのfromdomain||文字列||-||-
 
|-
 
|-
|from_user||
+
|from_user||SIPのfromuser||文字列||-||-
 
|-
 
|-
|g726_non_standard||
+
|g726_non_standard||G726オーディオ時にAAL2使用を強制||Bool||no||-
 
|-
 
|-
|ice_support||
+
|ice_support||NATトラバースにICEを使用||Bool||no||-
 
|-
 
|-
|identify_by||
+
|identify_by||エンドポイントの識別方法||Custom||username,ip||-
 
|-
 
|-
|inband_progress||
+
|inband_progress||Ringingに員バンドを使用するかどうか||Bool||no||-
 
|-
 
|-
|incoming_mwi_mailbox||
+
|incoming_mwi_mailbox||MWI NOTIFYが来た場合に使用するメールボックス||文字列||-||-
 
|-
 
|-
|language||
+
|language||このエンドポイントの言語||文字列||-||language=ja
 
|-
 
|-
|mailboxes||
+
|mailboxes||指定されたメールボックスに変更があった場合エンドポイントにNOTIFY||文字列||-||-
 
|-
 
|-
|media_address||
+
|media_address||SDPのメディアハンドリングで使用するIPアドレス||文字列||-||-
 
|-
 
|-
|media_encryption||
+
|media_encryption||このエンドポイントでメディア暗号化を使用するかどうか/その方式||Custom||-||-
 
|-
 
|-
|media_encryption_optimistic||
+
|media_encryption_optimistic||暗号化に成功しない場合でもセッションを切断しない||Bool||no||-
 
|-
 
|-
 
|media_use_received_transport||
 
|media_use_received_transport||
395行目: 397行目:
 
|contact_user||リクエスト内のコンタクトユーザ||文字列||-||
 
|contact_user||リクエスト内のコンタクトユーザ||文字列||-||
 
|-
 
|-
|endpoint||着信時に使用するエンドポイント||文字列||-||
+
|endpoint||着信時に使用するエンドポイント||文字列||-||line=yes時にしか使えないので注意
 
|-
 
|-
 
|expiration||レジスタのExpire時間||uint||3600||expiration=3600
 
|expiration||レジスタのExpire時間||uint||3600||expiration=3600
439行目: 441行目:
 
|cert_file||エンドポイントの認証証書(TLSのみWSSは非対象)||文字列||-||-
 
|cert_file||エンドポイントの認証証書(TLSのみWSSは非対象)||文字列||-||-
 
|-
 
|-
|cipher||有線する暗号化方式(TLSのみWSSは非対象)||文字列||-||-
+
|cipher||優先する暗号化方式(TLSのみWSSは非対象)||文字列||-||-
 
|-
 
|-
 
|cos||COS値||uint||0||-
 
|cos||COS値||uint||0||-
476行目: 478行目:
  
 
=res_pjsip_config_wizard=
 
=res_pjsip_config_wizard=
ファイル: pjsip_wizard.conf
+
ファイル: pjsip_wizard.conf<br>
 +
*[[Asterisk_pjsip#Wizard]]

2019年7月10日 (水) 18:08時点における版

全般的な注意

省略時のデフォルトが明確でない部分もあるので注意してください。安全のためには明示指定すべきです。
例えば、いくつかのセクションで transport= が指定できますが、これが省略された場合には「最初のtype=transportで指定された」トランスポートが使用されます。明示指定せずとも動作しますが、別なトランスポートを定義し、それが以前のものよりも前に来るように書いてしまうと挙動が変わってしまうということになります。
次の例をみてください

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5070

[hikari-hgw]
type = registration
transport = transport-udp
outbound_auth = hikari-hgw
server_uri = sip:XXX.XXX.XXX.XXX
client_uri = sip:3@XXX.XXX.XXX.XXX
retry_interval = 60

[hikari-hgw]
type = endpoint
context = from-hikari-hgw
dtmf_mode = inband
disallow = all
allow = ulaw
direct_media = no
send_pai = yes
inband_progress = yes
from_user = 3
from_domain = XXX.XXX.XXX.XXX
language = ja
outbound_auth = hikari-hgw
aors = hikari-hgw

Registerのセクションにはtransport-udpが指定されていますが、endpointのセクションにはtransportが指定されていません。
ですがtransportセクションとしてtransport-udpが定義されているので、省略時にはこれが用いられます。

res_pjsip

GLOBAL

[grobal]
グローバル設定
type=global

項目名 内容 種類 デフォルト 記述例
max_forwards SIPのMAXFORWARDERS値 uint 70 -
user_agent SIPのUA名 文字列 Asterisk PBX {Version} -
default_outbound_endpoint デフォルトで使用するエンドポイント(発信) 文字列 - -
debug デバッグ設定(nまたはIPアドレス) 文字列 n -

SYSTEM

type=system

項目名 内容 種類 デフォルト 記述例
timer_t1 T1タイマ値(ミリ秒) uint 500 -
timer_b タイマB値(ミリ秒 uint 32000 -
compact_headers コンパクトヘッダを使用するかどうか Bool n -
threadpool_initial_size PjSIPスレッド・プールの初期数 uint 0 -
threadpool_auto_increment 必要になった際にスレッドを増加させる数 uint 5 -
threadpool_idle_timeout 使用されなくなったスレッドを破棄するまでの時間(秒) uint 60 -
threadpool_max_size PjSIPが使用するスレッドの最大数(0は無制限) uint 0 -
disable_tcp_switch UDPからTCPへの自動切り替えを禁止するかどうか Bool n -
follow_early_media_fork - Bool yes -
accept_multiple_sdp_answers - Bool no -

ACL(res_pjsip_acl)

type=acl

項目名 内容 種類 デフォルト 記述例
acl acl.conf内の名前付ACL名 Custom - -
contact_acl acl.conf内のContact名前付ACL Custom - -
contact_deny 拒否するSIPヘッダ内のContact Custom - -
contact_permit 許可するSIPヘッダ内のContact Custom - -
deny 拒否するIPアドレス Custom - deny=192.168.1.0/24
deny=0.0.0.0/0.0.0.0
permit 許可するIPアドレス Custom - permit=192.168.2.0/24
permit=192.168.2.1,192.168.2.2

AOR

type=aor

項目名 内容 種類 デフォルト 記述例
authenticate_qualify Qualifyに認証を使用するかどうか Bool no -
contact このAORのコンタクト Custom - -
default_expiration このAORを使用する動的コンタクトのexpire時間(秒) uint 3600 -
mailboxes 指定されたメールボックスへのSubscribeを許可 文字列 - -
max_contacts このAORに接続可能なコンタクト数 uint 0 -
maximum_expiration AORで保持される最大時間(秒) uint 7200 -
minimum_expiration AORの最小キープアライブ時間(秒) uint 60 -
outbound_proxy OPTIONSを送出する際に使用するプロキシ 文字列 - -
qualify_frequency Qualify間隔(秒) uint 0 -
qualify_timeout Qualifyのタイムアウト(秒) double 3.0 -
remove_existing 既存のコンタクトを新しいもので上書きするかどうか Bool no -
support_path REGISTERリクエストのPathサポートを有効にするかどうか Bool no -
voicemail_extension NOTIFYに含めるメールボックスexten Custom - -

AUTH

type=auth

項目名 内容 種類 デフォルト 記述例
auth_type 認証方式 Custom userpass auth_type=userpass
md5_cred 認証に使用するMD5ハッシュ 文字列 - -
nonce_lifetime 認証のnonce寿命時間 uint 32 -
password パスワード 文字列 - password=mypassword
realm エンドポイントのSIPレルム 文字列 - -
username ユーザ名 文字列 - username=myusername

CONTACT

DOMAIN_ALIAS

type=domain_alias

項目名 内容 種類 デフォルト 記述例
domain ドメインのエイリアス 文字列 - -

ENDPOINT

type=endpoint

項目名 内容 種類 デフォルト 記述例
100rel RFC3252タグを許可 Custom yes -
accept_multiple_sdp_answers 非100relレスポンスで複数のSDP応答を許 Bool no -
acl acl.confのセクション名 Custom - -
aggregate_mwi MWの通知をひとつのNOTIFYにまとめる Bool yes -
allow 許可するCODEC Codec - allow=ulaw
allow=ulaw,gsm
deny 許可しないCODEC Codec - deny=all
deny=alaw
allow_overlap RFC3578オーバラップダイヤルを許可 Bool yes -
allow_subscribe エンドポイントからAsteriskへのサブスクライブ許可 Bool yes -
allow_transfer エンドポイントのSIP REFERによる転送を許可 Bool yes -
aors このエンドポイントのAOR 文字列 - -
asymmetric_rtp_codec 送受信で異なるCODECの使用を許可 Bool no -
auth このエンドポイントのauth 文字列 - -
bind_rtp_to_media_address RTPインスタンスをmedia_addressにする Bool no -
call_group コールグループ(数値) Custom - -
callerid このエンドポイントのCID Custom - -
callerid_privacy デフォルトのプライバシーレベル Custom allowed_not_screened -
callerid_tag エンドポイントの内部id_tag Custom - -
connected_line_method コネクテッドラインのメソッド Custom invite -
contact_acl acl.conf内のセクション名(コンタクトACL) Custom - -
contact_user Custom - -
context ダイヤルプランのcontext 文字列 default -
cos_audio 音声のCOS値 uint 0 -
cos_video ビデオのCOS値 uint 0 -
device_state_busy_at 使用中のチャネル数がこの値に達した際にBUSY応答する uint 0 -
direct_media エンドポイント間でのダイレクトメディアを許可 Bool yes -
direct_media_glare_mitigation - Custom - -
direct_media_method ダイレクトメディアのメソッド Custom invite -
disable_direct_media_on_nat NAT環境下で使用する場合にはダイレクトメディアを無効化 Bool no -
dtls_ca_file 認証証書(CA)ファイル名へのパス Custom - -
dtls_ca_path 認証証書(CA)ファイルのあるディレクトリへのパス Custom - -
dtls_cert_file 現在のピアの認証証書 Custom - -
dtls_cipher DTLSネゴシエーションで使用する暗号化 Custom - -
dtls_fingerprint SDPで使用するDTLSフィンガープリントのハッシュ Custom - -
dtls_private_key 認証証書のプライベートキー Custom - -
dtls_rekey TLSセッションとSRTPセッションのrekeyまでの間隔 Custom 0 -
dtls_setup 接続の方向 Custom - -
dtls_verify ピアの認証証書を検証するかどうか Custom no -
dtmf_mode DTMFモード Custom RFC4733 -
fax_detect CNGトーン検出 Bool no -
fax_detect_timeout CNGトーン検出タイムアウト uint 0 -
follow_early_media_fork Toタグが異なっていてもSDPに追従する bool no -
force_avp このエンドポイントでAVPを使用するかどうか Bool no -
force_rport このエンドポイントでAVP使用を強制するかどうか Bool no -
from_domain SIPのfromdomain 文字列 - -
from_user SIPのfromuser 文字列 - -
g726_non_standard G726オーディオ時にAAL2使用を強制 Bool no -
ice_support NATトラバースにICEを使用 Bool no -
identify_by エンドポイントの識別方法 Custom username,ip -
inband_progress Ringingに員バンドを使用するかどうか Bool no -
incoming_mwi_mailbox MWI NOTIFYが来た場合に使用するメールボックス 文字列 - -
language このエンドポイントの言語 文字列 - language=ja
mailboxes 指定されたメールボックスに変更があった場合エンドポイントにNOTIFY 文字列 - -
media_address SDPのメディアハンドリングで使用するIPアドレス 文字列 - -
media_encryption このエンドポイントでメディア暗号化を使用するかどうか/その方式 Custom - -
media_encryption_optimistic 暗号化に成功しない場合でもセッションを切断しない Bool no -
media_use_received_transport
message_context
moh_suggest
mwi_from_user
mwi_subscribe_replaces_unsolicited
named_call_group
named_pickup_group
notify_early_inuse_ringing
one_touch_recording
outbound_auth
outbound_proxy
pickup_group
record_off_feature
record_on_feature
refer_blind_progress
rewrite_contact
rpid_immediate
rtcp_mux
rtp_engine
rtp_ipv6
rtp_keepalive
rtp_symmetric
rtp_timeout
rtp_timeout_hold
sdp_owner
sdp_session
send_diversion
send_pai
send_rpid
set_var
srtp_tag_32
sub_min_expiry
subscribe_context
suppress_q850_reason_headers
t38_udptl
t38_udptl_ec
t38_udptl_ipv6
t38_udptl_maxdatagram
t38_udptl_nat
timers
timers_min_se
timers_sess_expires
tone_zone
tos_audio
tos_video
transport
trust_id_inbound
trust_id_outbound
use_avpf
use_ptime
user_eq_phone
voicemail_extension

IDENTIFY(res_pjsip_endpoint_identifier_ip)

type=identify

項目名 内容 種類 デフォルト 記述例
endpoint 識別するエンドポイント名 文字列 -
match 一致させるIPアドレスまたはネットワーク Custom - match = 192.168.100.1
match_header 一致させるヘッダ/値のペア 文字列 - match_header = SIPHeader: 値
srv_lookups ホスト名解決にSRV参照を使用するかどうか Bool yes

REGISTRATION(res_pjsip_outbound_registration)

type=registration

項目名 内容 種類 デフォルト 記述例
auth_rejection_permanent 認証失敗時に恒久的失敗として扱う Bool yes
client_uri アウトバウンドレジスト時に使用するクライアントのSIP URI 文字列 -
contact_user リクエスト内のコンタクトユーザ 文字列 -
endpoint 着信時に使用するエンドポイント 文字列 - line=yes時にしか使えないので注意
expiration レジスタのExpire時間 uint 3600 expiration=3600
fatal_retry_interval Fatalレスポンスの場合のリトライ間隔(秒) uint 0
forbidden_retry_interval 403エラーの場合のリトライ間隔(秒) uint 0
line 着信時のcontactにlineを付加するかどうか Bool no
max_retries レジスタ試行回数 uint 10
server_uri レジスタ先のサーバURI 文字列 -
outbound_auth このレジスタの認証情報 文字列 - outbound_auth=セクション名
outbound_proxy レジスタ先のアウトバウンドproxyのFull SIP URI 文字列 -
retry_interval レジスタ失敗時の再試行間隔(秒) uint 60
support_path レジスタ時のPATHサポートの有効無効 Bool no
transport このReg.が使用するトランスポート 文字列 - trabsport=セクション名

TRANSPORT

type=transport
注意:transportの設定変更は通常、res_pjsip.soモジュールのリロードでは反映されません。Asteriskを再起動する必要があります。res_pjsipのリロードでtransportもリロードするにはallow_reload = yesを設定する必要があります。

項目名 内容 種類 デフォルト 記述例
allow_reload res_pjsipをリロードした際にtransportもリロードするかどうか Bool no -
async_operations 非同期動作の同時実行数 uint 1 -
bind このトランスポートがbindするアドレスとポート Custom - bind=0.0.0.0:5070
ca_list_file 読み込む認証証書のリストが入っているファイル(TLSのみWSSは非対象) 文字列 - -
ca_list_path 読み込む認証証書のリストが入っているファイルへのパス(TLSのみWSSは非対象) 文字列 - -
cert_file エンドポイントの認証証書(TLSのみWSSは非対象) 文字列 - -
cipher 優先する暗号化方式(TLSのみWSSは非対象) 文字列 - -
cos COS値 uint 0 -
domain "入り"方向のドメイン 文字列 - -
external_media_address RTPを扱う際の外部IPアドレス 文字列 - -
external_signaling_address SIPを扱う際の外部IPアドレス 文字列 - -
external_signaling_port SIPの外部ポート番号 uint 0 -
local_net NATを使用する場合にローカルとして扱うアドレス Custom - -
method SSLトランスポートのメソッド Custom - -
password トランスポートに必要とされるパスワード 文字列 - -
priv_key_file プライベートキーファイル(TLSのみWSSは非対象) Custom - -
protocol このトランスポートが使用するプロトコル(TLSのみWSSは非対象) Custom udp protocol=udp
require_client_cert クライアント認証証書が必要(TLSのみWSSは非対象) Custom - -
symmetric_transport 入出力双方で同じトランポートを使用するかどうか Bool no -
tos TOS値 Custom 0 - -
verify_client クライアント認証証書の確認が必要(TLSのみWSSは非対象) Custom - -
verify_server サーバ認証証書の確認が必要(TLSのみWSSは非対象) Custom - -
websocket_write_timeout WebSocket接続のタイムアウト(ミリ秒) 100 - -

res_pjsip_config_wizard

ファイル: pjsip_wizard.conf