# -*- coding: utf-8 -*-
# Copyright 2019-2020 The Wazo Authors  (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later

from __future__ import unicode_literals

import logging

logger = logging.getLogger(__name__)

# These values are copied from https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Configuration_res_pjsip

endpoint_options = [
    '100rel',
    'accept_multiple_sdp_answers',
    'accountcode',
    'acl',
    'aggregate_mwi',
    'allow_overlap',
    'allow_subscribe',
    'allow_transfer',
    'aors',
    'asymmetric_rtp_codec',
    'auth',
    'bind_rtp_to_media_address',
    'bundle',
    'call_group',
    'callerid',
    'callerid_privacy',
    'callerid_tag',
    'connected_line_method',
    'contact_acl',
    'contact_deny',
    'contact_permit',
    'contact_user',
    'context',
    'cos_audio',
    'cos_video',
    'deny',
    'device_state_busy_at',
    'direct_media',
    'direct_media_glare_mitigation',
    'direct_media_method',
    'disable_direct_media_on_nat',
    'dtls_auto_generate_cert',
    'dtls_ca_file',
    'dtls_ca_path',
    'dtls_cert_file',
    'dtls_cipher',
    'dtls_fingerprint',
    'dtls_private_key',
    'dtls_rekey',
    'dtls_setup',
    'dtls_verify',
    'dtmf_mode',
    'fax_detect',
    'fax_detect_timeout',
    'follow_early_media_fork',
    'force_avp',
    'force_rport',
    'from_domain',
    'from_user',
    'g726_non_standard',
    'ice_support',
    'identify_by',
    'ignore_183_without_sdp',
    'inband_progress',
    'incoming_mwi_mailbox',
    'language',
    # 'mailboxes',
    'max_audio_streams',
    'max_video_streams',
    'media_address',
    'media_encryption',
    'media_encryption_optimistic',
    'media_use_received_transport',
    'message_context',
    'moh_passthrough',
    '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',
    'permit',
    'pickup_group',
    'preferred_codec_only',
    'record_off_feature',
    'record_on_feature',
    'redirect_method',
    '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_connected_line',
    '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_connected_line',
    'trust_id_inbound',
    'trust_id_outbound',
    'use_avpf',
    'use_ptime',
    'user_eq_phone',
    # 'voicemail_extension',
    'webrtc',
]

auth_options = [
    'auth_type',
    'nonce_lifetime',
    'md5_cred',
    'password',
    'realm',
    'username',
]

contact_options = [
    # 'authenticate_qualify',
    'call_id',
    'endpoint',
    'expiration_time',
    # 'outbound_proxy',
    'path',
    'prune_on_boot',
    # 'qualify_frequency',
    # 'qualify_timeout',
    'reg_server',
    'uri',
    'user_agent',
    'via_addr',
    'via_port',
]

aor_options = [
    # 'authenticate_qualify',
    'contact',
    'default_expiration',
    # 'mailboxes',
    'max_contacts',
    'maximum_expiration',
    'minimum_expiration',
    # 'outbound_proxy',
    # 'qualify_frequency',
    # 'qualify_timeout',
    'remove_existing',
    'support_path',
    # 'voicemail_extension',
]

registration_options = [
    'auth_rejection_permanent',
    'forbidden_retry_interval',
    'fatal_retry_interval',
    'max_retries',
]
