Children of the init

Don't feed the geek!
  • Home
  • Imprint / Impressum

mod_sofia TLS status

Published by stkn on January 7, 2008 04:11 pm under FreeSWITCH

A short overview of the current status of TLS support in mod_sofia.

Things that work:

originating calls via sip profile name, like:

sofia/default/user@remote;transport=tls or {sip_transport=tls}sofia/default/user@remote

will use TLS (or any other supported transport type)

Receiving calls works too, but i’m currently extracting the transport from the contact header and i’m not 100% sure that’s working when there’s a proxy in the middle.

What i’m working on right now:

Originating calls using a gateway. Specifying the transport using:

sofia/gateway/testgw/1234;transport=tls

already works, overriding the register transport this way is working too (e.g. registering via TLS and dialing via SCTP, not sure we really want to support that though (?)).

Using {sip_transport=…} to change the transport for dialing doesn’t work for gateways at the moment. The sip_transport variable is handled in sofia_glue_do_invite(), while the gateway params and the invite_contact are created/handled in sofia_outgoing_channel(). Fixing this means either moving code from sofia_glue…() to sofia_outgoing channel() or creating a new invite_contact for gateways in sofia_glue…(). We’ll see…

Changes so far:

– keep track of transport type in tech_pvt->transport and gateway->register_transport.

– fix handling of gateway dialing params in sofia_outgoing channel

– remove some code duplication

– transport string comparisons using strncasecmp now

– create a new invite_contact if the gateway’s register_transport and the “invite” transport differ

What needs to be done:

Check (and change) transport handling of the presence stuff.

What i’m thinking about:

Something that could be handy for (fully working) IPv6 support…

Extend / change the sofia_transport_t type and enum to a set of flags, the lower bits handling the transport protocol (TCP, UDP, SCTP, TLS) and some of the upper bits the network protocol (IP / IPv6).

E.g.:

enum {

SOFIA_TRANSPORT_UNKNOWN = 0,

SOFIA_TRANSPORT_UDP = (1 << 0),

SOFIA_TRANSPORT_TCP = (1<<1),

SOFIA_TRANSPORT_TCP_TLS = (1<<2),

SOFIA_TRANSPORT_SCTP = (1<<3),

SOFIA_TRANSPORT_SCTP_TLS = (1<<4),

SOFIA_TRANSPORT_IP6 = (1<<24)

};

#define sofia_transport_is_ip6(x) (x & SOFIA_TRANSPORT_IP6)

#define sofia_transport_type(x) (x & 0x00FFFFFF)

#define sofia_transport_proto(x) (x & 0xFF000000)

…

No Comment

Comments are closed.

Posting your comment.

  • Categories

    • Development (39)
      • FreeSWITCH (23)
      • FreeTDM (2)
      • OpenZAP (9)
    • Hardware (1)
    • Misc (2)
  • Pages

    • About
    • Imprint / Impressum
  • Archives

    • January 2011
    • November 2010
    • June 2010
    • February 2010
    • January 2010
    • December 2009
    • October 2009
    • August 2009
    • July 2009
    • June 2009
    • April 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • March 2008
    • January 2008
    • November 2007
  • Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

Copyright © 2021 Children of the init
WordPress Theme based on Light Theme