Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: include an RTSP stream #17

Open
pergolafabio opened this issue Dec 29, 2021 · 19 comments
Open

feature request: include an RTSP stream #17

pergolafabio opened this issue Dec 29, 2021 · 19 comments

Comments

@pergolafabio
Copy link

Hi, as in topic, is it possible to insert a manual rtsp stream? usefull for intercoms that are not able to send video in SIP
or we can inject an camera feed from another camera

thnx in advance

@mixaz
Copy link

mixaz commented Nov 30, 2022

Hi @pergolafabio , I'm going to work on this feature since we also need RTSP camera support.

I think of adding new device type "Audio SIP + RTSP camera" with camera's IP address. Will it do?

@pergolafabio
Copy link
Author

That would be indeed awesome, for now I used my own compiled version with an rtsp player...

But would be great if it's going to be official...

Also , a nice feature is to have it as early media BUT also in call session itself, usefully for sip door intercoms without a camera...

When are you going to start on this one, happy to test

@mixaz
Copy link

mixaz commented Nov 30, 2022

I used my own compiled version with an rtsp player

I will also use a RTSP player, as I do not know how to route RTSP stream into SIP early media.

Can you share your code, it it available on github?

@pergolafabio
Copy link
Author

Hi, no didnt share, it was a quick and dirty setup, i just changed the surface view with a player... didnt touch the device settings lie you want todo... is for personal use

i used this player : https://github.com/alexeyvasilyev/rtsp-client-android , allthough its not the best one, but was verry easy to implement... just changed the view...
That player can only play h264 , and had some parse issues with some rtsp url's

have a look at this one, they used linphone as a source
Added the option to have RTSP as early media only (not while in call) and some nice options to add extra cameras in the app too

https://play.google.com/store/apps/details?id=com.basip.app&hl=nl&gl=US

@mixaz
Copy link

mixaz commented Nov 30, 2022

OK, I see, thanks for the links. I'm going to use libVLC for RTSP playback, ie https://lindevs.com/display-rtsp-stream-from-ip-camera-using-libvlc-on-android

Since we already use libphone native libs, adding libvlc shouldn't do much harm )

@pergolafabio
Copy link
Author

cool, nice to hear
are you going to make support for RTSP stream also for early media AND in call ?
let me know if you want me todo some testing

@pergolafabio
Copy link
Author

Hey @mixaz , is there already some progress??

@mixaz
Copy link

mixaz commented Dec 13, 2022

Unfortunately not, current status is - I built linhome app from source code OK, but it has problems:

  1. When accepting incoming call, voice is not heard in linhome app, with a headset. Switching to speakerphone somehow works, but also seems not quite OK. When testing original linhome app from GP, it does work OK, no such issues.
  2. The call is dropped after 30-32 seconds, being marked as "not answered" in call history (while I accepted it, and some sort of communication occurred (see above). Dropping the call manually in linhome app marks it as "answered".

Since the app from GP works OK, I checked its linphone core version - it's 4.5.0 against 5.2.1-pre.4 in https://gitlab.linphone.org/BC/public/linhome-android. I tried to downgrade source code to last commit with 4.5.0 https://gitlab.linphone.org/BC/public/linhome-android/-/commit/1d5c3fcb2aabb3ae0d64a4350cae646bf72bda84 but got Kotlin code being not compiled. I haven't sorted it out, and I think the matter is different.

Googling for "linphone drops call after 30 seconds" brought few topics like BelledonneCommunications/linphone-android#1395, saying that the issue relates to "push notifications" settings in the app. This setting is not available in linhome app, so I can't test.

I'm testing my own build of linhome app, signed with a debug key, on sip.linphone.org server. I think that it can cause firebase push notifications not being sent from flexisip to andriod app. My signing key is not registered with firebase app https://gitlab.linphone.org/BC/public/linhome-android/-/blob/master/app/google-services.json. So I either need to deploy my own firebase+flexysip instances for my key, changing the package name, or sign with original linhome key. I see https://gitlab.linphone.org/BC/public/linhome-android/-/blob/master/linhome.keystore which probably has that key, but it needs a password. And source code mentions other keystore file https://gitlab.linphone.org/BC/public/linhome-android/-/blob/master/keystore.properties#L4

My current plan is to check the issue with linphone app, as it has better support and guides. I'm going to build linphone from sources.

What is your setup, you said you use a custom linhome app - did you setup firebase+flexisip instances for it?

@pergolafabio
Copy link
Author

Hi, i always tested with Asterisk, and most of the times call drops after 30 sec, means no audio/video for me in two way, was just a misconfiguration in Asterisk or ports setup...
Linhome does support Push, when you is their supplied json file, you need to use indeed their flexisip sip.linhome.org, then push works.... there is no background mode

I created my own json file , and compiled linhome with it.... From Asterisk, before i do the call, i do a curl command to wake up linhome with my own firebase, works great

Dont you have an Asterisk?

@cdeschambc
Copy link
Contributor

Hello,
Yes 30 seconds is typical symptom of no audio/video stream after the call is established at SIP level.
Regarding push notification on 3rd party SIP servers, Linhome supports "dependent" SIP server concept (also called dependent SIP proxy config).
When configuring a SIP account (other than Linhome) in Linhome the app automatically creates (via API) a Linhome account and stores its details onto the APP. Then when registering to your own SIP server the app will set the Linhome SIP account as contact for the registrar, this way incoming SIP requests to your device would resolve the contact address to the Linhome account which will wake the app up by a push notification and have it SIP register to your device and retrieve the INVITE.
Christophe

@mixaz
Copy link

mixaz commented Dec 13, 2022

I've built linphone from source, and it works OK, without those issues. Linphone SDK 5.2.1-pre.5.

@cdeschambc, can you suggest what to do further to resolve the issue - shall I compare logs between working linhome app from GP and not working one built from sources? Or should I provide it to you? I'm not familiar with SIP protocol.

From that linphone app doesn't have the issues, and you say linhome one sends linhome account to sip.linphone.org as "dependent" sip proxy config - may the issue be caused by not working sip.linhome.org, as I reported in #28 ? I tested it with linhome app in GP, it fails to connect to the SIP server either.

And I can't explain why linhome GP app works OK with "use your SIP account". Could you please check that you don't have the "drop call after 30 seconds" issue with debug version of linhome built from source code in gitlab? I mean the case when the app is signed by other key, not yours.

@yossigrosskopf
Copy link

Keeping my eye out on this one, Would love to know if there is any development progress

@pergolafabio
Copy link
Author

Hey @mixaz , have you an update for us?

@mixaz
Copy link

mixaz commented Jan 20, 2023

Sorry, I didn't work on it much. The issue with call dropping after 30 seconds is more critical IMO, and should be addressed first. Now I'm working on other project, and most likely I won't work on this one.

@pergolafabio
Copy link
Author

Oh, that's really to bad, how can we help with those 30 sec? Really love to see rtsp preview in Linhome, it's specially for door intercoms, imo rtsp is a musthave for doorbells without camera

@pergolafabio
Copy link
Author

pergolafabio commented May 12, 2023

Hey @mixaz , still working on this?

@cdeschambc , I see you are very busy on 1.2 release? When can we expect the final release? :-)

@mixaz
Copy link

mixaz commented May 15, 2023

@pergolafabio I'm sorry, I'm busy on other projects (

@pergolafabio
Copy link
Author

Oh that's too bad :-(

Was hoping to see RTSP supports, would be a great advantage for intercom purposes

Thnx for feedback

@adzmailru
Copy link

Hi, great Guru! Do u have any news of RTSP supports?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants