Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Normalization Script - Modifying INVITE

Hi guys,

I would have a question regarding the normalization scripts for SIP.

Is there a way to modify the second field in an INVITE request? (sip:DN@IP)

INVITE sip:7111@192.168.15.111:5060 SIP/2.0

Date: Mon, 28 Oct 2013 09:25:39 GMT

Call-Info: <sip:192.168.15.1:5060>;method="NOTIFY;Event=telephone-event;Duration=500"

Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY

Thanks a lot.

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
VIP Super Bronze

Normalization Script - Modifying INVITE

Yes you can chnage the request URI..

The script below changes the RURI from XXXX@211.211.211.211 to XXXX@Test.com

M = {}

function M.outbound_INVITE(msg)

local method, ruri, ver = msg:getRequestLine()

local uri = string.gsub (ruri, “211.211.211.211″, “Test.com”)

msg:setRequestUri(uri)

end

Please rate all useful posts

"opportunity is a haughty goddess who waste no time with those who are unprepared"

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
11 REPLIES
New Member

Normalization Script - Modifying INVITE

Hi Cristian,

It is possible to do using sip profiles.

http://www.cisco.com/en/US/products/sw/voicesw/ps5640/products_configuration_example09186a0080982499.shtml

Kind regards,
Andrew C.

Kind regards, Andrew C.
New Member

Normalization Script - Modifying INVITE

Hi Andrew,

thanks for the reply.

It works great using sip profiles.

But is there a way to do it on Call Manager with norm. scripts?

Thanks.

Regards

New Member

Normalization Script - Modifying INVITE

Sorry, I haven't noticed that you want to use normalization scripts. I've never used them, but it seems that yes, you can change almost everything using it.

https://supportforums.cisco.com/community/netpro/collaboration-voice-video/unified-comm-application/blog/2012/03/12/modifying-sip-header-in-call-manager-sip-normalization

http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/sip_tn/8_5_1/10-sip_transparency.html

Kind regards,

Andrew C.

Kind regards, Andrew C.
New Member

Normalization Script - Modifying INVITE

or is there a way to force the Voice Gateway to route incoming invites based on the TO header instead of the request uri?

because the TO header can be easily modified with norm. scripts:

M = {}

function M.outbound_INVITE(msg)

    msg:removeHeader("To")

    msg:addHeader("To", "<7222>")

end

return M

Thanks.

Regards

New Member

Normalization Script - Modifying INVITE

Sorry, can't help with that, I have only theoretical knowledge regarding this question. Hope someone in community would be more helpful.

Kind regards,
Andrew C.

Kind regards, Andrew C.
New Member

Normalization Script - Modifying INVITE

thanks Andrew.

It seems that you can modify nearly everything but I'm not really sure regarding the INVITE SIP-Req-URI...

Has anyone tried this?

Thanks.

VIP Super Bronze

Normalization Script - Modifying INVITE

Cristian,

First of all you can only use normalization scripts on CUCM. With voice gateways you only use sip profiles.

Second, you can only apply sip profiles in the outbound direction, you can use it to change headers in the outbound direction as far as the gateway is concerened.

Please rate all useful posts

"opportunity is a haughty goddess who waste no time with those who are unprepared"

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

Normalization Script - Modifying INVITE

Hi aokanlawon,

yes, that is clear.

The problem would be that I can't change the request uri using norm scripts on Call Manager.

Is there a way that I can access the request uri in the invite message using norm scripts (on Call Manager)?

INVITE sip:7111@192.168.15.111:5060 SIP/2.0

Date: Mon, 28 Oct 2013 09:25:39 GMT

Thanks.

Regards

VIP Super Bronze

Normalization Script - Modifying INVITE

Yes you can chnage the request URI..

The script below changes the RURI from XXXX@211.211.211.211 to XXXX@Test.com

M = {}

function M.outbound_INVITE(msg)

local method, ruri, ver = msg:getRequestLine()

local uri = string.gsub (ruri, “211.211.211.211″, “Test.com”)

msg:setRequestUri(uri)

end

Please rate all useful posts

"opportunity is a haughty goddess who waste no time with those who are unprepared"

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

Normalization Script - Modifying INVITE

great. thanks.

New Member

Normalization Script - Modifying INVITE

it seems that it can be done with setRequestUri.

M = {}

function M.outbound_INVITE(msg)

    msg:setRequestUri("tel:1234")

end

return M

Thanks.

Regards

618
Views
0
Helpful
11
Replies