Skip to content

Commit

Permalink
connectToSip user nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Feb 28, 2025
1 parent 5d67dee commit fda81ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/com/vonage/client/kt/Voice.kt
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ fun connectToSip(uri: String, customHeaders: Map<String, Any>? = null, userToUse
*
* @since 1.1.4
*/
fun connectToSip(domain: String, user: String,
fun connectToSip(domain: String, user: String?,
customHeaders: Map<String, Any>? = null, userToUserHeader: String? = null,
properties: ConnectAction.Builder.() -> Unit = {}) : ConnectAction =
connectToSip(customHeaders, userToUserHeader, properties) { domain(domain).user(user) }
Expand Down
5 changes: 5 additions & 0 deletions src/test/kotlin/com/vonage/client/kt/VoiceTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,11 @@ class VoiceTest : AbstractTest() {
connectToSip(sipUri)
)

testSingleNccoConnect(
mapOf("domain" to sipDomainName),
connectToSip(sipDomainName, user = null)
)

testSingleNccoConnect(
mapOf("domain" to sipDomainName, "user" to userName),
connectToSip(sipDomainName, userName)
Expand Down

0 comments on commit fda81ec

Please sign in to comment.