cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
378
Views
0
Helpful
1
Replies

SIP Normalization for oubound calls on SIP trunk

devraj123
Level 1
Level 1

Hi All,

I need to modify this script to change this header

From

 

Remote-Party-ID  "Test" ;party=calling;screen=yes;privacy=off

 

To

 

Remote-Party-ID  "Test" ;party=calling;screen=yes;privacy=full

 

Please confirm if below script is ok:

 

M = {}

function M.outbound_INVITE(msg)

local fromtag = msg:getHeaderValueParameter("From", "tag")

local pai = msg:getHeader("P-Asserted-Identity")

local uri = string.match(pai, "(<sip:%+8820.+>)")

local uri2 = string.match(pai, "(<sip:%+881995.+>)")

                if uri or uri2

                then

                                msg:modifyHeader("From", "Anonymous <sip:anonymous@anonymous.invalid>")

                                msg:addHeaderValueParameter("From", "tag", fromtag)

                                msg:addHeader("Privacy", "id")

                end

end

return M

 

Please assist.

Devraj

 

1 Reply 1

nikhilrajan
Level 1
Level 1

Hi Devraj,

Even i would like to change the Privacy to full.

Were you able to find the answer?

Regards,

Nikhil

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: