Charles Ragan | Rune ¿ if the pai is there (it would be the original To: I believe) ¿ you should be able to do something similar to...
M = {} function M.outbound_INVITE(msg) local uri = msg:getUri("P-Asserted-Identity") msg:removeHeader("Diversion") msg:addHeader("Diversion", uri) end return M
Rune Heggelund has created a new message in the forum "SIP Transparency and Normalization Questions":
-------------------------------------------------------------- Thank you for replying.
The setup is as follow; pstn-----sip----cucm-----sip------trio-vmail
I can apply the script at the outgoing invite to the trio-vmail. I still need some help to create the script.
Here is what sendt in the Invite header; Diversion: "nn" <sip:4981@172.29.1.12>;reason=unconditional;privacy=off;screen=yes Diversion: "nn" <sip:4983@172.29.1.12>;reason=unconditional;privacy=off;screen=yes Diversion: "nn" <sip:4986@172.29.1.12>;reason=unconditional;privacy=off;screen=yes
If I convert the diversion headers into History-Info headers for outbound INVITE messages. And then remove the Diversion header. This is what I got;
M = {} function M.outbound_INVITE(msg) if msg:getHeader("Diversion") then msg:convertDiversionToHI() msg:removeHeader("Diversion") end end return M
History-Info: <sip:4980@172.29.1.12?Reason=sip;cause=302;text="unconditional">;index=1 History-Info: <sip:4981@172.29.1.12?Reason=sip;cause=302;text="unconditional">;index=1.1 History-Info: <sip:9999@172.29.1.17:5060>;index=1.1.1
The Trio System understands both diversion headers and History-Info headers.
If I first convert the diversion headers into History-Info headers, then I got information I need in index=1. If I now remove all other index lines everything should be ok. -- To respond to this post, please click the following link:
<http://developer.cisco.com/web/sip/forums/-/message_boards/view_message/4725147>
or simply reply to this email. -- To respond to this post, please click the following link:
<http://developer.cisco.com/web/sip/forums/-/message_boards/view_message/4727040>
or simply reply to this email. |
| Please sign in to flag this as inappropriate. |