Ask HN: What is the best VoIP library/service to add calls to an app? - jackdorsey
======
a2tech
With the tiny amount of details provided, we can't even begin to offer
suggestions.

When it comes to VoIP stuff though I always lean towards Twilio-but once
again, it entirely depends on what you want to do.

~~~
bootcat
[https://www.twilio.com/](https://www.twilio.com/)

------
king7532
WebRTC. Specifically Google's libWebRTC for Android/iOS mobile platforms [1].
All the major web browsers (including Safari 11+) support WebRTC. For the
server, I am interested in trying Jangouts (Janus Hangouts) [2].

    
    
      [1] https://webrtc.org/native-code/
      [2] https://github.com/jangouts/jangouts
    

Update: Forget to add the reference.

~~~
mmontagna9
Interesting, looks like a fair number of apps use webrtc directly.

[https://mightysignal.com/top-android-
sdks?tag=47](https://mightysignal.com/top-android-sdks?tag=47)
[https://mightysignal.com/top-ios-sdks?tag=47](https://mightysignal.com/top-
ios-sdks?tag=47)

------
zackify
Funny seeing this on HN the day I start building a PBX system that supports
SIP and WebRTC in node. There's really nothing open source out there, that
isn't 10 years old and horrible. Hopefully I can knock down some marketshare
that the enterprise solutions have by making it super easy to build your own
servers for this.

~~~
mc_
Just curious how you evaluated projects like FreeSWITCH and Kamailio and what
you found lacking/horrible? We have been building on them for 8+ years now
with no major issues. We've found both communities and core teams to be
helpful and responsive with bug reports, feature requests, and pull requests.

~~~
zackify
For me, I want something that immediately works with local phones and local
calling, built in admin panel that shows active calls, transfer calls, build
out prompts for conferencing, 1st class iOS / Android support. Web app
integration to accept calls there. Database driven. I know these things are
possible but it's a ton of work and messing with configs and lacking
documentation. My goal is to make express.js but for voip. code it however you
want, offer a preset with admin panel, mobile apps, and default middleware for
conferencing, whispering, etc. Keeping all setup as code.

~~~
mc_
Understood. I don't want to deter you; I will instead suggest taking a little
more time to learn about telecom, SIP, and running telecom infrastructure.
Just glancing at your repo, I see you are trying to send/receive the SIP
yourself, which is ambitious. SIP interop probably accounts for a larger-than-
it-should-be percentage of support issues; non-negligible amounts of time are
spent arguing with other carriers and phone manufacturers about
interpretations of the SIP RFCs.

Spend some time trawling the various soft-switch mailing lists. Join the
VoiceOps mailing list and trawl through there. Read the SIP RFCs and curse
their use of MAY and MIGHT and SHOULD! :)

There's a lot of wisdom baked into the projects about how to handle phone
calls; I don't know that there's money to be made redoing their work to be
honest. Scratch the itch for sure! But be honest in your expectations - you're
probably looking at years before your project becomes viable (unless there's a
JS/Node SIP stack out there you could plug into already?) in a commercial
sense.

Best of luck!

~~~
zackify
Thanks for all the tips! Yes I have been reading through the SIP RFC’s haha.
Making this for the company I work at so I have a small amount of phones. I
may publish a list of the ones the library will support. But I figure, if it
gets big enough, other people can help fix the issues between phones.
Everything just feels so old school and a pain to configure. It’s worth
trying, who knows if I’ll get it to a working state. But I truly think it’ll
be way better than anything out there!

------
mc_
2600Hz has an API-driven platform, Kazoo[0], built on FreeSWITCH and Kamailio.
You can use the APIs to start calls, modify in-progress calls, and more.
Multiple commercial offerings[1] depending on your needs are provided by
2600Hz as well.

Source: work there building Kazoo

[0] [https://github.com/2600hz/kazoo](https://github.com/2600hz/kazoo)

[1] [https://www.2600hz.com](https://www.2600hz.com)

------
otto_ortega
I have a related question. We are developing a "contact center" SaaS web
application with the following functionalities:

\- Launch a call programmatically (from an extension to a phone number) while
setting a custom caller ID.

\- Check extension status: idle / calling to {phone number} + call duration

\- Read call history log for the day (talking time, calls made)

\- Record a call

\- Monitoring functions over calls: listen/whisper/barge

We are able to provide all of those already, but using FreePBX + a SIP trunk
provider.

The problem is, our approach seems difficult to scale, as we will have to
develop the VoIP infrastructure to support new users, and we don't want to go
that route, as we want to focus on the software.

We would rather outsource that part to some VoIP provider with an API that
enables those functionalities, however some well-known services (like 8x8.com)
don't provide all those functionalities and some others that do provide them
(like RingCentral) turn out to be too expensive, pretty much double our
current cost.

Any suggestion?

~~~
mc_
Hi Otto,

I'll try to list the reference docs that probably address your points:

\- If you plan to have devices/users in Kazoo, you can use the quickcall
functionality[0] to connect them to a phone number. Includes setting custom
caller ID. Some folks build queues using conferences and you can dial out[1]
from them as well

\- With the channels[2] API you can query active channels per
account/user/device.

\- With the CDRs[3] API you can fetch CDRs over a range of time

\- You can setup call recordings automatically for devices/users/accounts (see
[4] for example). You can also enable them on-demand in the callflow (JSON
tree that determines how to process a call).

\- Depends on whether you bridge two callers together or put them in a
conference how you implement these features but definitely do-able.

From what you've described, your use case fits in our sweet spot of providing
the infrastructure for you to build on. You get the scaling of your app for
free by using Kazoo, in that Kazoo presents one logical soft-switch while
taking care of the bookkeeping of which media server calls and conferences
actually exist on. You can setup Kazoo yourself to play with it (currently
recommendation is to use CentOS[5] but Debian is coming), knowing that we have
professional services and SaaS/PaaS/Iaas offerings to get you going faster as
well.

Hope that helps!

[0]
[https://docs.2600hz.com/dev/applications/crossbar/doc/quickc...](https://docs.2600hz.com/dev/applications/crossbar/doc/quickcall/)

[1]
[https://docs.2600hz.com/dev/applications/crossbar/doc/confer...](https://docs.2600hz.com/dev/applications/crossbar/doc/conference/#dialing-
an-endpoint)

[2]
[https://docs.2600hz.com/dev/applications/crossbar/doc/channe...](https://docs.2600hz.com/dev/applications/crossbar/doc/channels/)

[3]
[https://docs.2600hz.com/dev/applications/crossbar/doc/cdrs/](https://docs.2600hz.com/dev/applications/crossbar/doc/cdrs/)

[4]
[https://docs.2600hz.com/dev/applications/crossbar/doc/device...](https://docs.2600hz.com/dev/applications/crossbar/doc/devices/#call_recording)

[5]
[https://docs.2600hz.com/sysadmin/doc/install/install_via_cen...](https://docs.2600hz.com/sysadmin/doc/install/install_via_centos7/)

~~~
otto_ortega
Thanks for such a detailed answer, I will be checking 2600hz for sure, the
only downside I see so far is that we will still need to use a SIP Trunk
provider to connect to the telephonic network and register DIDs.

But it seems like a good option for sure, thank you for taking the time to
point me to the specific parts of documentation related to the functionality
we need to implement.

I will be checking the viability of using this service and contacting sales
for a demo if it seems like a good fit.

~~~
mc_
Well, it depends. You can signup for the hosted platform and use our provided
carriers (transparent to you), purchase numbers via API, manage their
lifecycle, assign them to sub-accounts, etc. So if you want a proof of
concept, that is definitely the fastest way to get up and running.

If/when you go full throttle and need more power, we offer custom boards that
will run the infrastructure for you versus the hosted offering which you share
with other tenants. And if you have your own hardware, we can install/maintain
the software in your datacenters (and transitioning off hosted to one of these
is done with 0 down time and transparent to your users).

And of course you can build it all yourself from the RPMs.

One thing to note is that a properly configured Kazoo cluster is redundant
across data-centers so outages in one geographical area won't impact customers
in other areas, and customers pinned to the down data center will fail over to
the next closest during the outage.

Anyway, things to consider as you plan what your infrastructure will need to
handle. These are mostly independent of Kazoo and things you'll want to think
about regardless of the solution/provider you move forward with!

~~~
otto_ortega
Purchasing numbers via API it is something that would be very useful for us.
And if you can provide us with carriers too that will be awesome (if the price
is reasonable)

sales@2600hz.com is the best way to reach you or someone in there to discuss
pricing and some other details?

~~~
mc_
Sales will get you all the info you need and can setup further calls with
engineering/operations/whomever as necessary to get you going.

------
fenesiistvan
It depends on the app (web? desktop? framework?). For web I can recommend the
mizu webphone: [https://www.mizu-
voip.com/Software/WebPhone.aspx](https://www.mizu-
voip.com/Software/WebPhone.aspx)

------
jaboutboul
Are you planning on running your own service or are you looking for a
SaaS/PaaS solution?

------
asidiali
Kazoo / 2600HZ - open source voip platform, cloud
PBX...[https://www.2600hz.org/](https://www.2600hz.org/)

------
the_common_man
Maybe jitsi?

------
rtx
We have been using Plivo for sometime, good features. However they can improve
on their support and documentation.

~~~
otto_ortega
Do you know if Plivo supports all the features listed on my comment?:

[https://news.ycombinator.com/item?id=15690623](https://news.ycombinator.com/item?id=15690623)

------
vxxzy
Check out Tropo or use Asterisk AMI

