Re: [EXTERNAL] the STUN negotiation is taking too long

23 views
Skip to first unread message

Richard Fuchs

unread,
Nov 19, 2024, 12:42:02 PM11/19/24
to rtpe...@googlegroups.com
Which version, and what does the log say? Enable full debug logging.

Cheers


On 18/11/2024 04.49, song gao wrote:
Hi, My  case is that: fs-----sip---->opensips+rtpengine---webrtc---->chrome(jssip.js)。when webrtc answered, the stun negotiation is taking almost 5s。
the rtcp port :22124, stun begin at: 15:04:36   -----> 15:04:41 , the 172.16.7.144 and 10.19.103.128 are  private IP address。
invite:
#######
Session Description Protocol
    Session Description Protocol Version (v): 0
    Owner/Creator, Session Id (o): HuaWeiUAP9600 264 264 IN IP4 172.16.7.144
    Session Name (s): Sip Call
    Connection Information (c): IN IP4 172.16.7.144
    Time Description, active time (t): 0 0
    Media Description, name and address (m): audio 22124 RTP/SAVPF 8 0 18 98 100 96 9 97
    Media Attribute (a): mid:1
    Media Attribute (a): rtpmap:8 PCMA/8000
    Media Attribute (a): rtpmap:0 PCMU/8000
    Media Attribute (a): rtpmap:18 G729/8000
    Media Attribute (a): fmtp:18 annexb=no
    Media Attribute (a): rtpmap:98 iLBC/8000
    Media Attribute (a): fmtp:98 mode=20
    Media Attribute (a): rtpmap:100 AMR-WB/16000
    Media Attribute (a): fmtp:100 mode-set=0,1,2,3,4,5,6,7,8
    Media Attribute (a): rtpmap:96 AMR/8000
    Media Attribute (a): fmtp:96 mode-set=0,1,2,3,4,5,6,7
    Media Attribute (a): rtpmap:9 G722/8000
    Media Attribute (a): rtpmap:97 telephone-event/8000
    Media Attribute (a): fmtp:97 0-15
    Media Attribute (a): sendrecv
    Media Attribute (a): rtcp:22125
    Media Attribute (a): rtcp-mux
    Media Attribute (a): setup:actpass
    Media Attribute (a): fingerprint:sha-256 00:3E:00:71:72:3F:65:94:5C:FB:DC:87:63:69:B1:8F:6E:EE:15:8C:F5:8B:EF:67:EB:BD:0B:6C:7C:8B:32:05
    Media Attribute (a): tls-id:5a88f0452df0d1e05ad0027fb67c6ec1
    Media Attribute (a): ptime:20
    Media Attribute (a): ice-ufrag:4sN6X5Z1
    Media Attribute (a): ice-pwd:qBhxZEgabIBFrJZMrZGZZlj5pp
    Media Attribute (a): ice-options:trickle
    Media Attribute (a): candidate:BcESCj9om8lSME1b 1 UDP 2130706431 172.16.7.144 22124 typ host
    Media Attribute (a): candidate:BcESCj9om8lSME1b 2 UDP 2130706430 172.16.7.144 22125 typ host
    Media Attribute (a): end-of-candidates
    [Generated Call-ID: rio84rr4t58ioi39h949lfh5hgi6q4lg@UAP9600]
######
200 ok:
######
Session Description Protocol
    Session Description Protocol Version (v): 0
    Owner/Creator, Session Id (o): - 772840021838998555 2 IN IP4 127.0.0.1
    Session Name (s): -
    Time Description, active time (t): 0 0
    Session Attribute (a): msid-semantic: WMS 718474b3-8b52-488a-b024-7220880350b6
    Media Description, name and address (m): audio 60476 RTP/SAVPF 8 0 9 97
    Connection Information (c): IN IP4 26.119.40.19
    Media Attribute (a): rtcp:9 IN IP4 0.0.0.0
    Media Attribute (a): candidate:356484001 1 udp 2122194687 26.119.40.19 60476 typ host generation 0 network-id 1
    Media Attribute (a): candidate:1603750049 1 udp 2122129151 10.19.103.128 60477 typ host generation 0 network-id 3 network-cost 10
    Media Attribute (a): candidate:2850817478 1 udp 2122265343 fdfd::1a77:2813 60478 typ host generation 0 network-id 2
    Media Attribute (a): candidate:3952432949 1 tcp 1518214911 26.119.40.19 9 typ host tcptype active generation 0 network-id 1
    Media Attribute (a): candidate:2705169461 1 tcp 1518149375 10.19.103.128 9 typ host tcptype active generation 0 network-id 3 network-cost 10
    Media Attribute (a): candidate:1464258898 1 tcp 1518285567 fdfd::1a77:2813 9 typ host tcptype active generation 0 network-id 2
    Media Attribute (a): ice-ufrag:etJc
    Media Attribute (a): ice-pwd:iz98wYpbU3Q9hI6ChmFSyjud
    Media Attribute (a): ice-options:trickle
    Media Attribute (a): fingerprint:sha-256 32:6A:0D:66:6F:E4:1A:FD:A9:5F:11:FB:F0:14:D8:63:E1:79:27:B7:CB:39:F6:F7:E8:96:AB:05:5E:22:73:99
    Media Attribute (a): setup:active
    Media Attribute (a): mid:1
    Media Attribute (a): sendrecv
    Media Attribute (a): msid:718474b3-8b52-488a-b024-7220880350b6 a6054ac5-6747-41be-b9bb-9320dffb1f98
    Media Attribute (a): rtcp-mux
    Media Attribute (a): rtpmap:8 PCMA/8000
    Media Attribute (a): rtpmap:0 PCMU/8000
    Media Attribute (a): rtpmap:9 G722/8000
    Media Attribute (a): rtpmap:97 telephone-event/8000
    Media Attribute (a): ssrc:801376699 cname:hkGYYuYRocQZeB3h
    [Generated Call-ID: rio84rr4t58ioi39h949lfh5hgi6q4lg@UAP9600]

######
--
You received this message because you are subscribed to the Google Groups "Sipwise rtpengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtpengine+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rtpengine/8203542f-e5db-4d76-b38f-9fa6f62499cen%40googlegroups.com.
Message has been deleted

Ahmed Fouad

unread,
Nov 27, 2024, 4:10:18 AM11/27/24
to Sipwise rtpengine
I faced this problem before with SIPJS and yes 5s is the default timeout

You could use iceGatheringTimeout
```
/**
   * The maximum duration to wait in ms for ICE gathering to complete.
   * No timeout if undefined or zero.
   */
  iceGatheringTimeout?: number;
```

Example:
```
userAgentOptions.sessionDescriptionHandlerFactoryOptions = {
   iceGatheringTimeout: 500,
};
Reply all
Reply to author
Forward
0 new messages