sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
785 stars 368 forks source link

Wrong SSRC in SDP #1773

Open biv opened 9 months ago

biv commented 9 months ago

rtpengine version the issue has been seen with

rtpengine-mr11.5.1.15

Used distribution and its version

Oracle 9

Linux kernel version used

5.15.62-13.el7.x86_64

CPU architecture issue was seen on (see uname -m)

amd64

Expected behaviour you didn't see

My setup has such rtpengine.conf:

[rtpengine]
log-level=9
table = -1

interface= sip/10.120.30.191;webrtc_direct/10.120.30.191;webrtc_server/10.120.30.191
listen-ng = 10.120.30.191:25061

port-min = 10000
port-max = 19999

timeout = 60
silent-timeout = 3600
tos = 184
audio-player = always

that is, transcoding is always enabled.

I've sent offer request to rtpengine:

{
  "sdp": "v=0\r\no=mozilla...THIS_IS_SDPARTA-99.0 6320273609145978279 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=sendrecv\r\na=fingerprint:sha-256 BC:C3:03:C7:D7:B7:D4:F8:C3:E6:AC:DE:EB:C1:6C:7F:55:FA:6A:E1:B6:22:D3:31:EE:70:28:50:53:7F:90:47\r\na=group:BUNDLE 0 1\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=audio 9 UDP/TLS/RTP/SAVPF 109 9 0 8 101\r\nc=IN IP4 0.0.0.0\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level\r\na=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1\r\na=fmtp:101 0-15\r\na=ice-pwd:e908dd9fb64c28e51148e8b98450494e\r\na=ice-ufrag:ff30cc31\r\na=mid:0\r\na=msid:{024021f0-7c1b-4b8b-acad-79735e695d1b} {48ad08fd-9f0d-4965-8dbe-a6b77a39530f}\r\na=rtcp-mux\r\na=rtpmap:109 opus/48000/2\r\na=rtpmap:9 G722/8000/1\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=setup:actpass\r\na=ssrc:3309166106 cname:{fcb8ba0f-2482-4894-8a59-f278fbbbc276}\r\na=candidate:0 1 UDP 2122055935 192.168.0.106 46221 typ host\r\na=candidate:3 1 UDP 2122121471 192.168.80.1 47378 typ host\r\na=candidate:6 1 UDP 2122252543 100.64.140.120 48905 typ host\r\na=candidate:9 1 UDP 2122187007 10.99.9.227 46745 typ host\r\na=candidate:12 1 TCP 2105327871 192.168.0.106 9 typ host tcptype active\r\na=candidate:14 1 TCP 2105393407 192.168.80.1 9 typ host tcptype active\r\na=candidate:16 1 TCP 2105524479 100.64.140.120 9 typ host tcptype active\r\na=candidate:18 1 TCP 2105458943 10.99.9.227 9 typ host tcptype active\r\na=candidate:0 2 UDP 2122055934 192.168.0.106 40338 typ host\r\na=candidate:3 2 UDP 2122121470 192.168.80.1 56162 typ host\r\na=candidate:6 2 UDP 2122252542 100.64.140.120 50867 typ host\r\na=candidate:9 2 UDP 2122187006 10.99.9.227 35398 typ host\r\na=candidate:12 2 TCP 2105327870 192.168.0.106 9 typ host tcptype active\r\na=candidate:14 2 TCP 2105393406 192.168.80.1 9 typ host tcptype active\r\na=candidate:16 2 TCP 2105524478 100.64.140.120 9 typ host tcptype active\r\na=candidate:18 2 TCP 2105458942 10.99.9.227 9 typ host tcptype active\r\na=candidate:0 1 UDP 2122055935 192.168.0.106 41379 typ host\r\na=candidate:3 1 UDP 2122121471 192.168.80.1 47776 typ host\r\na=candidate:6 1 UDP 2122252543 100.64.140.120 48201 typ host\r\na=candidate:9 1 UDP 2122187007 10.99.9.227 49935 typ host\r\na=candidate:12 1 TCP 2105327871 192.168.0.106 9 typ host tcptype active\r\na=candidate:14 1 TCP 2105393407 192.168.80.1 9 typ host tcptype active\r\na=candidate:16 1 TCP 2105524479 100.64.140.120 9 typ host tcptype active\r\na=candidate:18 1 TCP 2105458943 10.99.9.227 9 typ host tcptype active\r\na=candidate:0 2 UDP 2122055934 192.168.0.106 46181 typ host\r\na=candidate:3 2 UDP 2122121470 192.168.80.1 53997 typ host\r\na=candidate:6 2 UDP 2122252542 100.64.140.120 60906 typ host\r\na=candidate:9 2 UDP 2122187006 10.99.9.227 58665 typ host\r\na=candidate:12 2 TCP 2105327870 192.168.0.106 9 typ host tcptype active\r\na=candidate:14 2 TCP 2105393406 192.168.80.1 9 typ host tcptype active\r\na=candidate:16 2 TCP 2105524478 100.64.140.120 9 typ host tcptype active\r\na=candidate:18 2 TCP 2105458942 10.99.9.227 9 typ host tcptype active\r\na=candidate:15 1 UDP 8200191 10.120.136.31 50200 typ relay raddr 10.120.136.31 rport 50200\r\na=candidate:19 1 UDP 8265727 10.120.136.31 36196 typ relay raddr 10.120.136.31 rport 36196\r\na=candidate:15 2 UDP 8200190 10.120.136.31 57344 typ relay raddr 10.120.136.31 rport 57344\r\na=candidate:19 2 UDP 8265726 10.120.136.31 34679 typ relay raddr 10.120.136.31 rport 34679\r\na=candidate:15 1 UDP 8200191 10.120.136.31 39002 typ relay raddr 10.120.136.31 rport 39002\r\na=candidate:19 1 UDP 8265727 10.120.136.31 36263 typ relay raddr 10.120.136.31 rport 36263\r\na=candidate:15 2 UDP 8200190 10.120.136.31 63572 typ relay raddr 10.120.136.31 rport 63572\r\na=candidate:19 2 UDP 8265726 10.120.136.31 46674 typ relay raddr 10.120.136.31 rport 46674\r\na=candidate:10 1 UDP 1685986303 217.20.148.196 46745 typ srflx raddr 10.99.9.227 rport 46745\r\na=candidate:11 1 UDP 92150783 10.120.136.31 51546 typ relay raddr 10.120.136.31 rport 51546\r\na=candidate:4 1 UDP 1685920767 217.20.148.196 47378 typ srflx raddr 192.168.80.1 rport 47378\r\na=candidate:5 1 UDP 92085247 10.120.136.31 42392 typ relay raddr 10.120.136.31 rport 42392\r\nm=video 0 UDP/TLS/RTP/SAVPF 121 120 124 125 126 127 97 98\r\nc=IN IP4 0.0.0.0\r\na=mid:1\r\n",
  "direction": [
    "webrtc_direct",
    "sip"
  ],
  "replace": [
    "session-connection",
    "origin",
    "session-name",
    "zero address"
  ],
  "flags": [
    "original sendrecv"
  ],
  "command": "offer",
  "call-id": "5317bafb-afa2-47dc-9e26-a799a6847ab8",
  "from-tag": "WEBRTC_DIRECT_0",
  "ICE": "remove",
  "transport protocol": "RTP/SAVP",
  "rtcp-mux": [
    "demux"
  ]
}

