Code Monkey home page Code Monkey logo

Comments (8)

davehorton avatar davehorton commented on September 16, 2024

I will look into it. So basically the scenario is two endpoints each register over wss (or ws) and then one calls the other?

from drachtio-srf.

andrewvmail avatar andrewvmail commented on September 16, 2024

Correct,

There is a demo phone from sipjs that you can use https://sipjs.com/demo-phone/ quirks with that is you need a webcam attached or you get some webrtc stream error on chrome console (on the mac)

I use your drachtio-registrar and use the latest tag docker image for the server part.

from drachtio-srf.

andrewvmail avatar andrewvmail commented on September 16, 2024

Found more stuff might be useful or interesting

If you register one UA and you call your self it works.

Alink to the websocket sip spec https://tools.ietf.org/id/draft-ietf-sipcore-sip-websocket-01.html#implementation_guidelines_client that might explain browser vendors implementation for the weird looking uri on the webrtc stack

from drachtio-srf.

davehorton avatar davehorton commented on September 16, 2024

Hmm, I am testing on my own server and using https://github.com/davehorton/simple-drachtio-registrar and I am able to connect, register, and then place a call between the two.

Can you verify my results so I can understand the difference between our setups? You can use wss://tighthead.drachtio.org:4433 as the server, and these two sets of credentials:

name: John Doe
...redacted..

name: Jane Doe
...redacted

from drachtio-srf.

andrewvmail avatar andrewvmail commented on September 16, 2024

👍 Yeah I can confirm your server is working!!

from drachtio-srf.

andrewvmail avatar andrewvmail commented on September 16, 2024

Hi Dave I got it!! I got a fix. Its a race. I just need to give some time for drachtio server to process things. Just to give you some context of what I'm doing. Its a mobile to mobile app.

  • UA1 calling UA2
  • UA1 sends an invite to drachtio/node then i simulate a pause of execution using setTimeout and an eventEmitter
  • drachtio/node then sends a voip push through apn/gcm to UA2
  • voip push wakes up UA2 device and do register
  • that register emits a signal that resumes UA1 invite execution

I just put a 500ms delay just before emitting the signal that un pauses the execution. And its working now 👍

What do you think of this 500ms delay? Is there a better approach to this?

Thanks!

from drachtio-srf.

davehorton avatar davehorton commented on September 16, 2024

Ah, ok this makes sense then. I think your solution sounds fine.

I do know of another customer that has taken a slightly different approach. When the INVITE from UA1 comes in, they park the call (on a freeswitch server, in their case) and send a push notification to UA2, which responds by sending an INVITE to the server which connects to and unparks the first call. (The push notification includes a parking slot id that is used in the INVITE to identify the parked call to connect to). Its obviously a bit more complicated but eliminates any race condition and is a bit more snappy in terms of connecting the call.

from drachtio-srf.

andrewvmail avatar andrewvmail commented on September 16, 2024

Hmm this is interesting. Will keep this in mind. Haven't completely build what I have in mind yet but curious later to compare numbers on snappiness 😄 Also I'll be using coturn instead of freeswitch for media.

Closing this issue

Thanks again!

from drachtio-srf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.