[Spce-user] Avoid number appear in cdr

Jon Bonilla (Manwe) jbonilla at sipwise.com
Tue May 22 12:43:45 EDT 2012


El Tue, 22 May 2012 17:22:25 +0200
Mario Contreras <mario.contreras at innovasur.es> escribió:

> Thans for the quick answer.
> 
> It's for legal issues. Some calls, like a phone in my country for 
> domestic violence, must be hidden to clients. So, my intention is to 
> hide it in csc. Is there any problem if I remove the row from table(I 
> already did to test it)?
> 
> Thanks again!
> 

This sounds indeed interesting. I'll open a feature request ticket and see if
this feature can be added to the upcoming 2.6 release. Some kind of number
patterns than will be shown in the admin cdr entries but not to the end
customer.

Meanwhile, you can delete the entries in the cdr table, but I'd suggest not to
mess with the database. You can try with a little dirty patch:

Create a c customtt template for /etc/kamailio/proxy/proxy.cfg as explained in
the handbook:

# cd /etc/ngcp-config/templates/etc/kamailio/proxy
# cp proxy.cfg.tt2 proxy.cfg.customtt.tt2
# vim proxy.cfg.customtt.tt2

If you want to hide all emergency calls for example, you can find the place
where emergency patterns are detected. In ROUTE_INVITE you'll find something
like this:


if(uri =~ "^sip:([% kamailio.proxy.patterns.emergency %])@")
        {
                $var(em_call) = 1;
        }

Add this line to the "if" statement:


if(uri =~ "^sip:([% kamailio.proxy.patterns.emergency %])@")
        {
                $var(em_call) = 1;
		$var(no_acc) = 1; #no CDR
        }

Then save and execute "ngcpcfg apply" to apply the changes. That should prevent
the system from creating any CDR from any call to an emergency pattern that you
defined in config.yml.

In case you only want to hide a particular number and not the whole emergency
patterns, the change is trivial. Create your own "if" to check the pattern. For
example if your number is "016" you can do add this:

if(uri =~ "^sip:016@")
        {
		$var(em_call) = 1; #This is emergency
		$var(no_acc) = 1; #No CDR
        }


Please remember that this is a quick patch and you need to test it! We'll try
to provide a cleaner solution for release 2.6.

Thanks for reporting,

Jon





More information about the Spce-user mailing list