AnsweredAssumed Answered

Convert History-Info to Diversion Header

Question asked by sureshsub2 on Aug 26, 2014
Latest reply on Dec 23, 2016 by mustafakemalcisco



We have CUCM 8.6 cluster integrated with Microsoft Lync over SIP Trunk.


We have the below SIP Normalization script to convert the History-Info to Diversion Header,


M = {}

M.allowHeaders = {"History-Info"}

function M.inbound_INVITE(msg)



return M


When a Lync user sets Call Forward All & Call Forward No Answer to external number, the script correctly changes the the header.


However when the same Lync user sets Simultaneous ring on the client, CUCM does receive the same History-Info but without any reason text.


Hence the script is not taking effect on that received INVITE message.


When we did Call Forward All from Lync number:+16477900399 to +13365439382, below is the History Info we received and it was converted to Diversion Header


HISTORY-INFO: <;user=phone?Reason=SIP%3Bcause%3D302%3Btext%3D%22Moved%20Temporarily%22>;index=1;ms-retarget-reason=forwarding,<;user=phone>;index=1.1


But when we did simultaneous ring to +13365439382 and got the following HISTORY-INFO, it was not converted to Diversion Header by the same script


HISTORY-INFO: <;user=phone>;index=1;ms-retarget-reason=forwarding,<;user=phone>;index=1.1

The only difference I see the in those 2 History Info is that, Simultaneous Ring INVITE doesn't have the reason text included.

is that the reason the Script not converting the header?

Thanks for your help