[OpenSIPS-Users] RTPEngine - garbage collector deletes active branch

Julian Santer julian.santer at rolmail.net
Tue Mar 8 11:47:07 CET 2016


Hi guys,

we are implementing OpenSips 2.1.2 with rptengine version 4.3.0.0-git git-master-926d9d3.
Now we got a problem on calls with multiple branches.
We call rtpengine_manage("replace-origin replace-session-connection ICE=remove via-branch=extra");
The extra-id is containing the call ID and the branch ID

Here a example with 2 branches:

INVITE 1. branch (ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0):
Mar  8 11:14:25  Received command 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Dump for 'offer' from 1.2.3.4:59038: { "sdp": "v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 2.3.4.5#015#012s=SIP 
Call#015#012c=IN IP4 2.3.4.6#015#012t=0 0#015#012m=audio 59482 RTP/AVP 18 8 0 4 125 101#015#012c=IN IP4 2.3.4.6#015#012a=rtpmap:18 
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101 
telephone-event/8000#015#012a=fmtp:101 0-16#015#012", "ICE": "remove", "replace": [ "origin", "session-connection" ], "call-id": 
"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBc ...
Mar  8 11:14:25  ... BWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", "via-branch": "ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0", 
"received-from": [ "IP4", "1.2.3.5" ], "from-tag": "D40356B0-22E3", "command": "offer" }
Mar  8 11:14:25  Creating new call
Mar  8 11:14:25  set FILLED flag for stream 2.3.4.6:59482
Mar  8 11:14:25  set FILLED flag for stream 2.3.4.6:59483
Mar  8 11:14:25  Replying to 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Response dump for 'offer' to 1.2.3.4:59038: { "sdp": "v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 1.2.3.6#015#012s=SIP 
Call#015#012c=IN IP4 1.2.3.6#015#012t=0 0#015#012m=audio 50000 RTP/AVP 18 8 0 4 125 101#015#012c=IN IP4 1.2.3.6#015#012a=rtpmap:18 
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101 
telephone-event/8000#015#012a=fmtp:101 0-16#015#012a=sendrecv#015#012a=rtcp:50001#015#012", "result": "ok" }

INVITE 1. branch (ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1):
Mar  8 11:14:25  Received command 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Dump for 'offer' from 1.2.3.4:59038: { "sdp": "v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 2.3.4.5#015#012s=SIP 
Call#015#012c=IN IP4 2.3.4.6#015#012t=0 0#015#012m=audio 59482 RTP/AVP 18 8 0 4 125 101#015#012c=IN IP4 2.3.4.6#015#012a=rtpmap:18 
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101 
telephone-event/8000#015#012a=fmtp:101 0-16#015#012", "ICE": "remove", "replace": [ "origin", "session-connection" ], "call-id": 
"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBc ...
Mar  8 11:14:25  ... BWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", "via-branch": "ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1", 
"received-from": [ "IP4", "1.2.3.5" ], "from-tag": "D40356B0-22E3", "command": "offer" }
Mar  8 11:14:25  Replying to 'offer' from 1.2.3.4:59038
Mar  8 11:14:25  Response dump for 'offer' to 1.2.3.4:59038: { "sdp": "v=0#015#012o=CiscoSystemsSIP-GW-UserAgent 4454 7726 IN IP4 1.2.3.6#015#012s=SIP 
Call#015#012c=IN IP4 1.2.3.6#015#012t=0 0#015#012m=audio 50040 RTP/AVP 18 8 0 4 125 101#015#012c=IN IP4 1.2.3.6#015#012a=rtpmap:18 
G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=fmtp:4 bitrate=5.3;annexa=no#015#012a=rtpmap:125 X-CCD/8000#015#012a=rtpmap:101 
telephone-event/8000#015#012a=fmtp:101 0-16#015#012a=sendrecv#015#012a=rtcp:50041#015#012", "result": "ok" }

OK 1. branch (ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0):
Mar  8 11:14:33  Received command 'offer' from 1.2.3.4:47625
Mar  8 11:14:33  Dump for 'offer' from 1.2.3.4:47625: { "sdp": "v=0#015#012o=root 2042928516 2042928517 IN IP4 3.4.5.6#015#012s=call#015#012c=IN IP4 
3.4.5.6#015#012t=0 0#015#012m=audio 51372 RTP/AVP 18 8 0 101#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 annexb=yes#015#012a=rtpmap:8 
PCMA/8000#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-16#015#012a=sendrecv#015#012", "ICE": "remove", 
"replace": [ "origin", "session-connection" ], "call-id": "ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", "via-branch" ...
Mar  8 11:14:33  ... : "ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0", "received-from": [ "IP4", "1.2.3.7" ], "from-tag": 
"b8nbyduymv", "to-tag": "D40356B0-22E3", "command": "offer" }
Mar  8 11:14:33  set FILLED flag for stream 3.4.5.6:51372
Mar  8 11:14:33  set FILLED flag for stream 3.4.5.6:51373
Mar  8 11:14:33  Replying to 'offer' from 1.2.3.4:47625
Mar  8 11:14:33  Response dump for 'offer' to 1.2.3.4:47625: { "sdp": "v=0#015#012o=root 2042928516 2042928517 IN IP4 
1.2.3.6#015#012s=call#015#012c=IN IP4 1.2.3.6#015#012t=0 0#015#012m=audio 50018 RTP/AVP 18 8 0 101#015#012a=rtpmap:18 G729/8000#015#012a=fmtp:18 
annexb=yes#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 
0-16#015#012a=sendrecv#015#012a=rtcp:50019#015#012", "result": "ok" }

Cancel 2. branch (ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1):
Mar  8 11:14:33  Received command 'delete' from 1.2.3.4:36513
Mar  8 11:14:33  Dump for 'delete' from 1.2.3.4:36513: { "ICE": "remove", "call-id": 
"ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-", "via-branch": "ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1", 
"received-from": [ "IP4", "1.2.3.7" ], "from-tag": "7F943699500EBFA6", "to-tag": "D40356B0-22E3", "command": "delete" }
Mar  8 11:14:33  Scheduling deletion of call branch 'D40356B0-22E3' (via-branch 'ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1') 
in 30 seconds
Mar  8 11:14:33  Replying to 'delete' from 1.2.3.4:36513
Mar  8 11:14:33  Response dump for 'delete' to 1.2.3.4:36513: { "created": 1457432065, "last signal": 1457432073, "tags": { "D40356B0-22E3": { "tag": 
"D40356B0-22E3", "created": 1457432065, "in dialogue with": "b8nbyduymv", "medias": [ { "index": 1, "type": "audio", "protocol": "RTP/AVP", "streams": 
[ { "local port": 50018, "endpoint": { "family": "IPv4", "address": "2.3.4.6", "port": 59482 }, "advertised endpoint": { "family": "IPv4", "address": 
"2.3.4.6", "port": 59482 }, "last packet": 14 ...
Mar  8 11:14:33  ... 57432065, "flags": [ "RTP", "filled" ], "stats": { "packets": 0, "bytes": 0, "errors": 0 } }, { "local port": 50019, "endpoint": 
{ "family": "IPv4", "address": "2.3.4.6", "port": 59483 }, "advertised endpoint": { "family": "IPv4", "address": "2.3.4.6", "port": 59483 }, "last 
packet": 1457432065, "flags": [ "RTCP", "filled" ], "stats": { "packets": 0, "bytes": 0, "errors": 0 } } ], "flags": [ "initialized", "send", "recv" ] 
} ] }, "b8nbyduymv": { "tag": "b8nbyduymv", "via-branch": " ...
Mar  8 11:14:33  ... ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0", "created": 1457432065, "in dialogue with": "D40356B0-22E3", 
"medias": [ { "index": 1, "type": "audio", "protocol": "RTP/AVP", "streams": [ { "local port": 50000, "endpoint": { "family": "IPv4", "address": 
"3.4.5.6", "port": 51372 }, "advertised endpoint": { "family": "IPv4", "address": "3.4.5.6", "port": 51372 }, "last packet": 1457432073, "flags": [ 
"RTP", "filled" ], "stats": { "packets": 1, "bytes": 28, "err ...
Mar  8 11:14:33  ... ors": 0 } }, { "local port": 50001, "endpoint": { "family": "IPv4", "address": "3.4.5.6", "port": 51373 }, "advertised endpoint": 
{ "family": "IPv4", "address": "3.4.5.6", "port": 51373 }, "last packet": 1457432073, "flags": [ "RTCP", "filled" ], "stats": { "packets": 1, "bytes": 
48, "errors": 0 } } ], "flags": [ "initialized", "send", "recv" ] } ] } }, "totals": { "RTP": { "packets": 1, "bytes": 28, "errors": 0 }, "RTCP": { 
"packets": 1, "bytes": 48, "errors": 0 } }, "result": "ok"  ...
Mar  8 11:14:33  ... }

Established call 1. branch
Mar  8 11:14:37 Confirmed peer address as 2.3.4.6:59482
Mar  8 11:14:37 Confirmed peer address as 3.4.5.6:51372
Mar  8 11:14:37 Kernelizing media stream: 3.4.5.6:51372
Mar  8 11:14:37 Kernelizing media stream: 2.3.4.6:59482
Mar  8 11:14:38 Confirmed peer address as 3.4.5.6:51373
Mar  8 11:14:40 Confirmed peer address as 2.3.4.6:59483

Garbage collector removes also the established and working 1. branch
Mar  8 11:15:03  Call branch 'D40356B0-22E3' (via-branch '') deleted, no more branches remaining
Mar  8 11:15:03  Final packet stats:
Mar  8 11:15:03  --- Tag 'D40356B0-22E3', created 0:38 ago for branch '', in dialogue with 'b8nbyduymv'
Mar  8 11:15:03  ------ Media #1 (audio over RTP/AVP) using G729/8000
Mar  8 11:15:03  --------- Port 50018 <>  2.3.4.6:59482, 1417 p, 45344 b, 0 e, 1457432102 last_packet
Mar  8 11:15:03  --------- Port 50019 <>  2.3.4.6:59483 (RTCP), 6 p, 792 b, 0 e, 1457432101 last_packet
Mar  8 11:15:03  --- Tag 'b8nbyduymv', created 0:38 ago for branch 'ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-0', in dialogue 
with 'D40356B0-22E3'
Mar  8 11:15:03  ------ Media #1 (audio over RTP/AVP) using G729/8000
Mar  8 11:15:03  --------- Port 50000 <>   3.4.5.6:51372, 1560 p, 41746 b, 0 e, 1457432102 last_packet
Mar  8 11:15:03  --------- Port 50001 <>   3.4.5.6:51373 (RTCP), 6 p, 388 b, 0 e, 1457432098 last_packet
Mar  8 11:15:03  --- Tag '', created 0:38 ago for branch 'ZzJFVwVlR0BDd2RHMF8DFUZZLAQUQjBcBWReR1ZzEUFHWgQQS0dAAGFCWlwcYUE-1', in dialogue with 
'D40356B0-22E3'
Mar  8 11:15:03  ------ Media #1 (audio over RTP/AVP) using unknown codec
Mar  8 11:15:03  --------- Port 50040 <>          (null):0    , 0 p, 0 b, 0 e, 1457432065 last_packet
Mar  8 11:15:03  --------- Port 50041 <>          (null):0     (RTCP), 0 p, 0 b, 0 e, 1457432065 last_packet

It seems, that the VIA-branch is been ignored and only the to-tag is been recognized by the garbage collector.
But I'm sure that RTPEngine can handle multiple branches. So maybe you could give me a hint, where my error is?

Kind regards,
Julian Santer
Raiffeisen OnLine




More information about the Users mailing list