Fund raising for SIP client app

@giorgio09 The repository for the Video app is named spreed, which is quite confusing. The old Spreed.me app is located elsewhere and I didn’t link it here.

For the Video app there is an issue talking about creating a SIP bridge that I linked above. The same applies for the chat integration.

@giorgio09 @alfred Spree.me is a more robust app but it’s not really stable.
On one server it works great on anothers it doesn’t and it’s limited, OTOH Jitsi is AFAIK the most robust SIP/WebRTC server(ice) on FLOSS available.

So I find the Nextcloud integration with Jitsi a really neat plan, if anything it’s worth it.
Cheers!

1 Like

@Ark74 Everyone is pointing to Jitsi, digging into Jitsi’s history we find that it was built having in mind poor internet communication yet with high quality of voice and video.
Well all that is very nice however there is no SIP client built into it nor user control panel.
Or at least I could not find any of them,
Communication is of an essence, sooner or later the SIP will be mandatory and would be integrated into Nextcloud. Until then each one has to figure out a solution that suit him.

At least I tried and invested lots of time into testing, while others were waiting for the solution to grab.

Well I believe is about putting our money where our mouth is. The rest is mostly silly talk.

I thought this kind of initiatives where suppose to appear on bountysource.com/teams/nextcloud

So if its set up I’ll contribute.
Cheers

@Ark74 the link you provided I never heard of.
Someone suggested http://uib.de/en/opsi-cofunding/cofunding/ similarly never visited.
Anyway I was still testing the people reaction before I approach fund raising which I never experienced and do not know how it works. Maybe we can start there and see.
By the way the link you provided is not working, it is having a certificate issue.

Jajaja
The cert expired just a couple of hours ago :rofl: any how.
Well let’s see.

Update! the module is 90% completed however the developer do not wish to make it GPL

If it is a Nextcloud app there is no way around it - actually AGPLv3 … looking forward to the app!

Well, MPL 2.0 and Apache License 2.0 would also work…

Or anything more libre (MIT/BSD). But actually if it is only used in an private intranet, you can keep it closed source I guess.

However as the person paying for it, I would INSIST on it being GPL. Nextcloud is updated regularly, and has quite a reputation for braking the apps API often, thus if the app isn’t open-source the developer can easily hold you ransom for even minimal adaptations to allow updating to Nextcloud 13/14 etc.
If it is open-source and on github on the other hand, it is likely that someone will do a pull-request for small changes if the app is popular and used by others as well.

Did anything ever come of this? Is there away to conference SIP into NextTalk?

Did you find anybody that could potentially develop this type of tool?

I am also very interested in the integration of a SIP client in nextcloud.
I am also willing to contribute financially.
I am no dev, so have no clue how to implement this programatically, but I am reasonably certain, that someone who has some experience with chat/coms this should not be overly difficult.
I am particularly interested in the connectivey with someone like SIPGate.
The idea would to have an app that would allow one to add the SIP accounts in his/her user profile, ideally with an integration in Talk.
And finally, to bring it to perfection: have a local Nextcloud Talk clinet for Windows though one could then also make phone calls, a sort of Teams for Nextcloud, only in “good” (SCNR).

You can check this SIP client for Nextcloud: SIP Trip Phone.

It connects to an Asterisk server to make and receive phone calls using SIP over WebSocket. You can install Asterisk on your VPS, alongside Nextcloud, then connect Asterisk to a SIP provider like Telnyx or Localphone, so that you can use a real phone number located in a country of your choice, acquired from the SIP provider, to make and receive phone calls to/from any phone number in the world.

It has complete documentation on how to configure it, as well as on how to install Asterisk, which can be used to implement advanced PBX features, such as: voice menu, voicemail, queue management, music on hold, number blacklisting, call recording, audio conference calls, etc.

If you want to send/receive SMS messages and faxes in Nextcloud, please check SMS Relentless and Pax Fax respectively.

If in addition to audio phone calls you need video calls, video conferences and text chat, you can use Roundpin, but this is a standalone application, independent from Nextcloud.

Feedback is welcome.

1 Like

