Skip to content

Commit

Permalink
Moving Dev into Main ready for a release (#171)
Browse files Browse the repository at this point in the history
* Correction to docs for automatic archiving

* Fixes NullReferenceException in CreateSession (#114)

* Better handle WebExceptions that don't have a Response and send a customized exception on WebExceptionStatus.SendFailure errors (usually from TLS errors).
Fixes #108.

* Adding extra instructions regarding TLS to readme, adding new exception handling if TLS is incorrect

* removing erroneously added whitespace

* list archive by session id, better exception handling for validateSessionid

* removing extra whitespace from tests

* cleaning up other whitespace issues

* passing inner exception to OpenTokException

* Fixing comments, removing redundant fields

* adding custom layout for archiving

* fixing spacing issue, adding javadocs to StartArchive for layout

* revving to 3.4

* adding extra Archive Test

* Adding non-custom with stylesheet case

* adding contract annotations to ArchiveLayout to prevent invalid serialization of the stylesheet for non-custom layouts

* bringing balance to the force

* Dropping core 3.0 tests

* moving back to newer container

* removing .net core 2.x runs

* Silenced warnings in the test project.

* empty Statement Redundancy Fix

* Spell Fix

* Spell Fix

* Spell Fix | GetPartnerIdFromSessionId

Spell Fix | GetPartnerIdFromSessionId method's Property

* moving dotnet version

* specifying test framework

* Changed Javadoc comments to XML comments.

* Replace <see href with <a href.

* Added additional comments.

* Revving to 3.5.0

* automatic release on new GitHub release

* adding OUTPUT_PATH

* fixing Windows CI issue

* updating nexmo/github-actions branch to main

* screenshare layout

* more tests

* Adding SetArchiveLayout, updating unit tests

* moving null ignore to data structure

* fixing error message

* fixing screenshareType

* revving to 3.6.0

* Removing travis config

* Removing travis, fixing GitHub Actions definitions and adding package settings in project file (#164)

* Docs corrections (#161)

Co-authored-by: Stephen Lorello <42971704+slorello89@users.noreply.github.com>
Co-authored-by: slorello89 <slorello89@gmail.com>
Co-authored-by: Dirk Lemstra <dirk@lemstra.org>
Co-authored-by: onpoc <gupta.pradeep506@gmail.com>
Co-authored-by: Matt Hunt <mattlethargic@gmail.com>
Co-authored-by: Jeff Swartz <jeff.swartz@vonage.com>

* Implementing Dial method for initiating a SIP call (#166)

* Adding Dial method, test fails

* Adding dial async and tests

* Adding session validation

* Removing key from appsettings

* Adding valid session id to tests

* Docs edits for Dial API

... and other minor docs corrections

Co-authored-by: Jeff Swartz <jeff.swartz@vonage.com>

* Rev the version to 3.7.0

* Adding Force and Disable Mute (#167)

* Adding Force and Disable Mute

* Docs edits for the Force Mute API enhancements

* Fixing PlayDTMF methods that had wrong URL

Co-authored-by: Jeff Swartz <jeff.swartz@vonage.com>
Co-authored-by: matt-lethargic <matt-lethargic@gmail.com>

* Docs edits for v3.7.0 (#169)

* Changing version number (#170)

* Docs corrections

Co-authored-by: Jeff Swartz <jeff.swartz@vonage.com>
Co-authored-by: Paul Ardeleanu <paul.ardeleanu@vonage.com>
Co-authored-by: Patrick Childers <patrick@aliihealthcare.com>
Co-authored-by: Stephen Lorello <42971704+slorello89@users.noreply.github.com>
Co-authored-by: slorello89 <slorello89@gmail.com>
Co-authored-by: Dirk Lemstra <dirk@lemstra.org>
Co-authored-by: onpoc <gupta.pradeep506@gmail.com>
Co-authored-by: matt-lethargic <matt-lethargic@gmail.com>
  • Loading branch information
9 people committed Jan 28, 2022
1 parent 0158965 commit 76dcda5
Show file tree
Hide file tree
Showing 19 changed files with 1,312 additions and 93 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -11,15 +11,22 @@ env:

jobs:
build:

env:
DOTNET_NOLOGO: true
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.401'
dotnet-version: |
2.0.x
2.1.x
2.2.x
3.1.x
5.0.x
6.0.x
- name: Clean
run: dotnet clean OpenTok.sln --configuration ${{ env.CONFIGURATION }} && dotnet nuget locals all --clear
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2016 TokBox, Inc.
Copyright (c) 2014-2022 TokBox, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 20 additions & 0 deletions OpenTok/DialAuth.cs
@@ -0,0 +1,20 @@
namespace OpenTokSDK
{
/// <summary>
/// Used to set the username and password to be used in the <see cref="OpenTok.Dial"/> method.
/// These are used in the SIP INVITE​ request for HTTP digest authentication, if it is required
/// by your SIP platform. See the <see cref="DialOptions"/> class.
/// </summary>
public class DialAuth
{
/// <summary>
/// The username.
/// </summary>
public string Username { get; set; }

/// <summary>
/// The password.
/// </summary>
public string Password { get; set; }
}
}
54 changes: 54 additions & 0 deletions OpenTok/DialOptions.cs
@@ -0,0 +1,54 @@
using System.Collections.Generic;

namespace OpenTokSDK
{
/// <summary>
/// Used to define options for the the <see cref="OpenTok.Dial"/> method. These are
/// custom headers to be added to the SIP ​INVITE​ request initiated from OpenTok to
/// your SIP platform.
/// </summary>
public class DialOptions
{
/// <summary>
/// A dictionary of custom headers to be added to the SIP ​INVITE​ request initiated
/// from OpenTok to your SIP platform.
/// </summary>
public Dictionary<string, object> Headers { get; set; }

/// <summary>
/// Contains the username and password to be used in the the SIP INVITE​ request.
/// </summary>
public DialAuth Auth { get; set; }

/// <summary>
/// Indicates whether the media must be transmitted encrypted (​true​) or not (​false​, the default).
/// </summary>
public bool? Secure { get; set; }

/// <summary>
/// The number or string that will be sent to the final SIP number as the caller.
/// </summary>
/// <remarks>
/// This must be a string in the form of "from@example.com", where <c>from</c> can be a string or a number. If it is set
/// to a number (for example, "14155550101@example.com"), it will show up as the incoming number on PSTN phones.
/// If it is undefined or set to a string (for example, "joe@example.com"), +00000000 will show up as the incoming
/// number on PSTN phones.
/// </remarks>
public string From { get; set; }

/// <summary>
/// Whether the SIP call will include video (​true​) or not (​false​, the default).
/// </summary>
/// <remarks>With video included, the SIP client's video is included in the OpenTok stream
/// that is sent to the OpenTok session. The SIP client will receive a single composed video of the published streams
/// in the OpenTok session.</remarks>
public bool? Video { get; set; }

/// <summary>
/// Whether the SIP endpoint observes
/// <a href="https://tokbox.com/developer/guides/moderation/#force_mute">force mute moderation</a>
/// (true) or not (false, the default).
/// </summary>
public bool? ObserveForceMute { get; set; }
}
}
23 changes: 23 additions & 0 deletions OpenTok/Exception/OpenTokArgumentException.cs
@@ -0,0 +1,23 @@
using System;

namespace OpenTokSDK.Exception
{
/// <summary>
/// Defines an exception object thrown when an invalid argument is passed into a method.
/// </summary>
public class OpenTokArgumentException : ArgumentException
{
/// <inheritdoc cref="ArgumentException"/>
public OpenTokArgumentException(string message)
:base(message)
{

}

/// <inheritdoc cref="ArgumentException"/>
public OpenTokArgumentException(string message, string paramName)
: base(message, paramName)
{
}
}
}
59 changes: 6 additions & 53 deletions OpenTok/Exception/OpenTokException.cs
@@ -1,19 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenTokSDK.Exception
namespace OpenTokSDK.Exception
{
/// <summary>
/// Defines exceptions in the OpenTok SDK.
/// </summary>
public class OpenTokException : System.Exception
{

/// <summary>
/// Construct opentok exception
/// </summary>

/// <inheritdoc cref="Exception"/>
public OpenTokException()
{
}
Expand All @@ -23,15 +16,15 @@ public OpenTokException()
/// </summary>
/// <param name="message"></param>
public OpenTokException(string message)
: base(message){}
: base(message) { }

/// <summary>
/// Construct OpenTokException with a message and an inner exception
/// </summary>
/// <param name="message"></param>
/// <param name="exception"></param>
public OpenTokException(string message, System.Exception exception)
: base(message, exception){}
: base(message, exception) { }

/// <summary>
/// Get's the message of the exception
Expand All @@ -51,44 +44,4 @@ public System.Exception GetException()
return InnerException;
}
}

/// <summary>
/// Defines an exception object thrown when an invalid argument is passed into a method.
/// </summary>
public class OpenTokArgumentException : OpenTokException
{
/// <summary>
/// Constructor. Do not use.
/// </summary>
/// <param name="message"></param>
public OpenTokArgumentException(string message)
: base(message)
{
}
}

/// <summary>
/// Defines an exception object thrown when a REST API call results in an error response.
/// </summary>
public class OpenTokWebException : OpenTokException
{
/// <summary>
/// Constructor. Do not use.
/// </summary>
/// <param name="message"></param>
/// <param name="exception"></param>
public OpenTokWebException(string message, System.Exception exception)
: base(message, exception)
{
}

/// <summary>
/// Constructor. Do not use.
/// </summary>
/// <param name="message"></param>
public OpenTokWebException(string message)
: base(message)
{
}
}
}
27 changes: 27 additions & 0 deletions OpenTok/Exception/OpenTokWebException.cs
@@ -0,0 +1,27 @@
namespace OpenTokSDK.Exception
{
/// <summary>
/// Defines an exception object thrown when a REST API call results in an error response.
/// </summary>
public class OpenTokWebException : OpenTokException
{
/// <summary>
/// Constructor. Do not use.
/// </summary>
/// <param name="message"></param>
/// <param name="exception"></param>
public OpenTokWebException(string message, System.Exception exception)
: base(message, exception)
{
}

/// <summary>
/// Constructor. Do not use.
/// </summary>
/// <param name="message"></param>
public OpenTokWebException(string message)
: base(message)
{
}
}
}

0 comments on commit 76dcda5

Please sign in to comment.