@telegenta/webclient 2.0.12 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -81
- package/demos/add_phone_number.html +8 -7
- package/demos/calldata_available.html +5 -5
- package/demos/embedded_config.html +3 -3
- package/demos/event_client.html +226 -211
- package/demos/phone_client.html +540 -514
- package/demos/styles.css +0 -0
- package/dist/telegenta.js +3663 -0
- package/dist/telegenta.min.js +1 -0
- package/docs/EventClient.html +3 -1093
- package/docs/EventServiceNotConnected.html +3 -0
- package/docs/InvalidMediaDevice.html +3 -0
- package/docs/InvalidOptions.html +3 -0
- package/docs/InvalidParameter.html +3 -0
- package/docs/LogHandler.html +7 -0
- package/docs/MediaNotPrepared.html +3 -0
- package/docs/NoActiveSession.html +3 -0
- package/docs/NotAllowed.html +3 -0
- package/docs/NotReady.html +3 -0
- package/docs/Phone.html +4 -2837
- package/docs/Request.html +3 -0
- package/docs/Requestor.html +3 -0
- package/docs/Session.html +3 -2599
- package/docs/UnableToConnect.html +3 -0
- package/docs/data/search.json +1 -0
- package/docs/event-client.js.html +352 -0
- package/docs/exceptions.js.html +104 -0
- package/docs/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/global.html +5 -4950
- package/docs/index.html +3 -66
- package/docs/logger.js.html +106 -0
- package/docs/phone-client.js.html +2175 -0
- package/docs/requestor.js.html +223 -0
- package/docs/scripts/core.js +726 -0
- package/docs/scripts/core.min.js +23 -0
- package/docs/scripts/resize.js +90 -0
- package/docs/scripts/search.js +265 -0
- package/docs/scripts/search.min.js +6 -0
- package/docs/scripts/{prettify → third-party}/Apache-License-2.0.txt +202 -202
- package/docs/scripts/third-party/fuse.js +9 -0
- package/docs/scripts/third-party/hljs-line-num-original.js +369 -0
- package/docs/scripts/third-party/hljs-line-num.js +1 -0
- package/docs/scripts/third-party/hljs-original.js +5171 -0
- package/docs/scripts/third-party/hljs.js +1 -0
- package/docs/scripts/third-party/popper.js +5 -0
- package/docs/scripts/third-party/tippy.js +1 -0
- package/docs/scripts/third-party/tocbot.js +672 -0
- package/docs/scripts/third-party/tocbot.min.js +1 -0
- package/docs/styles/clean-jsdoc-theme-base.css +1159 -0
- package/docs/styles/clean-jsdoc-theme-dark.css +412 -0
- package/docs/styles/clean-jsdoc-theme-light.css +482 -0
- package/docs/styles/clean-jsdoc-theme-scrollbar.css +30 -0
- package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
- package/docs/styles/clean-jsdoc-theme.min.css +1 -0
- package/package.json +38 -26
- package/babel.config.js +0 -16
- package/browser/telegenta.min.js +0 -1
- package/demos/telegenta.min.js +0 -1
- package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/styles/jsdoc-default.css +0 -692
- package/docs/styles/prettify-jsdoc.css +0 -111
- package/docs/styles/prettify-tomorrow.css +0 -132
- package/embedded_client/embedded_phone.js +0 -325
- package/embedded_client/index.html +0 -201
- package/embedded_client/server.php +0 -28
- package/embedded_client/styles.css +0 -310
- package/embedded_client/tiny_rest_client.php +0 -73
- package/embedded_client/webphone_sprites.png +0 -0
- package/es5/event-client.js +0 -277
- package/es5/index.js +0 -44
- package/es5/phone-client.js +0 -1336
- package/src/event-client.js +0 -1
- package/src/index.js +0 -10
- package/src/phone-client.js +0 -1
- package/webpack.config.js +0 -39
package/docs/Phone.html
CHANGED
|
@@ -1,215 +1,6 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
-
<title>Phone - Documentation</title>
|
|
7
|
-
|
|
8
|
-
<script src="scripts/prettify/prettify.js"></script>
|
|
9
|
-
<script src="scripts/prettify/lang-css.js"></script>
|
|
10
|
-
<!--[if lt IE 9]>
|
|
11
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
12
|
-
<![endif]-->
|
|
13
|
-
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
|
14
|
-
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
15
|
-
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
16
|
-
</head>
|
|
17
|
-
<body>
|
|
18
|
-
|
|
19
|
-
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
20
|
-
<label for="nav-trigger" class="navicon-button x">
|
|
21
|
-
<div class="navicon"></div>
|
|
22
|
-
</label>
|
|
23
|
-
|
|
24
|
-
<label for="nav-trigger" class="overlay"></label>
|
|
25
|
-
|
|
26
|
-
<nav>
|
|
27
|
-
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="EventClient.html">EventClient</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="EventClient.html#connect">connect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="EventClient.html#disconnect">disconnect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="EventClient.html#fireEvent">fireEvent</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="EventClient.html#isConnected">isConnected</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="EventClient.html#subscribe">subscribe</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="EventClient.html#unsubscribe">unsubscribe</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Phone.html">Phone</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#call">call</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#getSessionByUUID">getSessionByUUID</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#holdAllCalls">holdAllCalls</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#listen">listen</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#playTone">playTone</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#prepareMedia">prepareMedia</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#start">start</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#stop">stop</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Phone.html#stopTone">stopTone</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Session.html">Session</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#answer">answer</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#getOtherSessions">getOtherSessions</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#hangup">hangup</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#hold">hold</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#muteMic">muteMic</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#playback">playback</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#reject">reject</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#sendDTMF">sendDTMF</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#setWhisperMode">setWhisperMode</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#startRecording">startRecording</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#stopRecording">stopRecording</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#toggleHold">toggleHold</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#toggleMute">toggleMute</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#toggleRecording">toggleRecording</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#transfer">transfer</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#unhold">unhold</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Session.html#unmuteMic">unmuteMic</a></span></li><li class="nav-heading">Events</li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:callDataInfo">callDataInfo</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:callDurationUpdate">callDurationUpdate</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:callEnded">callEnded</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:callQualityReportUpdate">callQualityReportUpdate</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:connectionStateChange">connectionStateChange</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:holdStateChange">holdStateChange</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:incomingCall">incomingCall</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:muteStateChange">muteStateChange</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:recordingStateChange">recordingStateChange</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:sessionCreated">sessionCreated</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:sessionRemoved">sessionRemoved</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:sessionStateChange">sessionStateChange</a></span></li><li class="nav-heading"><span class="nav-item-type type-event">E</span><span class="nav-item-name"><a href="global.html#event:whisperModeChange">whisperModeChange</a></span></li><li class="nav-heading"><a href="global.html">Globals</a></li>
|
|
28
|
-
</nav>
|
|
29
|
-
|
|
30
|
-
<div id="main">
|
|
31
|
-
|
|
32
|
-
<h1 class="page-title">Phone</h1>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<section>
|
|
41
|
-
|
|
42
|
-
<header>
|
|
43
|
-
|
|
44
|
-
<h2>
|
|
45
|
-
Phone
|
|
46
|
-
</h2>
|
|
47
|
-
|
|
48
|
-
<div class="class-description">This class acts as a SIP user Agent and is responsible for handling calls using the WebRTC interface in the browser.<br>
|
|
49
|
-
If you have your own log handler or if you want to adjust the log level you can create your own logging instance, when you create the Phone
|
|
50
|
-
instance. See <code>LogHandler</code> class for more information.</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</header>
|
|
54
|
-
|
|
55
|
-
<article>
|
|
56
|
-
<div class="container-overview">
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<div class="section-method">
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<h2>Constructor</h2>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<h4 class="name" id="Phone"><span class="type-signature"></span>new Phone<span class="signature">(logger<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<dl class="details">
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</dl>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<h5>Parameters:</h5>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<table class="params">
|
|
122
|
-
<thead>
|
|
123
|
-
<tr>
|
|
124
|
-
|
|
125
|
-
<th>Name</th>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<th>Type</th>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<th>Attributes</th>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<th class="last">Description</th>
|
|
137
|
-
</tr>
|
|
138
|
-
</thead>
|
|
139
|
-
|
|
140
|
-
<tbody>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<tr>
|
|
144
|
-
|
|
145
|
-
<td class="name"><code>logger</code></td>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<td class="type">
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<span class="param-type"><code>LogHandler</code></span>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
</td>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<td class="attributes">
|
|
159
|
-
|
|
160
|
-
<optional><br>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
</td>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<td class="description last">
|
|
172
|
-
Custom log instance
|
|
173
|
-
|
|
174
|
-
</td>
|
|
175
|
-
</tr>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
</tbody>
|
|
179
|
-
</table>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<h5>Fires:</h5>
|
|
187
|
-
<ul>
|
|
188
|
-
<li>event:connectionStateChange on connection state changes.</li>
|
|
189
|
-
|
|
190
|
-
<li>event:sessionCreated When a new session has been created</li>
|
|
191
|
-
|
|
192
|
-
<li>sessionRemoved When a existing session has been removed (after autoRemoveSessionTime)</li>
|
|
193
|
-
|
|
194
|
-
<li>event:callDataInfo Receive detailed information about call after call has been terminated</li>
|
|
195
|
-
|
|
196
|
-
<li>event:incomingCall Incoming call sessions are received on this event</li>
|
|
197
|
-
</ul>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<div class="section-examples">
|
|
210
|
-
<h5>Example</h5>
|
|
211
|
-
|
|
212
|
-
<pre class="prettyprint"><code>// Creating Phone object and use it make a call
|
|
1
|
+
<!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Class: Phone</title><!--[if lt IE 9]>
|
|
2
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
3
|
+
<![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="EventClient.html">EventClient</a></div><div class="sidebar-section-children"><a href="EventServiceNotConnected.html">EventServiceNotConnected</a></div><div class="sidebar-section-children"><a href="InvalidMediaDevice.html">InvalidMediaDevice</a></div><div class="sidebar-section-children"><a href="InvalidOptions.html">InvalidOptions</a></div><div class="sidebar-section-children"><a href="InvalidParameter.html">InvalidParameter</a></div><div class="sidebar-section-children"><a href="LogHandler.html">LogHandler</a></div><div class="sidebar-section-children"><a href="MediaNotPrepared.html">MediaNotPrepared</a></div><div class="sidebar-section-children"><a href="NoActiveSession.html">NoActiveSession</a></div><div class="sidebar-section-children"><a href="NotAllowed.html">NotAllowed</a></div><div class="sidebar-section-children"><a href="NotReady.html">NotReady</a></div><div class="sidebar-section-children"><a href="Phone.html">Phone</a></div><div class="sidebar-section-children"><a href="Request.html">Request</a></div><div class="sidebar-section-children"><a href="Requestor.html">Requestor</a></div><div class="sidebar-section-children"><a href="Session.html">Session</a></div><div class="sidebar-section-children"><a href="UnableToConnect.html">UnableToConnect</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#event:callDataInfo">callDataInfo</a></div><div class="sidebar-section-children"><a href="global.html#event:callDurationUpdate">callDurationUpdate</a></div><div class="sidebar-section-children"><a href="global.html#event:callEnded">callEnded</a></div><div class="sidebar-section-children"><a href="global.html#event:callQualityReportUpdate">callQualityReportUpdate</a></div><div class="sidebar-section-children"><a href="global.html#event:connectionStateChange">connectionStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:holdStateChange">holdStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:incomingCall">incomingCall</a></div><div class="sidebar-section-children"><a href="global.html#event:muteStateChange">muteStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:recordingStateChange">recordingStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:sessionCreated">sessionCreated</a></div><div class="sidebar-section-children"><a href="global.html#event:sessionRemoved">sessionRemoved</a></div><div class="sidebar-section-children"><a href="global.html#event:sessionStateChange">sessionStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:whisperModeChange">whisperModeChange</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#CALL_DIRECTION">CALL_DIRECTION</a></div><div class="sidebar-section-children"><a href="global.html#CALL_DISPOSITION">CALL_DISPOSITION</a></div><div class="sidebar-section-children"><a href="global.html#CONNECTION_STATE">CONNECTION_STATE</a></div><div class="sidebar-section-children"><a href="global.html#LOGLVL">LOGLVL</a></div><div class="sidebar-section-children"><a href="global.html#SESSION_STATE">SESSION_STATE</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="Phone-title" class="has-anchor">Phone</h1><div class="class-description">This class acts as a SIP user Agent and is responsible for handling calls using the WebRTC interface in the browser.<br>If you have your own log handler or if you want to adjust the log level you can create your own logging instance, when you create the Phone instance. See <a href="LogHandler.html"><code>LogHandler</code></a> class for more information.</div></header><article><div class="container-overview"><h2 id="constructor" class="has-anchor">Constructor</h2><h3 class="name has-anchor" id="Phone"><span class="type-signature"></span>new Phone<span class="signature">(logger<span class="signature-attributes">opt</span>)</span></h3><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>logger</code></td><td class="type"><span class="param-type"><a href="LogHandler.html">LogHandler</a></span></td><td class="attributes"><optional><br></td><td class="description last">Custom log instance</td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line101">line 101</a></li></ul></dd></div></dl><div class="method-member-container flex w-100 overflow-auto mt-20"><strong>Fires:</strong><ul><li>event:connectionStateChange on connection state changes.</li><li>event:sessionCreated When a new session has been created</li><li>sessionRemoved When a existing session has been removed (after autoRemoveSessionTime)</li><li>event:callDataInfo Receive detailed information about call after call has been terminated</li><li>event:incomingCall Incoming call sessions are received on this event</li></ul></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Example</strong><div class="rel"><pre class="prettyprint"><code>// Creating Phone object and use it make a call
|
|
213
4
|
const phone = new Telegenta.Phone()
|
|
214
5
|
phone.prepareMedia().then(() => {
|
|
215
6
|
// Hook up events
|
|
@@ -219,2628 +10,4 @@ phone.prepareMedia().then(() => {
|
|
|
219
10
|
|
|
220
11
|
// Dial 12345678
|
|
221
12
|
session = phone.call('12345678');
|
|
222
|
-
}</code></pre>
|
|
223
|
-
|
|
224
|
-
</div>
|
|
225
|
-
|
|
226
|
-
</div>
|
|
227
|
-
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<h3 class="subsection-title">Classes</h3>
|
|
236
|
-
|
|
237
|
-
<dl>
|
|
238
|
-
<dt><a href="Phone.html">Phone</a></dt>
|
|
239
|
-
<dd></dd>
|
|
240
|
-
</dl>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
<h3 class="subsection-title">Members</h3>
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<div class="section-members">
|
|
253
|
-
<h4 class="name" id="browserSupported"><span class="type-signature"></span>browserSupported<span class="type-signature"></span></h4>
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
<div class="description">
|
|
259
|
-
Verify browser is supported
|
|
260
|
-
</div>
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<dl class="details">
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
</dl>
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
</div>
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<div class="section-members">
|
|
312
|
-
<h4 class="name" id="hasMediaPermission"><span class="type-signature"></span>hasMediaPermission<span class="type-signature"></span></h4>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
<div class="description">
|
|
318
|
-
Return media permission state
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
<dl class="details">
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
</dl>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
</div>
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
<div class="section-members">
|
|
371
|
-
<h4 class="name" id="hasMediaPermissionError"><span class="type-signature"></span>hasMediaPermissionError<span class="type-signature"></span></h4>
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
<div class="description">
|
|
377
|
-
Media permission denied
|
|
378
|
-
</div>
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
<dl class="details">
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
</dl>
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
</div>
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
<div class="section-members">
|
|
430
|
-
<h4 class="name" id="isStarted"><span class="type-signature"></span>isStarted<span class="type-signature"></span></h4>
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
<div class="description">
|
|
436
|
-
Phone client started
|
|
437
|
-
</div>
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
<dl class="details">
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
</dl>
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
</div>
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
<div class="section-members">
|
|
489
|
-
<h4 class="name" id="options"><span class="type-signature"></span>options<span class="type-signature"></span></h4>
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
<div class="description">
|
|
495
|
-
Return phone options
|
|
496
|
-
</div>
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
<dl class="details">
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
</dl>
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
</div>
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
<div class="section-members">
|
|
548
|
-
<h4 class="name" id="remoteAudioElement"><span class="type-signature"></span>remoteAudioElement<span class="type-signature"></span></h4>
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
<div class="description">
|
|
554
|
-
Remote audio HTML element
|
|
555
|
-
</div>
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
<dl class="details">
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
</dl>
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
</div>
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
<div class="section-members">
|
|
607
|
-
<h4 class="name" id="sessions"><span class="type-signature"></span>sessions<span class="type-signature"></span></h4>
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
<div class="description">
|
|
613
|
-
Return list of current sessions
|
|
614
|
-
</div>
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
<dl class="details">
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
</dl>
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
</div>
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
<h3 class="subsection-title">Methods</h3>
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
<div class="section-method">
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
<h4 class="name" id="call"><span class="type-signature"></span>call<span class="signature">(number, params)</span><span class="type-signature"> → {<a href="Session.html">Session</a>}</span></h4>
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
<div class="description">
|
|
682
|
-
Start a new call
|
|
683
|
-
If you have other active calls they will be set on hold
|
|
684
|
-
</div>
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
<dl class="details">
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
</dl>
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
<h5>Parameters:</h5>
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
<table class="params">
|
|
737
|
-
<thead>
|
|
738
|
-
<tr>
|
|
739
|
-
|
|
740
|
-
<th>Name</th>
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
<th>Type</th>
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
<th class="last">Description</th>
|
|
750
|
-
</tr>
|
|
751
|
-
</thead>
|
|
752
|
-
|
|
753
|
-
<tbody>
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
<tr>
|
|
757
|
-
|
|
758
|
-
<td class="name"><code>number</code></td>
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
<td class="type">
|
|
762
|
-
|
|
763
|
-
</td>
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
<td class="description last">
|
|
770
|
-
Number to call
|
|
771
|
-
|
|
772
|
-
</td>
|
|
773
|
-
</tr>
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
<tr>
|
|
778
|
-
|
|
779
|
-
<td class="name"><code>params</code></td>
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
<td class="type">
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
<span class="param-type"><code>object</code></span>
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
</td>
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
<td class="description last">
|
|
796
|
-
call options
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
<table class="params">
|
|
801
|
-
<thead>
|
|
802
|
-
<tr>
|
|
803
|
-
|
|
804
|
-
<th>Name</th>
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
<th>Type</th>
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
<th>Attributes</th>
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
<th>Default</th>
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
<th class="last">Description</th>
|
|
818
|
-
</tr>
|
|
819
|
-
</thead>
|
|
820
|
-
|
|
821
|
-
<tbody>
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
<tr>
|
|
825
|
-
|
|
826
|
-
<td class="name"><code>record</code></td>
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
<td class="type">
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
<span class="param-type"><code>number</code></span>
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
</td>
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
<td class="attributes">
|
|
840
|
-
|
|
841
|
-
<optional><br>
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
</td>
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
<td class="default">
|
|
852
|
-
|
|
853
|
-
</td>
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
<td class="description last">
|
|
857
|
-
Recording retention days. The number of days recording will be kept. Setting this to 0 disables recording.
|
|
858
|
-
|
|
859
|
-
</td>
|
|
860
|
-
</tr>
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
<tr>
|
|
865
|
-
|
|
866
|
-
<td class="name"><code>explicitCallerId</code></td>
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
<td class="type">
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
<span class="param-type"><code>number</code></span>
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
</td>
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
<td class="attributes">
|
|
880
|
-
|
|
881
|
-
<optional><br>
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
</td>
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
<td class="default">
|
|
892
|
-
|
|
893
|
-
</td>
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
<td class="description last">
|
|
897
|
-
Force a specific caller id, by providing explicit phone number id
|
|
898
|
-
|
|
899
|
-
</td>
|
|
900
|
-
</tr>
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
<tr>
|
|
905
|
-
|
|
906
|
-
<td class="name"><code>explicitShortCallerId</code></td>
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
<td class="type">
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
<span class="param-type"><code>number</code></span>
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
</td>
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
<td class="attributes">
|
|
920
|
-
|
|
921
|
-
<optional><br>
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
</td>
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
<td class="default">
|
|
932
|
-
|
|
933
|
-
</td>
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
<td class="description last">
|
|
937
|
-
Force a specific caller id, by providing explicit short caller id
|
|
938
|
-
|
|
939
|
-
</td>
|
|
940
|
-
</tr>
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
<tr>
|
|
945
|
-
|
|
946
|
-
<td class="name"><code>answerCallTimeout</code></td>
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
<td class="type">
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
<span class="param-type"><code>number</code></span>
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
</td>
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
<td class="attributes">
|
|
960
|
-
|
|
961
|
-
<optional><br>
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
</td>
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
<td class="default">
|
|
972
|
-
|
|
973
|
-
0
|
|
974
|
-
|
|
975
|
-
</td>
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
<td class="description last">
|
|
979
|
-
Hangup call with NO ANSWER if call is not picked up before specified interval (seconds). If 0, timeout is disabled.
|
|
980
|
-
|
|
981
|
-
</td>
|
|
982
|
-
</tr>
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
<tr>
|
|
987
|
-
|
|
988
|
-
<td class="name"><code>maximumCallCost</code></td>
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
<td class="type">
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
<span class="param-type"><code>number</code></span>
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
</td>
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
<td class="attributes">
|
|
1002
|
-
|
|
1003
|
-
<optional><br>
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
</td>
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
<td class="default">
|
|
1014
|
-
|
|
1015
|
-
</td>
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
<td class="description last">
|
|
1019
|
-
Maximum call cost (in customer currency) allowed for call. The call will automatically be stopped when the specified cost has been reached. Setting this to 0 disables checking for maximum cost.
|
|
1020
|
-
|
|
1021
|
-
</td>
|
|
1022
|
-
</tr>
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
<tr>
|
|
1027
|
-
|
|
1028
|
-
<td class="name"><code>metaInfo</code></td>
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
<td class="type">
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
<span class="param-type"><code>string</code></span>
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
</td>
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
<td class="attributes">
|
|
1042
|
-
|
|
1043
|
-
<optional><br>
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
</td>
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
<td class="default">
|
|
1054
|
-
|
|
1055
|
-
</td>
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
<td class="description last">
|
|
1059
|
-
Add meta info to call, which will be available in server events and inside call complete webhook (max 256 chars)
|
|
1060
|
-
|
|
1061
|
-
</td>
|
|
1062
|
-
</tr>
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
</tbody>
|
|
1066
|
-
</table>
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
</td>
|
|
1070
|
-
</tr>
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
</tbody>
|
|
1074
|
-
</table>
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
<div class="section-throws">
|
|
1088
|
-
<h5>Throws:</h5>
|
|
1089
|
-
<ul>
|
|
1090
|
-
<li>
|
|
1091
|
-
|
|
1092
|
-
<div class="param-desc">
|
|
1093
|
-
|
|
1094
|
-
NotReady - If phone is not ready to call
|
|
1095
|
-
|
|
1096
|
-
</div>
|
|
1097
|
-
|
|
1098
|
-
</li>
|
|
1099
|
-
|
|
1100
|
-
<li>
|
|
1101
|
-
|
|
1102
|
-
<div class="param-desc">
|
|
1103
|
-
|
|
1104
|
-
NotAllowed - If there are calls currently connecting
|
|
1105
|
-
|
|
1106
|
-
</div>
|
|
1107
|
-
|
|
1108
|
-
</li>
|
|
1109
|
-
</ul>
|
|
1110
|
-
</div>
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
<div class="section-returns">
|
|
1115
|
-
<h5>Returns:</h5>
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
<dl class="param-type">
|
|
1120
|
-
<dt>
|
|
1121
|
-
Type:
|
|
1122
|
-
</dt>
|
|
1123
|
-
<dd>
|
|
1124
|
-
|
|
1125
|
-
<span class="param-type"><code><a href="Session.html">Session</a></code></span>
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
</dd>
|
|
1129
|
-
</dl>
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
<div class="param-desc">
|
|
1133
|
-
object for call
|
|
1134
|
-
</div>
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
</div>
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
</div>
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
<div class="section-method">
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
<h4 class="name" id="getSessionByUUID"><span class="type-signature"></span>getSessionByUUID<span class="signature">(uuid)</span><span class="type-signature"> → {<a href="Session.html">Session</a>|null}</span></h4>
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
<div class="description">
|
|
1155
|
-
Get session by UUID, if none are found null is returned
|
|
1156
|
-
</div>
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
<dl class="details">
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
</dl>
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
<h5>Parameters:</h5>
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
<table class="params">
|
|
1209
|
-
<thead>
|
|
1210
|
-
<tr>
|
|
1211
|
-
|
|
1212
|
-
<th>Name</th>
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
<th>Type</th>
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
<th class="last">Description</th>
|
|
1222
|
-
</tr>
|
|
1223
|
-
</thead>
|
|
1224
|
-
|
|
1225
|
-
<tbody>
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
<tr>
|
|
1229
|
-
|
|
1230
|
-
<td class="name"><code>uuid</code></td>
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
<td class="type">
|
|
1234
|
-
|
|
1235
|
-
</td>
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
<td class="description last">
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
</td>
|
|
1245
|
-
</tr>
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
</tbody>
|
|
1249
|
-
</table>
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
<div class="section-returns">
|
|
1265
|
-
<h5>Returns:</h5>
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
<dl class="param-type">
|
|
1270
|
-
<dt>
|
|
1271
|
-
Type:
|
|
1272
|
-
</dt>
|
|
1273
|
-
<dd>
|
|
1274
|
-
|
|
1275
|
-
<span class="param-type"><code><a href="Session.html">Session</a></code></span>
|
|
1276
|
-
|
|
|
1277
|
-
|
|
1278
|
-
<span class="param-type"><code>null</code></span>
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
</dd>
|
|
1282
|
-
</dl>
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
</div>
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
</div>
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
<div class="section-method">
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
<h4 class="name" id="holdAllCalls"><span class="type-signature"></span>holdAllCalls<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
<div class="description">
|
|
1304
|
-
Hold all active calls
|
|
1305
|
-
</div>
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
<dl class="details">
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
</dl>
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
<div class="section-throws">
|
|
1365
|
-
<h5>Throws:</h5>
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
<div class="param-desc">
|
|
1370
|
-
|
|
1371
|
-
NotAllowed If there are connection calls
|
|
1372
|
-
|
|
1373
|
-
</div>
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
</div>
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
</div>
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
<div class="section-method">
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
<h4 class="name" id="listen"><span class="type-signature"></span>listen<span class="signature">(listenKey)</span><span class="type-signature"> → {<a href="Session.html">Session</a>}</span></h4>
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
<div class="description">
|
|
1397
|
-
Start a new session and listen to another call
|
|
1398
|
-
</div>
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
<dl class="details">
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
</dl>
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
<h5>Parameters:</h5>
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
<table class="params">
|
|
1451
|
-
<thead>
|
|
1452
|
-
<tr>
|
|
1453
|
-
|
|
1454
|
-
<th>Name</th>
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
<th>Type</th>
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
<th class="last">Description</th>
|
|
1464
|
-
</tr>
|
|
1465
|
-
</thead>
|
|
1466
|
-
|
|
1467
|
-
<tbody>
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
<tr>
|
|
1471
|
-
|
|
1472
|
-
<td class="name"><code>listenKey</code></td>
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
<td class="type">
|
|
1476
|
-
|
|
1477
|
-
</td>
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
<td class="description last">
|
|
1484
|
-
provided by API endpoint "active-calls" and the event library subscription for resource name "activecall"
|
|
1485
|
-
|
|
1486
|
-
</td>
|
|
1487
|
-
</tr>
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
</tbody>
|
|
1491
|
-
</table>
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
<div class="section-throws">
|
|
1505
|
-
<h5>Throws:</h5>
|
|
1506
|
-
<ul>
|
|
1507
|
-
<li>
|
|
1508
|
-
|
|
1509
|
-
<div class="param-desc">
|
|
1510
|
-
|
|
1511
|
-
NotReady - If phone is not ready to call
|
|
1512
|
-
|
|
1513
|
-
</div>
|
|
1514
|
-
|
|
1515
|
-
</li>
|
|
1516
|
-
|
|
1517
|
-
<li>
|
|
1518
|
-
|
|
1519
|
-
<div class="param-desc">
|
|
1520
|
-
|
|
1521
|
-
NotAllowed - If there are calls currently connecting
|
|
1522
|
-
|
|
1523
|
-
</div>
|
|
1524
|
-
|
|
1525
|
-
</li>
|
|
1526
|
-
</ul>
|
|
1527
|
-
</div>
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
<div class="section-returns">
|
|
1532
|
-
<h5>Returns:</h5>
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
<dl class="param-type">
|
|
1537
|
-
<dt>
|
|
1538
|
-
Type:
|
|
1539
|
-
</dt>
|
|
1540
|
-
<dd>
|
|
1541
|
-
|
|
1542
|
-
<span class="param-type"><code><a href="Session.html">Session</a></code></span>
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
</dd>
|
|
1546
|
-
</dl>
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
<div class="param-desc">
|
|
1550
|
-
object for listen
|
|
1551
|
-
</div>
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
</div>
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
</div>
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
<div class="section-method">
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
<h4 class="name" id="playTone"><span class="type-signature"></span>playTone<span class="signature">(duration, freq1, freq2, callback)</span><span class="type-signature"></span></h4>
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
<div class="description">
|
|
1572
|
-
Play tone locally (on incoming remote audio)
|
|
1573
|
-
</div>
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
<dl class="details">
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
</dl>
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
<h5>Parameters:</h5>
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
<table class="params">
|
|
1626
|
-
<thead>
|
|
1627
|
-
<tr>
|
|
1628
|
-
|
|
1629
|
-
<th>Name</th>
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
<th>Type</th>
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
<th>Default</th>
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
<th class="last">Description</th>
|
|
1641
|
-
</tr>
|
|
1642
|
-
</thead>
|
|
1643
|
-
|
|
1644
|
-
<tbody>
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
<tr>
|
|
1648
|
-
|
|
1649
|
-
<td class="name"><code>duration</code></td>
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
<td class="type">
|
|
1653
|
-
|
|
1654
|
-
</td>
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
<td class="default">
|
|
1660
|
-
|
|
1661
|
-
</td>
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
<td class="description last">
|
|
1665
|
-
Duration of tone in ms
|
|
1666
|
-
|
|
1667
|
-
</td>
|
|
1668
|
-
</tr>
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
<tr>
|
|
1673
|
-
|
|
1674
|
-
<td class="name"><code>freq1</code></td>
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
<td class="type">
|
|
1678
|
-
|
|
1679
|
-
</td>
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
<td class="default">
|
|
1685
|
-
|
|
1686
|
-
</td>
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
<td class="description last">
|
|
1690
|
-
Frequency in Hz of tone 1
|
|
1691
|
-
|
|
1692
|
-
</td>
|
|
1693
|
-
</tr>
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
<tr>
|
|
1698
|
-
|
|
1699
|
-
<td class="name"><code>freq2</code></td>
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
<td class="type">
|
|
1703
|
-
|
|
1704
|
-
</td>
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
<td class="default">
|
|
1710
|
-
|
|
1711
|
-
0
|
|
1712
|
-
|
|
1713
|
-
</td>
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
<td class="description last">
|
|
1717
|
-
Frequency in Hz of tone 2
|
|
1718
|
-
|
|
1719
|
-
</td>
|
|
1720
|
-
</tr>
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
<tr>
|
|
1725
|
-
|
|
1726
|
-
<td class="name"><code>callback</code></td>
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
<td class="type">
|
|
1730
|
-
|
|
1731
|
-
</td>
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
<td class="default">
|
|
1737
|
-
|
|
1738
|
-
null
|
|
1739
|
-
|
|
1740
|
-
</td>
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
<td class="description last">
|
|
1744
|
-
Function to be called after tone has ended
|
|
1745
|
-
|
|
1746
|
-
</td>
|
|
1747
|
-
</tr>
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
</tbody>
|
|
1751
|
-
</table>
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
<div class="section-throws">
|
|
1765
|
-
<h5>Throws:</h5>
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
<div class="param-desc">
|
|
1770
|
-
|
|
1771
|
-
NotAllowed - If audio api is not supported by browser
|
|
1772
|
-
|
|
1773
|
-
</div>
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
</div>
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
</div>
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
<div class="section-method">
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
<h4 class="name" id="prepareMedia"><span class="type-signature"></span>prepareMedia<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
<div class="description">
|
|
1797
|
-
Prepare media and get media permission from browser
|
|
1798
|
-
This must be done prior to using the phone or getting device lists.
|
|
1799
|
-
</div>
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
<dl class="details">
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
</dl>
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
<div class="section-returns">
|
|
1861
|
-
<h5>Returns:</h5>
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
<div class="param-desc">
|
|
1867
|
-
A promise which will be resolved when user accepts access to media devices
|
|
1868
|
-
</div>
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
</div>
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
</div>
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
<div class="section-method">
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
<h4 class="name" id="start"><span class="type-signature"></span>start<span class="signature">(phoneOptions)</span><span class="type-signature"></span></h4>
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
<div class="description">
|
|
1889
|
-
Start phone and connect to server if needed
|
|
1890
|
-
</div>
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
<dl class="details">
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
</dl>
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
<h5>Parameters:</h5>
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
<table class="params">
|
|
1943
|
-
<thead>
|
|
1944
|
-
<tr>
|
|
1945
|
-
|
|
1946
|
-
<th>Name</th>
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
<th>Type</th>
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
<th class="last">Description</th>
|
|
1956
|
-
</tr>
|
|
1957
|
-
</thead>
|
|
1958
|
-
|
|
1959
|
-
<tbody>
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
<tr>
|
|
1963
|
-
|
|
1964
|
-
<td class="name"><code>phoneOptions</code></td>
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
<td class="type">
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
<span class="param-type"><code>object</code></span>
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
</td>
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
<td class="description last">
|
|
1981
|
-
configuration options
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
<table class="params">
|
|
1986
|
-
<thead>
|
|
1987
|
-
<tr>
|
|
1988
|
-
|
|
1989
|
-
<th>Name</th>
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
<th>Type</th>
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
<th>Attributes</th>
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
<th>Default</th>
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
<th class="last">Description</th>
|
|
2003
|
-
</tr>
|
|
2004
|
-
</thead>
|
|
2005
|
-
|
|
2006
|
-
<tbody>
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
<tr>
|
|
2010
|
-
|
|
2011
|
-
<td class="name"><code>provisionToken</code></td>
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
<td class="type">
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
<span class="param-type"><code>string</code></span>
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
</td>
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
<td class="attributes">
|
|
2025
|
-
|
|
2026
|
-
<optional><br>
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
</td>
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
<td class="default">
|
|
2037
|
-
|
|
2038
|
-
</td>
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
<td class="description last">
|
|
2042
|
-
Provisioning token from API service
|
|
2043
|
-
|
|
2044
|
-
</td>
|
|
2045
|
-
</tr>
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
<tr>
|
|
2050
|
-
|
|
2051
|
-
<td class="name"><code>authorizationUsername</code></td>
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
<td class="type">
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
<span class="param-type"><code>string</code></span>
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
</td>
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
<td class="attributes">
|
|
2065
|
-
|
|
2066
|
-
<optional><br>
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
</td>
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
<td class="default">
|
|
2077
|
-
|
|
2078
|
-
</td>
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
<td class="description last">
|
|
2082
|
-
Authorizing username
|
|
2083
|
-
|
|
2084
|
-
</td>
|
|
2085
|
-
</tr>
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
<tr>
|
|
2090
|
-
|
|
2091
|
-
<td class="name"><code>password</code></td>
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
<td class="type">
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
<span class="param-type"><code>string</code></span>
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
</td>
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
<td class="attributes">
|
|
2105
|
-
|
|
2106
|
-
<optional><br>
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
</td>
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
<td class="default">
|
|
2117
|
-
|
|
2118
|
-
</td>
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
<td class="description last">
|
|
2122
|
-
WSS Password
|
|
2123
|
-
|
|
2124
|
-
</td>
|
|
2125
|
-
</tr>
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
<tr>
|
|
2130
|
-
|
|
2131
|
-
<td class="name"><code>callToken</code></td>
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
<td class="type">
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
<span class="param-type"><code>string</code></span>
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
</td>
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
<td class="attributes">
|
|
2145
|
-
|
|
2146
|
-
<optional><br>
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
</td>
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
<td class="default">
|
|
2157
|
-
|
|
2158
|
-
</td>
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
<td class="description last">
|
|
2162
|
-
Call token
|
|
2163
|
-
|
|
2164
|
-
</td>
|
|
2165
|
-
</tr>
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
<tr>
|
|
2170
|
-
|
|
2171
|
-
<td class="name"><code>connectEventService</code></td>
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
<td class="type">
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
<span class="param-type"><code>boolean</code></span>
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
</td>
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
<td class="attributes">
|
|
2185
|
-
|
|
2186
|
-
<optional><br>
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
</td>
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
<td class="default">
|
|
2197
|
-
|
|
2198
|
-
false
|
|
2199
|
-
|
|
2200
|
-
</td>
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
<td class="description last">
|
|
2204
|
-
Connect to event service (required to send call commands and receive callDataInfo event)
|
|
2205
|
-
|
|
2206
|
-
</td>
|
|
2207
|
-
</tr>
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
<tr>
|
|
2212
|
-
|
|
2213
|
-
<td class="name"><code>useCallDataInfoEvent</code></td>
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
<td class="type">
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
<span class="param-type"><code>boolean</code></span>
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
</td>
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
<td class="attributes">
|
|
2227
|
-
|
|
2228
|
-
<optional><br>
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
</td>
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
<td class="default">
|
|
2239
|
-
|
|
2240
|
-
false
|
|
2241
|
-
|
|
2242
|
-
</td>
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
<td class="description last">
|
|
2246
|
-
Subscribe to callDataInfo remote event
|
|
2247
|
-
|
|
2248
|
-
</td>
|
|
2249
|
-
</tr>
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
<tr>
|
|
2254
|
-
|
|
2255
|
-
<td class="name"><code>register</code></td>
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
<td class="type">
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
<span class="param-type"><code>boolean</code></span>
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
</td>
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
<td class="attributes">
|
|
2269
|
-
|
|
2270
|
-
<optional><br>
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
</td>
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
<td class="default">
|
|
2281
|
-
|
|
2282
|
-
true
|
|
2283
|
-
|
|
2284
|
-
</td>
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
<td class="description last">
|
|
2288
|
-
Register on server to receive enable incoming calls
|
|
2289
|
-
|
|
2290
|
-
</td>
|
|
2291
|
-
</tr>
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
<tr>
|
|
2296
|
-
|
|
2297
|
-
<td class="name"><code>playSignalTones</code></td>
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
<td class="type">
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
<span class="param-type"><code>number</code></span>
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
</td>
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
<td class="attributes">
|
|
2311
|
-
|
|
2312
|
-
<optional><br>
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
</td>
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
<td class="default">
|
|
2323
|
-
|
|
2324
|
-
false
|
|
2325
|
-
|
|
2326
|
-
</td>
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
<td class="description last">
|
|
2330
|
-
Play signal tones (busy, invalid number, etc) remotely
|
|
2331
|
-
|
|
2332
|
-
</td>
|
|
2333
|
-
</tr>
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
<tr>
|
|
2338
|
-
|
|
2339
|
-
<td class="name"><code>iceGatherTimeout</code></td>
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
<td class="type">
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
<span class="param-type"><code>number</code></span>
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
</td>
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
<td class="attributes">
|
|
2353
|
-
|
|
2354
|
-
<optional><br>
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
</td>
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
<td class="default">
|
|
2365
|
-
|
|
2366
|
-
3000
|
|
2367
|
-
|
|
2368
|
-
</td>
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
<td class="description last">
|
|
2372
|
-
Number of millisecs before ICE gather will be forced stopped and candidate selection will take place
|
|
2373
|
-
|
|
2374
|
-
</td>
|
|
2375
|
-
</tr>
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
<tr>
|
|
2380
|
-
|
|
2381
|
-
<td class="name"><code>toneVolume</code></td>
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
<td class="type">
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
<span class="param-type"><code>number</code></span>
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
</td>
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
<td class="attributes">
|
|
2395
|
-
|
|
2396
|
-
<optional><br>
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
</td>
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
<td class="default">
|
|
2407
|
-
|
|
2408
|
-
0.3
|
|
2409
|
-
|
|
2410
|
-
</td>
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
<td class="description last">
|
|
2414
|
-
Signal- and DTMF tone volume (0-1)
|
|
2415
|
-
|
|
2416
|
-
</td>
|
|
2417
|
-
</tr>
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
<tr>
|
|
2422
|
-
|
|
2423
|
-
<td class="name"><code>autoBusyIncoming</code></td>
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
<td class="type">
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
<span class="param-type"><code>boolean</code></span>
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
</td>
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
<td class="attributes">
|
|
2437
|
-
|
|
2438
|
-
<optional><br>
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
</td>
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
<td class="default">
|
|
2449
|
-
|
|
2450
|
-
true
|
|
2451
|
-
|
|
2452
|
-
</td>
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
<td class="description last">
|
|
2456
|
-
Automatically reject calls with busy if active session exists
|
|
2457
|
-
|
|
2458
|
-
</td>
|
|
2459
|
-
</tr>
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
<tr>
|
|
2464
|
-
|
|
2465
|
-
<td class="name"><code>autoRemoveSessionTime</code></td>
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
<td class="type">
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
<span class="param-type"><code>number</code></span>
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
</td>
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
<td class="attributes">
|
|
2479
|
-
|
|
2480
|
-
<optional><br>
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
</td>
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
<td class="default">
|
|
2491
|
-
|
|
2492
|
-
3000
|
|
2493
|
-
|
|
2494
|
-
</td>
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
<td class="description last">
|
|
2498
|
-
Automatically remove session after interval specified
|
|
2499
|
-
|
|
2500
|
-
</td>
|
|
2501
|
-
</tr>
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
<tr>
|
|
2506
|
-
|
|
2507
|
-
<td class="name"><code>playRingOnIncoming</code></td>
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
<td class="type">
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
<span class="param-type"><code>number</code></span>
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
</td>
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
<td class="attributes">
|
|
2521
|
-
|
|
2522
|
-
<optional><br>
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
</td>
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
<td class="default">
|
|
2533
|
-
|
|
2534
|
-
true
|
|
2535
|
-
|
|
2536
|
-
</td>
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
<td class="description last">
|
|
2540
|
-
Play ringing tones on incoming calls
|
|
2541
|
-
|
|
2542
|
-
</td>
|
|
2543
|
-
</tr>
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
<tr>
|
|
2548
|
-
|
|
2549
|
-
<td class="name"><code>playCallInitializedTone</code></td>
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
<td class="type">
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
<span class="param-type"><code>number</code></span>
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
</td>
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
<td class="attributes">
|
|
2563
|
-
|
|
2564
|
-
<optional><br>
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
</td>
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
<td class="default">
|
|
2575
|
-
|
|
2576
|
-
false
|
|
2577
|
-
|
|
2578
|
-
</td>
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
<td class="description last">
|
|
2582
|
-
Play tone when call has been initiated (before progress/ringback tones)
|
|
2583
|
-
|
|
2584
|
-
</td>
|
|
2585
|
-
</tr>
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
</tbody>
|
|
2589
|
-
</table>
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
</td>
|
|
2593
|
-
</tr>
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
</tbody>
|
|
2597
|
-
</table>
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
<div class="section-throws">
|
|
2611
|
-
<h5>Throws:</h5>
|
|
2612
|
-
<ul>
|
|
2613
|
-
<li>
|
|
2614
|
-
|
|
2615
|
-
<div class="param-desc">
|
|
2616
|
-
|
|
2617
|
-
MediaNotPrepared - If <code>prepareMedia</code> was not called and resolved prior to calling this method
|
|
2618
|
-
|
|
2619
|
-
</div>
|
|
2620
|
-
|
|
2621
|
-
</li>
|
|
2622
|
-
|
|
2623
|
-
<li>
|
|
2624
|
-
|
|
2625
|
-
<div class="param-desc">
|
|
2626
|
-
|
|
2627
|
-
InvalidOptions - If one or more options are invalid
|
|
2628
|
-
|
|
2629
|
-
</div>
|
|
2630
|
-
|
|
2631
|
-
</li>
|
|
2632
|
-
|
|
2633
|
-
<li>
|
|
2634
|
-
|
|
2635
|
-
<div class="param-desc">
|
|
2636
|
-
|
|
2637
|
-
UnableToConnect - If unable to connect phone to server
|
|
2638
|
-
|
|
2639
|
-
</div>
|
|
2640
|
-
|
|
2641
|
-
</li>
|
|
2642
|
-
</ul>
|
|
2643
|
-
</div>
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
</div>
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
<div class="section-method">
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
<h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
<div class="description">
|
|
2663
|
-
Stops the phone client, gracefully disconnects from the server and terminates any active calls
|
|
2664
|
-
</div>
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
<dl class="details">
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
</dl>
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
<div class="section-throws">
|
|
2724
|
-
<h5>Throws:</h5>
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
<div class="param-desc">
|
|
2729
|
-
|
|
2730
|
-
NotReady - If phone is not started
|
|
2731
|
-
|
|
2732
|
-
</div>
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
</div>
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
</div>
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
<div class="section-method">
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
<h4 class="name" id="stopTone"><span class="type-signature"></span>stopTone<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
<div class="description">
|
|
2756
|
-
Immediately stop playing tones
|
|
2757
|
-
(Tone callbacks will be cancelled)
|
|
2758
|
-
</div>
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
<dl class="details">
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
</dl>
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
</div>
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
</article>
|
|
2829
|
-
|
|
2830
|
-
</section>
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
</div>
|
|
2836
|
-
|
|
2837
|
-
<br class="clear">
|
|
2838
|
-
|
|
2839
|
-
<footer>
|
|
2840
|
-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Oct 06 2023 14:19:15 GMT+0200 (Central European Summer Time) using the Minami theme.
|
|
2841
|
-
</footer>
|
|
2842
|
-
|
|
2843
|
-
<script>prettyPrint();</script>
|
|
2844
|
-
<script src="scripts/linenumber.js"></script>
|
|
2845
|
-
</body>
|
|
2846
|
-
</html>
|
|
13
|
+
}</code></pre></div></div></div><h2 id="classes" class="subsection-title has-anchor">Classes</h2><dl><dt><a href="Phone.html">Phone</a></dt><dd></dd></dl><h2 id="members" class="subsection-title has-anchor">Members</h2><h3 class="name has-anchor" id="browserSupported"><span class="type-signature"></span>browserSupported<span class="type-signature"></span></h3><div class="description">Verify browser is supported</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line551">line 551</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="hasMediaPermission"><span class="type-signature"></span>hasMediaPermission<span class="type-signature"></span></h3><div class="description">Return media permission state</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line527">line 527</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="hasMediaPermissionError"><span class="type-signature"></span>hasMediaPermissionError<span class="type-signature"></span></h3><div class="description">Media permission denied</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line535">line 535</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="isStarted"><span class="type-signature"></span>isStarted<span class="type-signature"></span></h3><div class="description">Phone client started</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line543">line 543</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="options"><span class="type-signature"></span>options<span class="type-signature"></span></h3><div class="description">Return phone options</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line504">line 504</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="remoteAudioElement"><span class="type-signature"></span>remoteAudioElement<span class="type-signature"></span></h3><div class="description">Remote audio HTML element</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line558">line 558</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="sessions"><span class="type-signature"></span>sessions<span class="type-signature"></span></h3><div class="description">Return list of current sessions</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line512">line 512</a></li></ul></dd></div></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="call"><span class="type-signature"></span>call<span class="signature">(number, params)</span><span class="type-signature"> → {<a href="Session.html">Session</a>}</span></h3><div class="description">Start a new call If you have other active calls they will be set on hold</div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>number</code></td><td class="type"></td><td class="description last">Number to call</td></tr><tr><td class="name"><code>params</code></td><td class="type"><span class="param-type">object</span></td><td class="description last">call options<h6>Properties</h6><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>record</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Recording retention days. The number of days recording will be kept. Setting this to 0 disables recording.</td></tr><tr><td class="name"><code>explicitCallerId</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Force a specific caller id, by providing explicit phone number id</td></tr><tr><td class="name"><code>explicitShortCallerId</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Force a specific caller id, by providing explicit short caller id</td></tr><tr><td class="name"><code>answerCallTimeout</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">0</td><td class="description last">Hangup call with NO ANSWER if call is not picked up before specified interval (seconds). If 0, timeout is disabled.</td></tr><tr><td class="name"><code>maximumCallCost</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Maximum call cost (in customer currency) allowed for call. The call will automatically be stopped when the specified cost has been reached. Setting this to 0 disables checking for maximum cost.</td></tr><tr><td class="name"><code>metaInfo</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Add meta info to call, which will be available in server events and inside call complete webhook (max 256 chars)</td></tr></tbody></table></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line426">line 426</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><ul><li><div class="param-desc">NotReady - If phone is not ready to call</div></li><li><div class="param-desc">NotAllowed - If there are calls currently connecting</div></li></ul></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc">object for call</div><dl class="param-type"><dt>Type: </dt><dd><span class="param-type"><a href="Session.html">Session</a></span></dd></dl></div><h3 class="name has-anchor" id="getSessionByUUID"><span class="type-signature"></span>getSessionByUUID<span class="signature">(uuid)</span><span class="type-signature"> → {<a href="Session.html">Session</a>|null}</span></h3><div class="description">Get session by UUID, if none are found null is returned</div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>uuid</code></td><td class="type"></td><td class="description last"></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line488">line 488</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type: </dt><dd><span class="param-type"><a href="Session.html">Session</a></span> |<wbr> <span class="param-type">null</span></dd></dl></div><h3 class="name has-anchor" id="holdAllCalls"><span class="type-signature"></span>holdAllCalls<span class="signature">()</span></h3><div class="description">Hold all active calls</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line671">line 671</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><div class="param-desc">NotAllowed If there are connection calls</div></div><h3 class="name has-anchor" id="listen"><span class="type-signature"></span>listen<span class="signature">(listenKey)</span><span class="type-signature"> → {<a href="Session.html">Session</a>}</span></h3><div class="description">Start a new session and listen to another call</div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>listenKey</code></td><td class="type"></td><td class="description last">provided by API endpoint "active-calls" and the event library subscription for resource name "activecall"</td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line471">line 471</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><ul><li><div class="param-desc">NotReady - If phone is not ready to call</div></li><li><div class="param-desc">NotAllowed - If there are calls currently connecting</div></li></ul></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc">object for listen</div><dl class="param-type"><dt>Type: </dt><dd><span class="param-type"><a href="Session.html">Session</a></span></dd></dl></div><h3 class="name has-anchor" id="playTone"><span class="type-signature"></span>playTone<span class="signature">(duration, freq1, freq2, callback)</span></h3><div class="description">Play tone locally (on incoming remote audio)</div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>duration</code></td><td class="type"></td><td class="default"></td><td class="description last">Duration of tone in ms</td></tr><tr><td class="name"><code>freq1</code></td><td class="type"></td><td class="default"></td><td class="description last">Frequency in Hz of tone 1</td></tr><tr><td class="name"><code>freq2</code></td><td class="type"></td><td class="default">0</td><td class="description last">Frequency in Hz of tone 2</td></tr><tr><td class="name"><code>callback</code></td><td class="type"></td><td class="default">null</td><td class="description last">Function to be called after tone has ended</td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line571">line 571</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><div class="param-desc">NotAllowed - If audio api is not supported by browser</div></div><h3 class="name has-anchor" id="prepareMedia"><span class="type-signature"></span>prepareMedia<span class="signature">()</span></h3><div class="description">Prepare media and get media permission from browser This must be done prior to using the phone or getting device lists.</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line150">line 150</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc">A promise which will be resolved when user accepts access to media devices</div></div><h3 class="name has-anchor" id="start"><span class="type-signature"></span>start<span class="signature">(phoneOptions)</span></h3><div class="description">Start phone and connect to server if needed</div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>phoneOptions</code></td><td class="type"><span class="param-type">object</span></td><td class="description last">configuration options<h6>Properties</h6><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>provisionToken</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Provisioning token from API service</td></tr><tr><td class="name"><code>authorizationUsername</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Authorizing username</td></tr><tr><td class="name"><code>password</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">WSS Password</td></tr><tr><td class="name"><code>callToken</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"><optional><br></td><td class="default"></td><td class="description last">Call token</td></tr><tr><td class="name"><code>connectEventService</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"><optional><br></td><td class="default">false</td><td class="description last">Connect to event service (required to send call commands and receive callDataInfo event)</td></tr><tr><td class="name"><code>useCallDataInfoEvent</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"><optional><br></td><td class="default">false</td><td class="description last">Subscribe to callDataInfo remote event</td></tr><tr><td class="name"><code>register</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"><optional><br></td><td class="default">true</td><td class="description last">Register on server to receive enable incoming calls</td></tr><tr><td class="name"><code>playSignalTones</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">false</td><td class="description last">Play signal tones (busy, invalid number, etc) remotely</td></tr><tr><td class="name"><code>iceGatherTimeout</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">3000</td><td class="description last">Number of millisecs before ICE gather will be forced stopped and candidate selection will take place</td></tr><tr><td class="name"><code>toneVolume</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">0.3</td><td class="description last">Signal- and DTMF tone volume (0-1)</td></tr><tr><td class="name"><code>autoBusyIncoming</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes"><optional><br></td><td class="default">true</td><td class="description last">Automatically reject calls with busy if active session exists</td></tr><tr><td class="name"><code>autoRemoveSessionTime</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">3000</td><td class="description last">Automatically remove session after interval specified</td></tr><tr><td class="name"><code>playRingOnIncoming</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">true</td><td class="description last">Play ringing tones on incoming calls</td></tr><tr><td class="name"><code>playCallInitializedTone</code></td><td class="type"><span class="param-type">number</span></td><td class="attributes"><optional><br></td><td class="default">false</td><td class="description last">Play tone when call has been initiated (before progress/ringback tones)</td></tr></tbody></table></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line196">line 196</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><ul><li><div class="param-desc">MediaNotPrepared - If <code>prepareMedia</code> was not called and resolved prior to calling this method</div></li><li><div class="param-desc">InvalidOptions - If one or more options are invalid</div></li><li><div class="param-desc">UnableToConnect - If unable to connect phone to server</div></li></ul></div><h3 class="name has-anchor" id="stop"><span class="type-signature"></span>stop<span class="signature">()</span></h3><div class="description">Stops the phone client, gracefully disconnects from the server and terminates any active calls</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line381">line 381</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><div class="param-desc">NotReady - If phone is not started</div></div><h3 class="name has-anchor" id="stopTone"><span class="type-signature"></span>stopTone<span class="signature">()</span></h3><div class="description">Immediately stop playing tones (Tone callbacks will be cancelled)</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="phone-client.js.html">phone-client.js</a>, <a href="phone-client.js.html#line594">line 594</a></li></ul></dd></div></dl></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="EventClient.html">EventClient</a></div><div class="sidebar-section-children"><a href="EventServiceNotConnected.html">EventServiceNotConnected</a></div><div class="sidebar-section-children"><a href="InvalidMediaDevice.html">InvalidMediaDevice</a></div><div class="sidebar-section-children"><a href="InvalidOptions.html">InvalidOptions</a></div><div class="sidebar-section-children"><a href="InvalidParameter.html">InvalidParameter</a></div><div class="sidebar-section-children"><a href="LogHandler.html">LogHandler</a></div><div class="sidebar-section-children"><a href="MediaNotPrepared.html">MediaNotPrepared</a></div><div class="sidebar-section-children"><a href="NoActiveSession.html">NoActiveSession</a></div><div class="sidebar-section-children"><a href="NotAllowed.html">NotAllowed</a></div><div class="sidebar-section-children"><a href="NotReady.html">NotReady</a></div><div class="sidebar-section-children"><a href="Phone.html">Phone</a></div><div class="sidebar-section-children"><a href="Request.html">Request</a></div><div class="sidebar-section-children"><a href="Requestor.html">Requestor</a></div><div class="sidebar-section-children"><a href="Session.html">Session</a></div><div class="sidebar-section-children"><a href="UnableToConnect.html">UnableToConnect</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#event:callDataInfo">callDataInfo</a></div><div class="sidebar-section-children"><a href="global.html#event:callDurationUpdate">callDurationUpdate</a></div><div class="sidebar-section-children"><a href="global.html#event:callEnded">callEnded</a></div><div class="sidebar-section-children"><a href="global.html#event:callQualityReportUpdate">callQualityReportUpdate</a></div><div class="sidebar-section-children"><a href="global.html#event:connectionStateChange">connectionStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:holdStateChange">holdStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:incomingCall">incomingCall</a></div><div class="sidebar-section-children"><a href="global.html#event:muteStateChange">muteStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:recordingStateChange">recordingStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:sessionCreated">sessionCreated</a></div><div class="sidebar-section-children"><a href="global.html#event:sessionRemoved">sessionRemoved</a></div><div class="sidebar-section-children"><a href="global.html#event:sessionStateChange">sessionStateChange</a></div><div class="sidebar-section-children"><a href="global.html#event:whisperModeChange">whisperModeChange</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#CALL_DIRECTION">CALL_DIRECTION</a></div><div class="sidebar-section-children"><a href="global.html#CALL_DISPOSITION">CALL_DISPOSITION</a></div><div class="sidebar-section-children"><a href="global.html#CONNECTION_STATE">CONNECTION_STATE</a></div><div class="sidebar-section-children"><a href="global.html#LOGLVL">LOGLVL</a></div><div class="sidebar-section-children"><a href="global.html#SESSION_STATE">SESSION_STATE</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>
|