I see that the comparison of the IPs is done with string operations. That's ok for ipv4, but can be a mismatch with ipv6 because there can be different forms of the same address.
I suggest to convert the the ip in sdp to binary struct and compare with the src ip which is in binary struct -- see str2ipxbuf() or str2ipx() and ip_addr_cmp() functions/macros.