We have an application that usually relies on a CTI app to obtain a caller's IP address and we'd like to see if we could implement something similar using a SIP Normalization script instead.
What we would like to do is add a custom sip header to the outbound SIP INVITE that includes the original caller's IP address.
I haven't seen anything in the lua script documentation that would provide information on the original caller.
Although perhaps others can weigh in here as well, I would argue that you can't do this reliably.
If you're trying to use locally registered phones (I'm presuming, please correct if wrong), then the correct answer is surely to use JTAPI. You can get a lot more phone-related information from that API.
Can you give a bit more information on what you're trying to achieve? If it is feasible with Lua, then I can definitely help you out in extracting the correct IP and inserting a custom header. But as I've suggested, I think this approach is riddled with caveats.
Thanks for you comments.
This is used in the context of processing 911 calls. So typically, the caller is "local" to the CUCM placing the outbound call.
The reason for having the original caller's IP present somewhere in the outbound call it so the server receiving the 911 call can figure out the caller's physical location (this server processes the call before forwarding to the actual PSAP).
As far as using JTAPI, this is basically what we are presently doing and it works well. But I was trying to find a "lighter" solution that would not require an external process. That is why the SIP Normalization scripts seemed promising. But I was hoping for some service to provide information on the call being processed, but it looks like all these services are SIP based.
While this may partly work for cases where the caller is SIP based, I'm not sure what happens when the caller is using a legacy signaling (SCCP, H.323, etc) while the outbound leg is SIP? Would the SIP Normalization script see any information for the inbound leg since it's not SIP?
You can run a Normalization Script on the SIP line side (the phone), which would create fewer barriers to this, but this hasn't really been fully vetted as a 911 solution, which makes me nervous when there are numerous off the shelf solutions out there. You even have an Emergency Call Handler built into Unified CM.
Really? I had read that normalization scripts were only supported for trunks.
You have to apply it using a SIP Profile (you cannot configure directly on a phone), but you can send SIP line-side calls through a Normalization script.
One more question - the way you're describing, this should be supported for 3rd party SIP devices as well?
It is tied to the SIP stack, not the phone specifically, so yes, it would handle 3rd-party SIP phones.