asterisk: add pjsip_wizard.conf
This commit is contained in:
parent
db279bd8c4
commit
49a96a1164
|
@ -0,0 +1,55 @@
|
|||
;
|
||||
; /etc/asterisk/pjsip_wizard.conf
|
||||
;
|
||||
; Modifed and "borrowed" (read: stolen) https://www.sacredheartsc.com/blog/building-a-personal-voip-system/
|
||||
;
|
||||
|
||||
; This template contains default settings for all SIP trunks.
|
||||
[trunk-defaults](!)
|
||||
type = wizard
|
||||
|
||||
; Send media to the address and port on the incoming packet, regardless of what
|
||||
; the SIP headers say (NAT workaround).
|
||||
endpoint/rtp_symmetric = yes
|
||||
|
||||
; Rewrite the SIP contact to the address and port of the request (NAT workaround).
|
||||
endpoint/rewrite_contact = yes
|
||||
|
||||
; Send the Remote-Party-ID SIP header. Some providers need this.
|
||||
endpoint/send_rpid = yes
|
||||
|
||||
; We use alaw mainly in Europe.
|
||||
endpoint/allow = !all,alaw
|
||||
|
||||
; Call encryption.
|
||||
endpoint/media_encryption = no
|
||||
|
||||
;
|
||||
; This template contains default settings for all local extensions.
|
||||
[extension-defaults](!)
|
||||
type = wizard
|
||||
|
||||
; Require clients to register.
|
||||
accepts_registrations = yes
|
||||
|
||||
; Require clients to authenticate.
|
||||
accepts_auth = yes
|
||||
|
||||
; When simultaneous logins from the same account exceed max_contacts, disconnect
|
||||
; the oldest session.
|
||||
aor/remove_existing = yes
|
||||
|
||||
; allow just alaw
|
||||
endpoint/allow = !all,alaw
|
||||
|
||||
; Context name for BLF/presence subscriptions. This can be any string of your
|
||||
; choosing.
|
||||
endpoint/subscribe_context = subscribe
|
||||
|
||||
;
|
||||
; Load user extensions.
|
||||
#tryinclude pjsip_wizard_users.conf
|
||||
|
||||
; Load trunks.
|
||||
#tryinclude pjsip_wizard_trunk_one.conf
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
; /etc/asterisk/pjsip_wizard_users.conf
|
||||
;
|
||||
; Modifed and "borrowed" (read: stolen) https://www.sacredheartsc.com/blog/building-a-personal-voip-system/
|
||||
;
|
||||
[1000](extension-defaults)
|
||||
; Dialplan context name for calls originating from this account.
|
||||
endpoint/context = from-ext
|
||||
|
||||
; Voicemail address.
|
||||
endpoint/mailboxes = 1000@default
|
||||
|
||||
; Internal Caller ID string for this device.
|
||||
endpoint/callerid = 1000 <1000>
|
||||
|
||||
; Username for SIP account. By convention, this should be the extension number.
|
||||
inbound_auth/username = 1000
|
||||
|
||||
; Password for SIP account (you can choose whatever password you like).
|
||||
inbound_auth/password = IfYouTolerateThisThenYourChildrenWillBeNext!
|
||||
|
||||
; Maximum number of simultaneous logins for this account.
|
||||
aor/max_contacts = 1
|
||||
|
||||
; Check connectivity every 30 seconds.
|
||||
aor/qualify_frequency = 30
|
||||
|
||||
; Set connectivity check timeout to 3 seconds.
|
||||
aor/qualify_timeout = 3.0
|
||||
|
||||
; IMPORTANT! This setting determines whether the audio stream will be proxied
|
||||
; through the Asterisk server.
|
||||
;
|
||||
; If this device is directly reachable by the internet (either by a publicly
|
||||
; routable IP, or static port mappings on your router), choose YES.
|
||||
;
|
||||
; Otherwise, if this device is hidden behind NAT, choose NO.
|
||||
endpoint/direct_media = no
|
|
@ -0,0 +1,163 @@
|
|||
; PJSIP Wizard Configuration Samples and Quick Reference
|
||||
;
|
||||
; This file has several very basic configuration examples, to serve as a quick
|
||||
; reference to jog your memory when you need to write up a new configuration.
|
||||
; It is not intended to teach PJSIP configuration or serve as an exhaustive
|
||||
; reference of options and potential scenarios.
|
||||
;
|
||||
; This file has two main sections.
|
||||
; First, manually written examples to serve as a handy reference.
|
||||
; Second, a list of all possible PJSIP config options by section. This is
|
||||
; pulled from the XML config help. It only shows the synopsis for every item.
|
||||
; If you want to see more detail please check the documentation sources
|
||||
; mentioned at the top of this file.
|
||||
|
||||
; ============================================================================
|
||||
; NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
|
||||
;
|
||||
; This file does not maintain the complete option documentation.
|
||||
; ============================================================================
|
||||
|
||||
; Documentation
|
||||
;
|
||||
; The official documentation is at http://wiki.asterisk.org
|
||||
; You can read the XML configuration help via Asterisk command line with
|
||||
; "config show help res_pjsip_config_wizard", then you can drill down through
|
||||
; the various sections and their options.
|
||||
;
|
||||
|
||||
|
||||
;============EXAMPLE WIZARD CONFIGURATION FOR A PHONE=======================
|
||||
|
||||
; This config would create an endpoint, aor with dynamic contact, inbound
|
||||
; auth, a phoneprov object and a dialplan hint for extension 1000.
|
||||
|
||||
;[myphone]
|
||||
;type = wizard
|
||||
;accepts_auth = yes
|
||||
;accepts_registrations = yes
|
||||
;has_phoneprov = yes
|
||||
;transport = ipv4
|
||||
;has_hint = yes
|
||||
;hint_exten = 1000
|
||||
;inbound_auth/username = testname
|
||||
;inbound_auth/password = test password
|
||||
;endpoint/allow = ulaw
|
||||
;endpoint/context = default
|
||||
;phoneprov/MAC = 001122aa4455
|
||||
;phoneprov/PROFILE = profile1
|
||||
|
||||
|
||||
;============EXAMPLE WIZARD CONFIGURATION FOR AN ITSP TRUNK=================
|
||||
|
||||
; This ITSP has 2 servers available and requires registration.
|
||||
|
||||
; This config would create an endpoint, an aor with 2 static contacts, an
|
||||
; outbound auth, an identify with 2 matches, and 2 registrations.
|
||||
|
||||
;[mytrunk]
|
||||
;type = wizard
|
||||
;sends_auth = yes
|
||||
;sends_registrations = yes
|
||||
;transport = ipv4
|
||||
;remote_hosts = sip1.myitsp.com:5060,sip2.myitsp.com:5060
|
||||
;outbound_auth/username = testname
|
||||
;outbound_auth/password = test password
|
||||
;endpoint/allow = ulaw
|
||||
;endpoint/context = default
|
||||
|
||||
|
||||
;========================WIZARD SECTION OPTIONS===============================
|
||||
;[wizard]
|
||||
; SYNOPSIS: Provides configuration wizard for common scenarios.
|
||||
;sends_auth= ; Will create an outbound auth object for the endpoint and
|
||||
; registration.
|
||||
; If yes, outbound/username must be specified.
|
||||
; (default = "no")
|
||||
|
||||
;accepts_auth= ; Will create an inbound auth object for the endpoint.
|
||||
; If yes, inbound/username must be specified.
|
||||
; (default = "no")
|
||||
|
||||
;sends_registrations= ; Will create an outbound registration object and an
|
||||
; identify match for each host in remote_hosts (which
|
||||
; must be specified).
|
||||
; sends_auth must also be specified.
|
||||
; (default: "no")
|
||||
|
||||
;sends_line_with_registrations= ; Setting this to true will cause the wizard to
|
||||
; skip the creation of an identify object to match
|
||||
; incoming requests to the endpoint and instead add the
|
||||
; line and endpoint parameters to the outbound
|
||||
; registration object.
|
||||
; (default: "no")
|
||||
|
||||
;accepts_registrations= ; Will create an aor with dynamic contacts which will
|
||||
; accept registrations.
|
||||
; accepts_auth must also be specified.
|
||||
; (default: "no")
|
||||
|
||||
;remote_hosts= ; A comma separated list of remote hosts in the form of
|
||||
; <ipaddress | hostname>[:port] [,<ipaddress | hostname>[:port] ] ...
|
||||
; If specified, a static contact for each host will be created
|
||||
; in the aor. If accepts_registrations is no, an identify
|
||||
; object is also created with a match line for each remote host.
|
||||
; If an aor/contact or match/identify is explicitly supplied,
|
||||
; remote_hosts will not be used to automatically create contacts
|
||||
; or matches respectively.
|
||||
; (default: "")
|
||||
|
||||
;outbound_proxy= ; Setting this is a shortcut for setting
|
||||
; endpoint/outbound_proxy
|
||||
; aor/outbound_proxy
|
||||
; registration/outbound_proxy
|
||||
|
||||
;transport= ; The transport to use for the endpoint and registrations
|
||||
; (default: the pjsip default)
|
||||
|
||||
;server_uri_pattern= ; The pattern used to construct the registration
|
||||
; server_uri. The replaceable parameter ${REMOTE_HOST} isa
|
||||
; available for use.
|
||||
; (default: "sip:${REMOTE_HOST}")
|
||||
|
||||
;client_uri_pattern= ; The pattern used to construct the registration client_uri.
|
||||
; The replaceable parameters ${REMOTE_HOST} and ${USERNAME}
|
||||
; are available for use.
|
||||
; (default: "sip:${USERNAME}@${REMOTE_HOST}")
|
||||
|
||||
;contact_pattern= ; The pattern used to construct the aor contact.
|
||||
; The replaceable parameter ${REMOTE_HOST} is available
|
||||
; for use.
|
||||
; (default: "sip:${REMOTE_HOST}")
|
||||
|
||||
;has_phoneprov= ; Will create a phoneprov object.
|
||||
; If yes, phoneprov/MAC must be specified.
|
||||
; (default: "no")
|
||||
|
||||
;has_hint= ; Create hint and optionally a default application.
|
||||
; (default: "no")
|
||||
|
||||
;hint_context ; Any hints created for this wizard will be placed in this
|
||||
; context.
|
||||
; (default: endpoint/context)
|
||||
|
||||
;hint_exten ; If specified, a PJSIP/<wizard_id> hint will be created
|
||||
; for this extension in 'hint_context'.
|
||||
; context.
|
||||
; (default: none)
|
||||
|
||||
;hint_application ; If specified, an extension will be placed in 'hint_context'
|
||||
; at priority 1 that calls this application. Could be any
|
||||
; valid dialplan expression like
|
||||
; "Gosub(stdexten,${EXTEN},1(${HINT}))"
|
||||
; (default: "Dial(${HINT})")
|
||||
|
||||
;endpoint/<param> ; Any parameters to be passed directly to and validated
|
||||
;aor/<param> ; by their respective objects.
|
||||
;inbound_auth/<param>
|
||||
;outbound_auth/<param>
|
||||
;identify/<param>
|
||||
;registration/<param>
|
||||
;phoneprov/<param>
|
||||
|
||||
;type= ; Must be of type wizard (default: "")
|
Loading…
Reference in New Issue