new Number(attributes)
Parameters:
| Name | Type | Description |
|---|---|---|
attributes |
Object | Attributes |
Properties:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attributes |
Object |
Properties
|
- Source:
Methods
add_tags(tags, callback)
Add tags to a number.
Parameters:
| Name | Type | Description |
|---|---|---|
tags |
Object | A collection of tags {key: 'value', tag2: 'value2'} |
callback |
function | Callback that will be fired after request. |
- Source:
Throws:
Will throw an error if attempting to modify tags on a number that doesn't belong to a number pool
with per-visitor numbers enabled.
clear_tags(callback)
Clear all tags from a number.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | Callback that will be fired after request. |
- Source:
Throws:
Will throw an error if attempting to modify tags on a number that doesn't belong to a number pool
with per-visitor numbers enabled.
initiate_call(dial, payload, callback)
Start a call immediately by having a campaign target dial the visitor.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dial |
String | The number to call. | ||||||||||||||||||||||||
payload |
Object | A collection of tags as key-value pairs and optional secure override properties.
Properties
|
||||||||||||||||||||||||
callback |
function | Callback that will be fired after request. |
- Source:
Example
number.initiate_call('4166686980', {company_name: 'CallPixels'}, function (call) {
alert('Call started with UUID ' + call.uuid)
});
release()
Release number back to pool.
- Source:
remove_tags(tags, callback)
Remove tags from a number.
Parameters:
| Name | Type | Description |
|---|---|---|
tags |
Object | A collection of tags {key: 'value', tag2: 'value2'} |
callback |
function | Callback that will be fired after request. |
- Source:
Throws:
Will throw an error if attempting to modify tags on a number that doesn't belong to a number pool
with per-visitor numbers enabled.
remove_tags_by_keys(keys, callback)
Removes all tags with given keys from a number.
Parameters:
| Name | Type | Description |
|---|---|---|
keys |
Array | An array of keys to remove. eg: ['key1', 'key2'] |
callback |
function | Callback that will be fired after request. |
- Source:
Throws:
Will throw an error if attempting to modify tags on a number that doesn't belong to a number pool
with per-visitor numbers enabled.
replace_tags(tags, callback)
Replace tags on a number. Any tags that already exist on the number that match the given keys will be
removed. This can be used instead of calling remove_tags and then add_tags.
Parameters:
| Name | Type | Description |
|---|---|---|
tags |
Object | A collection of tags {key: 'value', tag2: 'value2'} |
callback |
function | Callback that will be fired after request. |
- Source:
Throws:
Will throw an error if attempting to modify tags on a number that doesn't belong to a number pool
with per-visitor numbers enabled.