Ok, it seems I'm still making a fundamental mistake:
I'm interested only in modifying the FROM address in the phone display (not at all for routing purposes), so I'm using the
expression "!([0-9]*)!+\1!f!50" in the field "Send call to extension" in the configuration of the trunk.
[8] 2012/06/15 15:28:38: Call from a trunk 4
[8] 2012/06/15 15:28:38: Trunk alonia.ro@myPbxDomain has country code not set, area code not set
[8] 2012/06/15 15:28:38: To is <sip:40373711111@85.204.232.10;user=phone>, user 0, domain 1
[8] 2012/06/15 15:28:38: Trying to match number 40373722222 with ERE ([0-9]*)
[8] 2012/06/15 15:28:38: Send call to extension ERE returned +40373722222
[8] 2012/06/15 15:28:38: User not found for account +40373722222 in domain myPbxDomain, trying to send the call to default account 50
[5] 2012/06/15 15:28:38: Domain trunk alonia.ro@myPbxDomain sends call to 50 in domain myPbxDomain
As I can see from the log the regular expression prepended the plus-sign correctly but the FROM number displayed on my phone continues to be "40373722222".
Is the field "Send call to extension" really the right thing to achieve what I want?
Best regards
Florian