I had a look at SIP Trip phone.
but it requires an additional system (asterisk).
While I am familiar with asterisk, it adds an additional point of failure to the envrionment.
Ideally I am looking for something that can connect directly to a SIP server.
A brief history:
In Germany for instance, there is is virtually no more POTS. The very vast majority of all telephone connections are SIP. The (in comparison a bit pricier) broadband router “Fritzbox” from avm holds (as far as I am aware) around 60-70% Market share due to the fact that it also is a small PABX allowing DECT phones, IP-phones, POTS, ISDN (the newer ones don’t, as ISDN is being phased out gradually).
A “propper” SIP client would also allow users to connect to their normal telephone provider, but use someone like SIPgate. Adding another system in the loop, could actually degrade the signal-quality through the added latency.
It depends a little on the implementation, I know, but in the grand scheme of things it causes an issue.
So having a “pure” SIP client (in my mind) would be the way to go.

1 Like

@ZimboKraut I understand what you mean. You would prefer a SIP client that connects directly to the SIP provider, because you suspect that adding Asterisk in this setup, can degrade the sound quality or create other issues. Indeed, the SIP client can be developed in such a way that it connects directly to the SIP services provider, but this will take a large portion of control away from the user. As I mentioned above, if you connect the SIP client to Asterisk, then connect Asterisk to the SIP provider, you can implement everything you will ever need in Asterisk, on your own server: all the advanced PBX features like call recording, voice menu (IVR), queue management, music on hold, number blacklisting, audio conferences, etc., as well as complex dial plans (which are all presented in detail in our documentation). They are all totally controlled by you. You can configure everything exactly the way you want. You have maximum control and maximum flexibility. On the other hand, if you take Asterisk out of this setup and you try to implement all these features directly in your online account offered by your SIP provider, you will meet countless problems and limitations like the number of simultaneously connected SIP clients, the duration of call recordings, the number of concurrent voice conferences, the absence of special PBX features, etc. Storing call recordings on your own VPS is also more privacy friendly than using your SIP provider’s call recording feature and having call recordings stored on their server.

Also, due to Asterisk’s capabilities, the latency and sound quality problems that you suggest are non-existent. Asterisk is written in C, which is not a coincidence. The C programming language is the closest to the machine that a language can be (apart from assembly language). The code is also well written and Asterisk is the most popular free and open source PBX for good reasons. Its efficiency and stability are a proved fact. Real life use has proved that the setup proposed in SIP Trip Phone’s documentation is efficient and Asterisk doesn’t decrease the sound quality at all and it doesn’t add latency. I had a 40 minutes call from Europe to USA yesterday with this setup and the sound was cristal clear, with no perceived latency.

Introducing an additional application in a setup is indeed to be avoided when that application doesn’t bring any substantial benefits and/or affects the functionality of the whole system. However, in this case Asterisk adds countless features to the setup, many of which are indispensable in real life business situations, and it doesn’t decrease the sound quality.

If you think, even if you connect a SIP client directly to the SIP provider, the call data still passes through multiple servers: the servers of the SIP provider and the servers of downstream carriers. Therefore, adding another server (Asterisk) in the mix, should not influence the sound quality if that server is well configured.

Hi there,
in many ways, I do agree with you and I am (reasonably) familiar with Asterisk.
I have used it in the past and think, that asterisk is a great PABX.
The “problem” that I have with adding astersik into the equasion, is the added complexety, particularly when one hosts nextcloud for several individuals.
While I see nextcloud as perfect for the enterprise, I also see it brilliant for the individual.
I run several nextcloud setups, two of them for some smallish businesses with around 25 employees, but I also run a couple of shared instances, where each instance is shared between several indivduals (freelancers, contractors, etc.) they don’t need or even want fancy features.Wwhat they want, is to be able to connect to their SIP provider, that has everything they want.
Asterisk is great for the enterprise and many really cool features, but for a one man show completely OTT.
And many of those people already have a SIP number, that they would like to integrate into “their” cloud.
So yes, I can understand the advantages, but the added complexity for individuals can also cause some challenges.
Don’t get me wrong, I am all for features and gimicks, and I enjoy playing around, but there is also a need for a certain simplicety.
All the best

@ZimboKraut

Hi,

