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

Kevin P. Fleming kpfleming at digium.com
Wed Dec 22 13:57:52 UTC 2010


On 12/22/2010 05:32 AM, 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.

The problem report that caused Matt to be working on this is a scenario 
where an INVITE is received from a UAC through a proxy; Asterisk 
properly responds to the INVITE through the proxy. However, later the 
same UAC sends in-dialog INFO requests directly to Asterisk, bypassing 
the proxy, and Asterisk replies to the proxy instead of to the UAC.

Based on my not-quite-complete understanding of SIP, my impression is 
that this UAC is behaving improperly; since it sent the dialog-creating 
request through the proxy, all subsequent requests should be sent 
through the proxy as well. However, that could be completely wrong, and 
Matt's analysis up to this point determined that it may have been wrong, 
and that we should be able to respond to the UAC directly for subsequent 
in-dialog requests.
-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming at digium.com
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list