Hello,

you can have a condition like:

if($fd != $rd) {
   send_reply("403", "Inter domain not allowed");
   exit;
}

You can place it after authentication.

Cheers,
Daniel

On 09/04/15 20:33, Bruno Emer wrote:
Hello all!

I have a scenario here where I need to put more than two companies into the same Kamailio server and to accomplish this I'm using a multi-domain configuration.

For now, I am able to create users in different domains and register all of them. The users are able to place and receive internal calls (as I am using this just to get internal communications working), so I am ok with this part of my configuration.

The problem that I'm facing now is that users from domain "A" are able to place calls to users from domain "B". I need to deny calls between different domains, and I don't know the best way to achieve this.

Here are my domains create (output from "kamctl domain show"):

domain:: enterprise.com
did:: enterprise.com
domain:: enterprise2.com
did:: enterprise2.com


And here are my users created:

username: bob
domain: enterprise.com

username: alice
domain: enterprise2.com


So, can you please help me to get this?

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com