Big pause while call establishing

462 views
Skip to first unread message

eugene.p...@gmail.com

unread,
Jul 21, 2020, 2:57:38 AM7/21/20
to SIP.js
Hi,

I tried to create very basic WebRTC scenario and noticed big pause while call establishing


Browser and FreeSWITCH are in the same network, no NAT/proxy between them and so no STUN/TURN required, right? But I see 16 secs in HANDSHAKE state, why so long?

eugene.p...@gmail.com

unread,
Jul 21, 2020, 3:15:43 AM7/21/20
to SIP.js
Btw, I see big pause in FF only. In Chome no pause, but sound quality is very bad - so it looks like browser-specific issue. Any ideas?

вторник, 21 июля 2020 г., 9:57:38 UTC+3 пользователь eugene....@gmail.com написал:

James Criscuolo

unread,
Jul 21, 2020, 11:40:37 AM7/21/20
to SIP.js
Looks like ICE is not negotiating fast, you can alter the iceGatheringTimeout: https://github.com/onsip/SIP.js/blob/9b5e6183f8f0d4245bdc2375c1d32e030d3e1132/docs/session-description-handler/sip.js.sessiondescriptionhandlerconfiguration.icegatheringtimeout.md

I also recommend updating to the latest version of SIP.js.

eugene.p...@gmail.com

unread,
Jul 22, 2020, 2:42:25 AM7/22/20
to SIP.js
Hi James,

Thank you for your answer, but I can't find how to use iceGatheringTimeout with SIP.Web.Simple in https://sipjs.com/api/0.15.0/simple_configuration_parameters/

I see something similar here - https://sipjs.com/api/0.7.0/ua_configuration_parameters/#icecheckingtimeout - but it is possible to try (and I'll do it!) with old version only, new version (0.17.0) even has no SIP.UA constructor, so I can't use examples from https://sipjs.com/api/0.7.0/ua/#examples. Where can I see examples/docs for new version?

вторник, 21 июля 2020 г., 18:40:37 UTC+3 пользователь James Criscuolo написал:
Looks like ICE is not negotiating fast, you can alter the iceGatheringTimeout: https://github.com/onsip/SIP.js/blob/9b5e6183f8f0d4245bdc2375c1d32e030d3e1132/docs/session-description-handler/sip.js.sessiondescriptionhandlerconfiguration.icegatheringtimeout.md

I also recommend updating to the latest version of SIP.js.

James Criscuolo

unread,
Jul 22, 2020, 9:00:45 AM7/22/20
to SIP.js
New version docs live here: https://github.com/onsip/SIP.js/tree/master/docs

There is a Simple equivalent (SimpleUser). My link in the other post is to the current docs version of the timeout.

eugene.p...@gmail.com

unread,
Jul 23, 2020, 6:03:27 AM7/23/20
to SIP.js
Thank you for new docs, but I can't find example how to use SimpleUser class in pure JS, I only TS examples. Can you provide some simple pure JS and readable (so not result of TS compilation) example too?

среда, 22 июля 2020 г., 16:00:45 UTC+3 пользователь James Criscuolo написал:
New version docs live here: https://github.com/onsip/SIP.js/tree/master/docs

There is a Simple equivalent (SimpleUser). My link in the other post is to the current docs version of the timeout.

eugene.p...@gmail.com

unread,
Jul 23, 2020, 6:08:02 AM7/23/20
to SIP.js
In pure JS I see 'Uncaught ReferenceError: SimpleUser is not defined' after '<script type="text/javascript" src='sipjs.js'></script>', maybe I need to use some prefix as before?

четверг, 23 июля 2020 г., 13:03:27 UTC+3 пользователь eugene....@gmail.com написал:

James Criscuolo

unread,
Jul 23, 2020, 9:07:04 AM7/23/20
to SIP.js
Loading in that manner, SIP is still the prefix.

eugene.p...@gmail.com

unread,
Jul 23, 2020, 9:49:39 AM7/23/20
to SIP.js
Thank you, SIP prefix works, but I got another issue now:

TypeError: SIP.SimpleUser is not a constructor


Please, advice me how to fix it

четверг, 23 июля 2020 г., 16:07:04 UTC+3 пользователь James Criscuolo написал:
Loading in that manner, SIP is still the prefix.

James Criscuolo

unread,
Jul 23, 2020, 11:43:44 AM7/23/20
to SIP.js
it's SIP.Web.SimpleUser

Eugene Prokopiev

unread,
Jul 23, 2020, 12:01:53 PM7/23/20
to sip...@googlegroups.com
Okay, thank you, but how to pass login/password? I tried to do it via
uri, but received: Failed to create valid URI from 101:101@local

чт, 23 июл. 2020 г. в 18:43, James Criscuolo <ja...@onsip.com>:
> --
> You received this message because you are subscribed to a topic in the Google Groups "SIP.js" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/sip_js/Lt6KhYqDdUc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to sip_js+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sip_js/f37214d9-1094-43f9-8afa-34e3260d2608n%40googlegroups.com.



--
WBR,
Eugene Prokopiev

eugene.p...@gmail.com

unread,
Jul 23, 2020, 12:02:12 PM7/23/20
to SIP.js
Okay, thank you, but how to pass login/password? I tried to do it via uri, but received: Failed to create valid URI from 101:101@local

четверг, 23 июля 2020 г., 18:43:44 UTC+3 пользователь James Criscuolo написал:
it's SIP.Web.SimpleUser

James Criscuolo

unread,
Jul 23, 2020, 12:04:04 PM7/23/20
to SIP.js

eugene.p...@gmail.com

unread,
Jul 23, 2020, 12:09:11 PM7/23/20
to SIP.js
Sorry, can't find login or password terms here, can you show me?

четверг, 23 июля 2020 г., 19:04:04 UTC+3 пользователь James Criscuolo написал:

Eric Green

unread,
Jul 23, 2020, 12:26:44 PM7/23/20
to SIP.js
user and password are part of the UserAgentOptions.

eugene.p...@gmail.com

unread,
Jul 23, 2020, 3:04:38 PM7/23/20
to SIP.js
Yes, I've found authorizationUsername and authorizationPassword in file sip-0.17.1.js in defaultOptions function and suggeted that it is related to UserAgentOptions - and it really works


Also I have no idea how to set iceGatheringTimeout or even find parent of it - SessionDescriptionHandlerConfiguration

Please explain me how to navigate in docs and understand where in SIP.Web.SimpleUser I can set iceGatheringTimeout

четверг, 23 июля 2020 г., 19:26:44 UTC+3 пользователь Eric Green написал:
user and password are part of the UserAgentOptions.

Eric Green

unread,
Aug 5, 2020, 5:35:20 AM8/5/20
to SIP.js
There is no way to set the iceGatheringTimeout in simple-user. If you need that level of granularity I suggest using the full API.

nus Ben

unread,
Apr 24, 2021, 4:36:28 AM4/24/21
to SIP.js

 options: {
                sessionDescriptionHandlerOptions: {
                    constraints: {
                        audio: true,
                        video: false,
                    },
                    iceGatheringTimeout: 1 // setting
                }
            },


this.session.accept(that.options).then(() => {
    // todo
})
Reply all
Reply to author
Forward
0 new messages