outboundConfigs
sip.outboundConfigs
Table of contents
Interfaces
Functions
createConfig
▸ createConfig(name
: string, config
: OutboundConfig & { password?
: string }, options?
: { account?
: Account }): Promise<OutboundConfig>
Create a new outbound SIP config.
Parameters:
Name | Type | Description |
---|---|---|
name | string | - |
config | OutboundConfig & { password? : string } | see OutboundConfig |
options? | object | - |
options.account? | Account | an account to use; if not set, defaults to the current account |
Returns: Promise<OutboundConfig>
a newly created config
deleteConfig
▸ deleteConfig(name
: string, options?
: { account?
: Account ; quiet?
: boolean }): Promise<void>
Delete an outbound SIP config from the Dasha platform.
Parameters:
Name | Type | Description |
---|---|---|
name | string | - |
options? | object | - |
options.account? | Account | an account to use; if not set, defaults to the current account |
options.quiet? | boolean | if true, does not complain if the config does not exist |
Returns: Promise<void>
getConfigByName
▸ getConfigByName(name
: string, options?
: { account?
: Account }): Promise<OutboundConfig>
Get outbound SIP config by name
Parameters:
Name | Type | Description |
---|---|---|
name | string | an config name |
options? | object | - |
options.account? | Account | an account to use; if not set, defaults to the current account |
Returns: Promise<OutboundConfig>
OutboundConfig object
listConfigs
▸ listConfigs(options?
: { account?
: Account }): Promise<{ [name: string]: OutboundConfig; }>
List all outbound SIP configs available to an account.
Parameters:
Name | Type | Description |
---|---|---|
options? | object | - |
options.account? | Account | an account to use; if not set, defaults to the current account |
Returns: Promise<{ [name: string]: OutboundConfig; }>
a dictionary of OutboundConfig objects by their name
updateConfig
▸ updateConfig(name
: string, patch
: { account?
: string | null
; domain?
: string | null
; fromUser?
: string | null
; password?
: string | null
; server?
: string | null
; transport?
: "tcp"
| "udp"
| null
}, options?
: { account?
: Account }): Promise<OutboundConfig>
Update an outbound SIP config. Pass null
in the optional fields to reset to defaults.
Parameters:
Name | Type | Description |
---|---|---|
name | string | - |
patch | object | see OutboundConfig |
patch.account? | string | null | - |
patch.domain? | string | null | - |
patch.fromUser? | string | null | - |
patch.password? | string | null | authorization password, if one is needed |
patch.server? | string | null | - |
patch.transport? | "tcp" | "udp" | null | - |
options? | object | - |
options.account? | Account | an account to use; if not set, defaults to the current account |
Returns: Promise<OutboundConfig>
an updated config