[SR-Users] ACK routing loop

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 20 15:20:00 CEST 2011


Hello,

maybe permissions is a better option to check ip addresses against a 
cached list. It offers also the possibility to group addresses, so you 
can have one group for this specific purposes and use allow_address("1", 
"$fd", "0"), provided that you grouped the addresses to id 1.

http://kamailio.org/docs/modules/stable/modules_k/permissions.html#id2512722

Cheers,
Daniel

On 10/20/11 1:35 PM, Antanas Masevicius wrote:
> Hello,
>
> basically i was intending to use is_from_local() function to dynamically
> (just add domain and reload) detect direction if user calling via given
> proxy should be handled as local user. Something like much faster
> version than doing check_from() function. This way i don't have to
> hardcode-in external (PSTN) IPs and compare against those. In general,
> the need to store remote IPs came up only because there are still some
> old equipment which is not able to set domain in from header (such as
> old cisco equipment).
>
> best regards,
>
> Antanas Masevicius
>
> On 2011.10.20 13:43, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> On 10/19/11 5:23 PM, Antanas Masevicius wrote:
>>> Hello,
>>>
>>> after troubleshooting ACK routing loops i came up with a thread:
>>> http://www.openser.org/pipermail/users/2009-March/004123.html
>>>
>>> In short, loops formed when i entered IP address to 'domain' table of a
>>> host which was remote.
>>> Call flow:
>>>
>>> UAC INVITE ->  Kamailio (with remote domain entered) ->  UAS (host whose
>>> IP matches that remote domain)
>>>
>>> It looks like after loose_route() check ACK to 200 OK gets routed to
>>> local host. Besides this issue, IP address of remote host in 'domain'
>>> table did no harm at all.
>>>
>>> Question is, is that normal ACK routing behaviour or loose_route()
>>> should still check if given IP in request is really bound to local
>>> interface?
>> domain module as well as aliases are ways of setting local domains
>> even if they don't exist in DNS. Therefore practically you can have
>> addresses like user at domainx.abc and domainx.abc not really existing.
>> Thus, it is no intention of checking records in domain against dns and
>> local network addresses.
>>
>> When you add a domain to domain table, kamailio (via config file),
>> will consider it as being for local routing.
>>
>>> Domain module documentation states that "A “local” domain is one that
>>> the proxy is responsible for", but id does not tell you that you cannot
>>> set remote IP address as a local domain.
>> Well, when there is a foreign IP either there is a SIP application
>> handling requests for it and you should let kamailio forward to it by
>> not adding it to domain table, or there is no sip application and then
>> kamailio will handle the requests locally since it is in the domain
>> table.
>>
>> Personally, I see no reason of why adding a remote IP to domain table,
>> can you give some examples where it would be useful?
>>
>> Cheers,
>> Daniel
>>

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list