Hi Kamil,
Thanks a lot for the detailed explanation of your scenario, highly appreciated!
Sadly, I don't think this is possible with current implementation of numeric transformations, because they are designed to convert numbers from E.164 to what the user expects, no matter what PBX flow it has used.
There are some DDI and IVR fields to update what Caller Name is presented, but this won't help you here.
From asterisk point of view, DDI numbers are not usually what user receives in its terminal (p.e. 555666777), but the full E.164 representation (p.e. +351555666777 for a country with +351 as country code), and Kamailio proxies (that are not aware which pbx flow has been used), transform that to what user requires using its assigned numeric transformation (p.e. remove the +351 country code and leave just 555666777 for national calls). If you wanted to add a prefix to that number so the user receives *2555666777, asterisk should work with E.164 numbers like +351*2555666777 (which actually is not E.164 at all).
For outgoing calls placed by users, the *2 code is stripped by Kamailio proxy before applying transformations (converting from user dialed to E.164) and placed in a SIP Header (called X-Info-DDI-Prefix) so asterisk can use that value in Outgoing DDI Rules. If I understand correctly your proposed change will be to add a similar field in DDIs, to do the reverse, adding a SIP Header to Kamailio to request adding that prefix after transforming from E.164 (asterisk numbers format) to user prefered format.
It could be a nice feature, and I will share it with the rest of the team, but with the current schedule I don't know when it could be implemented. Of course, If you're willing to pay to prioritize features, feel free to contact our commercial team at
come...@irontec.com
Best regards!