When you setup Lync forwarding or simultaneous ring it always passes the original callers number in the FROM field.
In the example shown above +44 123 4567 calls +44 987 6543 the Lync user has setup a call forward to another number +44 765 4321. When you receive the call on +44 765 4321 you see the original caller id +44 123 4567.
SIP Header wise this is what is sent from the Mediation server to the ITSP:
INVITE sip:07654321@20.20.20.20;user=phone SIP/2.0 |
As you can see the FROM is set to the external callers number and the TO is set to the forwarded to number. Although this can be useful to the person receiving the call to see where the call is coming from it does however cause issues for some ITSP’s (Internet Telephony Service Providers)
Introduced in CU2 was a fix to allow a REFFERED-BY header to be added however after applying the patch (or even CU3) the header does not appear. It is alluded to here in the KB article http://support.microsoft.com/kb/2517730
However it mentions that you need to apply 255421 as well which doesn’t exist (I assume this will be corrected). The actual KB article is 2500421 (http://support.microsoft.com/kb/2500421
Here is explains you need to update the Mediation server config file.
For those of you that have never had to update the config file it is in the Mediation server directory which by default can be found here:
C:\Program Files\Microsoft Lync Server 2010\Mediation Server\MediationServerSvc.exe.config
For the SIP trace above you would modify the file to:
<?xml version=”1.0″ encoding=”utf-8″?>
<configuration>
<appSettings>
<add key=”20.20.20.20.ReferredBySupported” value=”true”/>
</appSettings>
<runtime>
<generatePublisherEvidence enabled=”false”/>
</runtime>
</configuration>
Once you save this file (don’t forget you need to run notepad as administrator to save it) you restart the Mediation Server service.
The headers now appear as
INVITE sip:07654321@20.20.20.20;user=phone SIP/2.0 ………… |
You can see the FROM and TO headers remain the same but you now have a REFFERED-BY header with the called party’s number. The ITSP can then use this value.
Very useful article – please could you confirm that this also inserts REFERRED-BY for a simultaneous ring call?
I have just ran the trace and yes I can confirm that you get the REFERRED-BY for simul ring as well
Great thanks for that – this field should solve a few issues in certain call scenarios when interacting with another SIP connected application server… Thanks again for posting this article was exactly what I was looking for.
We are fully up to date on all patches and updates on our Lync server, but when we save the changes to our MediationServerSvc.exe.config file and try to restart the Mediaton Server Service, the service fails to start. If we remove the changes to the config file the service starts as it should. Any ideas or suggestions?
If the mediation server won’t start after the change it is usually one of two things.
1) You didn’t enter the data correctly or in the right location. Double check you have all the ” in the right place and terminte the lines correctly.
2) You used an editor that modifies the format of the file. Do you remove the change by deleting the lines you added or by restoring a copy? I know notepad works if you run it on the server. If you didn’t use notepad and restored a copy then try deleting the lines you added to see if it still fails to start
Great post – the MSFT KB article doesn’t tell you where the config file resides so thanks very much for pointing that out. I too had the same issue as thetdub above and it was caused by the quotation marks. I cut and pasted your sample file text above and modified it. I had to change the smart quotes to straight quotes (just delete them are re-type them) and then the service started fine. Thanks again.