-
Notifications
You must be signed in to change notification settings - Fork 748
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
Discussion: Making jsSIP work with React Native #526
Comments
Any updates around this? I need to use react-native-webrtc with SIP, and I can't use this library or SIP.js, as they both default to the browser's API |
Hi guys, any news? |
My branch isn't anywhere near ready to merge into jssip - and there are changes coming in react-native-webrtc which should make things work smoother by itself so for now, just use my branch which is in the original comment |
Didn't know about those news. Which changes do you mean? May be make it WebRTC 1.0 API compatible instead of using the API of 2013? |
Not perfect but better APIs, promise based, etc etc - https://github.com/oney/react-native-webrtc/pull/527 |
If anyone still interest with this. Based on the discussion here: https://github.com/oney/react-native-webrtc/issues/242 Hope it helps. |
Super thanks, @namnm |
@krishnapsarthi May be you need to add WebRTC to the global window object as following: import {
mediaDevices,
MediaStream,
MediaStreamTrack,
RTCIceCandidate,
RTCPeerConnection,
RTCSessionDescription,
} from 'react-native-webrtc';
window.RTCPeerConnection = window.RTCPeerConnection || RTCPeerConnection;
window.RTCIceCandidate = window.RTCIceCandidate || RTCIceCandidate;
window.RTCSessionDescription =
window.RTCSessionDescription || RTCSessionDescription;
window.MediaStream = window.MediaStream || MediaStream;
window.MediaStreamTrack = window.MediaStreamTrack || MediaStreamTrack;
window.navigator.mediaDevices = window.navigator.mediaDevices || mediaDevices;
window.navigator.getUserMedia =
window.navigator.getUserMedia || mediaDevices.getUserMedia; Try to put it where before any other import. |
@namnm,, I have tried that and that issue is gone, |
You should update it to the latest, If you need that specific version then you should see the API of that version to see what are exported. |
@namnm , I have tried with updating In new version promise never get resolved and i didn't received any response in Thanks |
Hello, Currently this https://github.com/versatica/JsSIP/compare/master...nimbleape:react-native?expand=1 @danjenkins with |
Ah you're using my fork! I really need to sit down with the jssip team to
see how we can shove these changes back in. The bigger issues include
dealing with answer Vs pranswer. Maybe this is a non issue if you're
running rn-webrtc 1.75 (master)
…On Fri, 30 Aug 2019, 15:45 Lev Melnikov, ***@***.***> wrote:
Hello,
how can I contribute to add support for jssip in react-native?
Currently this
https://github.com/versatica/JsSIP/compare/master...nimbleape:react-native?expand=1
<http://url> with
react-natve : 0.59.4 react : 16.8.3 react-native-webrtc : 1.69.2
works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#526?email_source=notifications&email_token=AAB3LLIYGGTD7PUY22ARRILQHEQA5A5CNFSM4FO7ZU62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5RWIGI#issuecomment-526607385>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB3LLLAABMEPSIFQOC6NUTQHEQA5ANCNFSM4FO7ZU6Q>
.
|
hey guys, i'm trying to find a simple example of this implementation with this fork created by @danjenkins. Does anyone have a demo ? |
hello guys, i'm also trying to learn about jssip for my project if anyone can give simple example that would be a great help. |
No example app I'm afraid :) Theres so much to consider when building a webrtc softphone using react native now that a "simple" example just doesn't exist. Just know that if you write javascript that would work with jssip in the browser, use my temporary fork and it should work fine |
We do have a fully open source webrtc soft phone here using jssip: https://github.com/brekekesoftware/brekekephone |
thanks for this... ill try this. |
Jssip is catching an error in your code - debug your code amthat happens as
a result of newRTCSession
…On Tue, 5 May 2020, 22:34 ZeboBravo, ***@***.***> wrote:
``Hi guys you know about this issue? I tried to running the call function
and it give me this error. My code works in the web but in react native app
gives me this.
Wed May 06 2020 03:26:59.125] LOG JsSIP:UA call() +0ms
[Wed May 06 2020 03:26:59.129] LOG JsSIP:RTCSession new +0ms
[Wed May 06 2020 03:26:59.131] LOG JsSIP:RTCSession connect() +9ms
[Wed May 06 2020 03:26:59.141] LOG JsSIP:RTCSession emit "peerconnection"
+11ms
[Wed May 06 2020 03:26:59.161] LOG JsSIP:RTCSession newRTCSession() +2ms
[Wed May 06 2020 03:26:59.178] WARN JsSIP:ERROR:RTCSession
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:154938:43
***@***.*** code]
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:154937:39
tryCallOne@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:28858:16
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:28959:27
_callTimer@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32398:17
_callImmediatesPass@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32434:19
callImmediates@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:32652:33
***@***.*** code] callImmediates@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2717:35
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2503:34
guard@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2700:15
flushedQueue@
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2502:21
***@***.*** code]
***@***.*** code] +0ms
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#526 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB3LLOAGF65T6BDF5FL5H3RQCA7FANCNFSM4FO7ZU6Q>
.
|
Any news around this? I think there will be more need for compatibility with react native. |
It's working very well with react-native now. We only need to add documentation about how to use it: polyfill from react-native-webrtc, some tweaks... |
I'd disagree, as soon as you add in support for hold etc there are changes needed - I still have my fork for a reason. |
Hi, for the detail we are currently using jssip version 3.2.15 For the hold you mentioned, come to think of it, I think we are currently using only INVITE and some other protocols to initialize the call. We are using another custom web socket connection to implement some features. |
@namnm What version should be used for react native right now then? |
@Farhadkm I think you should try with the latest first. |
sendDTMF not work in mobile. |
RFC2833 isnt implemented into r-n-webrtc (theres a pull request open but it doesnt follow the spec - I wrote it... I just havent found the time to alter it to make it follow the spec) |
Thanks you, I have another question. |
Hi Tuannvitt, |
In case someone still want to use it with react-native, here is my fork from JsSIP 3.7.4. It's working great with react-native-webrtc 1.89.1 without sendDTMF. |
Hi guys, i am using https://github.com/versatica/JsSIP/compare/master...nimbleape:react-native?expand=1 fork in my react-native app, everything is working fine except for hold, it causes the RTC session to end with cause "webRTC Error". has someone encountered the same issue? |
strange - i use this fork (im the maintainer) in a lot of projects and dont have issues.... if youve got a actual log message saying what the error is I'd be interested in looking at it |
Thanks a lot @danjenkin, this problem happens when using react-native-webrtc 1.89.3 with the branch react-native-webrtc-89.3 in your fork (https://github.com/nimbleape/JsSIP/tree/react-native-webrtc-89.3), when i tried your branch (https://github.com/versatica/JsSIP/compare/master...nimbleape:react-native?expand=1) with react-native-webrtc 1.75.1, it's working fine. |
@yunusaydinonline @bolambaoZebo Hi, I'm having the same issue in my react native project. Have you fixed it?
|
Hi @danjenkins, do you have a link to the fork to allow RFC2833 DTMF in react-native app? |
Hey @danjenkins, i can't see any logs from your's fork https://github.com/nimbleape/JsSIP/tree/react-native should I do something to enable them? After changing all debug commands to console.log on the reworked version of the library, all logs appear. In the plain new react native app, react-native-debug shows all logs properly. |
Hey @danjenkins , may I know branch of yours has a working sendDTMF functionality? I'm using this as webRTC: https://github.com/nimbleape/react-native-webrtc/tree/94.1-plus-dtmf-plus-field-trial , But I'm getting an error:
That error shows when I use the RFC2833 transportType option on sendDTMF(). or your webRTC fork is only working on callKit keypad UI only? |
Sorry @jikseyres16 - I missed this! I should have deleted the |
Thanks @danjenkins , yeah hope the new rn-webrtc we can use latest JsSip builds. does |
@jikseyres16 yes it does but you have to use the extra method in the jssip fork for sending "webrtc" DTMF. I can't remember what the method is named though :) |
Hey @danjenkins & @jikseyres16. Sorry to bother you. I tried your jssip fork react-native-rn-100 with your webrtc fork https://github.com/nimbleape/react-native-webrtc/tree/1.100.0-plus-dtmf-plus-field-trial, but I don't see any extra method in jssip for sending "webrtc" DTMF - I only find sendDTMF method. I'm trying to make RFC2833 DTMF. Could you perhaps point me in the right direction? :) |
Ah yes so in the webrtc lib you link to... it is indeed sendDtmf (because the webrtc lib has no concept of sending dtmf any other way) In jssip you can send dtmf the "sip" way or "the webrtc way" - so you can do.... |
Thanks alot @danjenkins. it makes sense & it worked :) |
hi, guys. I have a trouble with streams in react native jssip. When I make an outgoing call, I get an error and the call is dropped |
Hiii guys any update? |
where to put it any idea? |
Hello everyone!, I would like to know what things or tasks are needed for the pull request to be accepted and added to the JsSip project? I want to contribute to the code or in the necessary tests. Regards, |
@maynor96 Honestly no idea any more.... in theory RN-WebRTC follows the standards much better now so I'd suggest just giving it a go and seeing what happens. I still have clients using my fork or a version of that fork in their own repos.... so maybe its still required... I haven't done a jssip based softphone on React Native for a little while now. |
Thank you very much for your response! The work you have done on your fork is really good; thank you so much for that great contribution! I am going to attempt to set up a simple project for testing. It would be fantastic if the main JsSip team could give their approval to the pull request! Regards! |
A pull request might not even be needed now. Give it a go and see what
happens without the fork
…On Mon, 4 Mar 2024 at 19:26, Maynor Peralta ***@***.***> wrote:
Thank you very much for your response! The work you have done on your fork
is really good; thank you so much for that great contribution!
I am going to attempt to set up a simple project for testing.
It would be fantastic if the main JsSip team could give their approval to
the pull request!
Regards!
—
Reply to this email directly, view it on GitHub
<#526 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB3LLIQPPTSC2A4BONJR5TYWTDFLAVCNFSM4FO7ZU62U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJXG4ZTAMJWGU3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
you mean jsSIP natively supports react native? |
Hello @Habtamu-Asefa , I've already started the project and I'm using JsSIP in React Native without any issues (you need to install and configure react-native-webrtc). Of course, depending on the scope and features of the application, you may encounter challenges to overcome. Additionally, the team behind react-native-webrtc developed react-native-callkeep, which provides additional call-related features (CallKit for iOS and Andriod's ConnectionService). Best Regards, |
Hello @maynor96 , thanks to this thread I did make the outbound calls work with react-native-webrtc, jssip and react-native-callkeep using expo sdk 50 and working well in development build on both android and iOS. But when i build the app and push to TestFlight, the useragent is not even registering not sure what went wrong. The useragent does connect but does not register. Did you face this issue? Kinda stuck in this last step :( |
I've been building a couple of "native" apps with jssip using React Native and React Native WebRTC.
I've pushed all the changes required to make jssip work within that environment.
https://github.com/versatica/JsSIP/compare/master...nimbleape:react-native?expand=1
This isn't PR quality at all. And I definitely don't want to run a fork forever. So I'd love to get these changes put into core jssip. I think its mostly do-able with some basic if statements, taking debug require into a new file, and have that decide what to bring in etc.
Wanted to raise the issue - see if this is something JsSIP core contributors would want added etc.
The text was updated successfully, but these errors were encountered: