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

SIP Normalization scripting help required

yellomello
Level 1
Level 1

Hi all,

I would require your help in order to solve a situation which I'm currently facing.


The current scenario is that I have a SIP Trunk from a Cisco Session Management Edition (version 8.5.1) -> Huawai UAP6600.
Unfortunately the remote site (Huawai site) has configured a session-timer of 90 secs.

As we can't change the session-timmer globally on the SME, I thought to use a SIP normalization script to fit the requirements.

I have already created a script which is changing the session-timer (as well as "Min-SE" value) from 90 to 1800 for the incoming INVITE request.
Also I'm doing the same for the outgoing 200 OK message, so changing back from 1800 to 90.

So far, this works fine, but the problem is that the call will be disconnected after a certain time and that's because of a new value at the session-timer: session-timer: 90;refresher=UAS

This tells me that the SME will send an UPDATE message, once it reaches the session-timer BUT it will not do so because for the SME, the session-timer is still 1800, as I'm just modifying the values to fit the requirements but not the concept in general.

Therefore I would need to change the value "refresher=UAS" to "refresher=UAC", so that the Huawai System will be forced to send the UPDATE messages.

Is someone able to put this into a lua script properly?

What I have so far is this:

 

function M.outbound_200_INVITE(msg)
local expired = msg:getHeader ("Session-Expires")
local newexpired = string.gsub(expired, "1800", "90")
msg:modifyHeader("Session-Expires", newexpired)
end

 

But, independently how I do it, it fails for the "refresher=UAS" part.

Any help on this is appreciated.

 

Thanks
Cheers,Michael

0 Replies 0