[asterisk-dev] [Code Review] Properly route responses according to the Via headers in the request
Klaus Darilion
klaus.mailinglists at pernau.at
Thu Dec 23 09:01:01 UTC 2010
Am 23.12.2010 09:06, schrieb Olle E. Johansson:
>
> 22 dec 2010 kl. 20.51 skrev Matthew Nicholson:
>
>> On Wed, 2010-12-22 at 20:35 +0100, Alex Hermann wrote:
>>> On Wednesday 22 December 2010, Matthew Nicholson wrote:
>>>
>>>> This patch makes asterisk respect the Via headers in a request when
>>>> responding to the request. Without this patch, the request is always
>>>> routed back to the address the initial request was received from (unless
>>>> nat=yes). This can cause problems if the initial request comes through
>>>> a proxy and additional requests (such as INFO dtmf tones) come from a
>>>> different proxy.
>>>
>>> New version looks much better. One question remains though. You set the port
>>> to the port in the Via, but if rport is present, it should be set to the
>>> port from which the request originated. I tried to find other code in
>>> chan_sip which overrides the port in case of rport, but couldn't find it.
>>> Maybe rport handling should be included in your process_via function.
>>>
>>
>> This can probably be supported simply by not modifying the port when
>> p->recv is copied. I'll update the patch.
>>
> Matthew,
>
> If we change anything in response handling we should fix it right and just send
> to the sender's IP address and port. Always.
That wouldn't be standard conform if rport parameter is missing, but it
should work.
I wonder how this work with TCP.
klaus
>
> It's very simple. Asterisk do not have to parse the via header at all.
>
> That way you can close multiple bug reports in the tracker.
>
>
> /O
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list