Skip to end of metadata
Go to start of metadata

Module that privides simple configuration wizard capabilities.

This configuration documentation is for functionality provided by res_pjsip_config_wizard.

Overview

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://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard

pjsip_wizard.conf

wizard

Provides config wizard.

Configuration Option Reference

Option Name

Type

Default Value

Regular Expression

Description

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

 

no

 

Send outbound authentication to remote hosts.

accepts_auth

 

no

 

Accept incoming authentication from remote hosts.

sends_registrations

 

no

 

Send outbound registrations to remote hosts.

sends_line_with_registrations

 

no

 

Sets "line" and "endpoint parameters on registrations.

accepts_registrations

 

no

 

Accept inbound registration from remote hosts.

has_phoneprov

 

no

 

Create a phoneprov object for this endpoint.

server_uri_pattern

 

sip:REMOTE_HOST

 

A pattern to use for constructing outbound registration server_uris.

client_uri_pattern

 

sip:USERNAMEREMOTE_HOST

 

A pattern to use for constructing outbound registration client_uris.

contact_pattern

 

sip:REMOTE_HOST

 

A pattern to use for constructing outbound contact uris.

has_hint

 

no

 

Create hint and optionally a default application.

hint_context

 

endpoint/context or 'default'

 

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.

Configuration Option Descriptions

transport

If not specified, the default will be used.

remote_hosts

A comma-separated list of remote hosts in the form of host[:port]. If set, an aor static contact and an identify match will be created for each entry in the list. If send_registrations is also set, a registration will also be created for each.

outbound_proxy

Shortcut for specifying endpoint/outbound_proxy, aor/outbound_proxy, and registration/outbound_proxy individually.

sends_auth

At least outbound_auth/username is required.

accepts_auth

At least inbound_auth/username is required.

sends_registrations

remote_hosts is required and a registration object will be created for each host in the remote _hosts string. If authentication is required, sends_auth and an outbound_auth/username must also be supplied.

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.

accepts_registrations

An AOR with dynamic contacts will be created. If the number of contacts nneds to be limited, set aor/max_contacts.

has_phoneprov

A phoneprov object will be created. phoneprov/MAC must be specified.

server_uri_pattern

The literal ${REMOTE_HOST} will be substituted with the appropriate remote_host for each registration.

client_uri_pattern

The literals ${REMOTE_HOST} and ${USERNAME} will be substituted with the appropriate remote_host and outbound_auth/username.

contact_pattern

The literal ${REMOTE_HOST} will be substituted with the appropriate remote_host for each contact.

has_hint

Create hint and optionally a default application.

hint_context

Ignored if hint_exten is not specified otherwise specifies the context into which the dialplan hints will be placed. If not specified, defaults to the endpoint's context or default if that isn't found.

hint_exten

Will create the following entry in hint_context:

exten => <hint_exten>,hint,PJSIP/<wizard_id>

Normal dialplan precedence rules apply so if there's already a hint for this extension in hint_context, this one will be ignored. For more information, visit:

https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard

hint_application

Ignored if hint_exten isn't specified otherwise will create the following priority 1 extension in hint_context:

exten => <hint_exten>,1,<hint_application>

You can specify any valid extensions.conf application expression.

Examples:

Dial(${HINT})

Gosub(stdexten,${EXTEN},1(${HINT}))

Any extensions.conf style variables specified are passed directly to the dialplan.

Normal dialplan precedence rules apply so if there's already a priority 1 application for this specific extension in hint_context, this one will be ignored. For more information, visit:

https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard

aor/*

If an aor/contact is explicitly defined then remote_hosts will not be used to create contacts automatically.

identify/*

If an identify/match is explicitly defined then remote_hosts will not be used to create matches automatically.

phoneprov/*

To activate phoneprov, at least phoneprov/MAC must be set.

Import Version

This documentation was imported from Asterisk Version GIT-15-b172474

  • No labels