Quick solution:

Take a look at the dispatcher module. You can assign each asterisk a group id.
Then when a call comes in you use a
Regexp, I.e. calls ending in 100-199 go to dispatcher group id 1, 200-299 to group Id 2, etc. 

If($rU=~”^.*1[0-9][0-9]”){
     ds_select_dst(“1”,”4”);
} else if $rU=~”^.*2[0-9][0-9]”){
     ds_select_dst(“2”,”4”);

And so on..
Just a quick way, there are better ways, I.e: no hardcoding group ids to phone ranges. But that’s a quick start.

Hope that helps.


On Mon, 19 Apr 2021 at 09:28, John Tuxies <atuxnull@gmail.com> wrote:
Could you give me some examples please?

On Sun, Apr 18, 2021 at 11:14 PM Karsten Horsmann <khorsmann@gmail.com> wrote:
Hi,

You can also map your number blocks with an avp from the dialplan module and then feed location for example.

Kind regards
Karsten Horsmann 

John Tuxies <atuxnull@gmail.com> schrieb am So., 18. Apr. 2021, 18:30:
Dear Daniel, thanks a lot for the reply.

Here is a diagram of what i have and what i try to achieve. In a isolated environment there is a single network (192.168.0.0/24) and one extension number is registered to one Asterisk server as a trunk. I would like to "push" DIDs in/out to these trunks(1000-1003) and eg
  • Asterisk's_1 server user which has the DID +493087710024 to be able and dial the number +49308771360 and reach another user on Asterisk Server 4. All the communication will go through the Server (Kamailio).
I am new to the field and i tried to search on alis db module, but i got more confused.




ITSP_Scenario.jpg



On Fri, Apr 16, 2021 at 4:47 PM Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,

On 16.04.21 08:18, John Tuxies wrote:
> I am novice in the area and i have a Kamailio basic setup where i
> create users and each user can call each other.
> No connection to an ITSP. i am trying to simulate things and need to
> send multiple numbers to each user.
> For example i have users 1000-1003. I need each user to have a range
> of 100 numbers (fake since it ia not connected anywhere) and routed to
> all the other users as well. The idea is to connect Asterisk servers
> and each one have a registered account 1000-1003. Then each Asterisk's
> extension have a particular DID  and call another Asterisk server to a
> different DID. Off course this will go through Kamailio.
> Now i call from one Asterisk to the other by using the 1000-1003 and
> it works. But i need the DID routing


Somehow I do not really get what you try to achieve, how you want the
mapping between between DIDs and user IDs. But, by a long shot, look at
alias_db module, might be what you look for.

Cheers,
Daniel

--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337