You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/vonage/voice/actions/connect.rb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ def verify_endpoint
65
65
raiseClientError.new("'user' must be defined")unlessendpoint[:user]
66
66
when'websocket'
67
67
raiseClientError.new("Expected 'uri' value to be a valid URI")unlessURI.parse(endpoint[:uri]).kind_of?(URI::Generic)
68
-
raiseClientError.new("Expected 'content-type' parameter to be either 'audio/116;rate=16000'or 'audio/116;rate=8000")unlessendpoint[:'content-type'] =='audio/116;rate=16000' || endpoint[:'content-type'] == 'audio/116;rate=8000'
68
+
raiseClientError.new("Expected 'content-type' parameter to be either 'audio/l16;rate=16000', 'audio/l16;rate=8000', or 'audio/l16;rate=24000'")unless['audio/l16;rate=16000','audio/l16;rate=8000','audio/l16;rate=24000'].include?(endpoint[:'content-type'])
69
69
when'sip'
70
70
raiseClientError.new("Expected 'uri' value to be a valid URI")unlessURI.parse(endpoint[:uri]).kind_of?(URI::Generic)ifendpoint[:uri]
71
71
raiseClientError.new("`uri` must not be combined with `user` and `domain`")ifendpoint[:uri] && (endpoint[:user] || endpoint[:domain])
assert_match"Expected 'content-type' parameter to be either 'audio/l16;rate=16000', 'audio/l16;rate=8000', or 'audio/l16;rate=24000'",exception.message
assert_match"NCCO action must be one of the valid options. Please refer to https://developer.nexmo.com/voice/voice-api/ncco-reference#ncco-actions for a complete list.",exception.message
0 commit comments