Skip to main content

mod_fsk

About

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

Click here to expand Table of Contents

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"/>

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

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.

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>

Comments:

For FreeSWITCH Peering:The 108 extension needs to have the closing </extension>. Additionally, the outgoing call part seems to be inaccurate. The *D and fsk appear to be sent to the calling party not the called. It is also sent before my cell phone answers (in the case of calling my cell phone).It might also be good if instead of just blindly dialing, an unused SIT tone is sent on answer by all FS boxes setup to allow the upgrade, something short, something that won't be detected as an error by various phone systems. A modified bong-ring where the tones are different, maybe. Then calling systems can listen for this very short tone and then send the *D and fsk data. This might also fix the problem where bridge_pre_execute_aleg_app sends it too early and execute_on_answer doesn't work as expected. Posted by tadams at Aug 17, 2015 20:14