Good Day List,


I am very new to Kamailio and trying to understand at 10,000 feet how it may be able to be used. I was wondering if the following Scenario would be possible and if so what modules would accomplish this aspect.  (Any URLs for further reading would be appreciated)


Scenario:


Given 


1) SoftPhones will register as follows

sip uri, user@subdomain.myvoipserver.com 

2) The following users are authorized to connect (this would be stored in a config file etc):

1001,1003,1007 are valid users for apples.myvoipserver.com

1001,2213,5817 are valid users for oranges.myvoipserver.com


Is it possible for Kamailio to perform the following evaluation and then take the appropriate steps:


If [domain is apples.myvoipserver.com AND user portion is 1001]

then

Forward/Proxy the SIP/RTP packets to

Asterisk server responsible for registration and audio for the domain apples.myvoipserver.com

 

Else if [domain is oranges.myvoipserver.com AND user portion is 2213]

then

Forward/Proxy the SIP/RTP packets to

Asterisk server responsible for registration and audio for the domain oranges.myvoipserver.com

Else

Silently Drop packets etc.

 

given the above evaluation rules, a user who tries to register as 


1001@apples.myvoipserver.com 

would be granted access and their SIP Packets and subsequent RTP would be forwarded to the asterisk server at apples.myvoipserver.com, where said server would take care of the Registration, and any subsequent calls, subscriptions, Options etc.


1004@ apples.myvoipserver.com

Would not match the authorized list for apples.myvoipserver.com (1001,1003,1007), therefore this registration attempt would be silently dropped


2213@apples.myvoipserver.com 

would be granted access and their SIP Packets and subsequent RTP would be forwarded to the asterisk server at oranges.myvoipserver.com, where said server would take care of the Registration, and any subsequent calls, subscriptions, Options etc.


 Thanks for any information to assist me in understanding how this would work.


~ron