Asterisk redirection mechanism

Hi, I’m totally new to Asterisk I therefore may ask things which are obvious to many … we’re investigating the possibility to implement the following call schema:

a customer has a standard SIP infrastructure including SIP phones and of the shelf PBX solution. This is totally out of our control …
we would like to build a small box (2 x Ethernet ports) to be inserted between the SIP phone and the PBX which is able to route/redirect the SIP calls depending on the callee extension.

The old extensions (that the customer was having on his address book before introducing our small box ) are handled as before and are routed to the proxy/ PBX the customer was using before. New extensions instead are routed/redirected to another asterisk proxy server.

We could change the sip server address on the SIP phones to point to a small proxy/redirect server on our box. The box simply looks at the extension to be called and redirects the sip call to the original proxy or it redirect it to our asterisk proxy…

Is this something feasible ? would the proxy/redirect approach be the best one for achieving this functionality?
“the box” would have enough power to run a proxy and a redirect server.
The redirection has to happen entirely in the box and has to be transparent to the SIP phone.

Thanks for any comment,
Cheers, Joel

if you can change the SIP server address on the phones, then you set up an asterisk box where all the phones register, this asterisk box will register to the pbx as their original extensions - then your dialplan just need to accommodate the call routing, which I didnt exactly get from your description… it would be a messy diaplan but technically possible…

Maybe I was a bit confusing with my description.
What we want to obtain is that on an existent SIP based VoIP system some new extensions have to be rerouted to and handled by a different PBX (our one). The customer has an already deployed and working VOIP system and wants to continue to use this as before. Only a restricted number of new extensions have to be rerouted to a different VoIP backed (our asterisk PBX). This is the requirement behind the idea of putting something between the SIP phone and the old PBX able to act as a “switch” between the two VOIP back ends (the old one and our Asterisk PBX)… what would be the best way for accommodating this ?
Many thanks, Joel

I don’t see how your clarification changes the answer. Please try and explain what is wrong with the answer.

Nothing is wrong with the answer… was just looking for the simplest possible solution …

sounds like you want some magic in-line transparent packet inspection and intercept, where if an INVITE goes to specific extions the invite is sent to your box instead of original pbx. To me that sounds like something overly complicated, possibly insecure (no registrations), and likely SIP-violating thing to do,. seems much easier to just take over the phones, and send everything that isnt your extensions back to their system, on all the individual registrations if no changes can be made to existing system at all. You would need to be crafty on things like presence and message wait indicator and such, all depending what the off the shelf system has…

It’s called a SIP proxy, and might be the solution if part of the traffic wasn’t already going to Asterisk.

Note that a proper SIP proxy will not interfere with end to end authentication, and some SIP end points may not be prepared to use proxy authentication, rather than than end to end.