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

sip_route_t* sip_route_follow ( msg_t msg,
sip_t sip 

Get first route header and rewrite the RequestURI.

Definition at line 529 of file sip_util.c.

References msg_home, sip_route_s::r_url, sip_request_s::rq_method, sip_request_s::rq_method_name, sip_request_s::rq_url, sip_request_s::rq_version, sip_s::sip_request, sip_request_create(), sip_s::sip_route, sip_route_remove(), and url_strip_transport().

  if (sip->sip_route) {
    /* XXX - in case of outbound proxy, route may contain our address */

    sip_route_t *r = sip_route_remove(msg, sip);
    sip_request_t *rq = sip->sip_request;

    rq = sip_request_create(msg_home(msg), rq->rq_method, rq->rq_method_name,
                      (url_string_t const *)r->r_url, rq->rq_version);

    msg_header_insert(msg, (msg_pub_t *)sip, (msg_header_t *)rq);

    return r;
  return NULL;

Generated by  Doxygen 1.6.0   Back to index