Mod fsk

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Introduction

This module is used to send and receive information via Frequency-shift keying. This can be used to send and receive Caller ID.

Installing

Edit modules.conf and add the following line:

applications/mod_fsk

Then,

make mod_fsk
make mod_fsk-install


Tell FreeSWITCH to load the module by adding the line below to modules.conf.xml in /usr/local/freeswitch/conf/autoload_configs:

<load module="mod_fsk"/>

Usage

fsk_send

Undocumented.

fsk_recv

This registers a mediabug that detects FSK.

<action application="fsk_recv"/>

Several variables may be set when FSK is detected:

fsk_datetime
fsk_phone_name
fsk_phone_num

It is also possible to send name=value pairs, which are placed in variables with the fsk_ prefix:

fsk_${name}

It is also possible to execute an application when FSK is received:

<action application="set" data="execute_on_fsk=..."/>

fsk_simplify

This can be used to simplify the call path, similar to uuid_simplify. It is used with execute_on_fsk:

<action application="fsk_recv"/>
<action application="set" data="execute_on_fsk=fsk_simplify"/>

fsk_display

This can be used to update the display with Caller ID information. It is used with execute_on_fsk:

<action application="fsk_recv"/>
<action application="set" data="execute_on_fsk=fsk_display"/>

It will update the display with the ${fsk_phone_name} and ${fsk_phone_num} variables, which were set when FSK was detected.


FreeSWITCH Peering

Using fsk, two FreeSWITCH machines can talk to each other and drop the call via PSTN and set up a direct peer connection. Via anthm.

NOTE: This is currently in beta!!

On the called box, in the dialplan that answers/bridges the incoming call:

<action application="set" data="execute_on_fsk=fsk_simplify"/>
<action application="bind_meta_app" data="D b a fsk_recv::w"/>

On the calling box, in the dialplan that bridges the outgoing call:

<action application="set" data="fsk_uri=i+${uuid}@$${domain}"/>
<action application="set" data="bridge_pre_execute_aleg_app=fsk_send"/>
<action application="set" data="bridge_pre_execute_aleg_data=*D"/>

The calling box also needs this extension:

<extension name="108">
<condition field="destination_number" expression="^i\+(.*)$">
<action application="answer"/>
<action application="intercept" data="-bleg $1"/>
</condition>