In SDP we have id 3309166106 (0xc53dde1a).

Response from RTPEngine, that I've received:

{
  "sdp": "v=0\r\no=mozilla...THIS_IS_SDPARTA-99.0 6320273609145978279 0 IN IP4 10.120.30.191\r\ns=-\r\nt=0 0\r\na=sendrecv\r\na=msid-semantic:WMS *\r\nm=audio 16504 RTP/SAVP 109 9 0 8 101\r\nc=IN IP4 10.120.30.191\r\na=sendrecv\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level\r\na=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=msid:{024021f0-7c1b-4b8b-acad-79735e695d1b} {48ad08fd-9f0d-4965-8dbe-a6b77a39530f}\r\na=ssrc:3309166106 cname:{fcb8ba0f-2482-4894-8a59-f278fbbbc276}\r\na=mid:0\r\na=rtpmap:109 opus/48000/2\r\na=fmtp:109 stereo=1; useinbandfec=1; maxplaybackrate=48000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-15\r\na=rtcp:16505\r\na=crypto:1 AEAD_AES_256_GCM inline:aCE5Hb9Alz0sRodO2gdxvdSfj+Ly0jh8sT3nBvND7PRn0Dh/olZ0vmIkztE\r\na=crypto:2 AEAD_AES_128_GCM inline:KlAIhssMdIqkeZKHBz7XljMKdJQd+8fnc2EjyA\r\na=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:N/GnVUeRfpB7XdJPepAnPybofOa+ntGZlMTkXsCDvakzPiIvBv4qcSz2zGeHXw\r\na=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:+LtrpzoeKl9cS+j9NRC25b5sEXC9EurbJNwLjQVR1bCzSQHtpt9uWBkqudxd3g\r\na=crypto:5 AES_192_CM_HMAC_SHA1_80 inline:UnXW26MRTAS8SbKCXYkaMPvZXGGZ4r26PaKxQdu29eU9jGmh/zU\r\na=crypto:6 AES_192_CM_HMAC_SHA1_32 inline:er5eDm/QINkPy+5ZKLDKTtBguMBHOTvmJQ6kcu50fGwUkt4srwQ\r\na=crypto:7 AES_CM_128_HMAC_SHA1_80 inline:yG2h7mhiVV3LXQd1NMA4UYZc8FevVeUNofBNL4QF\r\na=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:VSm8pIbmZcvu2z28JxuvcW4rgRPLlnJ53SMS7vxj\r\na=crypto:9 F8_128_HMAC_SHA1_80 inline:SRCMdSbLpPNUK7kLJthI07jyPqk32tbMzITQgqk6\r\na=crypto:10 F8_128_HMAC_SHA1_32 inline:7fG350kwshf0DqQe5ghR4ZdDrJUjcD11wVy5zPF0\r\na=crypto:11 NULL_HMAC_SHA1_80 inline:FUZSyksupN6Akj0P6tyf3k8V8xApu4NnFd+sGgvJ\r\na=crypto:12 NULL_HMAC_SHA1_32 inline:DrxmZYqmZRbikNr5QjTYGmbRs+qmY9Jvc2Zdg4WG\r\na=setup:actpass\r\na=fingerprint:sha-256 9B:9A:10:4E:DF:D1:75:05:A9:A2:B4:FB:51:E6:EA:EC:32:B0:9B:C7:7F:46:0A:05:73:0A:63:66:12:35:5B:37\r\na=tls-id:5716ac0ff36999108e8d265baba35983\r\nm=video 0 RTP/SAVP 121 120 124 125 126 127 97 98\r\nc=IN IP4 10.120.30.191\r\na=mid:1\r\n",
  "result": "ok"
}

