Error when use invite Method

1,594 views
Skip to first unread message

Thiago Oliveira

unread,
Sep 18, 2020, 3:13:30 PM9/18/20
to SIP.js
Hi,

I'm trying to use the SIP.js, but  when i try call, the phone ring, but when a answer i get a Error:

ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.SessionDescriptionHandler | SessionDescriptionHandler.setDescription failed - TypeError: pc.getSenders is not a function. (In 'pc.getSenders()', 'pc.getSenders' is undefined)  

This error is because I forget samething?

sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {"constraints":{"audio":true,"video":false}}
sip.UserAgent | · sipExtension100rel: "Unsupported"
sip.UserAgent | · sipExtensionReplaces: "Unsupported"
sip.UserAgent | · sipExtensionExtraSupported: []
sip.UserAgent | · sipjsId: "cle9j"
sip.UserAgent | · transportConstructor: Transport
sip.UserAgent | · transportOptions: {"server":"ws://192.168.3.198:8088/ws"}
sip.UserAgent | · uri: sip:9...@192.168.3.198
sip.UserAgent | · userAgentString: "SIP.js/0.17.1"
sip.UserAgent | · viaHost: "10.0.2.16"
sip.Registerer | Configuration:
sip.Registerer | · expires: 600
sip.Registerer | · extraContactHeaderParams: []
sip.Registerer | · extraHeaders: []
sip.Registerer | · logConfiguration: true
sip.Registerer | · instanceId: ""
sip.Registerer | · params: {}
sip.Registerer | · regId: 0
sip.Registerer | · registrar: sip:9...@192.168.3.198
sip.UserAgent | Starting sip:9...@192.168.3.198
sip.UserAgent | Transitioned from Stopped to Started
sip.Transport | Connecting ws://192.168.3.198:8088/ws
sip.Transport | Transitioned from Disconnected to Connecting
sip.Transport | WebSocket opened ws://192.168.3.198:8088/ws
sip.Transport | Transitioned from Connecting to Connected
[Fri Sep 18 2020 15:52:14.703]  LOG      Fri Sep 18 2020 18:52:13 GMT+0000 (GMT) | sip.UserAgent | · sessionDescriptionHandlerFactory: function (session, options) {
      if (mediaStreamFactory === undefined) {
        mediaStreamFactory = (0, _mediaStreamFactoryDefault.defaultMediaStreamFactory)();
      }

      var iceGatheringTimeout = (options === null || options === void 0 ? void 0 : options.iceGatheringTimeout) !== undefined ? options === null || options === void 0 ? void 0 : options.iceGatheringTimeout : 5000;
      var sessionDescriptionHandlerConfiguration = {
        iceGatheringTimeout: iceGatheringTimeout,
        peerConnectionConfiguration: (0, _extends2.default)((0, _extends2.default)({}, (0, _peerConnectionConfigurationDefault.defaultPeerConnectionConfiguration)()), options === null || options === void 0 ? void 0 : options.peerConnectionConfiguration)
      };
      var logger = session.userAgent.getLogger("sip.SessionDescriptionHandler");
      return new _sessionDescriptionHandler.SessionDescriptionHandler(logger, mediaStreamFactory, sessionDescriptionHandlerConfiguration);
    }
sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {"constraints":{"audio":true,"video":false}}
sip.UserAgent | · sipExtension100rel: "Unsupported"
sip.UserAgent | · sipExtensionReplaces: "Unsupported"
sip.UserAgent | · sipExtensionExtraSupported: []
sip.UserAgent | · sipjsId: "cle9j"
sip.UserAgent | · transportConstructor: Transport
sip.UserAgent | · transportOptions: {"server":"ws://192.168.3.198:8088/ws"}
sip.UserAgent | · uri: sip:9...@192.168.3.198
sip.UserAgent | · userAgentString: "SIP.js/0.17.1"
sip.UserAgent | · viaHost: "10.0.2.16"
sip.Registerer | Configuration:
sip.Registerer | · expires: 600
sip.Registerer | · extraContactHeaderParams: []
sip.Registerer | · extraHeaders: []
sip.Registerer | · logConfiguration: true
sip.Registerer | · instanceId: ""
sip.Registerer | · params: {}
sip.Registerer | · regId: 0
sip.Registerer | · registrar: sip:9...@192.168.3.198
sip.UserAgent | Starting sip:9...@192.168.3.198
sip.UserAgent | Transitioned from Stopped to Started
sip.Transport | Connecting ws://192.168.3.198:8088/ws
sip.Transport | Transitioned from Disconnected to Connecting
sip.Transport | WebSocket opened ws://192.168.3.198:8088/ws
sip.Transport | Transitioned from Connecting to Connected

sip.Registerer | Waiting toggled to true
sip.Transport | Sending WebSocket message:


SIP/2.0 200 OK
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK4428730;received=10.10.250.3;rport=54388
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=gl0af674a9
To: <sip:9...@192.168.3.198>;tag=as027d4139
Call-ID: cle9j4n85nctjj4immnl
CSeq: 2 INVITE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:902@*********:0;transport=ws>
Content-Type: application/sdp
Content-Length: 1300

v=0
o=root 1228591982 1228591982 IN IP4 ***********
s=Asterisk PBX 13.22.0
c=IN IP4 ***********
b=CT:384
t=0 0
m=audio 18726 RTP/SAVPF 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=ice-ufrag:7d71a9a97a29eb0e1a5a67f41349381e
a=ice-pwd:7676e1235306f22506463098626ab29f
a=candidate:Hc0a803c6 1 UDP 2130706431 192.168.3.198 18726 typ host
a=candidate:Hc0a803c6 2 UDP 2130706430 192.168.3.198 18727 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 51:37:6E:77:A6:87:E2:AA:53:CE:A1:79:53:E1:E6:E2:E9:80:E5:DF:6D:F6:67:E0:C3:20:37:D5:88:52:8F:5D
a=sendrecv
m=video 11916 RTP/SAVPF 104 100 99 103 34 31
a=ice-ufrag:2cd2ac5e5533dfb63f1f8e01431e52bf
a=ice-pwd:6818890659df955e1c09b5e663feb3d9
a=candidate:Hc0a803c6 1 UDP 2130706431 192.168.3.198 11916 typ host
a=candidate:Hc0a803c6 2 UDP 2130706430 192.168.3.198 11917 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 51:37:6E:77:A6:87:E2:AA:53:CE:A1:79:53:E1:E6:E2:E9:80:E5:DF:6D:F6:67:E0:C3:20:37:D5:88:52:8F:5D
a=rtpmap:104 MP4V-ES/90000
a=rtpmap:100 VP8/90000
a=rtcp-fb:* ccm fir
a=rtpmap:99 H264/90000
a=rtpmap:103 h263-1998/90000
a=rtpmap:34 H263/90000
a=rtpmap:31 H261/90000
a=sendrecv


