Skip to content

Commit 73423ad

Browse files
committed
Add missing Twiml Dial nouns
1 parent e1aa85e commit 73423ad

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

src/Twilio/TwiML/Dial.cs

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,13 @@ public Dial Sip(string address,
221221
/// <param name="trim">Trim recording</param>
222222
/// <param name="waitMethod">Wait URL method</param>
223223
/// <param name="waitUrl">Wait TwiML URL</param>
224-
/// <param name="eventCallbackUrl">URL to hit on conference events</param>
224+
/// <param name="eventCallbackUrl">URL to hit on conference events, deprecated in favor of 'recordingStatusCallback', providing a 'recordingStatusCallback' will ignore 'eventCallbackUrl' if provided</param>
225+
/// <param name="region">Where Twilio should mix the conference</param>
226+
/// <param name="statusCallbackEvent">Specify which conference state changes should generate a webhook to the URL specified in the 'statusCallback'</param>
227+
/// <param name="statusCallback">URL to hit on conference events</param>
228+
/// <param name="statusCallbackMethod">Method to use when hitting 'statusCallback' url</param>
229+
/// <param name="recordingStatusCallback">If a conference recording was requested via the record attribute, Twilio will make a request to this URL when the recording is available to access</param>
230+
/// <param name="recordingStatusCallbackMethod">Method to use when hitting 'recordingStatusCallback'</param>
225231
/// <returns>Dial element</returns>
226232
public Dial Conference(string name,
227233
bool? muted=null,
@@ -233,7 +239,13 @@ public Dial Conference(string name,
233239
string trim=null,
234240
string waitMethod=null,
235241
string waitUrl=null,
236-
string eventCallbackUrl=null)
242+
string eventCallbackUrl=null,
243+
string region=null,
244+
string statusCallbackEvent=null,
245+
string statusCallback=null,
246+
string statusCallbackMethod=null,
247+
string recordingStatusCallback=null,
248+
string recordingStatusCallbackMethod=null)
237249
{
238250
var conference = new XElement("Conference", name);
239251
if (muted != null)
@@ -272,10 +284,34 @@ public Dial Conference(string name,
272284
{
273285
conference.Add(new XAttribute("waitUrl", waitUrl));
274286
}
275-
if (!string.IsNullOrEmpty(eventCallbackUrl))
287+
if (!string.IsNullOrEmpty(eventCallbackUrl) && string.IsNullOrEmpty(recordingStatusCallback))
276288
{
277289
conference.Add(new XAttribute("eventCallbackUrl", eventCallbackUrl));
278290
}
291+
if (!string.IsNullOrEmpty(region))
292+
{
293+
conference.Add(new XAttribute("region", region));
294+
}
295+
if (!string.IsNullOrEmpty(statusCallbackEvent))
296+
{
297+
conference.Add(new XAttribute("statusCallbackEvent", statusCallbackEvent));
298+
}
299+
if (!string.IsNullOrEmpty(statusCallback))
300+
{
301+
conference.Add(new XAttribute("statusCallback", statusCallback));
302+
}
303+
if (!string.IsNullOrEmpty(statusCallbackMethod))
304+
{
305+
conference.Add(new XAttribute("statusCallbackMethod", statusCallbackMethod));
306+
}
307+
if (!string.IsNullOrEmpty(recordingStatusCallback))
308+
{
309+
conference.Add(new XAttribute("recordingStatusCallback", recordingStatusCallback));
310+
}
311+
if (!string.IsNullOrEmpty(recordingStatusCallbackMethod))
312+
{
313+
conference.Add(new XAttribute("recordingStatusCallbackMethod", recordingStatusCallbackMethod));
314+
}
279315

280316
Element.Add(conference);
281317
return this;

0 commit comments

Comments
 (0)