Response has the same SSRC 3309166106 (0xc53dde1a).

The same is for answer. I've sent:

{
  "sdp": "v=0\r\no=- 3911378639 3911378640 IN IP4 10.144.2.23\r\ns=pjmedia\r\nb=AS:117\r\nt=0 0\r\na=X-nat:0\r\nm=audio 15003 RTP/SAVP 109 101\r\nc=IN IP4 10.144.2.23\r\nb=TIAS:96000\r\na=rtcp:15004 IN IP4 10.144.2.23\r\na=sendrecv\r\na=ssrc:1754653800 cname:2bb937931766f29c\r\na=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:XrNtEB2jNsTRB01Eyuu8fywzAxY56Lx6eBYhrD2Ly7YnQPc2W9qWVwjZkOJNqw==\r\na=rtpmap:109 opus/48000/2\r\na=fmtp:109 useinbandfec=1\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\nm=video 0 RTP/SAVP 121 120 124 125 126 127 97 98\r\nc=IN IP4 10.120.30.191\r\n",
  "direction": [
    "sip",
    "webrtc_direct"
  ],
  "replace": [
    "session-connection",
    "origin",
    "session-name",
    "zero address"
  ],
  "flags": [
    "original sendrecv"
  ],
  "command": "answer",
  "call-id": "5317bafb-afa2-47dc-9e26-a799a6847ab8",
  "from-tag": "WEBRTC_DIRECT_0",
  "to-tag": "SIP_0",
  "ICE": "force"
}

And response, I've received:

{
  "sdp": "v=0\r\no=- 3911378639 3911378640 IN IP4 10.120.30.191\r\ns=pjmedia\r\nb=AS:117\r\nt=0 0\r\na=X-nat:0\r\nm=audio 17868 UDP/TLS/RTP/SAVPF 109\r\nc=IN IP4 10.120.30.191\r\nb=TIAS:96000\r\na=sendrecv\r\na=ssrc:1754653800 cname:2bb937931766f29c\r\na=mid:0\r\na=rtpmap:109 opus/48000/2\r\na=fmtp:109 stereo=1; sprop-stereo=1; useinbandfec=1\r\na=rtcp:17868\r\na=rtcp-mux\r\na=setup:active\r\na=fingerprint:sha-256 9B:9A:10:4E:DF:D1:75:05:A9:A2:B4:FB:51:E6:EA:EC:32:B0:9B:C7:7F:46:0A:05:73:0A:63:66:12:35:5B:37\r\na=tls-id:9c1f9367ba333d2bb216cca1c032c4be\r\na=ice-ufrag:NC3XlSCo\r\na=ice-pwd:VyvSHj9OR8mWv0aM4C3OFqNV1o\r\na=ice-options:trickle\r\na=candidate:GHUNOqhImokLT2LA 1 UDP 2130706431 10.120.30.191 17868 typ host\r\na=end-of-candidates\r\nm=video 0 UDP/TLS/RTP/SAVPF 121 120 124 125 126 127 97 98\r\nc=IN IP4 10.120.30.191\r\na=mid:1\r\n",
  "result": "ok"
}

That is, SSRC in request and response are the same: 1754653800 (0x6895E468).

