@@ -20,6 +20,8 @@ public class SipProperties {
20
20
private String password = null ;
21
21
private String headersJsonStartingWithXDash = null ;
22
22
private Boolean secure = false ;
23
+ private Boolean video = false ;
24
+ private Boolean observeForceMute = false ;
23
25
24
26
private SipProperties (Builder builder ) {
25
27
this .sipUri = builder .sipUri ;
@@ -28,6 +30,8 @@ private SipProperties(Builder builder) {
28
30
this .password = builder .password ;
29
31
this .headersJsonStartingWithXDash = builder .headersJsonStartingWithXDash ;
30
32
this .secure = builder .secure ;
33
+ this .video = builder .video ;
34
+ this .observeForceMute = builder .observeForceMute ;
31
35
}
32
36
33
37
/**
@@ -42,6 +46,8 @@ public static class Builder {
42
46
private String password = null ;
43
47
private String headersJsonStartingWithXDash = null ;
44
48
private boolean secure = false ;
49
+ private boolean video = false ;
50
+ private boolean observeForceMute = false ;
45
51
46
52
47
53
/**
@@ -60,6 +66,7 @@ public Builder sipUri(String sipUri) {
60
66
this .sipUri = sipUri ;
61
67
return this ;
62
68
}
69
+
63
70
/**
64
71
* Call this method to set the SIP <code>from</code> field (optional).
65
72
*
@@ -76,6 +83,7 @@ public Builder from(String from) {
76
83
this .from = from ;
77
84
return this ;
78
85
}
86
+
79
87
/**
80
88
* Call this method to set the username for the SIP gateway provider (optional).
81
89
*
@@ -99,6 +107,7 @@ public Builder password(String password) {
99
107
this .password = password ;
100
108
return this ;
101
109
}
110
+
102
111
/**
103
112
* Call this method to define custom headers to be added to the SIP INVITE
104
113
* initiated from OpenTok to the your SIP platform.
@@ -114,6 +123,7 @@ public Builder headersJsonStartingWithXDash(String headersJsonStartingWithXDash)
114
123
this .headersJsonStartingWithXDash = headersJsonStartingWithXDash ;
115
124
return this ;
116
125
}
126
+
117
127
/**
118
128
* Call this method and pass in <code>true</code> to indicate that the media
119
129
* must be transmitted encrypted. Pass in <code>false</code>, the default, if encryption
@@ -128,6 +138,34 @@ public Builder secure(boolean secure) {
128
138
this .secure = secure ;
129
139
return this ;
130
140
}
141
+
142
+ /**
143
+ * Call this method and pass in <code>true</code> to enable video in the SIP call.
144
+ * The default is <code>false</code>.
145
+ *
146
+ * @param video Whether video should be enabled in the SIP call.
147
+ *
148
+ * @return The SipProperties.Builder object with the SIP video setting.
149
+ */
150
+ public Builder video (boolean video ) {
151
+ this .video = video ;
152
+ return this ;
153
+ }
154
+
155
+ /**
156
+ * Call this method and pass in <code>true</code> to have the SIP end point observe
157
+ * <a href="https://tokbox.com/developer/guides/moderation/#force_mute">force mute moderation</a>.
158
+ * The default is <code>false</code>.
159
+ *
160
+ * @param observeForceMute Whether to observe force mute moderation.
161
+ *
162
+ * @return The SipProperties.Builder object with the observeForceMute setting.
163
+ */
164
+ public Builder observeForceMute (boolean observeForceMute ) {
165
+ this .observeForceMute = observeForceMute ;
166
+ return this ;
167
+ }
168
+
131
169
/**
132
170
* Builds the SipProperties object.
133
171
*
@@ -137,18 +175,21 @@ public SipProperties build() {
137
175
return new SipProperties (this );
138
176
}
139
177
}
178
+
140
179
/**
141
180
* Returns the SIP URI.
142
181
*/
143
182
public String sipUri () {
144
183
return sipUri ;
145
184
}
185
+
146
186
/**
147
187
* Returns the from value.
148
188
*/
149
189
public String from () {
150
190
return from ;
151
191
}
192
+
152
193
/**
153
194
* Returns the user name.
154
195
*/
@@ -169,10 +210,21 @@ public String password() {
169
210
public String headersJsonStartingWithXDash () {
170
211
return headersJsonStartingWithXDash ;
171
212
}
213
+
172
214
/**
173
215
* Returns the secure value (<code>true</code> or <code>false</code>).
174
216
*/
175
217
public boolean secure () {
176
218
return secure ;
177
219
}
220
+
221
+ /**
222
+ * Return the video value (<code>true</code> or <code>false</code>).
223
+ */
224
+ public boolean video () { return video ; }
225
+
226
+ /**
227
+ * Returns the observeForceMute value (<code>true</code> or <code>false</code>).
228
+ */
229
+ public boolean observeForceMute () { return observeForceMute ; }
178
230
}
0 commit comments