How to setup freeswitch in CentOS 7

Livesearch

Content

Freeswitch is an open-source alternative to Asterisk to build a telephony server. It was launched by a member of the Asterisk development team who wanted to rewrite the whole thing from scratch to cleanly separate the switching part from the PBX part.

1. Install EPEL

We will install two repository namely epel and the one provided by freeswitch. To install these two execute the following commands in the terminal.

Now open the file /etc/freeswitch/dialplan/default.xml using any editor and modify the destination_number and application=”bridge” part under extension section “Local Extension” around line 266. If you have already configured the domain name then you don’t have to add IP address part in bridge parameter. Just Keep it like below.

If you have not configured the domain name then edit the above line and add IP address in place of {domain_name}.

……………..

……………..

……………..

<extension name=”Local_Extension”>
<condition field=”destination_number” expression=”^(1[0-9]{3})$”>
<!– This will dial a registered phone at the ip or domain name you set in the globals section –>
<!– (The % indicates it is an internal extension) –>
<action application=”set” data=”dialed_extension=$1″/>
<action application=”export” data=”sip_auto_answer=true”/>
<action application=”bridge” data=”user/${dialed_extension}@103.38.75.11“/>
</condition>

……………..

……………..

……………..

Reload new configuration.

freeswitch@your-host> reloadxml

4. Install Zoiper in client

We have created two users in the last step. Download and install zoiper in two separate client system from https://www.zoiper.com/en/voip-softphone/download/zoiper3 . Extract the downloaded zoiper directory and run the installer according to your client’s architecture.

5. Configure Zoiper

Run the zoiper and click settings-> Audio wizard and configure speaker and microphone. Once you have finished testing “microphone” and “speakers” , click “settings”->create a new account. Choose “SIP” and click next.

Enter user/password that we have created earlier along with domain. If you have already configured the domain then you don’t have to put IP address. Click “Next”.

Give a name of the account.

Click “Next” , your account will be added to the list.

If you now click “Settings”->“Preferences” and then “General” and “advance” tab, it will look like below.

Repeat the same process for user 1001 in another system. Now as a user ‘1000’ dial the user ‘1001’ or vice-versa, you will get a screen like below stating its status as “ringing”. Once the user “1001” accept your call, you will get connected with the user ‘1001’.

Now you have a basic PBX which allows the SIP users to register and place and receive calls.