But, because of transcoding, SSRC of input RTP packet and output RTP packet are different, this can be seen in rtpengine logs, for instance, in my case:

Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [core] Handling packet on: 10.99.9.227:46745
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [core] Handling packet: remote 10.99.9.227:46745 (expected: 1
0.99.9.227:46745) -> local 10.120.30.191:17868 (RTP seq 17565 TS 3785228561 SSRC c53dde1a)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [transcoding] Received RTP packet: SSRC c53dde1a, PT 109, seq
 17565, TS 3785228561, len 161
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [internals] returning in-sequence packet (seq 17565)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [transcoding] Processing RTP packet: seq 17565, TS 3785228561
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [transcoding] Decoding RTP packet now
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [internals] 0x7f01d226b7e0 dec pts 306240 rtp_ts 184467440731
99811921 incoming ts 18446744073199812881
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [transcoding] RTP media decoded for audio player: TS 307200,
samples 960
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [internals] packet queue empty
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [core] stream 10.99.9.227:46745 NO_KERNEL_SUPPORT
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [internals] 0x7f01d226b690 dec pts 354240 rtp_ts 354240 incoming ts 3552
00
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [internals] send packet ret 0
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [internals] receive frame ret 0
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [internals] raw frame from decoder pts 355200 samples 960
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [internals] receive frame ret -11
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [transcoding] RTP media successfully decoded: TS 355200, samples 960
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [internals] output fifo pts 355200
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [internals] 0x7f01d226b540 dec pts 354240 rtp_ts 354240 incoming ts 355200
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [internals] send packet ret 0
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [internals] receive frame ret 0
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [internals] raw frame from decoder pts 355200 samples 960
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [internals] receive frame ret -11
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [transcoding] RTP media successfully decoded: TS 355200, samples 960
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [internals] output fifo pts 355200
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [transcoding] RTP media successfully encoded: TS 355200, len 60
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [transcoding] Adding 60 bytes to packetizer
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [transcoding] Received packet of 60 bytes from packetizer
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1]: [transcoding] Scheduling to send RTP packet (seq 26152 TS 656655238985036605) in 0.0 ms (at 1702389847.252262)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [transcoding] RTP media successfully encoded: TS 355200, len 45
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [transcoding] Adding 45 bytes to packetizer
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [transcoding] Received packet of 45 bytes from packetizer
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1]: [transcoding] Scheduling to send RTP packet (seq 5490 TS 9865353438681979474) in 0.0 ms (at 1702389847.252455)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1 port 16504]: [core] Forward to sink endpoint: local 10.120.30.191:16504 -> remote 10.120.31.40:15003 (RTP seq 5490 TS 5331538 SSRC 807016)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/WEBRTC_DIRECT_0/1 port 17868]: [core] Forward to sink endpoint: local 10.120.30.191:17868 -> remote 10.99.9.227:46745 (RTP seq 26152 TS 4086969149 SSRC defee39e)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1 port 16504]: [core] Handling packet on: 10.120.31.40:15003
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1 port 16504]: [core] Handling packet: remote 10.120.31.40:15003 (expected: 10.120.31.40:15003) -> local 10.120.30.191:16504 (RTP seq 29782 TS 359040 SSRC 6895e468)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1 port 16504]: [transcoding] Received RTP packet: SSRC 6895e468, PT 109, seq 29782, TS 359040, len 140
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1 port 16504]: [internals] returning in-sequence packet (seq 29782)
Dec 12 17:04:07 rtpengine_host rtpengine[4335] DEBUG: [5317bafb-afa2-47dc-9e26-a799a6847ab8/SIP_0/1 port 16504]: [transcoding] Processing RTP packet: seq 29782, TS 359040

That is, we have 4 SSRCs (and this is true, I've checked it with tcpdump and wireshark):

So, it seems, that in response to offer request, we expect to see a=ssrc:8417302, but we see a=ssrc:3309166106. The same for response to answer request, we expect to see a=ssrc:3741246366, but we see a=ssrc:1754653800.

That is RTPEngine doesn't change SSRC attribute in response and use the same, that it received in request, but input and output RTP packets have different SSRCs. Expected bevaviour in this case, that RTPEngine changes SSRC attribute in SDP in response according to changes in RTP packets.

Unexpected behaviour you saw

Response from RTPEngine has SDP with the same SSRC attribute as in request, but transcoding changes SSRC in RTP packets.

Steps to reproduce the problem

No response

Additional program output to the terminal or logs illustrating the issue

No response

Anything else?

No response

biv commented 9 months ago

The same for rtpengine-mr12.0.1.2

rfuchs commented 9 months ago

We don't currently interpret, change or manipulate a=ssrc in any way. This would have to be added as a new feature.

biv commented 9 months ago

Ok, thank you. Can you, please, suggest any way to find out new SSRC values at the SDP exchange stage?