Freeswitch is an open-source communications platform often compared to Asterisk. Like Asterisk, it has a powerful CLI (Command-Line Interface) that allows system administrators to manage, configure, and troubleshoot the system. Here are the top 30 most frequently used FreeSWITCH CLI commands, along with explanations:

  1. help

Description: Displays a list of available commands in FreeSWITCH, similar to Asterisk’s core show help.

  1. version

Description: Displays the version of FreeSWITCH currently running. This is useful for verifying the software version in use.

  1. status

Description: Provides an overview of the system’s current state, including the number of active calls, uptime, and memory usage.

  1. show channels

Description: Displays a list of all active channels (calls) in the system. This is useful for monitoring calls and seeing what’s happening on the system in real time.

  1. show calls

Description: Lists all current calls, including details such as caller and callee information, start time, and call duration.

  1. show registrations

Description: Displays a list of all registered users (SIP endpoints). This is useful for monitoring SIP client registration status.

  1. show codecs

Description: Lists all available audio and video codecs that FreeSWITCH supports. This command is helpful for troubleshooting codec-related issues.

  1. sofia status

Description: Displays the status of the SIP profiles managed by FreeSWITCH, including the status of endpoints and their bindings.

  1. sofia status profile [profile_name]

Description: Provides detailed information about a specific SIP profile, such as the number of active calls, registered users, and more.

  1. sofia profile [profile_name] rescan

Description: Forces FreeSWITCH to rescan the specified SIP profile for new or updated registrations.

  1. sofia profile [profile_name] restart

Description: Restarts the specified SIP profile. Useful when you make changes to SIP configuration and need to apply them without restarting FreeSWITCH.

  1. reloadxml

Description: Reloads the XML configuration files (typically freeswitch.xml or dialplan.xml). This allows you to apply configuration changes without restarting the entire system.

  1. reload mod_sofia

Description: Reloads the SIP (mod_sofia) module. This is particularly useful after making changes to the SIP configuration without restarting the entire system.

  1. fsctl shutdown

Description: Shuts down FreeSWITCH cleanly, allowing it to terminate any ongoing calls gracefully.

  1. fsctl restart

Description: Restarts the FreeSWITCH service without killing the underlying process. This helps apply system-wide configuration changes.

  1. uuid_kill [uuid]

Description: Terminates a specific call by its unique identifier (UUID). This is useful for manually killing problematic or stuck calls.

  1. uuid_transfer [uuid] [destination]

Description: Transfers a specific call (identified by UUID) to another destination, such as another extension or phone number.

  1. uuid_park [uuid]

Description: Parks a specific call, allowing the user to resume it later. Parking is often used in call centers and shared phone environments.

  1. uuid_dump [uuid]

Description: Provides detailed information about a specific call, including all parameters and variables associated with it. Useful for troubleshooting individual call issues.

  1. show alias

Description: Lists all command aliases that have been defined. Aliases are shortcuts for commands, helping to streamline common operations.

  1. show modules

Description: Displays a list of all loaded modules. FreeSWITCH is modular, so this command is useful for verifying which modules are currently active.

  1. load [module_name]

Description: Loads a specific module into FreeSWITCH. Modules add functionality such as specific codecs, protocols, or features like call routing.

  1. unload [module_name]

Description: Unloads a specific module, effectively disabling its functionality. This is useful for troubleshooting or removing unused features.

  1. reload [module_name]

Description: Reloads a specific module, applying any changes made to its configuration without restarting FreeSWITCH.

  1. show core

Description: Provides core system information, such as the maximum number of sessions, memory usage, and CPU load.

  1. show channels count

Description: Displays the total number of active channels (calls) in the system, useful for high-level monitoring in busy environments.

  1. show endpoints

Description: Lists all endpoints currently registered with FreeSWITCH, including their protocol, IP address, and registration status.

  1. sofia loglevel all 9

Description: Sets the log level for SIP messages to the highest level of verbosity. This is invaluable for debugging SIP-related issues.

  1. sofia profile [profile_name] flush_inbound_reg

Description: Clears all inbound SIP registrations for the specified profile. This is useful for forcing SIP clients to re-register.

  1. originate [destination] &park()

Description: Places a call to a destination (SIP endpoint, extension, or phone number) and parks the call. This is often used in IVR systems or call centers.

Bonus Commands:

  • uuid_hold [uuid]: Places a specific call on hold.
  • uuid_record [uuid] start [file_path]: Starts recording a specific call and saves the recording to a file.
  • uuid_record [uuid] stop: Stops recording a specific call.
  • sofia profile [profile_name] register [user]: Registers a specific SIP user manually.
  • sofia profile [profile_name] unregister [user]: Unregisters a specific SIP user manually.
  • show calls count: Displays the total number of active calls in the system, similar to show channels count.

These commands help in managing a FreeSWITCH instance, monitoring calls, handling SIP registrations, troubleshooting, and controlling active sessions. Regularly using these commands ensures efficient management of a FreeSWITCH system and can help resolve issues more quickly.