Well I don't know avaya, but in my world I can take what is coming from the phone company, and I can add and delete any digits I want from that. I have done that before but it was maybe 7 years ago since the last time I messed with it.
Assuming if you are lucky enough that the first 3 digits of all your avaya extensions are the same, like a local NXX number, there might be a couple of options there. I am no expert on trunking, but I understand what I want to do - I would just have to look in the book to be able to do it.
So lets say all of your extensions in the Avaya are like 1234000, 1234001, 1234002, etc. You want to be able to dial 4000, 4001, 4002 on the siemens end. (If I'm guessing correctly). So one option, on the Siemens end is when you make your outdial rule (ODR) you say something like:
echo 123
echo all
Like I said - someone that does this in their sleep will probably correct me, but I know you can insert digits in the outdial rule before the digits get sent (because mine has echo 911 for emergency calls, for example). So in that case the Siemens would prepend on the 123 onto the 4-digit extension that got dialed and the Avaya would get 1234000.
The other possibility is on the Avaya end. You might have general digit translation rules like we have on the Siemens. That allows you to go into the gdtr table and tell it that when a number comes in from this "carrier" (the Siemens) that you should make these changes to the digits. In this case you would tell it to prepend 123 to the number that comes over.
On one side or the other you should be able to do the digit translation. In my case I had an idiot PBX vendor set up a DID number block from the carrier on a different local exchange that overlapped an existing number range that was already in our dial plan. So the external number was 686-24xx, but in our in-house dial table we already had 24xx extensions in use. So I set the new site up for 44xx extensions. I told the carrier to only send me the last 3 digits, and I told the phone system to add on a "4" to any number they sent me. Because the carrier was only sending me the last 3 digits the "2" was already dropped before it ever got to me, so in my gdtr table, for the digit strings 40x, 41x, 42x, 43x, 44x, 45x, 46x, 47x, 48x, 49x I told the system to add a "4" at the beginning.
In 2005 I worked out a deal with AT&T and the PSC of WI to overlay my entire dial plan with a single exchange. Once I did that I used the big PR campaign to advertise new numbers for the site in question and it was no longer necessary to use the translation anymore. That was the last time I messed with those commands....