...
INBOUND call of multiple numbers are connected with alias_db to the accounts
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