# Integrate JsSip with react native webrtc

**URL:** <https://react-native-webrtc.discourse.group/t/integrate-jssip-with-react-native-webrtc/284>\
**Category:** Uncategorized\
**Created:** [October 1, 2019, 11:50am UTC](https://react-native-webrtc.discourse.group/t/integrate-jssip-with-react-native-webrtc/284 "2019-10-01T11:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishna](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@krishna](https://react-native-webrtc.discourse.group/u/krishna)\
**Post date:** [October 1, 2019, 11:50am UTC](https://react-native-webrtc.discourse.group/t/integrate-jssip-with-react-native-webrtc/284/1 "2019-10-01T11:50:39Z")

</div>

We are using JsSIP to integrate Turbobridge conferencing in our react native application. The desktop (browser) version is working correctly. But the iOS app using react native webrtc is not getting any streams. Below code snippet is for react native

```
connectWS = () => {

```

const connectParams = this.\_connectParams;  
this.setSipURIs(this.\_connectParams.toSipURI, this.\_connectParams.fromSipURI);  
var configuration = {  
uri: this.fromURI,  
register: false,  
};

configuration.sockets = [new JsSIP.WebSocketInterface(connectParams.wsSipURI)];  
this.ua = new JsSIP.UA(configuration);  
this.ua  
.on(‘connected’, () =\> {  
this.\_call = () =\> {  
const eventHandlers = {

```
                    peerconnection: e => {
          this._peerConnection = e.peerconnection;
          e.peerconnection.onaddstream = e => { // not getting streams here 
               this._ontrack(e);

                this._setState(STATE.CONNECTED);
           };

            if (this._hasTransceivers && !this._sendingAudio) {
               e.peerconnection.addTransceiver('audio');
           }
       }
              }
           }
 })      
 .start();

```

};

Any suggestion/insights would be helpful.

Thanks,

---

<div class="post-metadata">

**Author:** ![krishna](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@krishna](https://react-native-webrtc.discourse.group/u/krishna)\
**Post date:** [October 3, 2019, 1:30pm UTC](https://react-native-webrtc.discourse.group/t/integrate-jssip-with-react-native-webrtc/284/2 "2019-10-03T13:30:34Z")

</div>

Got following response from JsSip thread [https://groups.google.com/forum/#!topic/jssip/QUrmdYqimmg](https://groups.google.com/forum/#!topic/jssip/QUrmdYqimmg)

JsSIP does not listen for “addtrack” or “addstream” in the peerconnection. Instead JsSIP exposes the peerconnection to the app (via rtcSession.connection) and it’s up to the app whether it wishes to listen for “addtrack” or “addstream” events into it. Said that, if react-native-webrtc does not emit “addtrack” there is nothing JsSIP can do about it. So please, check whether react-native-webrtc emits or not “addstream” and/or “addtrack”.
