wiki:freeswitch-201002

Version 4 (modified by Jamie McClelland, 14 years ago) ( diff )

--

FreeSwitch vs. Asterisk

[It would be good to revisit the decision to use FreeSwitch rather than Asterisk because I cannot remember the argument]

A limitation from the FreeSwitch wiki: Unlike some other switches, the dialplan is not designed to be an end all be all scripting language that you put a bunch of logic into. The dialplan, quite simply is designed to take a call request, decide where it should forward to and forward to an application.

However, it looks like there is an Asterisk module for FreeSwitch: http://wiki.freeswitch.org/wiki/Mod_dialplan_asterisk

Dialplan

  1. user dials
  2. Welcome to May First/People Link, the progressive Internet organization. If you are a member and need technical support, please go to our support web site at support.mayfirst.org. If you would like to speak with Jamie, please press 1, Alfredo, please press 2, or Mallory please press 3. Our fax number is: 718-770-7699. Our postal address is PO Box 1814, New York, New York, 10159.
  1. user presses extension, leaves a voice message, hangs up, or the message repeats
  2. user is welcomed by recording and asked to leave a recorded voice message or press 0 to return to the main menu

US SOCIAL FORUM 1-877

  1. User dials
  2. user is welcomed with a recording in english followed by spanish, asked to press 1 or 2 for language
  3. user chooses
  4. user listens to a recording. during office hours, press 0 to speak to a ussf organizer and is then directed to press 1 - 5
  5. user presses 1 -> user listens to a recording of information about the social forum, given option to press 9 to return to main menu. if user does not press 9 or 0, message repeats once, then ends the call
  6. user presses 2 -> user listens to a short recording about the national work and is instructed to leave a message for adrienne/sylvia, given option to press 9 for main menu or 0 to reach the office during office hours. user leaves a message and mp3 is forwarded via email to adrienne and sylvia. if user does nothing, message repeats once and then ends the call
  7. user presses 3 -> user listens to a short recording about the local work and is instructed to leave a message for maureen/will, given option to press 9 for main menu or 0 to reach the office during office hours user leaves a message and mp3 is forwarded via email to will/maureen. if user does nothing, message repeats once and then ends the call
  8. user presses 4 -> user listens to a short recording about the fundraising work and is instructed to leave a message for sha, given option to press 9 for main menu or 0 to reach the office during office hours user leaves a message and mp3 is forwarded via email to sha. if user does nothing, message repeats once and then ends the call
  9. user presses 5 -> user listens to a message about registration logistics (may extend this menu later) and instructed to press 0 during office hours for immediate questions, press 9 for main menu, or leave a message for mallory. user leaves a message and mp3 is forwarded via email to mallory. if user does nothing, message repeats once and then ends the call

Freeswitch Details

Basic Configuration

There are three directories where incoming calls are handled:

  • conf/sip_profiles/external: these files define the user/password for a voicepulse account (e.g. mfpl-voicepulse.xml). If you have a new voicepulse account, you will need to create a new file with the username/password in it and define the name of the gateway that will be referenced in the other config files (the MFPL gateway is called mfpl-voicepulse)
  • conf/dialplan/public/: this directory contains files that handle incoming phone calls (e.g. mfpl-voicpulse.xml). For example it says - if we get an incoming call from the number 718-303-3204 (the MFPL line), then it should be sent to the MFPL dialplan. If you add a new phone number, you will need a new file here
  • conf/dialplan/mfpl.xml: this directory contains a file that includes all files in the conf/dialplan/mfpl directory. This is the MFPL dial plan. The conf/dialplan/mfpl/ directory contains both an incoming.xml and outgoing.xml files. The inbound.xml file may define an application called "ivr" (interactive voice response) which is defined below.
  • conf/autoload_configs/ivr*: these files define interactive voice response menues (ivr_mfpl.xml). This is how you define a automated attendent with a menu of options.

Tips

If you login as root@talk.mayfirst.org and then type screen -x you can attach to a running screen session.

There's one window that is running the /opt/freeswitch/bin/fs_cli program, an interactive connection to the freeswitch server that allows you to see what is happening as it's happening. You can also type the command:

reloadxml
reload mod_sip

After you make a change to an xml file.

If freeswitch complains about an XML parse error (which it does without telling you which file had the error), you can check for xml errors (ignore the de directory since there seems to be some utf8 errors that are not relevent to us):

find /opt/freeswitch/conf ! -path '*/conf/lang/de/*' -name '*.xml' -exec xmllint --noout '{}' \;
Note: See TracWiki for help on using the wiki.