onsip / SIP.js

A simple, intuitive, and powerful JavaScript signaling library
https://sipjs.com
MIT License
1.9k stars 702 forks source link

this.options.uri.clone is not a function in new API #720

Closed ksitko closed 5 years ago

ksitko commented 5 years ago

Describe the bug I am trying to use the new API in SIP.js 0.15.3 and am unable to get a URI.

Logs Following the docs when I try to use the method userAgent.makeTargetURI("someuser@somesubdomain.onsip.com") results in the following error: this.options.uri.clone is not a function. (in 'this.options.uri.clone()', 'this.options.uri.clone' is undefined)

And attempting to simply give a URI in the form of a string directly will result in the following error: ruri.clone is not a function. (In 'ruri.clone()','ruri.clone' is undefined) I have used the exact string before with the previous API so I know it is valid.

To Reproduce (if possible) Follow the docs on new API in react native.

Expected behavior String to be parsed into a valid URI.

Environment Information

  React Native Environment Info:
    System:
      OS: macOS 10.14.4
      CPU: (4) x64 Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
      Memory: 205.08 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.1.0 - /usr/local/bin/node
      npm: 6.10.2 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    IDEs:
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.3 => 16.8.6 
      react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-svg: 9.5.3
egreenmachine commented 5 years ago

How are you constructing your user agent?

ksitko commented 5 years ago

My function for constructing my user agent:

  initializeUA = () => {
    const { uri, server, username, password } = this.state;
    const userAgentOptions: UserAgentOptions = {
      uri: uri,
      transportOptions: {
        wsServers: [server]
      },
      authorizationUsername: username,
      authorizationPassword: password,
      sessionDescriptionHandlerFactory:
        SessionDescriptionHandler.defaultFactory,
      autoStop: false
    };
    this.userAgent = new UserAgent(userAgentOptions);
    this.userAgent.delegate = {
      onInvite: invitation => {
        console.log("INVITE received");
        this.setState({ ringing: true });
        // Tell callkit that we a call is incoming
        RNCallKeep.displayIncomingCall(this.getCurrentCallId(), "TestID");
        this.currentSession = invitation;
      },
      onMessage: message => {
        console.log("MESSAGE received");
        message.accept();
      },
      onNotify: notification => {
        console.log("NOTIFY received");
        notification.accept();
      },
      onRefer: referral => {
        console.log("REFER received");
        referral.accept();
      }
    };
    // console.log(this.userAgent);
    this.userAgent.start();
    this.initializeCallKeep();
    console.log("UA Setup Done");
  };

Which results in the follow console output:

Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | configuration parameters after validation:
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · allowLegacyNotifications: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · allowOutOfDialogRefers: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · authorizationPassword: NOT SHOWN
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · authorizationUsername: "k"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · autoStart: true
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · autoStop: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · delegate: {}
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · displayName: ""
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · forceRport: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · hackAllowUnregisteredOptionTags: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · hackIpInContact: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · hackViaTcp: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · hackWssInTransport: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · logBuiltinEnabled: true
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · logLevel: "log"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · logConnector: undefined
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · noAnswerTimeout: 60
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · sessionDescriptionHandlerFactory: function (session, options) {
      var logger = session.ua.getLogger("sip.invitecontext.sessionDescriptionHandler", session.id);
      var observer = new SessionDescriptionHandlerObserver_1.SessionDescriptionHandlerObserver(session, options);
      return new SessionDescriptionHandler(logger, observer, options);
    }
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {}
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · sipExtension100rel: "Unsupported"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · sipExtensionReplaces: "Unsupported"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · sipExtensionExtraSupported: []
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · sipjsId: "ev9ob"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · transportConstructor: Transport
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · transportOptions: {"wsServers":["wss://edge.sip.onsip.com"]}
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · uri: wss://edge.sip.onsip.com
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · usePreloadedRoute: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · userAgentString: "SIP.js/0.15.0"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | · viaHost: "201im7fk584n.invalid"
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | configuration parameters after validation:
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · wsServers: [{"wsUri":"wss://edge.sip.onsip.com","sipUri":"<sip:edge.sip.onsip.com;transport=ws;lr>","weight":0,"isError":false,"scheme":"WSS"}]
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · connectionTimeout: 5
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · maxReconnectionAttempts: 3
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · reconnectionTimeout: 4
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · keepAliveInterval: 0
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · keepAliveDebounce: 10
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | · traceSip: false
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | user requested startup...
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | connecting to WebSocket wss://edge.sip.onsip.com
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | user requested startup...
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.UserAgent | UA is in STARTING status, not opening new connection
CallKeep Start
CallKeep Complete
UA Setup Done
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | Attempting to transition status from 0 to 1
Mon Jul 29 2019 14:43:25 GMT-0400 (EDT) | sip.transport | WebSocket wss://edge.sip.onsip.com connected
Running application on iPhone X.
egreenmachine commented 5 years ago

