Customer Variables

Custom variables can be defined either in the template scenario scripts or in custom scripts. They must be configured in the Custom/Variables column for the script in the dbo.SbcScriptTemplate table. Its recommended to define them with proper names such as “localhostname” and not simply variable1, variable2 etc. Once configured in both scripts and the database, they are displayed in the Scripts selection page in the Onboarding wizard (for Direct Routing services, see Onboarding) and can be called using REST API, for example, see Create Hosted Essentials Service.

Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, table

Description automatically generated

In the script itself, the custom variable must be defined with the notation "{{CustomVar.xxx}}. In the script example below, the defined customer variables are local host name=variable1 and tenant ID-variable2. These variables then appear as fields in the Onboarding wizard when the script is selected.

Graphical user interface, application, Word

Description automatically generated

In the screen below, custom variables are defined for the IP-PBX.

Graphical user interface, table

Description automatically generated

The Custom Variables defined above appear in the wizard when the IP PBX Onboarding script is selected in the wizard.

Graphical user interface, text, application

Description automatically generated

In cases where it’s not clear which type of value must be entered for the custom variable, then this must be verified with the SBC INI file. For example, for the Custom Variable shown below “IP‑PBX‑proxy address”, it’s not clear whether to enter an FQDN or IP address. In this case, the Message Manipulation User-defined string defined in the Outbound Message Manipulation rule must be verified on the SBC.

Graphical user interface, application, Word

Description automatically generated

In a similar way, the custom variable SIP-Hostname is configured on the SBC as the sip-group-name. It’s necessary to verify on the SBC whether the value for this parameter is an IP-address or FQDN and whether its configured for a gateway or SBC call.

Graphical user interface, text, application

Description automatically generated

The following example extraction shows how to configure custom variables for an IP-PBX:
Copy
# definitions of PBX connectivity 

# customer variables:
# IPPBX-proxyaddress
# IPPBX-proxyaddress-SIPPort
# SIP-Hostname

configure voip
proxy-set new
  proxy-name "{{CustomerId}}-c"
  proxy-enable-keep-alive using-options
  srd-name "PBXSRD"
  sbcipv4-sip-int-name "PBXSIP"
  activate
  proxy-ip 0
    proxy-address "{{CustomVar.IPPBX-proxyaddress}}:{{CustomVar.IPPBX-proxyaddress-SIPPort}}"
    transport-type udp
    activate
  exit
exit
ip-group new
  name "{{CustomerId}}-c"
  proxy-set-name "{{CustomerId}}-c"
  media-realm-name "MRWAN"
  ip-profile-name "3CX"
  sip-group-name "{{CustomVar.SIP-Hostname}}"
  srd-name "PBXSRD"
  outbound-mesg-manipulation-set 17
  authentication-mode sbc-as-client
  msg-man-user-defined-string1 "{{CustomVar.IPPBX-proxyaddress}}"
  tags "Trunk={{SBC.OnlinePstnGateway}}"
  proxy-keepalive-use-ipg enable
  call-setup-rules-set-id 4
  classify-by-proxy-set disable
  activate
 exit
 ip-group new 
  name "{{CustomerId}}-t"
  type user
  proxy-set-name "Teams"
  ip-profile-name "Teams"
  srd-name "DefaultSRD"
  outbound-mesg-manipulation-set 14
  local-host-name "{{SBC.OnlinePstnGateway}}" 
  always-use-source-addr enable 
  tags "Tenant={{SBC.OnlinePstnGateway}}" 
  classify-by-proxy-set disable 
  call-setup-rules-set-id 7
  registration-mode sbs-initiates
  authentication-mode sbc-as-client
  {{#if  SBC.EnableCAC}}    
   cac-profile "{{SBC.CacProfile}}"
  {{/if }}  
  activate 
 exit

   sbc dial-plan where name "PBXDomains"
    dial-plan-rule new
     name "{{CustomerId}}"
     prefix "{{sbcEscape SBC.OnlinePstnGateway}}"
     tag "{{CustomVar.SIP-Hostname}}"
     activate
    exit
   exit
The following example extraction shows how to configure custom variables for LBR Network Topology:
Copy
# Script variables
        [String]$OnlinePstnGateway="{{SBC.OnlinePstnGateway}}"
        [String]$CustomerId="{{SBC.SbcSiteName}}"
        [String]$IPNetwork="{{CustomVar.IP-Network}}"
        [String]$IPSubnet="{{CustomVar.IP-SubnetBits}}"
        [String]$TrustedIPNetwork="{{CustomVar.Trusted-IP-Network}}"
        [String]$TrustedIPSubnet="{{CustomVar.Trusted-IP-SubnetBits}}"