[SR-Users] question for best way to remove sips uris - TLS and sips in $ru - get_send_socket2(): protocol/port mismatch

Karsten Horsmann khorsmann at gmail.com
Fri Aug 18 13:54:10 CEST 2017


Hello List,


of course - best way is not to use sips: uri scheme. But i have to deal
with that.

I try to configure an multihomed kamailio (public/private IP) in front of
my SIP-Servers.
One of my softphones variants used TLS for connection but the INVITES of
this softphone use the "sips" URI scheme.

As i saw in other posts, this seems to be an issue for many people.
In my case it breaks the routing to my internal sip-server (only plain udp).

Most of my config is similar to havfos example + TLS.
https://github.com/havfo/WEBRTC-to-SIP/blob/master/etc/kamailio/kamailio.cfg


I tried to fixed that with this extra route -
but this breaks the dialog somewhere - after 60 seconds i have no audio and
the BYE becomes another CSeq:

in the request_route right after route(AUTH)  i add my route(FIX_SIPS)

        if (is_method("INVITE|SUBSCRIBE")) {
                if ($ru =~ "^sips:") {
                        route(FIX_SIPS);
                } else {
                        record_route();
                }
        }


route[FIX_SIPS] {
        if ($ru =~ "^sips:") {
                xlog("L_INFO","---FIX_SIPS-before: ru:($ru)");
                $var(orig_uri) = $ru;
                $ru = "sip:" + $rU + "@" + $td;
                xlog("L_INFO","---FIX_SIPS-now: $rU $td ru:($ru)
orig_uri:($var(orig_uri))");
                record_route();
                #$ru = $var(orig_uri);
                xlog("L_INFO","---FIX_SIPS-after: ru:($ru)");
        }
}


172.20.120.81 = Kamailio private IP
172.20.120.79 = My internal SIP-Server (B2BUA)


I used kamailio with CentOS 7 and RTPENGINE 63bdd615 from master
kamailio-5.0.2-3.1.x86_64
kamailio-tls-5.0.2-3.1.x86_64
kamailio-mysql-5.0.2-3.1.x86_64
kamailio-websocket-5.0.2-3.1.x86_64

-- 
Kind Regards
*Karsten Horsmann*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170818/9cf59284/attachment.html>


More information about the sr-users mailing list