add-ipx-user

The add-ipx-user script is triggered during the Onboarding wizard. It applies the following configuration on the SBC device that is configured to connect calls to the customer site location:

Configures a new dial plan rule in both the CustDialPlan and in the RegisteredUsers Dial Plan with the extension of the PBX user and assigns the tag of the Online PSTN Gateway sub domain.
Configures a registered IP-PBX user and extensions to specific site location and configures connection to specific SBC.
Configures SBC User Information for registering a user to an external registrar server If the device registers on behalf of users and the users don't perform registration:
Local User value which is the user name with the appended name of the IP-PBX host.
IP-PBX UserUsername
IP-PBX User Password
Associates an IP-Group Teams leg, any SIP request destined to the user is routed to the Proxy Set associated with this IP Group.
Copy
 # Registration of new PBX extensions
# GUIDELINES for the CSV file uploaded in UMP to add PBX extensions to this tenant
# the field "LocalUserName" should have the extension e.g. 2345
# the field "PbxExtension" should also have that syntax. e.g. 4002
# the field "OnlineVoiceRoutingPolicy" should have the PBX SIP domain. e.g. ac3cx.elastix.com or the IP address used by the PBX in the from header for calls towards an extension

configure voip

# Create
# if create has a value then the below will run
# leave the value empty to ignore this section 
{{#if  PbxUser.create}}    

sbc dial-plan where name "CustDialPlan"
dial-plan-rule new
name "{{SBC.SbcSiteName}}"
prefix "{{sbcEscape PbxUser.LocalUserName}}\.{{sbcEscape PbxUser.Pbxhost}}"
tag "{{SBC.OnlinePstnGateway}}"
exit
dial-plan-rule new
name "{{SBC.SbcSiteName}}"
prefix "+{{sbcEscape PbxUser.E164}}"
tag "{{SBC.OnlinePstnGateway}}"
exit
activate
exit

sip-definition  proxy-and-registration
user-info sbc-user-info new
    local-user "{{PbxUser.LocalUserName}}.{{PbxUser.Pbxhost}}"
     username "{{PbxUser.RegisteringUserName}}"
     password {{PbxUser.RegisteringPassword}}
     ip-group-name "{{SBC.SbcSiteName}}-t"
     activate
    exit
exit

sbc dial-plan where name "RegisteredUsers"
   dial-plan-rule new
   name "{{SBC.SbcSiteName}}"
   prefix "+{{sbcEscape PbxUser.E164}}"
   tag "{{PbxUser.LocalUserName}}.{{PbxUser.Pbxhost}}"
   activate
  exit
   dial-plan-rule new
   name "{{SBC.SbcSiteName}}"
   prefix "{{sbcEscape PbxUser.LocalUserName}}\.{{sbcEscape PbxUser.Pbxhost}}"
   tag "{{PbxUser.LocalUserName}}.{{PbxUser.Pbxhost}}"
   activate
  exit
    dial-plan-rule new
     name "{{SBC.SbcSiteName}}"
     prefix "pb{{sbcEscape PbxUser.LocalUserName}}\.{{sbcEscape PbxUser.Pbxhost}}"
     tag "{{PbxUser.E164}}"
     activate
  exit  
exit
{{/if }}  

#Delete
# if delete has a value then the below will run
# leave the value empty to ignore this section
{{#if  PbxUser.delete}} 
sbc dial-plan where name "CustDialPlan"
no dial-plan-rule where prefix "{{sbcEscape PbxUser.LocalUserName}}\.{{sbcEscape PbxUser.Pbxhost}}"
no dial-plan-rule where prefix "+{{sbcEscape PbxUser.E164}}"
exit
sip-definition  proxy-and-registration
no user-info sbc-user-info where local-user "{{PbxUser.LocalUserName}}.{{PbxUser.Pbxhost}}"
exit
sbc dial-plan where name "RegisteredUsers"
no dial-plan-rule where prefix "+{{sbcEscape PbxUser.E164}}"
no dial-plan-rule where prefix "{{sbcEscape PbxUser.LocalUserName}}\.{{sbcEscape PbxUser.Pbxhost}}"
no dial-plan-rule where prefix "pb{{sbcEscape PbxUser.LocalUserName}}\.{{sbcEscape PbxUser.Pbxhost}}"
exit
{{/if }} 

do write

The following figure shows an example of an SBC site for an IP-PBX customer.

Graphical user interface, application

Description automatically generated