Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SOFIAPUBFUN sip_contact_t* sip_contact_create_from_via ( su_home_t home,
sip_via_t const *  v,
char const *  user 

Convert a header to header.

The URI will contain the port number if needed. If transport protocol name starts with "TLS", "SIPS:" URI schema is used. Transport parameter is included in the URI unless the transport protocol is UDP.

home memory home
v header field structure (with <sent-protocol> and <sent-by> parameters)
user username for URI (may be NULL)
Return values:
contact header structure
NULL upon an error
See also:
sip_contact_create_from_via_with_transport(), sip_contact_string_from_via()

Definition at line 155 of file sip_util.c.

References sip_transport_udp, and sip_via_s::v_protocol.

  const char *tp;

  if (!v) return NULL;

  tp = v->v_protocol;

  if (tp == sip_transport_udp ||
      strcasecmp(tp, sip_transport_udp) == 0)  /* Default is UDP */
    tp = NULL;

  return sip_contact_create_from_via_with_transport(home, v, user, tp);

Generated by  Doxygen 1.6.0   Back to index