sems-server/sems

[SEMS] Content-Length duplicating when failure rerouting

denyspozniak opened this issue · 9 comments

Hello!
We are using sems 1.7.1 and looks like there is a bug in sbc application in case of call rerouting via option next_hop.
Here is a sbcprofile main settings:

RURI = sip:$rU@10.10.10.10:5060
To = <sip:$tU@10.10.10.10>
From = <sip:$fU@$rd>
next_hop=10.10.10.10/UDP,10.10.10.20/UDP
enable_rtprelay=no
sdp_filter=transparent
sdp_anonymize=no
enable_transcoder=never

When primary node (10.10.10.10) does not respond, call goes to secondary (10.10.10.20), but outgoing INVITE has two Content-Length fields, like below:

2018/12/18 11:39:17.293209 10.10.10.1:5060 -> 10.10.10.20:5060
INVITE sip:+12345@10.10.10.20:5060 SIP/2.0
...
Content-Type: application/sdp
Content-Length: 283
Contact: <sip:10.10.10.1:5060;transport=udp>
Content-Length: 283

Hello!
Print-screen demonstrates this issue:

image

Some additional information.
If next_hop has 3 IPs, there will be 3 Content-Length headers...

Hello!
Looks like it does not work well, sems crashes before rerouting.
sems-syslog.txt

Hello!
Looks like your patch fixed this issue.
Thanks!

Fixed by commit 6fd8eeb.