「Asterisk pjsip parameters」の版間の差分
| 327行目: | 327行目: | ||
|moh_suggest||デフォルトのMOHクラス||文字列||default||- | |moh_suggest||デフォルトのMOHクラス||文字列||default||- | ||
|- | |- | ||
|moh_passthrough||-||yes | |moh_passthrough||-||Bool|yes||- | ||
|- | |- | ||
|mwi_from_user|| | |mwi_from_user|| | ||
2023年11月10日 (金) 09:33時点における版
全般的な注意
省略時のデフォルトが明確でない部分もあるので注意してください。安全のためには明示指定すべきです。
例えば、いくつかのセクションで 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が定義されているので、省略時にはこれが用いられます。
各セクションのパラメータ
各セクションはtype=で区別されます。例えば[global]はセクション名ですが、type=globalを指定する必要があります。globalやsystemの設定はそのままセクションにglobal,systemと書くのが良いでしょう。
エンドポイントやAOR等はそれぞれの名前を使いますので例えば次のようなケースは
[Alice] type=endpoint
"Alice"という名前のエンドポイントのセクションという意味になります。
GLOBAL
[grobal]
グローバル設定
type=global
| 項目名 | 内容 | 種類 | デフォルト | 記述例 |
|---|---|---|---|---|
| max_forwards | SIPのMAXFORWARDERS値 | uint | 70 | - |
| user_agent | SIPのUA名 | 文字列 | Asterisk PBX {Version} | - |
| default_outbound_endpoint | デフォルトで使用するエンドポイント(発信) | 文字列 | - | - |
| keep_alive_interval | コネクション型で使用されるキープアライブ | 数値(秒) | 90 | - |
| contact_expiration_check_interval | 期限切れコンタクトを無効にするまでの時間 | 数値(秒) | 30 | - |
| disable_multi_domain | マルチドメインのサポートを無効化する | yes/no | no | - |
| endpoint_identifier_order | エンドポイントの判定順序 | カンマ区切り文字列 | ip,username,anonymous,header,auth_username | - |
| debug | デバッグ設定(nまたはIPアドレス) | 文字列 | n | - |
| max_initial_qualify_time | 起動から初期Qualify(全AOR)までの秒数 | 数値(秒) | 4 | - |
| regcontext | レジストしてくるエンドポイントにPriority 1のNoOpをエンドポイント名で作成するcontextを指定 | 文字列 | なし | - |
| default_voicemail_extension | AORで指定されていない場合にNOTIFYで使用されるボイスメールのexten | 文字列 | なし | - |
| unidentified_request_count | あるIPアドレスからの未識別のリクエストを何回まで許容するか | 数値(回数) | 5 | - |
| unidentified_request_period | 未識別のリクエストを許容する間隔 | 数値(秒数) | 5 | - |
| unidentified_request_prune_interval | 未識別のリクエストを隔離する間隔 | 数値 | - | - |
| default_from_user | デフォルトのFromユーザ名 | 文字列 | asterisk | - |
| default_realm | デフォルトのrealm | 文字列 | asterisk | - |
| mwi_tps_queue_high | - | 数値 | - | - |
| mwi_tps_queue_low | - | 数値 | -1 | - |
| mwi_disable_initial_unsolicited | - | yes/no | - | - |
| ignore_uri_user_options | SIP URIのuser=を無視するかどうか | yes/no | - | - |
| send_contact_status_on_update_registration | デバイスがレジストを更新した際にAMIイベントを送出するかどうか | yes/no | no | - |
| taskprocessor_overload_trigge | タスクプロセッサの過負荷検出要因 | global,pjsip_only,none | global | - |
| norefersub | norefersubを送出するかどうか | yes/no | yes | - |
| all_codecs_on_empty_reinvite | - | yes/no | no | - |
| allow_sending_180_after_183 | 183の後に180を送るかどうか | yes/no | no | - |
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 | - |
| disable_rport | rportを無効にするかどうか | yes/no | 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 | - |
| remove_unavailable | - | yes/no | 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 | 廃止済(sip.confとの互換性維持?) | - | - | - |
| message_context | 廃止済(sip.confとの互換性維持?) | - | - | - |
| moh_suggest | デフォルトのMOHクラス | 文字列 | default | - |
| moh_passthrough | - | yes | - | |
| 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