Your uri is set incorrectly. It should not be wss://edge.sip.onsip.com but be whatever the uri of your user agent.

ksitko commented 5 years ago

You're right, the URI was set incorrectly. I have fixed the URI and I still get the same error. Logging in to my onsip admin panel it says that my user is registered.

Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | configuration parameters after validation:
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · allowLegacyNotifications: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · allowOutOfDialogRefers: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · authorizationPassword: NOT SHOWN
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · authorizationUsername: "k"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · autoStart: true
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · autoStop: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · delegate: {}
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · displayName: ""
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · forceRport: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · hackAllowUnregisteredOptionTags: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · hackIpInContact: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · hackViaTcp: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · hackWssInTransport: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · logBuiltinEnabled: true
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · logLevel: "log"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · logConnector: undefined
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · noAnswerTimeout: 60
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · sessionDescriptionHandlerFactory: function (session, options) {
      var logger = session.ua.getLogger("sip.invitecontext.sessionDescriptionHandler", session.id);
      var observer = new SessionDescriptionHandlerObserver_1.SessionDescriptionHandlerObserver(session, options);
      return new SessionDescriptionHandler(logger, observer, options);
    }
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {}
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · sipExtension100rel: "Unsupported"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · sipExtensionReplaces: "Unsupported"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · sipExtensionExtraSupported: []
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · sipjsId: "ksfek"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · transportConstructor: Transport
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · transportOptions: {"wsServers":["wss://edge.sip.onsip.com"]}
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · uri: k@alzai.onsip.com
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · usePreloadedRoute: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · userAgentString: "SIP.js/0.15.0"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | · viaHost: "kl7k1gm1tk3p.invalid"
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | configuration parameters after validation:
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · wsServers: [{"wsUri":"wss://edge.sip.onsip.com","sipUri":"<sip:edge.sip.onsip.com;transport=ws;lr>","weight":0,"isError":false,"scheme":"WSS"}]
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · connectionTimeout: 5
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · maxReconnectionAttempts: 3
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · reconnectionTimeout: 4
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · keepAliveInterval: 0
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · keepAliveDebounce: 10
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | · traceSip: false
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | user requested startup...
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | connecting to WebSocket wss://edge.sip.onsip.com
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | user requested startup...
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.UserAgent | UA is in STARTING status, not opening new connection
CallKeep Start
CallKeep Complete
UA Setup Done
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | Attempting to transition status from 0 to 1
Mon Jul 29 2019 15:21:03 GMT-0400 (EDT) | sip.transport | WebSocket wss://edge.sip.onsip.com connected

egreenmachine commented 5 years ago

Are you setting the uri as a string or a URI object? it is required to be a URI object.

ksitko commented 5 years ago

The User Agent URI is set as a string as I did so with the previous version of the API. How would I create an appropriate URI object for a new UserAgent?

ksitko commented 5 years ago

Okay, I was able to get the URI object by importing it: import { URI } from "sip.js/lib/core"; and setting my uri to new URI("sip", "myuser", "mysubdomain.onsip.com")

Thank you for all of your help.

egreenmachine commented 5 years ago

^^ Not recommended. Calling new URI(...) is the approach we would like people to take.

