[SR-Users] forced tls over tcp

David Villasmil david.villasmil.work at gmail.com
Mon May 15 15:20:23 CEST 2017


Hello guys,

I'm listening on port 443 for tls and 5111 for tcp.

Client registers on 443 and makes a call over tls which kamailio forwards
over tcp.

Because freeswitch doesn't support "sips" yet, when replies come back from
freeswitch (which contact set as "sip:" i manually change that tp "sips:"
for the client to not die with "SIPS Required".

Call is established and the client responds with ACK. At this point i need
to change back the contact "sips:" to "sip:".

This is the route that changes it:

route[FIXCONTACT] {

    # This is freeswitch sending a message, so we change "sip:" to "sips:"
    xlog("L_ERR","[FIXCONTACT]: User-Agent is: $ua\n");

    if( $ua =~ "^FreeSWITCH" ) {
        if( subst('/^(Contact:.*)sip:/\1sips:/') ) {
            xlog("L_ERR","[FIXCONTACT]: Method $rm Status $rs Changed
contact coming from freeSWITCH from sip to sips [$ct]!\n");
        }
    # Else it is the client, when change it back from "sips:" to "sip:"
    } else {
        if( subst("/^(Contact:.*)sips:/\1sip:/") ) {
            xlog("L_ERR","[FIXCONTACT]: Method $rm Status $rs Changed
contact coming from CLIENT from sips to sip [$ct]!\n");
        }
    }
    return;
}

When kamailio is preparing to send out the ACK via TCP I'm seeing:

[forward.c:268]: get_send_socket2(): protocol/port mismatch

And I really don't know why it's doing this...

Help is appreciated!


Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170515/6f3e819f/attachment.html>


More information about the sr-users mailing list