[Serusers] loose routing of BYE from UDP to TCP

Mark Aiken aiken.mark at gmail.com
Thu Sep 29 18:52:36 CEST 2005


The problem is the other way. BYE from UDP to TCP. However I do see the
problem now.

Thanks Klaus for pointing me to the URI as it that is indeed the problem.

The TCP UA has transport=tcp in the Contact: header and SER correctly leave
that intact when forwarding to UDP. The UDP UA, when sending the loose
routed BYE back to SER, does not correctly add the URI param from the
Contact URI to the RURI.

I expected SER to not care about this because the rr params clearly have the
transport=tcp coming back in the local route header. Its also my
understanding thet URI params in Contact headers are optional so the UDP UA
need not return them.

Anyway, I've fix my problem by adding the transport=tcp param to the RURI in
the loose route section of the script prior to t_relay.

I dont know who is at fault here - the TCP UA, the UDP UA, or SER but since
there are many of these UAs in the field I needed to fix the problem.

I would like to know why transport=tcp is ignored in the Route header by
SER. If the RURI must have transport=tcp then why bother having it in the
Route header at all? I would think that information in the Route would trump
lack of information in the RURI.

Mark


On 9/29/05, Cesc <cesc.santa at gmail.com> wrote:
>
> I would say that as long as your UA's contact header registered in ser
> specifies UDP, t_relay should do the trick when receiving the bye (tcp) and
> relaying it (udp).
> It works in my lab :) I cannot be more specific as i am away now ...
> sorry.
>  Cesc
>
>  On 9/29/05, Mark Aiken <aiken.mark at gmail.com> wrote:
>
> > HI,
> >
> > The original RURI does have but when SER relays to UDP UA it places
> > transport=tcp in the Record-Route but not in the RURI to the UDP UA, which
> > seems correct to me.
> >
> > I guess the problem is when using relay_to_udp on an INVITE from a TCP
> > UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing
> > new requests in the same dialog back via TCP.
> >
> > There seems to be no code in SER to handle this, from the small bits
> > I've looked at anyway. The information is in the rr params that SER added,
> > but SER just ignores the information on loose routed requests when the route
> > is a local one.
> >
> > Does anyone know if there is some special trick to get SER to handle
> > TCP<->UDP conversion of loose routed requests? Should the UA be adding the
> > transport=tcp from the rr param to the RURI of the BYE ( I would not think
> > so, since its the 2nd route added by SER anyway, not the topmost).
> >
> > For SER to work as a TCP<=>UDP proxy, one needs to "search" for the
> > transport=tcp, somehow be sure its in a local route header, and add the
> > transport=tcp to the uri before calling t_relay, I guess. I haven't tried
> > that yet. All this for loose routed requests.
> >
> > This seems like a lot of work in the .cfg file which is better done in
> > rr/tm module.
> >
> > I still think I must be doing something wrong as SER should handle this
> > automatically for loose routed requests.
> >
> > Is using relay_to_udp not the proper way to force TCP to UDP proxy of an
> > INVITE?
> >
> > Mark
> >
> > On 9/29/05, Klaus Darilion <klaus.mailinglists at pernau.at > wrote:
> > >
> > > Hi Mark!
> > >
> > > I do not know it exactly, but I think the important thing is the
> > > contact
> > > header URI of the INVITE. Does it contain a transport=tcp parameter?
> > > Otherwise, ser is correct when using UDP.
> > >
> > > klaus
> > >
> > > Mark Aiken wrote:
> > > > Hi,
> > > >
> > > > I'm having problems getting SER to (loose) route requests from UDP
> > > to
> > > > TCP. I'm not sure if the UA is at fault here or some SER config
> > > issue.
> > > >
> > > > SER receives an INVITE over TCP, record_route() is called and then
> > > the
> > > > request is relayed via UDP (t_relay_to_udp) to the UA. The
> > > > INVITE relayed to the UDP UA now has 2 Record-Route headers added by
> > >
> > > > SER. One has the transport=tcp parameter.
> > > >
> > > > Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on>
> > > > Record-Route: <sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz>
> > > >
> > > > When the UA sends the BYE to SER, it has the 2 Route headers like so
> > > (on
> > > > a single line):
> > > >
> > > > Route:
> > > > <sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on>,<sip:xx.xx.xx.xx
> > > ;transport=tcp;r2=on;ftag=xyz;lr=on>
> > > >
> > > > The SER script simply calls t_relay() in the loose_route section of
> > > the
> > > > script.
> > > >
> > > > I expected t_relay() to relay the BYE via TCP, since the Route
> > > header
> > > > has transport=tcp, but it sends the BYE via UDP instead.
> > > >
> > > > Anyone seen this problem before? Do I need to check for
> > > transport=tcp
> > > > and call t_relay_to_tcp, rather than using t_relay after
> > > loose_route()?
> > > >
> > > > Mark
> > > >
> > > >
> > > >
> > > ------------------------------------------------------------------------
> > > >
> > > > _______________________________________________
> > > > Serusers mailing list
> > > > serusers at lists.iptel.org
> > > > http://lists.iptel.org/mailman/listinfo/serusers
> > >
> > >
> >
> > _______________________________________________
> > Serusers mailing list
> > serusers at lists.iptel.org
> > http://lists.iptel.org/mailman/listinfo/serusers
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050929/2041c602/attachment.htm>


More information about the sr-users mailing list