cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8007
Views
15
Helpful
6
Replies

cucm manager drops incoming "anonymous" or "restricted" calls from "Filter css"

shohamshalom
Level 1
Level 1

hello  guys

Need some help here asap!!!!

i m running 8.6.2-29000 cucm manager cluster

all my mgcp gateway and sip trunks incoming calls configured with "Inbound Css"  with filter

to block/allow/Add 9 prefix and more.

i  facing the issue with 'anonymous'  calls that the cucm manager droped and i m not sure what the action plan here

i must user the Filter css ,and also to make that "anonymous" or "restricted calls will pass the cucm manager.

 

please advise a.s.a.p

 

thanks

shoham

6 Replies 6

Terry Cheema
VIP Alumni
VIP Alumni

So you are filtering calls based on Calling number and your MGCP gateway is blocking incoming calls with no CLID?

Refer to Step 7 here: https://supportforums.cisco.com/document/71966/blocking-calls-based-calling-party-id

7)      Some calls may arrive without caller id or a restricted caller ID. If you wish to allow calls without caller ID, there will also need to be a <none> or blank Translation Pattern. If the administrator does not define a <none> Translation Pattern, then all calls without caller id will be rejected.

 

image4.png

 

If you have a different issue please explain in bit more detail.

-Terry

Please rate all helpful posts

Yorick Petey
Level 4
Level 4

Hi Shoham,

I have the exact same problem. Calls coming with "anonymous" (seen in CDRs) are dropped by the filter, although I have the "blank" pattern. Did you find a solution?

These "anonymous" calls started when I added new voice gateways ISR 4400 series as SIP Trunks. It seems the new IOS changed the way the SIP headers are sent to the CUCM.

Thank you for your help.

Yorick

With SIP I have had similar problems as well.  Personally I wiped out the "From" Header and put in a fictitious number that I would then take actions on once it makes it to CUCM.   Do this with a SIP profile on a CUBE dial peer.  It sure beats writing a normalization script for CUCM to do the same thing. 

For instance:

voice class sip-profiles 1
request INVITE sip-header From modify "<sip:Anonymous@" "<sip:0000000000@"

More details here:  http://technologyordie.com/calling-party-routing-of-anonymous-calls-sip-header-fix-up

- Be sure to rate all helpful posts

david.vanherck
Level 1
Level 1

Hi,

I'm also having problems with anonymous callers when using a filter list on CUCM. If the CLID is known, calls pass thru, but if an anonymous callers calls, the call gets dropped. Did you find a workaround?

Greets,

David

Dalton-Covene
Level 1
Level 1

Shohamshalom,

You need to apply a Normalization Script on the SIP Trunk which will modify the SIP Header and change ANONYMOUS / NONE / NULL to a "Replacement Number" which will be routable by CUCM.  Please find the SIP Trunk Normalization Script details below.



Name: Allow-Anonymous-Calls
Description:ALLOW ANONYMOUS / NONE / NULL INBOUND CALLS - Change the SIP invite from sip:Anonymous to sip:0 so that calls match the inbound call filter list


Conetent:

M={}

--change to trace.enable() to have trace output in SDI
trace.disable()  


function M.inbound_INVITE(msg)  --capture inbound INVITE messages
   --set the string to replace the anonymous, unavailable or restricted strings in the INVITE message
   replacementNumber = "sip\:0"
   trace.format("Replacement Number: %s", replacementNumber)


   --Set the header values to inspect for anonymous caller
   local fields = { "From" , "Remote-Party-ID" , "P-Preferred-Identity", "P-Asserted-Identity" }
   local numberOfFields = #fields
   trace.format("Fields/Count: %s, %s, %s, %s, %s", fields[1], fields[2], fields[3], fields[4], numberOfFields)
   
   --loop though the header fields to inspect and replace any instance of 'anonymous' with the specified replacement number
   local x = 1
   while  x <= numberOfFields do

      --get the field from the header
      local header = msg:getHeader(fields[x])
      if header == nil
      then
         trace.format("Field %s not found", fields[x])
      else
         trace.format("Field %s: %s", fields[x], header)

         --does the from contain anonymous
         if string.find(string.lower(header), "sip\:anonymous")  
         then
            trace.format("Found string anonymous in %s", fields[x])
            trace.format("Header: %s %s", fields[x], string.lower(header))

            --replace the word anonymous with the user defined replacement number
           local newHeader = string.gsub(string.lower(header), "sip\:anonymous", replacementNumber)
           trace.format("New %s Field: %s", fields[x], newHeader)

           --modify the From field
           msg:modifyHeader(fields[x], newHeader)    
         else if string.find(string.lower(header), "sip\:unavailable")
         then
            trace.format("Found string unavailable in %s", fields[x])
            trace.format("Header: %s %s", fields[x], string.lower(header))

            --replace the word unavailable with the user defined replacement numbe
           local newHeader = string.gsub(string.lower(header), "sip\:unavailable", replacementNumber)
           trace.format("New %s Field: %s", fields[x], newHeader)

           --modify the From field
           msg:modifyHeader(fields[x], newHeader)    

         else if string.find(string.lower(header), "sip\:restricted")
         then
            trace.format("Found string unavailable in %s", fields[x])
            trace.format("Header: %s %s", fields[x], string.lower(header))

            --replace the word unavailable with the user defined replacement number
           local newHeader = string.gsub(string.lower(header), "sip\:restricted", replacementNumber)
           trace.format("New %s Field: %s", fields[x], newHeader)

           --modify the From field
           msg:modifyHeader(fields[x], newHeader)    
           
          else
            trace.format("Field %s number valid.  No change made.", fields[x])
          end
          end
          end
        end
    x = x+1
   end
end
return M

 

: Message Rollback Only

Disable Script

Memory Threshold: 50

LUA Instruction Threshold: 1500

 

 

Once creating the SIP Normalization Script in CUCM under Device > Device Settings > SIP Normalization Script, apply the script to the SIP Trunk after hours.  Ensure to Apply Config & Reset the SIP Trunk (NOTE: This will drop active calls).  I have tested this in multiple deployments and verified it works.

 

Regards,

 

Dalton Woolsey

AhmadmKefaya
Level 1
Level 1

Hi,

 

if you have CUBE you can apply this command:

Voice service voip

sip

sip-profiles inbound
sip-profiles 10 inbound

exit

 

voice class sip-profiles 10
request ANY sip-header From modify "<sip:anonymous@" "<sip:+00000000000@"

exit

 

here you must start see that the SIP messages header is changed to +00000000000 not anonymous, you have the option to change (+00000000000) to anything that meet your requirement

 

Regards,

Ahmad Kefaya

 

 

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: