The problem is that for any incoming call, they will all be matched only based on their IP address, hence only the incoming call routing rules of the first provider configured in Askozia are used.
Unfortunately, according to the configuration, this is the way Asterisk works. From the Asterisk source example sip configuration file:
;------- Naming devices ------------------------------------------------------
;
; When naming devices, make sure you understand how Asterisk matches calls
; that come in.
; 1. Asterisk checks the SIP From: address username and matches against
; names of devices with type=user
; The name is the text between square brackets [name]
; 2. Asterisk checks the From: addres and matches the list of devices
; with a type=peer
; 3. Asterisk checks the IP address (and port number) that the INVITE
; was sent from and matches against any devices with type=peer
;
; Don't mix extensions with the names of the devices. Devices need a unique
; name. The device name is *not* used as phone numbers. Phone numbers are
; anything you declare as an extension in the dialplan (extensions.conf).
In Askozia the third option apply because no device match usernames, as the latest documentation suggests.
There are some workarounds:
1) Add
match_auth_username=yes to manual attributes in the advanced sip configuration. I think there are very little changes... probably don't work.
2) Append a device matching the From: address to sip.conf using the dev panel; to do that simply copy the device created for the provider exactly as is and paste it changing only the unique
[device name] to match the From: field.