Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVX-5649 Add SIP Video Outbound flag #227

Merged
merged 3 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/opentok/sip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class Sip
# "password" => sip_password },
# "headers" => { "X-KEY1" => "value1",
# "X-KEY1" => "value2" },
# "secure" => "true"
# "secure" => "true",
# "video" => "true"
# }
# response = opentok.sip.dial(session_id, token, "sip:+15128675309@acme.pstn.example.com;transport=tls", opts)
# @param [String] session_id The session ID corresponding to the session to which
Expand All @@ -33,8 +34,13 @@ class Sip
# @option opts [Hash] :auth This object contains the username and password
# to be used in the the SIP INVITE​ request for HTTP digest authentication,
# if it is required by your SIP platform.
# @option opts [true, false] :secure Wether the media must be transmitted
# @option opts [true, false] :secure Whether the media must be transmitted
# encrypted (​true​) or not (​false​, the default).
# @option opts [true, false] :video Whether the SIP call will include
# video (​true​) or not (​false​, the default). 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.
def dial(session_id, token, sip_uri, opts)
response = @client.dial(session_id, token, sip_uri, opts)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/cassettes/OpenTok_Sip/receives_a_valid_response.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion spec/opentok/sip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
it "receives a valid response", :vcr => { :erb => { :version => OpenTok::VERSION + "-Ruby-Version-#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"} } do
opts = { "auth" => { "username" => sip_username,
"password" => sip_password },
"secure" => "true"
"secure" => "true",
"video" => "true"
}
response = sip.dial(session_id, expiring_token, sip_uri, opts)
expect(response).not_to be_nil
Expand Down