< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Record-Route handling by stack


Hi

 

There is some code within TransportSelector.cxx to stamping host/port/transport into Record-Route:

 

         if (msg->exists(h_RecordRoutes) && !msg->header(h_RecordRoutes).empty())

         {

            NameAddr& rr = msg->header(h_RecordRoutes).back(); //!!!!!!!!!!!!!!!!!!!

            if (rr.uri().host().empty())

            {

               rr.uri().host() = Tuple::inet_ntop(source);

               rr.uri().port() = target.transport->port();

               if (target.transport->transport() != UDP && !rr.uri().exists(p_transport))

               {

                  rr.uri().param(p_transport) = Tuple::toData(target.transport->transport());

               }

            }

         }

 

I don’t understand why we try to stamp header(h_RecordRoutes).back() - the oldest, possible not our Record-Route?

It works when we have only one such header, but does not work if there some Record-Routes (inserted by others proxies).

 

I also have some questions about Repro concerning Record-Route, but I think it is good idea to clarify my first question before.

 

With best regards

Alexander Altshuler