10-28-2013 03:13 AM - edited 03-16-2019 08:06 PM
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
Solved! Go to Solution.
10-28-2013 04:28 AM
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"
10-28-2013 03:40 AM
Hi Cristian,
It is possible to do using sip profiles.
Kind regards,
Andrew C.
10-28-2013 03:48 AM
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
10-28-2013 03:51 AM
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.
http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/sip_tn/8_5_1/10-sip_transparency.html
Kind regards,
Andrew C.
10-28-2013 03:51 AM
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>")7222>
end
return M
Thanks.
Regards
10-28-2013 03:53 AM
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.
10-28-2013 03:55 AM
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.
10-28-2013 04:11 AM
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"
10-28-2013 04:16 AM
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
10-28-2013 04:28 AM
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"
10-28-2013 04:29 AM
great. thanks.
10-28-2013 04:24 AM
it seems that it can be done with setRequestUri.
M = {}
function M.outbound_INVITE(msg)
msg:setRequestUri("tel:1234")
end
return M
Thanks.
Regards
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: