Typically this would be part of the Inbound TDM routing on the gateway. On my Dialogic there is a "Dial-Plan" option in the configuration. clicking this them displays a number of tabs, one of which is "Inbound TDM Routing". In default setup there will only be one entry here. Each entry has a "CPID Manipulation" entry associated with it - this manipulation rule is responsible for converting inbound numbers as you have requested. The list of CPID Manipulation rules can be found on the "CPID Manipulation" tab. Here you define each manipulation rule - either changing the calling party or the called party.
In your case it looks like you are trying to change the Called Party. So you could create a rule which has the following in the Called Party Change Rule field: repl(D,"0","+49"). Then create a Inbound TDM routing rule which matches your original called number and select the CPID manipulation rule you have just created. Now, anytime that number is called, the rule will fire and modify it replacing the leading 0 with +49 before passing on to OCS.
FYI this is the reference table for the change rule syntax....
S |
Source (Calling) Number |
|
lext(str1, n) |
extract n characters from left of str1 |
D |
Destination (Called) Number |
|
rext(str1, n) |
extract n characters from right of str1 |
R |
Redirection Number |
|
lrem(str1, n) |
remove n characters from left of str1 |
I |
IP Address |
|
rrem(str1, n) |
remove n characters from right of str1 |
+ |
concatenate |
|
mext(str1, pos, n) |
extract n characters from str1 starting at position pos |
"str" |
literal string |
|
repl(str1, strOld, strNew) |
replace first occurence of strOld with strNew in str1 |