How to add custom parameters in CDR from routing

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "To copy parameters from routing in CDR they must be enabled in cdrbuild.conf first and then from routing file they are set in specific parameter called '''copyparams'''. ===D...")
 
(Routing)
Line 17: Line 17:
 
If the routing it is done from regexroute.conf:
 
If the routing it is done from regexroute.conf:
  
^.*$=sip/sip:\0@127.0.0.1;copyparams=name_param1; name_param2
+
^.*$=sip/sip:\0@127.0.0.1;copyparams=name_param1; name_param2
  
 
If you decide to do the routing from an external script the params will be set in message object like this:
 
If you decide to do the routing from an external script the params will be set in message object like this:

Revision as of 15:34, 10 May 2013

To copy parameters from routing in CDR they must be enabled in cdrbuild.conf first and then from routing file they are set in specific parameter called copyparams.

Contents

Database account

It is assumed that you have set an account in Yate, in mysqldb.conf file or in pgsqldb.conf file to register your users and their CDRs in the database.

Enable parameters

The parameters must be enabled from cdrbuild.conf:

[parameters]
name_param1=true;
name_param2=true;

Routing

If the routing it is done from regexroute.conf:

^.*$=sip/sip:\0@127.0.0.1;copyparams=name_param1; name_param2

If you decide to do the routing from an external script the params will be set in message object like this:

$m->params["name_param1"] = $value1;
$m->params["name_param2"] = $value2;
$m->params["copyparams"] = "name_param1,name_param2";

Write CDR in database

To write CDR in the database module register can be used.



See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers