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

SIP Normalization Script inbound_REGISTER???

Does anyone know if the Lua engine on CUCM will process inbound REGISTER messages?

If not, is there a feature request already submitted to the BU?

If not, WHY???

 

I am trying to insert a + for a third party device that cannot use the + in the DN.

 

When I apply the script to the device (using the sip profile) I don't see any trace output.  Yes, Trace is enabled in both places. :-)

 

What I want to do is...

Make this:

REGISTER sip:10.10.10.10 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.11:5060;branch=z9hG4bKsdff220199;rport
From: <sip:14564564561@10.10.10.10>;tag=2427249315
To: <sip:14564564561@110.10.10.11>

CSeq: 1168234561 REGISTER
Max-Forwards: 70
Call-ID: 3627365506@10.10.10.10
Contact: <sip:14564564561@10.10.10.10:5060;transport=udp;rinstance=2019984276>
Expires: 3600
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,UPDATE
User-Agent: Tesira/1.2.4.2
Content-Length: 0
Authorization: Digest username="supersecretusername",realm="ccmsipline",nonce="hasheduppassword/hashthat",uri="sip:10.10.10.11:5060",response="b05asdf465c29806056465465456475c",algorithm=MD5

Look like this to CCM:

REGISTER sip:10.10.10.10 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.11:5060;branch=z9hG4bKsdff220199;rport
From: <sip:+14564564561@10.10.10.10>;tag=24ss2745249315
To: <sip:+14564564561@110.10.10.11>

CSeq: 1168234561 REGISTER
Max-Forwards: 70
Call-ID: 3627365506@10.10.10.10
Contact: <sip:+1456456456@110.10.10.10:5060;transport=udp;rinstance=2019984276>
Expires: 3600
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,UPDATE
User-Agent: Tesira/1.2.4.2
Content-Length: 0
Authorization: Digest username="supersecretusername",realm="ccmsipline",nonce="hasheduppassword/hashthat",uri="sip:10.10.10.11:5060",response="b05asdf465csdf29806056465465456475c",algorithm=MD5

By using this:

M = {}
 trace.enable()
 function M.inbound_REGISTER(msg)
   local uriString1 = msg:getHeader("To")
   local uriString2 = msg:getHeader("From")
   local uriString3 = msg:getHeader("Contact")
   local uriNewString1 = string.gsub(uriString1, "<sip:" , "<sip:+")
   local uriNewString2 = string.gsub(uriString2, "<sip:" , "<sip:+")
   local uriNewString3 = string.gsub(uriString3, "<sip:" , "<sip:+")
   msg:modifyHeader("To", uriNewString1)
   msg:modifyHeader("From", uriNewString2)
   msg:modifyHeader("Contact", uriNewString3)
  end
return M

 

OR By using this:

M = {}
 trace.enable()
 function M.inbound_ALL(msg)
   local uriString1 = msg:getHeader("To")
   local uriString2 = msg:getHeader("From")
   local uriString3 = msg:getHeader("Contact")
   local uriNewString1 = string.gsub(uriString1, "<sip:" , "<sip:+")
   local uriNewString2 = string.gsub(uriString2, "<sip:" , "<sip:+")
   local uriNewString3 = string.gsub(uriString3, "<sip:" , "<sip:+")
   msg:modifyHeader("To", uriNewString1)
   msg:modifyHeader("From", uriNewString2)
   msg:modifyHeader("Contact", uriNewString3)
  end
return M

Ideas?  Missing something?  Cisco cannot modify REGISTER messages, there has to be an answer...

Also, is there a best effort email address that I can also send this too?

Thanks,

TwD

0 Replies 0