Multi transfer over MPLS dropped calls

We have a 3 switch network with each server connected to each other via MPLS. The corporate server is also a centralized ACD call center with agents distributed amoung all 3 switches. Each switch can also take local calls and manage their own ACD, but again, agents for each local ACD are distributed amoung all 3 servers. The strategy obviously is any agent on the network can take a call from any of the 3 ACD’s. As long as the agent can actually handle the call they get, all is well. However, if that agent must transfer the call to another queue or another agent in such as way that the call must traverse the MPLS more than 2 times, the voice qualify suffers dramatically to the point of the call being dropped.

For example, if a call comes into server A and is first served by an agent on server B, but that agent cannot handle the call and put’s it into another queue on server A which in turn is handled by an agent on server C, the final answering agent cannot hear the caller or the caller cannot hear the agent or the call just drops. (A-B-A-C)

Or if a caller on server C dials the operator which for business reasons resides on server B who then puts the caller in a queue on server A which in turn is handled by an agent on server C, the call quality is horrible. (C-B-A-C).

In either of these scenarios, it is very possible for the call to start and end on the same server, but travers the MPLS unnecessarily to get there.

It is my understanding of asterisk IAX call handling that a channel is created for each switch to switch transfer and that each of these channels survives for the life of the call. If that is the case, then the scenario presented above would traverse my MPLS 3 times and could cover almost 10,000 miles. VOIP is good, but it’s not that good.

Is there a dial plan trick to avoid this much WAN traffic and find the shortest
route between servers? In other words, if the call were handled properly, the system
should recognize that the A-B and B-A legs of the call are no longer necessary
and can just drop them out of the equation. The A-C leg is all that is required
and the call would be fine.

It seems that only Asterisk behaves this way. I’m considering switch away from
Asterisk in favor of Shoretel, Mitel, or Cisco, all of whom do not suffer from this
but I don’t like the idea of losing all we spent on the systems and phones that we have.

Any ideas?

You should read about directrtpsetup

Will directrtpsetup (or canreinvite) also apply to IAX channels? It looks like these options only apply to SIP devices which in my network is just the phones themselves. If the call originates on a PRI channel on server A and then is transferred to a SIP user on server B, how would INVITE and direct media exchange help me if the agent decides to send the call back to a queue or user on server A?