Early media fails on TCP extension with call forwarding

We have tried this in Asterisk 1.8.21.0, Asterisk 10 and Asterisk 11.3

If we have a TCP extension where calls are forwarded to a number playing early media (e.g. wrong number playing not in service announcement) Asterisk will not recognize the early media stream. However if the extension is UDP protocol then everything works as it should. This can be easily duplicated by setting up a TCP extension and forwarding the calls to an early media recording e.g. IBM 18004267378.

This creates major issues when trying to connect with a Microsoft Lync server as they only “speak” TCP and Lync clients constantly forward their calls to their cellular phone.

The correct place to report bugs is issues.asterisk.org/jira/

You will need to enable debug logging an provide output after using the following three commands, and then reproducing the problem:

core set verbose 5
core set debug 5
sip set debug on

You will also need to provide the sip.conf configuration and a dialplan that reproduces the problem. Try not to obfuscate more than absolutely necessary.

Obviously check it is not already a known problem.