[Fri Sep 18 2020 15:52:18.805]  LOG      Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.Inviter | Inviter.onAccept
[Fri Sep 18 2020 15:52:18.872]  ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.SessionDescriptionHandler | SessionDescriptionHandler.setDescription failed - TypeError: pc.getSenders is not a function. (In 'pc.getSenders()', 'pc.getSenders' is undefined)
[Fri Sep 18 2020 15:52:18.923]  ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.Inviter | Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...
[Fri Sep 18 2020 15:52:18.941]  ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.Inviter | pc.getSenders is not a function. (In 'pc.getSenders()', 'pc.getSenders' is undefined)
[Fri Sep 18 2020 15:52:18.993]  LOG      Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.invite-dialog | INVITE dialog cle9j4n85nctjj4immnlgl0af674a9as027d4139 sending ACK request
[Fri Sep 18 2020 15:52:18.995]  LOG      Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

Eric Green

unread,
Sep 28, 2020, 5:37:19 AM9/28/20
to SIP.js
It appears that the environment that you are running does not support WebRTC.

Thiago Oliveira

unread,
Sep 28, 2020, 10:34:08 AM9/28/20
to SIP.js
I'm using SIPJs with React Native, in the docs ask to install  react-native-webrtc and to use  registerGlobals()  before I call UserAgent to work with SIPJs API.
I did forget something? 

This my code for use UserAgent method.

const userAgentOptions: UserAgentOptions = {
        uri,
        authorizationUsername,
        authorizationPassword,
        displayName: authorizationUsername,
        viaHost: ipMobile?.toString(),
        sessionDescriptionHandlerFactoryOptions: {
          constraints: {
            audio: true,
            video: false
          }
        },
        sessionDescriptionHandlerFactory: defaultSessionDescriptionHandlerFactory(),
        // noAnswerTimeout:10000,
        transportOptions: {
          server: `ws://${server}:8088/ws`,
        },
      }; 

Eric Green

unread,
Sep 28, 2020, 1:22:51 PM9/28/20
to SIP.js
Hi. I've looked into this and we definitely broke react-native. React-native uses the WebRTC stream API that we removed in favor of the transceiver api. The react-native plugin does not yet support the transceiver api. We are looking into fixing this.

What you could do in the near term to get up and running quickly is to use the SDH from 0.16.1 - https://github.com/onsip/SIP.js/blob/0.16.1/src/platform/web/session-description-handler/session-description-handler.ts

Thiago Oliveira

unread,
Sep 28, 2020, 1:38:21 PM9/28/20
to SIP.js
OK, thanks for your help.

I will try that way.

Thiago Oliveira

unread,
Oct 1, 2020, 9:36:41 AM10/1/20
to SIP.js
hi,

After a change the version of my SIP.Js from 0.17.1  to 0.16.1

I didn't have this problem


[Fri Sep 18 2020 15:52:18.872]  ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.SessionDescriptionHandler | SessionDescriptionHandler.setDescription failed - TypeError: pc.getSenders is not a function. (In 'pc.getSenders()', 'pc.getSenders' is undefined)
[Fri Sep 18 2020 15:52:18.923]  ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.Inviter | Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...
[Fri Sep 18 2020 15:52:18.941]  ERROR    Fri Sep 18 2020 18:52:17 GMT+0000 (GMT) | sip.Inviter | pc.getSenders is not a function. (In 'pc.getSenders()', 'pc.getSenders' is undefined)

But another problem appeared to me 

[Thu Oct 01 2020 10:26:07.200]  LOG      Thu Oct 01 2020 13:26:05 GMT+0000 (GMT) | sip.Inviter | Inviter.onAccept
[Thu Oct 01 2020 10:26:07.170]  ERROR    Thu Oct 01 2020 13:26:05 GMT+0000 (GMT) | sip.SessionDescriptionHandler | setRemoteDescription failed.
[Thu Oct 01 2020 10:26:07.760]  ERROR    Thu Oct 01 2020 13:26:05 GMT+0000 (GMT) | sip.Inviter | Session.setAnswer: SDH setDescription rejected...
[Thu Oct 01 2020 10:26:07.980]  ERROR    Thu Oct 01 2020 13:26:05 GMT+0000 (GMT) | sip.Inviter | setRemoteDescription failed.
[Thu Oct 01 2020 10:26:07.132]  ERROR    Thu Oct 01 2020 13:26:05 GMT+0000 (GMT) | sip.Inviter | setRemoteDescription failed.

can it be a problem with response from asterisk?

Eric Green

unread,
Oct 1, 2020, 9:38:55 AM10/1/20
to SIP.js
My recommendation was to use the SDH from 0.16.1 in version 0.17. This can be passed in as a user agent option.

I cannot speak to the error shown above. More information is needed.

Thiago Oliveira

unread,
Oct 1, 2020, 1:27:14 PM10/1/20
to SIP.js
"Eric: My recommendation was to use the SDH from 0.16.1 in version 0.17. This can be passed in as a user agent option. "

ok, I thought was necessary downgrade SIP.Js version.

The code that I'm using is below.

My Code:

const userAgentOptions: UserAgentOptions = {
        uri,
        authorizationUsername,
        authorizationPassword,
        displayName: authorizationUsername,
        viaHost: ipMobile?.toString(),
        sessionDescriptionHandlerFactoryOptions: {
          constraints: {
            audio: true,
            video: false
          }
        },
        sessionDescriptionHandlerFactory: (session, option) => {
          const se = SessionDescriptionHandler.defaultFactory(session, option);
          return se;
        },
        // noAnswerTimeout:10000,
        transportOptions: {
          server: `ws://${server}:8088/ws`,
        },
      };


