So I have some behavior between my CUCM 8.6, Lync, and 2 voice gateways that I consider weird, but may be completely logical and I just am not aware that it's working as intended. So I was hoping some experts here could help me figure out what is going on.
Calls will originate from CUCM either via a 7940 phone registered to CUCM or via the PSTN. Both types of call will route via a route pattern to a SIP trunk that is configured to send calls to 2 Lync mediation servers. MTP required is checked as per Lync requirements on the SIP trunk. The phones and SIP trunk are in the same Location so they will be talking g711u the whole way. They also have the same MRLs. Those MRLs have 2 transcoding resources pointing to a pair of 3925 gateways. They also have 2 MTP resources pointing to the 3925 gateways. Gateway 1 has 200 MTP software sessions configured. Gateway 2 has, right now, 2 MTP hardware sessions and 4 MTP software sessions.
Now, from what I understand, whenever a call is initiated from CUCM to a Lync conference an MTP session has to be initiated to connect the 2 sides. And that MTP session will happen via one of the 3925 gateways. We see that happen quite frequently. However, the odd thing that I can't figure out is that we will see a transcoding resource be used instead of an MTP resource in some instances. And this transcoding resource is talking g711u on both sides. As I understand it, if an MTP resource is unavailable a transcoding resource will be used as MTP. However, I've never seen more than 8 MTP sessions be used on our gateway with 200 sessions configured so I don't know how an MTP resource would be unavailable.
Also, it's never consistent in any of my tests what will use an MTP or what will use a transcoder. Using 4 phones with 6 lines between them configured, I've had tests use 5 MTPs/1 xcode, 2 MTPs/4 xcode, and other combinations. I'm not even sure how or where to debug this. Any thoughts?
The side with MTP Required checked will always allocate the MTP. Since you had it checked on the trunk, it will use the trunk's MRGL for selecting an MTP resource.
You are correct that the transcoder can work as an MTP. Now, the reason for transcoder being invoked even though you have MTP's configured in the MRGL could be because of MTP and transcoder resources assigned to the same MRG, MTP leak issue or MTP resoources getting exhausted.
First, you need to ensure that you do not have MTP and transcoder is the same MRG. Assign xcoders and MTP resources to different MRG's and ensure the MTP MRG is on top of the MRGL.
This is because when cucm needs an MTP, it picks the first available MTP/Xcoder it finds in the MRGL. Hence, you should only have one codec-type MTP in the MRGL, for the codec that you intend to use across the trunk.