I just tested connecting SIP Trip Phone directly to the SIP provider and it works. So, you can skip installing Asterisk, and connect SIP Trip Phone directly to your SIP provider. I tested with Telnyx, but it should work with other SIP providers that allow direct connections from WebRTC applications. I describe below how to connect SIP Trip Phone directly to a Telnyx account.

First I want to point out that I don’t have any affiliation with any of the SIP providers that I mention. I just searched a lot to find the SIP provider offering the services with the best quality at the lowest prices possible. I found that Telnyx and Localphone are the best for voice SIP services. For example, if you connect a browser phone like SIP Trip Phone directly to Telnyx, you can make and receive phone calls in the US with $0.0020 per minute. And it’s about the same price in all other countries.

How to connect SIP Trip Phone to a Telnyx account directly, without the use of Asterisk

1. Configure your Telnyx account.

After you sign up for a Telnyx account click on the ‘My Account’ icon in the upper right corner of the screen, then click on ‘My Account’, click the ‘Verifications’ tab and take the steps to undergo verification, so that you become ‘Level 1’ and ‘Level 2’ verified. ‘Level 1’ verification usually requires verifying the email address you used to create your Telnyx account, by clicking a link included in a message sent to that email address. ‘Level 2’ verification can be requested by pressing the ‘Verify’ button in the ‘Level 2 Verification’ section (on the ‘Verifications’ tab). After you make your request for ‘Level 2’ verification, a representative from Telnyx will look at your account details and (s)he may send you an email asking about the way you plan to use your Telnyx account, after which (s)he will approve the ‘Level 2’ verification. Being ‘Level 1’ and ‘Level 2’ verified unlocks all the features of a Telnyx account: you can buy numbers, assign a connection/messaging profile to a number, set up global messaging capabilities, create a multi-user organization, make international calls, set up call forwarding, send SMS messages at a higher rate.

While logged in to your Telnyx account, click on Numbers on the left panel. To buy a real phone number located in a country of your choice click on the ‘Search & Buy Numbers’ tab, then under ‘Local Numbers’, in the ‘Search Type’ select ‘Region’, in the ‘Region’ text field enter the name of the country, in the ‘Number Features’ select ‘Voice’, then, if you want your number to have other capabilities select other features such as ‘SMS’ from the drop-down list, then click on the ‘Search Numbers’ button. You will see a list with all the numbers available in the selected region. Choose the number that you like, click ‘Add to Cart’, then click on ‘Cart’ on the upper bar, then click on the ‘Place Order’ button.

After you have bought a local phone number click on ‘Numbers’ on the left panel; on the ‘My Numbers’ tab you will see your number in the list of acquired phone numbers.

Then click on SIP connections on the left panel, click on the ‘Add SIP Connection’ button, in the ‘Name’ field enter the name of the new SIP connection, for example SIP_Trip_Phone, then click on ‘Create SIP Connection’. After you create the new connection click on the small pencil icon to open the options window. On the options window, on the ‘BASIC’ tab, under ‘SIP Connection Type’ choose ‘Credentials’, then in the ‘Username’ field enter a username for this connection, siptripphoneuser for example, in the ‘Password’ field enter a strong password; write down the username and password to use them later. Next, under ‘AnchorSite’ choose a town that is closer to the physical location of your server, then, under ‘Expert Settings’, in the ‘Port’ drop-down list choose ‘rtcp-mux’. Next, click on the ‘INBOUND’ tab and in the ‘Number Format (DNIS)’ drop-down list choose ‘SIP Username’. (The last 2 settings are extremely important. If you connect SIP Trip Phone to Telnyx via Asterisk, the last 2 settings will be different, namely ‘Port’: ‘rtp+1’ and ‘Number Format (DNIS)’: ‘E.164’) Leave all the other settings as they are and click on the ‘Save All Changes’ button.

To be able to make phone calls you will also need to configure an Outbound Voice Profile. On the left panel click on ‘Outbound Voice Profile’, then click on the ‘Add New Profile’ button. In the ‘Name’ field enter a name for the profile, 1_outbound for example, then click ‘Create’. In the new window, under ‘Associated Connections and Applications’ click ‘Add connections/apps to profile’, select the name of the SIP connection created earlier, SIP_Trip_Phone in this example, by checking its checkbox, then click ‘Add Connections/Apps to profile’. Next, under ‘Traffic Type’ choose ‘Conversational’, then under ‘International Allowed Destinations’ select the countries and regions to which outbound calls will be allowed, by clicking their name. You can select all the 253 countries and regions, to allow outbound calls to all of them. Click on ‘Save’ to save the changes.

