I am encountering some troubles with headers that the Mediation server is stripping, when I fork a call to another PBX (out of the Sfb environment).
Does anyone know how to parse sip headers through the mediation server, by using MSPL? I'm running it in a managed application, which is adding headers as following (in the OnResponse and OnRequest handlers):
// Add a ModifyHeadersSample header.
Header newHeader = new Header("ModifyHeadersSample1", "localhost");
e.Request.AllHeaders.Add(newHeader);
// Add a ModifyHeadersSample header.
Header newHeader = new Header("ModifyHeadersSample", "localhost");
e.Response.AllHeaders.Add(newHeader);
The thing is, that I want the History-Info header to be parsed from Mediation server and to the external PBX, so the history is not lost during the forwarding. I even want to be able to parse custom headers (e.g. X-MyHeader) in order to append extra information to track.
If I log the transaction, I see the headers that I added, in the Incoming Sip message on my SFB server, but it's gone on the Out Sip Request .
I'm running with following setting on the request:
e.Request.SimpleProxy = true;
e.ServerTransaction.EnableForking = false;
I think you are going to be out of luck here. I have found that when going through the Lync's SIP trunking setup you can lose all headers going into or out of the Lync SIP domain.
The only header that goes through untouched (at least from external sip domain into lync, I haven't checked going out) is the diversion header.
There is other ways to solve this problem tho.
I have done all of the above for different projects so I know all of the above works except for the Diversion header coming out of a Lync gateway, what would have to be tested to check to see if that comes through ok.