cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
281
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: BENGT ANDERSSON on 19-12-2011 09:36:01 AM
I need help in adding a user in a specific case when a call comes in without a "source number" "user", i get a SIP "From" header looking like this:
"<sip:10.160.108.53>;tag=2821~76ab30d4-0f12-4cd8-8bec-63e69de49af2-34353355", and this call is not possible to answer.
I have tried with the following script but i must be "off" somwhere casuse it does not work :-)
M = {}
local function add_user(msg, header)
  local uriString = msg:getUri(header)
  if uriString
  then
    local uri = sipUtils.parseUri(uriString)
    if uri
    then
      local user = uri:getUser()
        if user == nil or user == "" then
          local newuri = string.format("<sip:anonymous@%s>", "%1")
          hdrvalue = hdrvalue:gsub("<sip.*)>", newuri)
        end
      end
    end
  end
end
local function process_outbound_INVITE(msg)
    add_user(msg, "From")
end
M.outbound_INVITE = process_outbound_INVITE -- Process outbound INVITE
return M
Anyone how can point me in the right direction ?
 
Bengt

Subject: RE: Adding a "user" in "From" header ?
Replied by: William Delgado on 20-01-2012 09:13:44 AM
HI BengT Anderson,

I am an user and definitely not a developer. I ran into a similar issue as well, my sip uri looked like: <sip:ipv4:5060> I was able to get this routed the right way in call manager but not on my cisco voice gateway.

What I did was to add a "SIP Route Pattern". I am running CM 8.6 and this is located in: http://callmanager/ccmadmin then go to; Call Routing > SIP Route Pattern.

In my call flow, here is how I am setup:

PSTN > 2pri > Voice GW > (h323) > CM

What I did was that I created a sip trunk from CM to the voice gateway (cisco 2811) and then in the configuration of the sip route patern, I entered the IP address in the first field and in the bottom I selected the new sip trunk I created above and then CM started to route the calls the right way.

THere might be an easier way of getting this done, I am not an expert. IF you happen to know how to get this done in the gateway please DO share though!..lol It would really help me on another project that I am working on.

Subject: RE: Adding a "user" in "From" header ?
Replied by: William Delgado on 20-01-2012 09:13:44 AM
HI BengT Anderson,

I am an user and definitely not a developer. I ran into a similar issue as well, my sip uri looked like: <sip:ipv4:5060> I was able to get this routed the right way in call manager but not on my cisco voice gateway.

What I did was to add a "SIP Route Pattern". I am running CM 8.6 and this is located in: http://callmanager/ccmadmin then go to; Call Routing > SIP Route Pattern.

In my call flow, here is how I am setup:

PSTN > 2pri > Voice GW > (h323) > CM

What I did was that I created a sip trunk from CM to the voice gateway (cisco 2811) and then in the configuration of the sip route patern, I entered the IP address in the first field and in the bottom I selected the new sip trunk I created above and then CM started to route the calls the right way.

THere might be an easier way of getting this done, I am not an expert. IF you happen to know how to get this done in the gateway please DO share though!..lol It would really help me on another project that I am working on.
Getting Started

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:

Quick Links