const registererOptions: RegistererOptions = { registrar: uri };
      const registerer = new Registerer(userAgent, registererOptions);


      userAgent.start().then(() => {
        
        if (userAgent.isConnected() == true) {

          registerer.register();

          const target = UserAgent.makeURI(`sip:${extendtarged}@${server}`);

          if (!target) {
            throw new Error("Failed to create target URI.");
          }

          const inviterOptions: InviterOptions = {
            params: {
              fromDisplayName: `${authorizationUsername}@${ipMobile}`,
              fromUri: `sip:${authorizationUsername}@${ipMobile}`,
            },
            sessionDescriptionHandlerOptions: {
              constraints: { 
                audio: true, video: false 
              }
            },
                    
          };

          const inviter = new Inviter(userAgent, target, inviterOptions);
          
          // An Inviter is a Session
          const outgoingSession: Session = inviter;

          outgoingSession.delegate = {
            // Handle incoming REFER request.
            onRefer(referral: Referral): void {
              // ...
            },
          };

          inviter.stateChange.addListener((newState) => {
            switch (newState) {
              case SessionState.Establishing:
                console.log('------------------------------------Establishing------------------------------------');
                console.log('------------------------------------inviter Get Description------------------------------------');
                console.log(inviter.sessionDescriptionHandler?.getDescription);
                console.log('------------------------------------inviter Get Description------------------------------------');
                break;
              case SessionState.Established:
                console.log('------------------------------------Established------------------------------------');
                setupRemoteMedia(inviter);
                console.log('------------------------------------Established------------------------------------');
                break;
              case SessionState.Terminated:
                console.log('------------------------------------Terminated------------------------------------');
                break;
              default:
                break;
            }
          });
          console.log('------------------------------------------------------------------------ Session Descriction ------------------------------------------------------------------------')
          console.log(userAgent.configuration.sessionDescriptionHandlerFactory);
          console.log('------------------------------------------------------------------------ Session Descriction ------------------------------------------------------------------------')
          
          inviter.invite()
            .then((invited) => {
              console.log('------------------------------------Invited------------------------------------');
              console.log(invited);
              
              
              console.log('------------------------------------Invited------------------------------------');
            })
            .catch((error: Error) => {
              console.log('------------------------------------Invite error------------------------------------');
              console.log(error);
            });



Logs:

[Thu Oct 01 2020 14:09:25.120]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | Configuration:
[Thu Oct 01 2020 14:09:25.121]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · allowLegacyNotifications: false
[Thu Oct 01 2020 14:09:25.121]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · authorizationPassword: NOT SHOWN
[Thu Oct 01 2020 14:09:25.134]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · authorizationUsername: "903"
[Thu Oct 01 2020 14:09:25.134]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · autoStart: false
[Thu Oct 01 2020 14:09:25.136]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · autoStop: true
[Thu Oct 01 2020 14:09:25.136]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · delegate: {}
[Thu Oct 01 2020 14:09:25.137]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · displayName: "903"
[Thu Oct 01 2020 14:09:25.138]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · forceRport: false
[Thu Oct 01 2020 14:09:25.138]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · hackAllowUnregisteredOptionTags: false
[Thu Oct 01 2020 14:09:25.138]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · hackIpInContact: false
[Thu Oct 01 2020 14:09:25.139]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · hackViaTcp: false
[Thu Oct 01 2020 14:09:25.139]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · hackWssInTransport: false
[Thu Oct 01 2020 14:09:25.139]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · logBuiltinEnabled: true
[Thu Oct 01 2020 14:09:25.140]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · logConfiguration: true
[Thu Oct 01 2020 14:09:25.140]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · logConnector: undefined
[Thu Oct 01 2020 14:09:25.140]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · logLevel: "log"
[Thu Oct 01 2020 14:09:25.141]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · noAnswerTimeout: 60
[Thu Oct 01 2020 14:09:25.141]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · preloadedRouteSet: []
[Thu Oct 01 2020 14:09:25.141]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · reconnectionAttempts: 0
[Thu Oct 01 2020 14:09:25.145]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · reconnectionDelay: 4
[Thu Oct 01 2020 14:09:25.146]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · sessionDescriptionHandlerFactory: function sessionDescriptionHandlerFactory(session, option) {
                var se = _web.SessionDescriptionHandler.defaultFactory(session, option);

                return se;
              }
[Thu Oct 01 2020 14:09:25.147]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {"constraints":{"audio":true,"video":false}}
[Thu Oct 01 2020 14:09:25.147]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · sipExtension100rel: "Unsupported"
[Thu Oct 01 2020 14:09:25.172]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · sipExtensionReplaces: "Unsupported"
[Thu Oct 01 2020 14:09:25.173]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · sipExtensionExtraSupported: []
[Thu Oct 01 2020 14:09:25.173]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · sipjsId: "port9"
[Thu Oct 01 2020 14:09:25.174]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · transportConstructor: Transport
[Thu Oct 01 2020 14:09:25.174]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · transportOptions: {"server":"ws://192.168.3.198:8088/ws"}
[Thu Oct 01 2020 14:09:25.174]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · uri: sip:9...@192.168.3.198
[Thu Oct 01 2020 14:09:25.174]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · userAgentString: "SIP.js/0.16.1"
[Thu Oct 01 2020 14:09:25.175]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | · viaHost: "10.0.2.16"
[Thu Oct 01 2020 14:09:25.176]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | Configuration:
[Thu Oct 01 2020 14:09:25.176]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · expires: 600
[Thu Oct 01 2020 14:09:25.177]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · extraContactHeaderParams: []
[Thu Oct 01 2020 14:09:25.177]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · extraHeaders: []
[Thu Oct 01 2020 14:09:25.178]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · logConfiguration: true
[Thu Oct 01 2020 14:09:25.178]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · instanceId: ""
[Thu Oct 01 2020 14:09:25.178]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · params: {}
[Thu Oct 01 2020 14:09:25.179]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · regId: 0
[Thu Oct 01 2020 14:09:25.179]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | · registrar: sip:9...@192.168.3.198
[Thu Oct 01 2020 14:09:25.179]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | Starting sip:9...@192.168.3.198
[Thu Oct 01 2020 14:09:25.180]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.UserAgent | Transitioned from Stopped to Started
[Thu Oct 01 2020 14:09:25.180]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Transport | Connecting ws://192.168.3.198:8088/ws
[Thu Oct 01 2020 14:09:25.180]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Transport | Transitioned from Disconnected to Connecting[Thu Oct 01 2020 14:09:25.201]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Transport | WebSocket opened ws://192.168.3.198:8088/ws
[Thu Oct 01 2020 14:09:25.202]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Transport | Transitioned from Connecting to Connected
[Thu Oct 01 2020 14:09:25.202]  LOG      Test OnConnect
[Thu Oct 01 2020 14:09:25.203]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Registerer | Waiting toggled to true
[Thu Oct 01 2020 14:09:25.204]  LOG      Thu Oct 01 2020 17:09:24 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:




[Thu Oct 01 2020 14:09:32.968]  LOG      Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.Inviter | Inviter.onAccept
[Thu Oct 01 2020 14:09:32.981]  ERROR    Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.SessionDescriptionHandler | setRemoteDescription failed.[Thu Oct 01 2020 14:09:33.500]  ERROR    Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.Inviter | Session.setAnswer: SDH setDescription rejected...
[Thu Oct 01 2020 14:09:33.670]  ERROR    Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.Inviter | setRemoteDescription failed.
[Thu Oct 01 2020 14:09:33.190]  ERROR    Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.Inviter | setRemoteDescription failed.
[Thu Oct 01 2020 14:09:33.212]  LOG      Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.invite-dialog | INVITE dialog port9miqs8o2nsrmkb8d4gvo7k1dnqas598856a0 sending ACK request
[Thu Oct 01 2020 14:09:33.223]  LOG      Thu Oct 01 2020 17:09:32 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

Eric Green

unread,
Oct 1, 2020, 1:29:36 PM10/1/20
to SIP.js
I need to see the remote SDP to see if it is acceptable for WebRTC or not.

Thiago Oliveira

unread,
Oct 1, 2020, 1:31:36 PM10/1/20
to SIP.js
How can i get this information?

Eric Green

unread,
Oct 1, 2020, 1:32:13 PM10/1/20
to SIP.js
Turn on traceSip

Thiago Oliveira

unread,
Oct 1, 2020, 1:48:46 PM10/1/20
to SIP.js
I put true value in traceSip

const userAgentOptions: UserAgentOptions = {
        uri,
        authorizationUsername,
        authorizationPassword,
        displayName: authorizationUsername,
        viaHost: ipMobile?.toString(),
        sessionDescriptionHandlerFactoryOptions: {
          constraints: {
            audio: true,
            video: false
          }
        },
        
        sessionDescriptionHandlerFactory: (sessionoption) => {
          const se = SessionDescriptionHandler.defaultFactory(session, option);
          return se;
        },
        // noAnswerTimeout:10000,
        transportOptions: {
          server: `ws://${server}:8088/ws`,
          traceSip:true,
        },
      };


This the code that show on node console.

[Thu Oct 01 2020 14:44:17.173]  LOG      Running "react_native_sip" with {"rootTag":1}
[Thu Oct 01 2020 14:44:20.901]  LOG      UserAgent created
[Thu Oct 01 2020 14:44:20.906]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | Configuration:
[Thu Oct 01 2020 14:44:20.907]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · allowLegacyNotifications: false
[Thu Oct 01 2020 14:44:20.907]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · authorizationPassword: NOT SHOWN
[Thu Oct 01 2020 14:44:20.910]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · authorizationUsername: "903"
[Thu Oct 01 2020 14:44:20.911]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · autoStart: false
[Thu Oct 01 2020 14:44:20.912]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · autoStop: true
[Thu Oct 01 2020 14:44:20.912]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · delegate: {}
[Thu Oct 01 2020 14:44:20.913]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · displayName: "903"
[Thu Oct 01 2020 14:44:20.913]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · forceRport: false
[Thu Oct 01 2020 14:44:20.914]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · hackAllowUnregisteredOptionTags: false
[Thu Oct 01 2020 14:44:20.915]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · hackIpInContact: false
[Thu Oct 01 2020 14:44:20.915]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · hackViaTcp: false
[Thu Oct 01 2020 14:44:20.916]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · hackWssInTransport: false
[Thu Oct 01 2020 14:44:20.916]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · logBuiltinEnabled: true
[Thu Oct 01 2020 14:44:20.917]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · logConfiguration: true
[Thu Oct 01 2020 14:44:20.924]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · logConnector: undefined
[Thu Oct 01 2020 14:44:20.925]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · logLevel: "log"
[Thu Oct 01 2020 14:44:20.926]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · noAnswerTimeout: 60
[Thu Oct 01 2020 14:44:20.928]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · preloadedRouteSet: []
[Thu Oct 01 2020 14:44:20.928]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · reconnectionAttempts: 0
[Thu Oct 01 2020 14:44:20.957]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · reconnectionDelay: 4
[Thu Oct 01 2020 14:44:20.958]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · sessionDescriptionHandlerFactory: function sessionDescriptionHandlerFactory(session, option) {
                var se = _web.SessionDescriptionHandler.defaultFactory(session, option);

                return se;
              }
[Thu Oct 01 2020 14:44:20.959]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {"constraints":{"audio":true,"video":false}}
[Thu Oct 01 2020 14:44:20.959]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · sipExtension100rel: "Unsupported"
[Thu Oct 01 2020 14:44:20.960]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · sipExtensionReplaces: "Unsupported"
[Thu Oct 01 2020 14:44:20.960]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · sipExtensionExtraSupported: []
[Thu Oct 01 2020 14:44:20.962]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · sipjsId: "bsmd9"
[Thu Oct 01 2020 14:44:20.962]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · transportConstructor: Transport
[Thu Oct 01 2020 14:44:20.963]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · transportOptions: {"server":"ws://192.168.3.198:8088/ws","traceSip":true}
[Thu Oct 01 2020 14:44:20.964]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · uri: sip:9...@192.168.3.198
[Thu Oct 01 2020 14:44:20.965]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · userAgentString: "SIP.js/0.16.1"
[Thu Oct 01 2020 14:44:20.965]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | · viaHost: "10.0.2.16"
[Thu Oct 01 2020 14:44:20.966]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | Configuration:
[Thu Oct 01 2020 14:44:20.987]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · expires: 600
[Thu Oct 01 2020 14:44:20.988]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · extraContactHeaderParams: []
[Thu Oct 01 2020 14:44:20.989]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · extraHeaders: []
[Thu Oct 01 2020 14:44:20.989]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · logConfiguration: true
[Thu Oct 01 2020 14:44:20.990]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · instanceId: ""
[Thu Oct 01 2020 14:44:20.991]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · params: {}
[Thu Oct 01 2020 14:44:20.991]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · regId: 0
[Thu Oct 01 2020 14:44:20.993]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | · registrar: sip:9...@192.168.3.198
[Thu Oct 01 2020 14:44:20.993]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | Starting sip:9...@192.168.3.198
[Thu Oct 01 2020 14:44:20.994]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.UserAgent | Transitioned from Stopped to Started
[Thu Oct 01 2020 14:44:20.995]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Connecting ws://192.168.3.198:8088/ws
[Thu Oct 01 2020 14:44:20.995]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Transitioned from Disconnected to Connecting
[Thu Oct 01 2020 14:44:21.200]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | WebSocket opened ws://192.168.3.198:8088/ws
[Thu Oct 01 2020 14:44:21.240]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Transitioned from Connecting to Connected
[Thu Oct 01 2020 14:44:21.250]  LOG      Test OnConnect
[Thu Oct 01 2020 14:44:21.260]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | Waiting toggled to true
[Thu Oct 01 2020 14:44:21.270]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

REGISTER sip:9...@192.168.3.198 SIP/2.0
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9546685
From: "903" <sip:9...@192.168.3.198>;tag=v5urs98nmi
CSeq: 2 REGISTER
Call-ID: bsmd9frleo6a4tkl61oj
Max-Forwards: 70
Contact: <sip:hahv...@10.0.2.16;transport=ws>;expires=600
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound, path, gruu
User-Agent: SIP.js/0.16.1
Content-Length: 0

[Thu Oct 01 2020 14:44:21.550]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Inviter | Inviter.invite
[Thu Oct 01 2020 14:44:21.560]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | SessionDescriptionHandlerOptions: {"constraints":{"audio":true,"video":false}}
[Thu Oct 01 2020 14:44:21.560]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | initPeerConnection
[Thu Oct 01 2020 14:44:21.830]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | New peer connection created
[Thu Oct 01 2020 14:44:21.840]  WARN     Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | Using onaddstream which is deprecated
[Thu Oct 01 2020 14:44:21.840]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | acquiring local media
[Thu Oct 01 2020 14:44:21.224]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9546685;received=10.10.250.3;rport=56231
From: "903" <sip:9...@192.168.3.198>;tag=v5urs98nmi
To: <sip:9...@192.168.3.198>;tag=as62b3f866
Call-ID: bsmd9frleo6a4tkl61oj
CSeq: 2 REGISTER
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3d687ea0"
Content-Length: 0



[Thu Oct 01 2020 14:44:21.230]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

REGISTER sip:9...@192.168.3.198 SIP/2.0
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK987020
From: "903" <sip:9...@192.168.3.198>;tag=v5urs98nmi
CSeq: 3 REGISTER
Call-ID: bsmd9frleo6a4tkl61oj
Max-Forwards: 70
Authorization: Digest algorithm=MD5, username="903", realm="asterisk", nonce="3d687ea0", uri="sip:9...@192.168.3.198", response="d7b443679c30864950782700b49dcf59"
Contact: <sip:hahv...@10.0.2.16;transport=ws>;expires=600
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound, path, gruu
User-Agent: SIP.js/0.16.1
Content-Length: 0



[Thu Oct 01 2020 14:44:21.242]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | acquired local media streams
[Thu Oct 01 2020 14:44:21.244]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | createOffer
[Thu Oct 01 2020 14:44:21.252]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | resetIceGatheringComplete
[Thu Oct 01 2020 14:44:21.252]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | Setting local sdp.
[Thu Oct 01 2020 14:44:21.253]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | sdp is v=0
o=- 355750195216661949 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS 6e986456-d8b7-48ea-9a95-0417dd5d4683
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:pVpn
a=ice-pwd:/mA3/WGy6ycwEiiapNpXzl1L
a=ice-options:trickle renomination
a=fingerprint:sha-256 FE:D7:9E:27:36:91:7D:55:C4:13:2B:AD:09:F4:F5:13:B2:91:A3:AE:B2:0D:16:DB:22:87:28:B6:0A:08:1C:68
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:2320915916 cname:FcOutuWl/mfJpIcl
a=ssrc:2320915916 msid:6e986456-d8b7-48ea-9a95-0417dd5d4683 8554ebb8-1129-41e9-bb01-ed9298689c72
a=ssrc:2320915916 mslabel:6e986456-d8b7-48ea-9a95-0417dd5d4683
a=ssrc:2320915916 label:8554ebb8-1129-41e9-bb01-ed9298689c72

[Thu Oct 01 2020 14:44:21.355]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

OPTIONS sip:hahv...@10.0.2.16;transport=ws SIP/2.0
Via: SIP/2.0/WS 177.139.172.37:0;branch=z9hG4bK20bd1404;rport
Max-Forwards: 70
From: "Unknown" <sip:Unk...@177.139.172.37:0>;tag=as636a4787
To: <sip:hahv...@10.0.2.16;transport=ws>
Contact: <sip:Unk...@177.139.172.37:0;transport=ws>
CSeq: 102 OPTIONS
User-Agent: IPBX-2.11.0.47(13.22.0)
Date: Thu, 01 Oct 2020 17:44:22 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0



[Thu Oct 01 2020 14:44:21.357]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

SIP/2.0 200 OK
Via: SIP/2.0/WS 177.139.172.37:0;branch=z9hG4bK20bd1404;rport
From: "Unknown" <sip:Unk...@177.139.172.37:0>;tag=as636a4787
To: <sip:hahv...@10.0.2.16;transport=ws>;tag=v17h0drkkf
CSeq: 102 OPTIONS
Supported: outbound
User-Agent: SIP.js/0.16.1
Allow: ACK,BYE,CANCEL,INFO,INVITE,MESSAGE,NOTIFY,OPTIONS,PRACK,REFER,REGISTER,SUBSCRIBE
Accept: application/sdp,application/dtmf-relay
Content-Length: 0



[Thu Oct 01 2020 14:44:21.433]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 200 OK
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK987020;received=10.10.250.3;rport=56231
From: "903" <sip:9...@192.168.3.198>;tag=v5urs98nmi
To: <sip:9...@192.168.3.198>;tag=as62b3f866
Call-ID: bsmd9frleo6a4tkl61oj
CSeq: 3 REGISTER
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 600
Contact: <sip:hahv...@10.0.2.16;transport=ws>;expires=600
Date: Thu, 01 Oct 2020 17:44:22 GMT
Content-Length: 0



[Thu Oct 01 2020 14:44:21.466]  WARN     Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.
(Saw setTimeout with duration 597000ms)
[Thu Oct 01 2020 14:44:21.468]  WARN     Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.
(Saw setTimeout with duration 600000ms)
[Thu Oct 01 2020 14:44:21.469]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | Registration transitioned to state Registered
[Thu Oct 01 2020 14:44:21.469]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.Registerer | Waiting toggled to false
[Thu Oct 01 2020 14:44:21.484]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | waitForIceGatheringComplete
[Thu Oct 01 2020 14:44:21.485]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | ICE is not complete. Returning promise
[Thu Oct 01 2020 14:44:21.485]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | RTCIceGatheringState changed: gathering
[Thu Oct 01 2020 14:44:21.496]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | ICE candidate received: candidate:841689039 1 udp 2122260223 10.0.2.16 39780 typ host generation 0 ufrag pVpn network-id 4 network-cost 10
[Thu Oct 01 2020 14:44:21.496]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | ICE candidate received: candidate:361502126 1 udp 2122187263 fec0::15:b2ff:fe00:0 53946 typ host generation 0 ufrag pVpn network-id 5 network-cost 10
[Thu Oct 01 2020 14:44:21.497]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | ICE candidate received: candidate:842163049 1 udp 1686052607 189.120.188.177 50840 typ srflx raddr 10.0.2.16 rport 39780 generation 0 ufrag pVpn network-id 4 network-cost 10
[Thu Oct 01 2020 14:44:21.497]  LOG      Thu Oct 01 2020 17:44:20 GMT+0000 (GMT) | sip.SessionDescriptionHandler | ICE candidate received: candidate:1847424209 1 tcp 1518149375 10.0.2.15 9 typ host tcptype active generation 0 ufrag pVpn network-id 3 network-cost 900
[Thu Oct 01 2020 14:44:26.509]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.SessionDescriptionHandler | RTCIceChecking Timeout Triggered after 5000 milliseconds
[Thu Oct 01 2020 14:44:26.510]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Inviter | Session bsmd9cqchdts9663o0r0difo9vnhb2 transitioned to state Establishing
[Thu Oct 01 2020 14:44:26.511]  LOG      ------------------------------------Establishing------------------------------------
[Thu Oct 01 2020 14:44:26.512]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

INVITE sip:9...@192.168.3.198 SIP/2.0
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9381577
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
CSeq: 1 INVITE
Call-ID: bsmd9cqchdts9663o0r0
Max-Forwards: 70
Contact: <sip:hahv...@10.0.2.16;transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
User-Agent: SIP.js/0.16.1
Content-Type: application/sdp
Content-Length: 1448

v=0
o=- 355750195216661949 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS 6e986456-d8b7-48ea-9a95-0417dd5d4683
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:pVpn
a=ice-pwd:/mA3/WGy6ycwEiiapNpXzl1L
a=ice-options:trickle renomination
a=fingerprint:sha-256 FE:D7:9E:27:36:91:7D:55:C4:13:2B:AD:09:F4:F5:13:B2:91:A3:AE:B2:0D:16:DB:22:87:28:B6:0A:08:1C:68
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:2320915916 cname:FcOutuWl/mfJpIcl
a=ssrc:2320915916 msid:6e986456-d8b7-48ea-9a95-0417dd5d4683 8554ebb8-1129-41e9-bb01-ed9298689c72
a=ssrc:2320915916 mslabel:6e986456-d8b7-48ea-9a95-0417dd5d4683
a=ssrc:2320915916 label:8554ebb8-1129-41e9-bb01-ed9298689c72

o=- 355750195216661949 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS 6e986456-d8b7-48ea-9a95-0417dd5d4683
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:pVpn
a=ice-pwd:/mA3/WGy6ycwEiiapNpXzl1L
a=ice-options:trickle renomination
a=fingerprint:sha-256 FE:D7:9E:27:36:91:7D:55:C4:13:2B:AD:09:F4:F5:13:B2:91:A3:AE:B2:0D:16:DB:22:87:28:B6:0A:08:1C:68
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:2320915916 cname:FcOutuWl/mfJpIcl
a=ssrc:2320915916 msid:6e986456-d8b7-48ea-9a95-0417dd5d4683 8554ebb8-1129-41e9-bb01-ed9298689c72
a=ssrc:2320915916 mslabel:6e986456-d8b7-48ea-9a95-0417dd5d4683
a=ssrc:2320915916 label:8554ebb8-1129-41e9-bb01-ed9298689c72
", "contentType": "application/sdp"}, "branch": "z9hG4bK9381577", "callId": "bsmd9cqchdts9663o0r0", "cseq": 1, "extraHeaders": ["Contact: <sip:hahv...@10.0.2.16;transport=ws;ob>", "Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER"], "from": {"_displayName": "9...@10.0.2.16", "parameters": [Object], "uri": [URI]}, "fromTag": "difo9vnhb2", "fromURI": {"headers": [Object], "normal": [Object], "parameters": [Object], "raw": [Object]}, "headers": {"CSeq": [Array], "Call-ID": [Array], "From": [Array], "Max-Forwards": [Array], "Route": [Array], "To": [Array], "Via": [Array]}, "method": "INVITE", "options": {"callId": "", "callIdPrefix": "bsmd9", "cseq": 1, "forceRport": false, "fromDisplayName": "9...@10.0.2.16", "fromTag": "difo9vnhb2", "fromUri": "sip:9...@10.0.2.16", "hackViaTcp": false, "optionTags": [Array], "routeSet": [Array], "toDisplayName": "", "toTag": "", "userAgentString": "SIP.js/0.16.1", "viaHost": "10.0.2.16"}, "ruri": {"headers": [Object], "normal": [Object], "parameters": [Object], "raw": [Object]}, "to": {"_displayName": "", "parameters": [Object], "uri": [URI]}, "toTag": "", "toURI": {"headers": [Object], "normal": [Object], "parameters": [Object], "raw": [Object]}}, "stale": false, "transactionConstructor": [Function InviteClientTransaction]}
[Thu Oct 01 2020 14:44:26.516]  LOG      ------------------------------------Invited------------------------------------
[Thu Oct 01 2020 14:44:26.627]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 401 Unauthorized
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9381577;received=10.10.250.3;rport=56231
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
To: <sip:9...@192.168.3.198>;tag=as321f4172
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 1 INVITE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6bc72d0c"
Content-Length: 0



[Thu Oct 01 2020 14:44:26.633]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9381577
To: <sip:9...@192.168.3.198>;tag=as321f4172
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0



[Thu Oct 01 2020 14:44:26.633]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

INVITE sip:9...@192.168.3.198 SIP/2.0
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK7166292
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
CSeq: 2 INVITE
Call-ID: bsmd9cqchdts9663o0r0
Max-Forwards: 70
Authorization: Digest algorithm=MD5, username="903", realm="asterisk", nonce="6bc72d0c", uri="sip:9...@192.168.3.198", response="2439695e09d8e99013fb8d5a804e26b3"
Contact: <sip:hahv...@10.0.2.16;transport=ws;ob>
Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
Supported: outbound
User-Agent: SIP.js/0.16.1
Content-Type: application/sdp
Content-Length: 1448

v=0
o=- 355750195216661949 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS 6e986456-d8b7-48ea-9a95-0417dd5d4683
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:pVpn
a=ice-pwd:/mA3/WGy6ycwEiiapNpXzl1L
a=ice-options:trickle renomination
a=fingerprint:sha-256 FE:D7:9E:27:36:91:7D:55:C4:13:2B:AD:09:F4:F5:13:B2:91:A3:AE:B2:0D:16:DB:22:87:28:B6:0A:08:1C:68
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:2320915916 cname:FcOutuWl/mfJpIcl
a=ssrc:2320915916 msid:6e986456-d8b7-48ea-9a95-0417dd5d4683 8554ebb8-1129-41e9-bb01-ed9298689c72
a=ssrc:2320915916 mslabel:6e986456-d8b7-48ea-9a95-0417dd5d4683
a=ssrc:2320915916 label:8554ebb8-1129-41e9-bb01-ed9298689c72


[Thu Oct 01 2020 14:44:26.757]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 100 Trying
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK7166292;received=10.10.250.3;rport=56231
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 2 INVITE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:9...@177.139.172.37:0;transport=ws>
Content-Length: 0



[Thu Oct 01 2020 14:44:26.760]  LOG      Thu Oct 01 2020 17:44:25 GMT+0000 (GMT) | sip.Inviter | Inviter.onTrying
[Thu Oct 01 2020 14:44:27.770]  LOG      Thu Oct 01 2020 17:44:26 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 180 Ringing
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK7166292;received=10.10.250.3;rport=56231
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
To: <sip:9...@192.168.3.198>;tag=as5dc02c86
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 2 INVITE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:9...@177.139.172.37:0;transport=ws>
Content-Length: 0



[Thu Oct 01 2020 14:44:27.860]  LOG      Thu Oct 01 2020 17:44:26 GMT+0000 (GMT) | sip.invite-dialog | INVITE dialog bsmd9cqchdts9663o0r0difo9vnhb2as5dc02c86 constructed
[Thu Oct 01 2020 14:44:27.870]  LOG      Thu Oct 01 2020 17:44:26 GMT+0000 (GMT) | sip.Inviter | Inviter.onProgress
[Thu Oct 01 2020 14:44:27.134]  LOG      Thu Oct 01 2020 17:44:26 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 180 Ringing
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK7166292;received=10.10.250.3;rport=56231
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
To: <sip:9...@192.168.3.198>;tag=as5dc02c86
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 2 INVITE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:9...@177.139.172.37:0;transport=ws>
Content-Length: 0



[Thu Oct 01 2020 14:44:27.137]  LOG      Thu Oct 01 2020 17:44:26 GMT+0000 (GMT) | sip.Inviter | Inviter.onProgress
[Thu Oct 01 2020 14:44:28.416]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 200 OK
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK7166292;received=10.10.250.3;rport=56231
From: "9...@10.0.2.16" <sip:9...@10.0.2.16>;tag=difo9vnhb2
To: <sip:9...@192.168.3.198>;tag=as5dc02c86
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 2 INVITE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:9...@177.139.172.37:0;transport=ws>
Content-Type: application/sdp
Content-Length: 649

v=0
o=root 745699891 745699891 IN IP4 177.139.172.37
s=Asterisk PBX 13.22.0
c=IN IP4 177.139.172.37
t=0 0
m=audio 14716 RTP/SAVPF 0 8 126
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=maxptime:150
a=ice-ufrag:6b0169b3248f459f754b966421cad69a
a=ice-pwd:6f3658a212e5a51020e2cf9451894e14
a=candidate:Hc0a803c6 1 UDP 2130706431 192.168.3.198 14716 typ host
a=candidate:Hc0a803c6 2 UDP 2130706430 192.168.3.198 14717 typ host
a=connection:new
a=setup:active
a=fingerprint:SHA-256 51:37:6E:77:A6:87:E2:AA:53:CE:A1:79:53:E1:E6:E2:E9:80:E5:DF:6D:F6:67:E0:C3:20:37:D5:88:52:8F:5D
a=sendrecv


[Thu Oct 01 2020 14:44:28.420]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Inviter | Inviter.onAccept
[Thu Oct 01 2020 14:44:28.433]  ERROR    Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.SessionDescriptionHandler | setRemoteDescription failed.
[Thu Oct 01 2020 14:44:28.505]  ERROR    Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Inviter | Session.setAnswer: SDH setDescription rejected...
[Thu Oct 01 2020 14:44:28.520]  ERROR    Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Inviter | setRemoteDescription failed.
[Thu Oct 01 2020 14:44:28.552]  ERROR    Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Inviter | setRemoteDescription failed.
[Thu Oct 01 2020 14:44:28.557]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.invite-dialog | INVITE dialog bsmd9cqchdts9663o0r0difo9vnhb2as5dc02c86 sending ACK request
[Thu Oct 01 2020 14:44:28.557]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

ACK sip:9...@177.139.172.37:0;transport=ws SIP/2.0
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK7812737
To: <sip:9...@192.168.3.198>;tag=as5dc02c86
From: "903" <sip:9...@10.0.2.16>;tag=difo9vnhb2
CSeq: 2 ACK
Call-ID: bsmd9cqchdts9663o0r0
Max-Forwards: 70
Supported: outbound
User-Agent: SIP.js/0.16.1
Content-Length: 0



[Thu Oct 01 2020 14:44:28.559]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.invite-dialog | INVITE dialog bsmd9cqchdts9663o0r0difo9vnhb2as5dc02c86 sending BYE request
[Thu Oct 01 2020 14:44:28.560]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

BYE sip:9...@177.139.172.37:0;transport=ws SIP/2.0
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9529774
To: <sip:9...@192.168.3.198>;tag=as5dc02c86
From: "903" <sip:9...@10.0.2.16>;tag=difo9vnhb2
CSeq: 3 BYE
Call-ID: bsmd9cqchdts9663o0r0
Max-Forwards: 70
Reason: SIP;cause=488;text="Not Acceptable Here"
Supported: outbound
User-Agent: SIP.js/0.16.1
Content-Length: 0



[Thu Oct 01 2020 14:44:28.560]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.invite-dialog | INVITE dialog bsmd9cqchdts9663o0r0difo9vnhb2as5dc02c86 destroyed
[Thu Oct 01 2020 14:44:28.573]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Inviter | Session bsmd9cqchdts9663o0r0difo9vnhb2 transitioned to state Terminated
[Thu Oct 01 2020 14:44:28.574]  LOG      ------------------------------------Terminated------------------------------------
[Thu Oct 01 2020 14:44:28.581]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Inviter | Session bsmd9cqchdts9663o0r0difo9vnhb2 in state Terminated is being disposed
[Thu Oct 01 2020 14:44:28.581]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.SessionDescriptionHandler | closing PeerConnection
[Thu Oct 01 2020 14:44:28.582]  WARN     Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.SessionDescriptionHandler | Using getLocalStreams which is deprecated
[Thu Oct 01 2020 14:44:28.582]  WARN     Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.SessionDescriptionHandler | Using getRemoteStreams which is deprecated
[Thu Oct 01 2020 14:44:28.617]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.SessionDescriptionHandler | resetIceGatheringComplete
[Thu Oct 01 2020 14:44:28.694]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

SIP/2.0 200 OK
Via: SIP/2.0/WS 10.0.2.16;branch=z9hG4bK9529774;received=10.10.250.3;rport=56231
From: "903" <sip:9...@10.0.2.16>;tag=difo9vnhb2
To: <sip:9...@192.168.3.198>;tag=as5dc02c86
Call-ID: bsmd9cqchdts9663o0r0
CSeq: 3 BYE
Server: IPBX-2.11.0.47(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0



[Thu Oct 01 2020 14:44:28.697]  LOG      Thu Oct 01 2020 17:44:27 GMT+0000 (GMT) | sip.SessionDescriptionHandler | ICE Connection State changed to iceConnectionClosed
[Thu Oct 01 2020 14:45:21.434]  LOG      Thu Oct 01 2020 17:45:20 GMT+0000 (GMT) | sip.Transport | Received WebSocket text message:

OPTIONS sip:hahv...@10.0.2.16;transport=ws SIP/2.0
Via: SIP/2.0/WS 177.139.172.37:0;branch=z9hG4bK5a44196f;rport
Max-Forwards: 70
From: "Unknown" <sip:Unk...@177.139.172.37:0>;tag=as6e3d0bc3
To: <sip:hahv...@10.0.2.16;transport=ws>
Contact: <sip:Unk...@177.139.172.37:0;transport=ws>
CSeq: 102 OPTIONS
User-Agent: IPBX-2.11.0.47(13.22.0)
Date: Thu, 01 Oct 2020 17:45:22 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0



[Thu Oct 01 2020 14:45:23.191]  LOG      Thu Oct 01 2020 17:45:20 GMT+0000 (GMT) | sip.Transport | Sending WebSocket message:

SIP/2.0 200 OK
Via: SIP/2.0/WS 177.139.172.37:0;branch=z9hG4bK5a44196f;rport
From: "Unknown" <sip:Unk...@177.139.172.37:0>;tag=as6e3d0bc3
To: <sip:hahv...@10.0.2.16;transport=ws>;tag=mor5sh3qss
CSeq: 102 OPTIONS
Supported: outbound
User-Agent: SIP.js/0.16.1
Allow: ACK,BYE,CANCEL,INFO,INVITE,MESSAGE,NOTIFY,OPTIONS,PRACK,REFER,REGISTER,SUBSCRIBE
Accept: application/sdp,application/dtmf-relay
Content-Length: 0

Eric Green

unread,
Oct 1, 2020, 2:08:45 PM10/1/20
to SIP.js
SDP looks valid. Maybe follow up with react webrtc to see why it is rejecting the SDP.

Thiago Oliveira

unread,
Oct 1, 2020, 2:29:13 PM10/1/20
to SIP.js
whats version of webRTC is compatible with SIP.Js?

Raffaele Nachos

unread,
Oct 5, 2020, 4:47:54 AM10/5/20
to SIP.js
I was having the same problem as Thiago about the undefined functions and fixed by installing via npm install sip...@0.16.1 and using the SessionDescriptionHandler from that version.
Eric, could you please explain me better what's the problem with SDH from 0.17.1?

Thiago, I'm using react-native-webrtc 1.84.0 version and I haven't big problems (calling only with audio) except for only a little one when making calls to the other client I'm using for testing (https://www.linphone.org/), but I will make another discussion if I can't fix it soon.

Anyway, I'm new to webRTC but if you think it's a problem caused by Asterisk I've made a little readme for the future me, if I will ever need to reinstall the PBX server. Have a look, it may help you: https://github.com/RaffaeleNachos/raffaelenachos.github.io/blob/master/articles/Install_Asterisk_17.md
Or, I can make my source code public so you can compare it to yours.

Eric Green

unread,
Oct 5, 2020, 4:53:17 AM10/5/20
to SIP.js
Hi Raffaele,

The issue is that there are 2 API's for WebRTC. There is the legacy stream API and the current transceiver API. react-native-webrtc only supports the stream API. In an effort to modernize and simplify out library we removed the stream api from the SDH in 0.17. All the browsers support the transceiver API and it is recommended to use that. 

Raffaele Nachos

unread,
Oct 5, 2020, 5:17:06 AM10/5/20
to SIP.js
Thank you, so it's a matter of waiting for react-native-webrtc to support the transceiver API.
I thought it was a problem with the sip.js library.

Raffaele Nachos

unread,
Oct 9, 2020, 3:30:42 PM10/9/20
to SIP.js
Thiago, at a point in the development it started giving me back your last errors "SDH setDescription rejected" and so on... I've got it fully working using the SDH from 0.16.1 from the react folder (and obliviously setting Asterisk as I said in the previous message). In particular:
import {SessionDescriptionHandler} from 'sip.js16/lib/platform/react/';
Keep in mind that I've installed via npm two versions of sip.js. The 0.16.1 for the SDH and the 0.17.1 for the rest.

Now, a little question for Eric (?).
For getting remote (and in the same way local) Media I've done like this:
setupRemoteMedia = () => {
    const rStream = new MediaStream();
    mySession.sessionDescriptionHandler.peerConnection
    .getRemoteStreams()
    .forEach((stream) => {
         stream.getTracks().forEach((track) => {
              rStream.addTrack(track);
         });
     });
     this.setState({
          remoteStream: rStream,
     });
};

Is there a better way to do it?
But my biggest question comes from the fact that in version 0.17.1 there isn't a SessionDescriptionHandler for react-native.
Does it mean that the SDH from the Web platform plus exposing variables with registerGlobals() function makes the whole thing working... or SIP.js need a react-native compatible SDH in version 0.17.1?


Thiago Oliveira

unread,
Oct 14, 2020, 5:42:14 PM10/14/20
to SIP.js
I'm working sometimes on this project when I have time.
I will check the config of PBX to see if I forgot something.

Everything from SIP.js in React worked for you?

Thanks for your help

Raffaele Nachos

unread,
Oct 17, 2020, 12:04:52 PM10/17/20
to SIP.js
Yes.

anshk...@gmail.com

unread,
Nov 9, 2020, 1:25:42 AM11/9/20
to SIP.js
Hello Raffle,

I tried as you suggested for react native to capture remote streams but unfortunately it doesn't work for me.

I found a way to achieve it like described below:

let pc = session.sessionDescriptionHandler.peerConnection;
this.setState({
_remoteStream : pc._remoteStreams[0],
_localStream : pc._localStreams[0]
})

To display remote video stream into component:

<RTCView streamURL={this.state._remoteStream.toURL()} ></RTCView>

I'm not sure whether it's a better way or not but it's working for me. This might help anyone.

Reply all
Reply to author
Forward
0 new messages