[asterisk-dev] [Code Review] Properly route responses according to the Via headers in the request

Matthew Nicholson mnicholson at digium.com
Wed Dec 22 13:56:27 UTC 2010


On Wed, 2010-12-22 at 12:32 +0100, Klaus Darilion wrote:
> 
> Am 16.12.2010 18:29, schrieb Matthew Nicholson:
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviewboard.asterisk.org/r/1059/
> >
> >
> > Review request for Asterisk Developers. By Matthew Nicholson.
> >
> >
> > Description
> >
> > This patch makes asterisk respect the Via headers in a request when
> > responding to it. This is necessary in the even that a stateless
> > proxy is in between asterisk and the requester.
> 
> Sorry for jumping in that late. It would be good if the description 
> would be useful - thus, describing what the current (broken?) behavior 
> is and how the new (fixed) behavior work.
> 
> I really wonder what is the problem with the current behavior.
> 
>  > Without this patch,
>  > the response is simply routed back to the address we received the
>  > initial request from.
> 
> Really? I often use proxies between Asterisk and the SIP clients and 
> never had any issues - responses were always routed correctly
> 
> Please describe in more detail the problem with the old and new behavior.

With the current behavior, we do not respect the Via header when routing
responses at all.  We send all responses to the address where the
initial invite came from.  Thus when I have an openser proxy that simply
forwards requests between the UAC and the UAS, when the UAC sends an ACK
or a reinvite or an INFO DTMF request directly to the UAS (based on the
contact header the UAC received), the asterisk UAS sends the response to
the proxy, not to the UAC as it should.

> thanks
> Klaus
> 
> PS: Maybe you wanted to say "transparent" proxy instead of "stateless"? 
> If a proxy is stateless, transaction statefull or dialog statefull does 
> in no way influence the routing of the SIP messages.

I may have confused some terms in my description.

-- 
Matthew Nicholson
Digium, Inc. | Software Developer




More information about the asterisk-dev mailing list