seanbright commented 5 years ago

new URI(…) as in the one that @ksitko used? There is no less verbose way?

ksitko commented 5 years ago

@seanbright I used new URI(...). While a string worked for me previously in the old API I wasn't able to get past the this.options.uri.clone error without using the new URI. Now when I create an new Inviter and call .invite() on it I am getting:

Mon Jul 29 2019 15:53:35 GMT-0400 (EDT) | sip.inviter | Inviter.invite
Mon Jul 29 2019 15:53:35 GMT-0400 (EDT) | sip.inviter | Session 7i3k9bkb7mi19jj5v5qj6bu0bs5s5f transitioned to state Establishing

Unfortunately however now I am getting a undefined is not an object (evaluating 'session.ua.getLogger' error. This is because the React Native SessionDescriptionHandler is not compatible with the new API.

egreenmachine commented 5 years ago

Yes the one @ksitko used. At the moment there is no less verbose way. SIP.Grammar.parse is something we do not wish to expose with the new API. The reason we are forcing this is so that it is guaranteed to work with the rest of our API. If you pass us a string, there is no guarantee that it is a valid URI, but by explicitly creating the URI object it will error out if you do not create it correctly.

We are currently discussing how we can make this process better. We understand that the URI documentation is buried in the core of the library at the moment and it is not well documented in our new guides. It is also not needed once you create the UA as there is a member function makeTargetURI. We are currently discussing adding a static function on the user agent to make a URI from a string. No promises yet.

egreenmachine commented 5 years ago

In terms of the ReactSDH, that is a community submission. If it is not working I can take a look when I get some free time or maybe someone from the community can get it worked out with the new API.

seanbright commented 5 years ago

If you pass us a string, there is no guarantee that it is a valid URI, but by explicitly creating the URI object it will error out if you do not create it correctly.

Well you could call Grammar.URIParse(…) on it to find out... 😄 I understand the desire to keep the API simple, so... 👍

ksitko commented 5 years ago

Well, ReactSDH is unfortunately not working at moment with the new API. If you could take a look that would be greatly appreciated!

egreenmachine commented 5 years ago

I pushed 36fa941f24f1adce3f55de3c66da2a79900a63ad which should resolve your issue with the React SDH

ksitko commented 5 years ago

That's great! I made my own fixed based on 8da96b61ad3d446c85054392bf48c86bd48d0178, but unlike 36fa941f24f1adce3f55de3c66da2a79900a63ad I also modified SessionDescriptionHandlerObserver as per that commit. Was that unnecessary? I'll try to test further but calling a currently unregistered user yeilds the following:

Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.inviter | Inviter.invite
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | SessionDescriptionHandlerOptions: {}
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | initPeerConnection
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | New peer connection created
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | acquiring local media
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | acquired local media streams
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | createOffer
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | resetIceGatheringComplete
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | Setting local sdp.
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | sdp is v=0
o=- 4355985546274710588 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS 7D5C1267-1F7A-497C-8910-AA6C7DAB96EF
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:g5yc
a=ice-pwd:rsUeBBU2sFztFWcVAvvLTqq1
a=ice-options:trickle renomination
a=fingerprint:sha-256 D1:0E:9C:D5:62:F1:66:95:28:43:D3:5A:76:A6:9A:E6:62:0B:8E:2A:73:9E:7F:8C:03:68:52:95:75:DC:5A:46
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:844775759 cname:YXplF/aMM37hqyky
a=ssrc:844775759 msid:7D5C1267-1F7A-497C-8910-AA6C7DAB96EF 79AEDBDD-BA0F-441B-B258-1C2CE5735CED
a=ssrc:844775759 mslabel:7D5C1267-1F7A-497C-8910-AA6C7DAB96EF
a=ssrc:844775759 label:79AEDBDD-BA0F-441B-B258-1C2CE5735CED
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 123 125 122 124
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:g5yc
a=ice-pwd:rsUeBBU2sFztFWcVAvvLTqq1
a=ice-options:trickle renomination
a=fingerprint:sha-256 D1:0E:9C:D5:62:F1:66:95:28:43:D3:5A:76:A6:9A:E6:62:0B:8E:2A:73:9E:7F:8C:03:68:52:95:75:DC:5A:46
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 H264/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 H264/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP8/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 VP9/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=127
a=rtpmap:125 red/90000
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=125
a=rtpmap:124 ulpfec/90000

Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | waitForIceGatheringComplete
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | ICE is not complete. Returning promise
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | RTCIceGatheringState changed: gathering
Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | ICE candidate received: candidate:1019731727 1 udp 2122260223 192.168.1.104 63984 typ host generation 0 ufrag g5yc network-id 1 network-cost 10
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | ICE candidate received: candidate:3180321211 1 udp 1686052607 73.160.218.187 63984 typ srflx raddr 192.168.1.104 rport 63984 generation 0 ufrag g5yc network-id 1 network-cost 10
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | ICE candidate received: candidate:1917068287 1 tcp 1518280447 192.168.1.104 56879 typ host tcptype passive generation 0 ufrag g5yc network-id 1 network-cost 10
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | ICE candidate gathering complete
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | RTCIceGatheringState changed: complete
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.inviter | Session omhl68ike6ct6c4mpaf17qn2e9sbvo transitioned to state Establishing
Successfully sent INVITE
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.inviter | Inviter.onTrying
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.inviter | Inviter.onReject
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.inviter | Session omhl68ike6ct6c4mpaf17qn2e9sbvo transitioned to state Terminated
Ended
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.inviter | closing INVITE session omhl68ike6ct6c4mpaf17qn2e9sbvo
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | closing PeerConnection
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | resetIceGatheringComplete
Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | ICE Connection State changed to iceConnectionClosed

I'm going to test further, but just a heads up I also got these messages in the console:

Mon Jul 29 2019 16:48:59 GMT-0400 (EDT) | sip.sessionDescriptionHandler | Using onaddstream which is deprecated
- node_modules/expo/build/environment/muteWarnings.fx.js:18:23 in warn
- node_modules/sip.js/lib/core/log/logger-factory.js:91:29 in print
- node_modules/sip.js/lib/core/log/logger-factory.js:69:27 in genericLog
- node_modules/sip.js/lib/core/log/logger.js:19:31 in genericLog
- node_modules/sip.js/lib/core/log/logger.js:15:65 in warn
- node_modules/sip.js/lib/React/SessionDescriptionHandler.js:410:29 in initPeerConnection
- node_modules/sip.js/lib/React/SessionDescriptionHandler.js:50:33 in SessionDescriptionHandler
- node_modules/sip.js/lib/React/SessionDescriptionHandler.js:63:45 in defaultFactory
- node_modules/sip.js/lib/api/session.js:787:50 in setupSessionDescriptionHandler
- node_modules/sip.js/lib/api/session.js:725:18 in getOffer
- node_modules/sip.js/lib/api/inviter.js:297:29 in invite
* src/classes/RNvoipSingleton.tsx:184:4 in makeCall
* src/screens/HomeScreen.tsx:141:20 in calldevice
* src/components/CallButton.tsx:38:3 in handleClick
* src/components/CallButton.tsx:62:24 in onPress
- node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js:235:45 in touchableHandlePress
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:878:34 in _performSideEffectsForTransition
- ... 21 more stack frames from framework internals

Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | Using getRemoteStreams which is deprecated
- node_modules/expo/build/environment/muteWarnings.fx.js:18:23 in warn
- ... 24 more stack frames from framework internals

Mon Jul 29 2019 16:49:00 GMT-0400 (EDT) | sip.sessionDescriptionHandler | Using getLocalStreams which is deprecated
- node_modules/expo/build/environment/muteWarnings.fx.js:18:23 in warn
- ... 24 more stack frames from framework internals
thanossOp commented 6 months ago

when i import this its giving me error like this import {URI} from "sip.js/lib/core"

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'E:\callUser\nodeSip\sipCaller\node_modules\sip.js\lib\core' is not supported resolving ES modules imported from E:\callUser\nodeSip\sipCaller\sender.js