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@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