@@ -63,10 +63,61 @@ Feature: conversation-1/create
6363 | room | 3 | 1 | 1 | GREATER_THAN_ZERO |
6464
6565 Scenario : Enable SIP during creation
66- Given the following "spreed" app config is set
66+ Given group "group1" exists
67+ And user "participant1" is member of group "group1"
68+ And the following "spreed" app config is set
69+ | sip_bridge_dialin_info | +49 -1234 -567890 |
70+ | sip_bridge_shared_secret | 1234567890abcdef |
71+ | sip_bridge_groups | ["group1 "] |
72+ Given user "participant1" creates room "room" (v4)
73+ | roomType | 3 |
74+ | roomName | room |
75+ | sipEnabled | 1 |
76+ Then user "participant1" is participant of the following rooms (v4)
77+ | id | type | participantType | sipEnabled |
78+ | room | 3 | 1 | 1 |
79+
80+ Scenario : Enable SIP during creation without being allowed to enable SIP
81+ Given group "group1" exists
82+ And the following "spreed" app config is set
83+ | sip_bridge_dialin_info | +49 -1234 -567890 |
84+ | sip_bridge_shared_secret | 1234567890abcdef |
85+ | sip_bridge_groups | ["group1 "] |
86+ When user "participant1" creates room "room" with 403 (v4)
87+ | roomType | 3 |
88+ | roomName | room |
89+ | sipEnabled | 1 |
90+ And user "participant1" creates room "room" with 403 (v4)
91+ | roomType | 3 |
92+ | roomName | room |
93+ | sipEnabled | 2 |
94+ Then user "participant1" is participant of the following rooms (v4)
95+
96+ Scenario : Send the default SIP state during creation without being allowed to enable SIP
97+ Given group "group1" exists
98+ And the following "spreed" app config is set
6799 | sip_bridge_dialin_info | +49 -1234 -567890 |
68100 | sip_bridge_shared_secret | 1234567890abcdef |
69101 | sip_bridge_groups | ["group1 "] |
102+ | default_sip_enabled | 1 |
103+ # The default value is sent by clients without the user requesting SIP,
104+ # so it is disabled instead of failing the creation
105+ When user "participant1" creates room "room" (v4)
106+ | roomType | 3 |
107+ | roomName | room |
108+ | sipEnabled | 1 |
109+ And user "participant1" creates room "room2" with 403 (v4)
110+ | roomType | 3 |
111+ | roomName | room2 |
112+ | sipEnabled | 2 |
113+ Then user "participant1" is participant of the following rooms (v4)
114+ | id | type | participantType | sipEnabled |
115+ | room | 3 | 1 | 0 |
116+
117+ Scenario : Enable SIP during creation while not being restricted by groups
118+ Given the following "spreed" app config is set
119+ | sip_bridge_dialin_info | +49 -1234 -567890 |
120+ | sip_bridge_shared_secret | 1234567890abcdef |
70121 Given user "participant1" creates room "room" (v4)
71122 | roomType | 3 |
72123 | roomName | room |
0 commit comments