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

Olle E. Johansson oej at edvina.net
Mon Jan 3 03:05:58 CST 2011


3 jan 2011 kl. 09.48 skrev Klaus Darilion:

> 
> 
> Am 30.12.2010 10:52, schrieb Olle E. Johansson:
>> 
>> 30 dec 2010 kl. 09.56 skrev Alex Hermann:
>> 
>>> On Wednesday 29 December 2010 20:06:34 Matthew Nicholson wrote:
>>>> In the latest patch, responses are routed to the address they were received
>>>> from except if maddr is set in the via header.
>>> 
>>> Some comments about the latest patch (sorry, i have no reviewboard account, so
>>> i do this per email).
>>> 
>>> 1) get_header returns the full header line of the first Via it finds. This can
>>> be a comma separated list of Via's. When you check for maddr, it is very
>>> possible to find the maddr of the second or more via entry in that header.
>>> Somewhere, the header returned by get_header must be limited to the first via,
>>> ie up to the first comma.
>> I just added a comment about that, good catch. We need to separate via processing
>> from retrieval of header.
> 
> Couldn't we add just generic functions for splitting headers? We could have the same with Route:, Record-Route:, Path:, ... too, and I know there is already some code for Route/RR headers
> 
Absolutely, It should be in get_heder(). Thanks for contributing code, Klaus! I look forward to it :-)

/O


More information about the asterisk-dev mailing list