-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from opentok/dev
v2.8.1
- Loading branch information
Showing
7 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -819,7 +819,7 @@ OpenTok = function (apiKey, apiSecret, env) { | |
* | ||
* @param sipUri The sip URI the SIP Interconnect feature will dial. | ||
* | ||
* @param options {Object} An optional options object with the following properties: | ||
* @param options {Object} An optional options object with the following properties (all of which are optional): | ||
* <p> | ||
* <ul> | ||
* <li> | ||
|
@@ -839,6 +839,12 @@ OpenTok = function (apiKey, apiSecret, env) { | |
* <code>secure</code> (Boolean) — Whether the SIP media streams should be transmitted | ||
* encrypted or not. | ||
* </li> | ||
* <li> | ||
* <code>from</code> (String) — The number or string that will be sent to the final SIP number as the caller. It must be a string in the form of | ||
* <code>[email protected]</code>, where <code>from</code> can be a string or a number. | ||
* If <code>from</code> is set to a number (for example, <code>"[email protected]"</code>), it will show up as the incoming number on PSTN phones. | ||
* If <code>from</code> is undefined or set to a string (for example, <code>"[email protected]"</code>), <code>+00000000</code> will show up as the incoming number on PSTN phones. | ||
* </li> | ||
* </ul> | ||
* | ||
* @return A {@link SipInterconnect} object with the following properties: | ||
|
@@ -890,6 +896,11 @@ OpenTok.prototype.dial = function (sessionId, token, sipUri, options, callback) | |
if (options.secure) { | ||
body.sip.secure = !!options.secure; | ||
} | ||
|
||
if (options.from) { | ||
body.sip.from = String(options.from); | ||
} | ||
|
||
this.client.dial(body, function (err, json) { | ||
if (err) return callback(new Error('Failed to dial endpoint. ' + err)); | ||
return callback(null, new SipInterconnect(self, json)); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters