diff --git a/modules/openstack_project/files/pbx/asterisk/cdr.conf b/modules/openstack_project/files/pbx/asterisk/cdr.conf new file mode 100644 index 0000000000..cc3fa0fd28 --- /dev/null +++ b/modules/openstack_project/files/pbx/asterisk/cdr.conf @@ -0,0 +1,3 @@ +[general](+) + +enable=yes diff --git a/modules/openstack_project/files/pbx/asterisk/cdr_custom.conf b/modules/openstack_project/files/pbx/asterisk/cdr_custom.conf new file mode 100644 index 0000000000..d4234613bc --- /dev/null +++ b/modules/openstack_project/files/pbx/asterisk/cdr_custom.conf @@ -0,0 +1,3 @@ +[mappings](+) + +Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)} diff --git a/modules/openstack_project/manifests/pbx.pp b/modules/openstack_project/manifests/pbx.pp index bc4db994ed..94e000cd9b 100644 --- a/modules/openstack_project/manifests/pbx.pp +++ b/modules/openstack_project/manifests/pbx.pp @@ -60,4 +60,22 @@ class openstack_project::pbx ( source => 'puppet:///modules/openstack_project/pbx/asterisk/extensions.conf', require => File['/etc/asterisk/'], } + + file {'/etc/asterisk/cdr.conf.d/cdr.conf': + ensure => present, + owner => 'asterisk', + group => 'asterisk', + mode => '0660', + source => 'puppet:///modules/openstack_project/pbx/asterisk/cdr.conf', + require => File['/etc/asterisk/'], + } + + file {'/etc/asterisk/cdr_custom.conf.d/cdr_custom.conf': + ensure => present, + owner => 'asterisk', + group => 'asterisk', + mode => '0660', + source => 'puppet:///modules/openstack_project/pbx/asterisk/cdr_custom.conf', + require => File['/etc/asterisk/'], + } }