flutter-webrtc / dart-sip-ua

A dart-lang version of the SIP UA stack.
MIT License
339 stars 270 forks source link

question on transport state #410

Closed eschmidbauer closed 1 year ago

eschmidbauer commented 1 year ago

I'm working on an voip app for calling. For technical reasons, I want to only open the websocket transport right before a call is going to be made. I do not need the transport open at all times. This seems difficult because when you call start(), it only waits for the transport to initialize before returning to the called code. The end result is, I run start() and call() , and the call fails because call() happens before transport is in "connected" state. I have event handlers to detect the transport but I cannot initialize a call from there. I'm wondering if anyone else has had this issue and if there is another solution. I wonder if the start() function could include a flag to wait for the transport to be in connected state. image

eschmidbauer commented 1 year ago

i ended up figuring this out by using emit state