Hi
I have a configuration with sip accounts which authenticate with the real name of the customers
ex:

customer1@sip.myvoip.dev
customer2@sip.myvoip.dev
...


INBOUND call of multiple numbers are connected with alias_db to the accounts

ex:
+331234567890 | sip.myvoip.dev        | customer1      | sip.myvoip.dev |
+331234567891 | sip.myvoip.dev        | customer1      | sip.myvoip.dev |

+341234567893 | sip.myvoip.dev        | customer2      | sip.myvoip.dev |
+341234567894 | sip.myvoip.dev        | customer2      | sip.myvoip.dev |
...

and all works perfectly.


OUTBOUND call 
after authentication with the username kamailio change the caller id and the ip of my ISP-SIP-TRUNK
to relay the call with the correct CID for the ISP using the variable $fn  (display name in the From header)

[SIP-GW-ISP]
{
                #out with ISP
                route(CID);
                $ru = "sip:" + $rU + "@" + "IP_ADDRESS_MY-ISP";      
                route(RELAY);
                exit;
}

ROUTE[CID]
{
        $var(caller) = $(fn{re.subst,/"//g});
        uac_replace_from("$var(caller)","sip:$var(caller)@$fd");
 }

Is possible do it with a different approach for example using Remote-Party-ID ,  PPI P-Preferred-Identity ?
Is possible to check if the customer uses the correct outbound number present in the alias_db table ?

ex
for customer1 only +331234567890 or +331234567891 numbers


many thanks

Luca