From 4d8ab20a8abac76c680a40605bb6e6e8e675afde Mon Sep 17 00:00:00 2001 From: George Joseph Date: Tue, 10 Feb 2015 23:16:40 +0000 Subject: res_pjsip_config_wizard: Add ability to auto-create hints. Looking at the Super Awesome Company sample reminded me that creating hints is just plain gruntwork. So you can now have the pjsip conifg wizard auto-create them for you. Specifying 'hint_exten' in the wizard will create 'exten => ,hint/PJSIP/' in whatever is specified for 'hint_context'. Specifying 'hint_application' in the wizard will create 'exten => ,1,' in whatever is specified for 'hint_context'. The default for 'hint_context' is the endpoint's context. There's no default for 'hint_application'. If not specified, no app is added. There's no default for 'hint_exten'. If not specified, neither the hint itself nor the application will be created. Some may think this is the slippery slope to users.conf but hints are a basic necessity for phones unlike voicemail, manager, etc that users.conf creates. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4383/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431643 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- configs/samples/pjsip_wizard.conf.sample | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/samples/pjsip_wizard.conf.sample b/configs/samples/pjsip_wizard.conf.sample index b27e146be..0f46083af 100644 --- a/configs/samples/pjsip_wizard.conf.sample +++ b/configs/samples/pjsip_wizard.conf.sample @@ -24,7 +24,7 @@ ;============EXAMPLE WIZARD CONFIGURATION FOR A PHONE======================= ; This config would create an endpoint, aor with dynamic contact, inbound -; auth and a phoneprov object. +; auth, a phoneprov object and a dialplan hint for extension 1000. ;[myphone] ;type = wizard @@ -32,6 +32,8 @@ ;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 @@ -116,6 +118,24 @@ ; 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/ 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/ ; Any parameters to be passed directly to and validated ;aor/ ; by their respective objects. ;inbound_auth/ -- cgit v1.2.3