Skip to content

Commit 602c32e

Browse files
authored
DX-2286 Updated Ring Verb (#36)
1 parent 8c44601 commit 602c32e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/bandwidth/voice_lib/bxml/verbs/ring.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ class Ring
77

88
def to_bxml(xml)
99
xml.Ring(compact_hash({
10-
'duration' => duration
10+
'duration' => duration,
11+
'answerCall' => answer_call
1112
}))
1213
end
1314
end

test/integration/test_integration.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,13 +555,14 @@ def test_bridge
555555

556556
def test_ring
557557
ring = Bandwidth::Voice::Ring.new({
558-
:duration => 5
558+
:duration => 5,
559+
:answer_call => false
559560
})
560561

561562
response = Bandwidth::Voice::Response.new()
562563
response.push(ring)
563564

564-
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Ring duration="5"/></Response>'
565+
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Ring duration="5" answerCall="false"/></Response>'
565566
actual = response.to_bxml()
566567
assert_equal(expected, actual)
567568
end

0 commit comments

Comments
 (0)