We have a contact center solution built on UCMA conference and come cross this scenario/issue:
All trusted application endpoint used for B2B calls are configure in A.com;e.g. transferEp@A.com
All agents are configured in B.com;e.g testAgent@B.com
PSTN caller +1234567890 calls contact center and back2back to a conference.
Delivered to testAgent@B.com via back2back.
Call transferred to a PSTN destination 38100 by making another back2back call to the PSTN destination then drop the agent.
During the transfer, we impersonate the caller +1234567890 but use the agent's voice policy by setting "transferor" property(testAgent@B.com) on CallEstablishOption when estalishing the back2back call from the conference using transferEp@A.com.
The back2back call failed with the following error:
ms-diagnostics: 1003;reason="User does not exist";destination="+8893538100@A.com";source="Test-LYNC13FE2.A.com"
Reading through the Lync trace, it appears FE applied dialplan of the trusted application endpoint on the number 38100 and translated it to +8893538100 but somehow it tagged it with the sip domain of the trusted application endpoint and it turned it into +8893538100@A.com. So FE done a look up for the user (I assume using testAgent@B.com's voice policy and failed.
if we change the code to use the voice policy of a user that lives in A.com, it works.
So the question is how FE recognizes the number is a Lync user if the voice policy is from a user that lives in a different sip domain and how can we fix it?
Secondly based on lync documentation, all dialplan and voice policy are all based on scope but not related to sip domain, so why the number is tagged with the sip domain once translated?