FreeSwitch
This documentation is for FreeSwitch v1.6. For newer versions – please reach out to the support.
xDR files​
In order to set up xDR files integration, you have to perform the following steps:
-
Install FreeSWITCH v1.6 according to the vendor's installation guide using compile from source method.
-
Make sure
cdr_csv.conf.xml
file (located in/usr/local/freeswitch/conf/autoload_configs
), contains the following data:/usr/local/freeswitch/conf/autoload_configs/cdr_csv.conf.xml<configuration name="cdr_csv.conf" description="CDR CSV Format">
<settings>
<!-- 'cdr-csv' will always be appended to log-base -->
<!--<param name="log-base" value="/var/log"/>-->
<param name="default-template" value="jerasoft"/>
<!-- This is like the info app but after the call is hung up -->
<!--<param name="debug" value="true"/>-->
<param name="rotate-on-hup" value="true"/>
<!-- may be a b or ab -->
<param name="legs" value="ab"/>
<!-- Only log in Master.csv -->
<param name="master-file-only" value="true"/>
</settings>
<templates>
<template name="jerasoft">"${billuuid}","${uuid}","${network_addr}","${sip_to_host}","${sip_auth_username}",
"${caller_id_number}","${destination_number}","${sip_to_uri}","${start_stamp}","${answer_stamp}",
"${end_stamp}","${billsec}","${hangup_cause}","${progresssec}","${read_codec}","${write_codec}",
"${call-origin}","${touser}"</template>
</templates>
</configuration> -
Set password in
event_socket_conf.xml
(located in/usr/local/freeswitch/conf/autoload_configs
). The contents of the file will be similar to the example below, with the actual password set instead ofXXX
:/usr/local/freeswitch/conf/autoload_configs/event_socket_conf.xml<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="nat-map" value="false"/>
<param name="listen-ip" value="0.0.0.1"/>
<param name="listen-port" value="8021"/>
<param name="password" value="XXX"/>
<!--<param name="apply-inbound-acl" value="lan"/>-->
</settings>
</configuration> -
Configure CDR files rotation via Cron – create file
/etc/cron.d/freeswitch-cdr-rotate
with the following content:/etc/cron.d/freeswitch-cdr-rotate0,30 * * * * root /usr/local/freeswitch/bin/fs_cli -p XXX -x 'cdr_csv rotate'
If you decided not to use password on the previous step, remove
-p XXX
part of the line above. -
Restart FreeSwitch.
-
Perform configuration on the JeraSoft Billing side using Billing configuration article.
For this integration please use "Freeswitch (CSV format)" files collector in the JeraSoft Billing.
RADIUS & External routing​
In order to set up RADIUS integration and external routing (supported via SIP redirect), please perform the following steps:
-
Install FreeSWITCH v1.6 according to the vendor's installation guide using compile from source method. During "Compile from Source" installation, after running
./bootstrap.sh
and before compilingfreeswitch
package, uncomment the following lines inmodules.conf
file:xml_int/mod_xml_radius
applications/mod_rad_auth -
After installation is over, completely delete
/usr/local/freeswitch/conf
folder and replace it with/opt/jerasoft/vcs/docs/examples/freeswitch/conf
, located on the billing server. Make sure you’ve changed owner and group of this folder and all its contents tofreeswitch:freeswitch
. -
Edit following lines in the
/usr/local/freeswitch/conf/vars.xml
file:/usr/local/freeswitch/conf/vars.xml<X-PRE-PROCESS cmd="set" data="radiusauth=<BILLING_IP>:<RADIUS AUTH PORT>:<RADIUS SECRET>"/>
<X-PRE-PROCESS cmd="set" data="radiusacct=<BILLING_IP>:<RADIUS ACCT PORT>:<RADIUS SECRET>"/>
<X-PRE-PROCESS cmd="set" data="sipredirect=<BILLING_IP>"/>change the following values:
<BILLING_IP>
– set to the IP of the JeraSoft Billing<RADIUS AUTH PORT>
– set to1812
(or another port you defined in the JeraSoft Billing)<RADIUS ACCT PORT>
– set to1813
(or another port you defined in the JeraSoft Billing)<RADIUS SECRET>
– set to a random value (same as you defined in the JeraSoft Billing)
-
Restart FreeSwitch.
For this integration please use "JeraSoft Billing Common" RADIUS collector and "FreeSwitch v1.6" SIP collector in the JeraSoft Billing.