PJSIP Configuration Wizard
This module allows creation of common PJSIP configuration scenarios without having to specify individual endpoint, aor, auth, identify and registration objects.
For example, the following configuration snippet would create the endpoint, aor, contact, auth and phoneprov objects necessary for a phone to get phone provisioning information, register, and make and receive calls. A hint is also created in the default context for extension 1000.
[myphone]
type = wizard
sends_auth = no
accepts_auth = yes
sends_registrations = no
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
The first 8 items are specific to the wizard. The rest of the items are passed verbatim to the underlying objects.
The following configuration snippet would create the endpoint, aor, contact, auth, identify and registration objects necessary for a trunk to another pbx or ITSP that requires registration.
[mytrunk]
type = wizard
sends_auth = yes
accepts_auth = no
sends_registrations = yes
accepts_registrations = no
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
Of course, any of the items in either example could be placed into templates and shared among wizard objects.
For more information, visit:
https://docs.asterisk.org/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/PJSIP-Configuration-Wizard/
pjsip_wizard.conf
[wizard]
Provides config wizard.
type- Must be 'wizard'.transport- The name of a transport to use for this object.remote_hosts- List of remote hosts.outbound_proxy- Shortcut for specifying proxy on individual objects.sends_auth- Send outbound authentication to remote hosts.accepts_auth- Accept incoming authentication from remote hosts.sends_registrations- Send outbound registrations to remote hosts.sends_line_with_registrations- Sets "line" and "endpoint parameters on registrations.accepts_registrations- Accept inbound registration from remote hosts.has_phoneprov- Create a phoneprov object for this endpoint.server_uri_pattern- A pattern to use for constructing outbound registration server_uris.client_uri_pattern- A pattern to use for constructing outbound registration client_uris.contact_pattern- A pattern to use for constructing outbound contact uris.has_hint- Create hint and optionally a default application.hint_context- The context in which to place hints.hint_exten- Extension to map a PJSIP hint to.hint_application- Application to call when 'hint_exten' is dialed.endpoint/*- Variables to be passed directly to the endpoint.aor/*- Variables to be passed directly to the aor.inbound_auth/*- Variables to be passed directly to the inbound auth.outbound_auth/*- Variables to be passed directly to the outbound auth.identify/*- Variables to be passed directly to the identify.registration/*- Variables to be passed directly to the outbound registrations.phoneprov/*- Variables to be passed directly to the phoneprov object.
User Notes
Know a tip or gotcha for this topic? Share it below and help others.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.