[asterisk-commits] gtjoseph: trunk r425009 - in /trunk: ./ configs/samples/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 9 15:55:53 CDT 2014


Author: gtjoseph
Date: Thu Oct  9 15:55:50 2014
New Revision: 425009

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425009
Log:
res_pjsip_phoneprov_provider: Provides pjsip integration with res_phoneprov

This module allows res_pjsip to integrate with res_phoneprov.  It handles
the pjsip 'phoneprov' object type.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3976/
........

Merged revisions 425007 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425008 from http://svn.asterisk.org/svn/asterisk/branches/13

Added:
    trunk/res/res_pjsip_phoneprov_provider.c
      - copied unchanged from r425008, branches/13/res/res_pjsip_phoneprov_provider.c
Modified:
    trunk/   (props changed)
    trunk/configs/samples/pjsip.conf.sample

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/configs/samples/pjsip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/samples/pjsip.conf.sample?view=diff&rev=425009&r1=425008&r2=425009
==============================================================================
--- trunk/configs/samples/pjsip.conf.sample (original)
+++ trunk/configs/samples/pjsip.conf.sample Thu Oct  9 15:55:50 2014
@@ -71,6 +71,8 @@
 ;   * Defines a permission list or references one stored in acl.conf
 ; * Registration "registration"
 ;   * Contains information about an outbound SIP registration
+; * Phone Provisioning "phoneprov"
+;   * Contains information needed by res_phoneprov for autoprovisioning
 
 ; The following sections show example configurations for various scenarios.
 ; Most require a couple or more configuration types configured in concert.
@@ -479,6 +481,104 @@
 ;too large to send. If you find that you are seeing error messages about SIP
 ;NOTIFY requests being too large to send, consider breaking your lists into
 ;sub-lists.
+
+;============EXAMPLE PHONEPROV CONFIGURATION================================
+
+; Before configuring provisioning here, see the documentation for res_phoneprov
+; and configure phoneprov.conf appropriately.
+
+; For each user to be autoprovisioned, a [phoneprov] configuration section
+; must be created.  At a minimum, the 'type', 'PROFILE' and 'MAC' variables must
+; be set.  All other variables are optional.
+; Example:
+
+;[1000]
+;type=phoneprov               ; must be specified as 'phoneprov'
+;endpoint=1000                ; Required only if automatic setting of
+                              ; USERNAME, SECRET, DISPLAY_NAME and CALLERID
+                              ; are needed.
+;PROFILE=digium               ; required
+;MAC=deadbeef4dad             ; required
+;SERVER=myserver.example.com  ; A standard variable
+;TIMEZONE=America/Denver      ; A standard variable
+;MYVAR=somevalue              ; A user confdigured variable
+
+; If the phoneprov sections have common variables, it is best to create a
+; phoneprov template.  The example below will produce the same configuration
+; as the one specified above except that MYVAR will be overridden for
+; the specific user.
+; Example:
+
+;[phoneprov_defaults](!)
+;type=phoneprov               ; must be specified as 'phoneprov'
+;PROFILE=digium               ; required
+;SERVER=myserver.example.com  ; A standard variable
+;TIMEZONE=America/Denver      ; A standard variable
+;MYVAR=somevalue              ; A user configured variable
+
+;[1000](phoneprov_defaults)
+;endpoint=1000                ; Required only if automatic setting of
+                              ; USERNAME, SECRET, DISPLAY_NAME and CALLERID
+                              ; are needed.
+;MAC=deadbeef4dad             ; required
+;MYVAR=someOTHERvalue         ; A user confdigured variable
+
+; To have USERNAME and SECRET automatically set, the endpoint
+; specified here must in turn have an outbound_auth section defined.
+
+; Fuller example:
+
+;[1000]
+;type=endpoint
+;outbound_auth=1000-auth
+;callerid=My Name <8005551212>
+;transport=transport-udp-nat
+
+;[1000-auth]
+;type=auth
+;auth_type=userpass
+;username=myname
+;password=mysecret
+
+;[phoneprov_defaults](!)
+;type=phoneprov               ; must be specified as 'phoneprov'
+;PROFILE=someprofile          ; required
+;SERVER=myserver.example.com  ; A standard variable
+;TIMEZONE=America/Denver      ; A standard variable
+;MYVAR=somevalue              ; A user configured variable
+
+;[1000](phoneprov_defaults)
+;endpoint=1000                ; Required only if automatic setting of
+                              ; USERNAME, SECRET, DISPLAY_NAME and CALLERID
+                              ; are needed.
+;MAC=deadbeef4dad             ; required
+;MYVAR=someUSERvalue          ; A user confdigured variable
+;LABEL=1000                   ; A standard variable
+
+; The previous sections would produce a template substitution map as follows:
+
+;MAC=deadbeef4dad               ;added by pp1000
+;USERNAME=myname                ;automatically added by 1000-auth username
+;SECRET=mysecret                ;automatically added by 1000-auth password
+;PROFILE=someprofile            ;added by defaults
+;SERVER=myserver.example.com    ;added by defaults
+;SERVER_PORT=5060               ;added by defaults
+;MYVAR=someUSERvalue            ;added by defaults but overdidden by user
+;CALLERID=8005551212            ;automatically added by 1000 callerid
+;DISPLAY_NAME=My Name           ;automatically added by 1000 callerid
+;TIMEZONE=America/Denver        ;added by defaults
+;TZOFFSET=252100                ;automatically calculated by res_phoneprov
+;DST_ENABLE=1                   ;automatically calculated by res_phoneprov
+;DST_START_MONTH=3              ;automatically calculated by res_phoneprov
+;DST_START_MDAY=9               ;automatically calculated by res_phoneprov
+;DST_START_HOUR=3               ;automatically calculated by res_phoneprov
+;DST_END_MONTH=11               ;automatically calculated by res_phoneprov
+;DST_END_MDAY=2                 ;automatically calculated by res_phoneprov
+;DST_END_HOUR=1                 ;automatically calculated by res_phoneprov
+;ENDPOINT_ID=1000               ;automatically added by this module
+;AUTH_ID=1000-auth              ;automatically added by this module
+;TRANSPORT_ID=transport-udp-nat ;automatically added by this module
+;LABEL=1000                     ;added by user
 
 ; MODULE PROVIDING BELOW SECTION(S): res_pjsip
 ;==========================ENDPOINT SECTION OPTIONS=========================
@@ -800,3 +900,17 @@
 ;endpoint=      ; Name of Endpoint (default: "")
 ;match= ; IP addresses or networks to match against (default: "")
 ;type=  ; Must be of type identify (default: "")
+
+
+
+
+;========================PHONEPROV_USER SECTION OPTIONS=======================
+;[phoneprov]
+;  SYNOPSIS: Contains variables for autoprovisioning each user
+;endpoint=      ; The endpoint from which to gather username, secret, etc. (default: "")
+;PROFILE=       ; The name of a profile configured in phoneprov.conf (default: "")
+;MAC=           ; The mac address for this user (default: "")
+;OTHERVAR=      ; Any other name value pair to be used in templates (default: "")
+                ; Common variables include LINE, LINEKEYS, etc.
+                ; See phoneprov.conf.sample for others.
+;type=          ; Must be of type phoneprov (default: "")




More information about the asterisk-commits mailing list