Constructor
new Mrf(srf, optsopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
srf |
Srf
|
Srf instance |
|
opts |
Mrf~createOptions
|
<optional> |
configuration options |
Methods
connect(opts, callbackopt) → {Promise}
connect to a specified media server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
Mrf~ConnectOptions
|
options describing media server to connect to |
|
callback |
Mrf~ConnectCallback
|
<optional> |
callback |
Returns:
- Type:
-
Promise
if no callback is specified
Type Definitions
apiCallback(response)
/** This callback provides the response to an api request
- Source:
Parameters:
Name | Type | Description |
---|---|---|
response |
string
|
body of the response from freeswitch |
ConnectCallback(err, ms)
/** This callback provides the response to a connection attempt to a freeswitch server
Parameters:
Name | Type | Description |
---|---|---|
err |
Error
|
connection error, if any |
ms |
MediaServer
|
MediaServer instance |
ConnectOptions
Arguments provided when connecting to a freeswitch media server
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
address |
String
|
hostname or IP address to connect to |
||
port |
Number
|
<optional> |
8021 | TCP port to connect to (freeswitch event socket) |
secret |
String
|
<optional> |
ClueCon | freeswitch authentication secret |
listenAddress |
String
|
<optional> |
auto-discovered public IP address or 127.0.0.1 | local TCP address to listen for external connections from the freeswitch media server |
listenPort |
Number
|
<optional> |
8085 | local TCP port to listen for external connections from the freeswitch media server |
Type:
-
Object