Gateways
Get-XpGateways
Syntax
Get-XpGateways [[-GatewayNames] <string[]>] [[-Type] {Any | CTI | SIP}] [-LineCreateConfig] [-LineVarConfig] [-Enabled] [-State] [-StateDetail] [-Timeout <int>] [<CommonParameters>]
Description
The command performs a search for gateways on the XPhone Connect Server and displays the result as a list of ATTPBXObjectSerial objects. By default, only the following properties are displayed:
Name
Type
PBXType
Parameter
-GatewayNames <String[]>
Specifies the string to be searched for on the XPhone Connect Server.
Several names can be entered, separated by commas.
It is strongly recommended to use enclosing quotation marks, as special characters (e.g. spaces) often occur in the strings.
-Type {Any | CTI | SIP}
Used to search by gateway type (All, CIT gateways only or SIP gateways only).
-LineCreateConfig
This parameter specifies the range of lines to be set up (
FirstNumber
,LastNumber
,DialParam
).This parameter only accepts a gateway as input.
-LineVarConfig
This parameter outputs the advanced settings for line generation.
-Enabled
This parameter shows whether a gateway is enabled (Enabled =
True
) or disabled (Enabled =False
).
-State
Returns the current status (
Name
,State
,Description
).
-StateDetail
Returns the current status (
Name
,State
,Description
).
-Timeout <int>
Timeout in minutes.
If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.
<CommonParameters>
Describes the parameters that can be used with each Cmdlet. See Microsoft documentation.
Inputs
This command does not support input via the pipeline and is therefore usually at the beginning of a command chain.
Outputs
The command Get-XpGateways
returns objects of the type ATTPBXObjectSerial
.
Type |
GatewayType Type=CTI |
Changed |
bool Changed {get;set;} |
Description |
string Description {get;set;} |
DialParamGuid |
C4B.Atlas.ATGuid DialParamGuid {get;set;} |
Enabled |
bool Enabled {get;set;} |
Guid |
C4B.Atlas.ATGuid Guid {get;} |
HostIPAddress |
string HostIPAddress {get;set;} |
LineAddressTrk |
string LineAddressTrk {get;} |
LogMode |
C4B.Atlas.Telephony.Config.ATTPBXLogMode LogMode {get;set;} |
LogPath |
string LogPath {get;set;} |
ModifyTimeStamp |
datetime ModifyTimeStamp {get;set;} |
Name |
string Name {get;set;} |
PBXLineCreateInfo |
C4B.Atlas.ATArrayList PBXLineCreateInfo {get;} |
PBXLineVarConfig |
C4B.Atlas.ATArrayList PBXLineVarConfig {get;} |
PBXType |
C4B.Atlas.Telephony.Config.ATTPBXType PBXType {get;set;} |
Port |
int Port {get;set;} |
VarConfig |
C4B.Atlas.ATStringDictionary VarConfig {get;} |
You can display a list similar to this with the following command:
Get-XpGateways | Get-Member
An output of all gateways with all properties (and their values) can be generated with the following command:
Get-XpGateways | Select-Object -Property *
Examples
Show all gateways (CTI / SIP)
Get-XpGateways
Display the “OSBiz CSTA” gateway
Get-XpGateways "OSBiz CSTA"
Show all gateways starting with
OSBiz
Get-XpGateways OSBiz*
Show all SIP gateways (of type
SIP
)Get-XpGateways | Where{$_.Type -eq "SIP"}
or
Get-XpGateways | Where-Object -Property Type -eq "SIP"
Set-XpGateways
Syntax
Set-XpGateways [-Objects] <Object[]> [[-GatewayName] <string>] [-LineCreateConfig] [-Timeout <int>] [<CommonParameters>]
Description
Set-XpGateways
can only set the PBXLineCreateInfo
property. The GatewayName
is mandatory.
All changes to the object are transferred to the XPhone Connect Server immediately and without further inquiry and stored there.
Warning
The changes can then no longer be reversed, so a thorough review of the changed data is essential.
Parameter
-Objects <ATTPBXObjectSerial[]>
Specifies the gateway objects to be stored on the XPhone Connect Server.
-GatewayName <string>
Specifies the string to be searched for on the XPhone Connect Server.
Several names can be entered, separated by commas.
It is strongly recommended to use enclosing quotation marks, as special characters (e.g. spaces) often occur in the strings.
Can be determined with
Get-XpGateways
.
-LineCreateConfig
This parameter is required if the property
PBXLineCreateInfo
is to be changed (see example).
-Timeout <int>
Timeout in minutes.
If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.
<CommonParameters>
Describes the parameters that can be used with each Cmdlet. See Microsoft documentation.
Inputs
The input type is the type of objects that can be transferred to Set-XpGateways
via pipelining:
ATTPBXObjectSerial
Outputs
The command Set-XpGateways
does not return any objects.
Example
In this example, the phone number range for the mass creation of lines is to be adjusted. This configuration can be found in the Web Administration under System settings > Telephony & Meetings > Telephony > CTI > CTI Gateway > Create lines.
No pipeline is used here, although this would be possible in principle.
First, a CTI Gateway object is saved in the variable
$gw
. The variable is then output:PS C:\Windows\system32> $gw = Get-XpGateways OSBizCSTA PS C:\Windows\system32> $gw Name Type PBXType ---- ---- ------- OSBizCSTA CTI OpenScapeBusiness
The content of the
PBXLineCreateInfo
property is output here. TheLastNumber
field is to be changed:PS C:\Windows\system32> $gw.PBXLineCreateInfo FirstNumber : 11 LastNumber : 19 DialParamGuid : 00000000-0000-0000-0000-000000000000 PBXLineVarConfigGuid : 00000000-0000-0000-0000-000000000000 IsValid : True
Here the type is determined and you can see that the property
PBXLineCreateInfo
is an array:PS C:\Windows\system32> $gw.PBXLineCreateInfo.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True ATArrayList System.Collections.ArrayList
If you select the array object
[0]
, you will receive this information:PS C:\Windows\system32> $gw.PBXLineCreateInfo[0].GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True ATTPBXLineCreateInfo System.Object
Here the LastNumber field of the array object
PBXLineCreateInfo[0]
is overwritten with 20:PS C:\Windows\system32> $gw.PBXLineCreateInfo[0].LastNumber = 20
This command is used to write the configuration to the gateway:
PS C:\Windows\system32> Set-XpGateways $gw -GatewayName OSBizCSTA -LineCreateConfig
Disable-XpGateways
Syntax
Disable-XpGateways [[-GatewayNames] <string[]>] [[-Type] {Any | CTI | SIP}] [-Timeout <int>] [<CommonParameters>]
Description
The command deactivates the PBX gateways (Any | CTI | SIP) on the XPhone Connect Server and returns a list of the affected gateways including their GUIDs and status.
Parameter
-GatewayNames <string[]>
Specifies the string to be searched for on the XPhone Connect Server.
Several names can be entered, separated by commas.
It is strongly recommended to use enclosing quotation marks, as special characters (e.g. spaces) often occur in the strings.
The names of the gateways can be determined with the command
Get-XpGateways
.
-Type {Any | CTI | SIP}
Searches for SIP gateways (SIP) or CTI gateways (CTI) or all (ANY).
-Timeout <int>
Timeout in minutes.
If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.
<CommonParameters>
Describes the parameters that can be used with each Cmdlet. See Microsoft documentation.
Example
Deactivate all gateways:
Disable-XpGateways
Deactivating all SIP gateways:
Disable-XpGateways -Type SIP
Start deactivating all gateways with
OSBiz
:Disable-XpGateways OSBiz*
Deactivate all gateways with the name
OSBizCSTA
:Disable-XpGateways -GatewayNames "OSBizCSTA"
Enable-XpGateways
Syntax
Enable-XpGateways [[-GatewayNames] <string[]>] [[-Type] {Any | CTI | SIP}] [-Timeout <int>] [<CommonParameters>]
Description
The command activates the PBX gateways (Any | CTI | SIP) on the XPhone Connect Server and returns a list of the affected gateways including their GUIDs and status.
Parameter
-GatewayNames <string[]>
Specifies the string to be searched for on the XPhone Connect Server.
Several names can be entered, separated by commas.
It is strongly recommended to use enclosing quotation marks, as special characters (e.g. spaces) often occur in the strings.
The name of the gateways can be determined with the command
Get-XpGateways
.
-Type {Any | CTI | SIP}
Searches for SIP gateways (SIP) or CTI gateways (CTI) or all (ANY).
-Timeout <int>
Timeout in minutes.
If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.
<CommonParameters>
Describes the parameters that can be used with each Cmdlet. See Microsoft documentation.
Examples
Activate all gateways:
Enable-XpGateways
Activate all SIP gateways:
Enable-XpGateways -Type SIP
Start activation of all gateways with
OSBiz
:Enable-XpGateways OSBiz*
Activate all gateways with the name
OSBizCSTA
:Enable-XpGateways -GatewayNames "OSBizCSTA"
Restart-XpGateways
Syntax
Restart-XpGateways [[-GatewayNames] <string[]>] [[-Type] {Any | CTI | SIP}] [-Timeout <int>] [<CommonParameters>]
Description
The command restarts the PBX gateways (Any | CTI | SIP) on the XPhone Connect Server and returns a list of the affected gateways including their GUIDs and status.
Parameter
-GatewayNames <string[]>
Specifies the string to be searched for on the XPhone Connect Server.
Several names can be entered, separated by commas.
It is strongly recommended to use enclosing quotation marks, as special characters (e.g. spaces) often occur in the strings.
The names of the gateways can be determined with the command
Get-XpGateways
.
-Type {Any | CTI | SIP}
Searches for SIP gateways (SIP) or CTI gateways (CTI) or all (ANY).
-Timeout <int>
Timeout in minutes.
If a command takes too long (e.g. due to too many data records or similar), this command can be aborted with this parameter after the specified time.
<CommonParameters>
Describes the parameters that can be used with each Cmdlet. See Microsoft documentation.
Examples
Restarting all gateways
Restart-XpGateways
Restarting all SIP gateways
Restart-XpGateways -Type SIP
Start restarting all gateways with
OSBiz
Restart-XpGateways OSBiz*
Restart all gateways with the name
OSBizCSTA
Restart-XpGateways -GatewayNames "OSBizCSTA"
Have you found an mistake on this page?
Or is something not formulated well or too vague? Then we look forward to receiving an e-mail, preferably with a suggestion for improvement, to doku@c4b.de. Thank you very much!