Next, create a Billing Group. Click on the ‘My Account’ icon in the upper right corner of the screen, then click on the ‘Billing Groups’ tab. In the ‘Create Billing Group’ field enter a name, Default_Billing for example, then click on ‘Create’. Then add the billing group to your phone number: click on ‘Numbers’ on the left panel, then on your number’s row, in the ‘Billing Group’ field select the billing group that you have just created, Default_Billing in this example. Also, in the ‘Connection or App’ field on the same row, choose the connection created earlier, SIP_Trip_Phone in this example.

2. Configure SIP Trip Phone

After you install SIP Trip Pphone like any other Nextcloud app, click on the profile picture in the upper right corner, click on ‘Settings’, then on the left sidebar, under ‘Personal’, click ‘SIP Trip Phone’. The credentials that have to be entered should look like this:

sip_trip_phone_settings_directcon

In the Display Name field you should enter the phone number that you have just configured in your Telnyx account, preceded by the country calling code: 49 for Germany, 33 for France, 44 for UK, 1 for USA, etc. So, if the number is 1212121212 and is located in Germany, the ‘Display Name’ shoiuld be 491212121212.

In the SIP User field enter the username for the SIP connection that you associated with your phone number in your Telnyx account, siptripphoneuserin this example. In the SIP User Password field enter the password for siptripphoneuser.

In the WSS URL field enter wss://sip.telnyx.com:7443

In the SIP Realm field enter sip.telnyx.com

In the STUN Server domain or IPv4 address, and port number field enter stun.telnyx.com:3478

Click ‘Save’ to save these settings.

3. Configure the web server

If you use Nginx (which I recommend), in the server blocks configuration file, /etc/nginx/sites-enabled/0-conf (replace 0-conf with the name of your file), add the following lines inside the server block for cloud.example.com, the subdomain that you use to serve Nextcloud, at the end of the block:

    location /apps/sip_trip_phone/phone {
        try_files $uri /index.html;
    }

    location /apps/sip_trip_phone/lib {

        # prevents 502 bad gateway error
        proxy_buffers 8 32k;
        proxy_buffer_size 64k;

        proxy_pass http://sip.telnyx.com:7443;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # enables WS support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

It is assumed that you use a subdomain like cloud.example.com to serve Nextcloud, and not a subdirectory, like example.com/nextcloud/ and that Nextcloud is served over HTTPS.

Restart Nginx:

systemctl restart nginx

If you use Apache (which I don’t recommend), add the following lines in the configuration file for Nextcloud, /etc/apache2/sites-available/nextcloud.conf (replace nextcloud.conf with the name of your file), inside the <VirtualHost *:443> block, at the end:

        <Directory /var/www/cloud.example.com/apps/sip_trip_phone/phone/>
             DirectoryIndex index.html
        </Directory>

	    <Location /var/www/cloud.example.com/apps/sip_trip_phone/lib/>

             ProxyPass http://sip.telnyx.com:7443
             ProxyPassReverse http://sip.telnyx.com:7443
             Order allow,deny
             Allow from all

             RequestHeader  set X-Real-IP $remote_addr
             RequestHeader  set Host $http_host
             RequestHeader  set X-Forwarded-For $proxy_add_x_forwarded_for
             
             RequestHeader  set Upgrade $http_upgrade
             RequestHeader  set Connection "upgrade"

	     </Location>

Enable the necessary Apache modules:

a2enmod rewrite headers env dir mime setenvif ssl proxy proxy_fcgi

Restart Apache:

systemctl restart apache2

All the configurations from above can be adapted to other SIP providers like Vonage, Flowroute etc., if they provide on their website the list of settings needed by WebRTC clients to connect to them (like the websocket URL and port). Telnyx lists those settings at the bottom of this page.

As a side note, Localphone doesn’t seem to allow WebRTC phones like SIP Trip Phone to connect directly, they can only connect via Asterisk.

2 Likes