|
14 | 14 | ComponentOptionsHLS, |
15 | 15 | ComponentOptionsHLSSubscribeMode, |
16 | 16 | ComponentOptionsRTSP, |
| 17 | + ComponentOptionsSIP, |
17 | 18 | ComponentPropertiesFile, |
18 | 19 | ComponentPropertiesHLS, |
19 | 20 | ComponentPropertiesHLSSubscribeMode, |
20 | 21 | ComponentPropertiesRTSP, |
21 | | - ComponentRTSP, |
22 | | - ComponentOptionsSIP, |
23 | 22 | ComponentPropertiesSIP, |
| 23 | + ComponentRTSP, |
24 | 24 | ComponentSIP, |
25 | 25 | Credentials, |
26 | 26 | Peer, |
|
66 | 66 | pierce_nat=True, |
67 | 67 | ) |
68 | 68 |
|
69 | | -SIP_PHONE_NUMBER="1234" |
70 | | - |
71 | | -SIP_CREDENTIALS=Credentials(address="my-sip-registrar.net",username="user-name",password="pass-word") |
| 69 | +SIP_PHONE_NUMBER = "1234" |
72 | 70 |
|
73 | | -SIP_OPTIONS = ComponentOptionsSIP( |
74 | | - registrar_credentials=SIP_CREDENTIALS |
75 | | -) |
76 | | -SIP_PROPERTIES = ComponentPropertiesSIP( |
77 | | - registrar_credentials=SIP_CREDENTIALS |
| 71 | +SIP_CREDENTIALS = Credentials( |
| 72 | + address="my-sip-registrar.net", username="user-name", password="pass-word" |
78 | 73 | ) |
79 | 74 |
|
| 75 | +SIP_OPTIONS = ComponentOptionsSIP(registrar_credentials=SIP_CREDENTIALS) |
| 76 | +SIP_PROPERTIES = ComponentPropertiesSIP(registrar_credentials=SIP_CREDENTIALS) |
| 77 | + |
80 | 78 | FILE_OPTIONS = ComponentOptionsFile(file_path="video.h264") |
81 | 79 | FILE_PROPERTIES = ComponentPropertiesFile( |
82 | 80 | file_path=FILE_OPTIONS.file_path, framerate=30 |
@@ -314,19 +312,19 @@ def test_invalid_subscription_in_auto_mode(self, room_api: RoomApi): |
314 | 312 | == "HLS component option `subscribe_mode` is set to :auto" |
315 | 313 | ) |
316 | 314 |
|
| 315 | + |
317 | 316 | class TestSIPCall: |
318 | 317 | def test_happy_path(self, room_api: RoomApi): |
319 | 318 | _, room = room_api.create_room(video_codec=CODEC_H264) |
320 | 319 | component = room_api.add_component( |
321 | 320 | room.id, |
322 | | - options=ComponentOptionsSIP( |
323 | | - registrar_credentials=SIP_CREDENTIALS |
324 | | - ), |
| 321 | + options=ComponentOptionsSIP(registrar_credentials=SIP_CREDENTIALS), |
325 | 322 | ) |
326 | 323 | assert room_api.sip_dial(room.id, component.id, SIP_PHONE_NUMBER) is None |
327 | 324 |
|
328 | 325 | assert room_api.sip_end_call(room.id, component.id) is None |
329 | 326 |
|
| 327 | + |
330 | 328 | class TestAddPeer: |
331 | 329 | def _assert_peer_created(self, room_api, webrtc_peer, room_id): |
332 | 330 | peer = Peer( |
|
0 commit comments