Freeswitch

From 탱이의 잡동사니
Revision as of 08:15, 4 December 2020 by Pchero (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Overview

Freeswitch 내용 정리.

Architecture

Endpoint Endpoint modules support types of communications devices such as VoIP, PSTN, Skype, Google Talk etc. Endpoint modules are one of the most important modules in FreeSWITCH.

Application This is where all the action is happening. There are hundreds of application modules include in the default setup a few examples are playing a file, joining a conference, send a call to voicemail, play an IVR menu. Many of common applications are provided by the dptools module.

Installation

Source

git clone 후 컴파일을 진행한다. <source lang=bash> $ git clone https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch.git </source>

특정 버전을 이용하고 싶다면 다음과 같이 v 이후에 버전 정보를 붙여주면 된다. <source lang=bash> $ git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch.git </source>

Package

간단하게 패키지 저장소 추가후, apt-get 으로 설치가 가능하다. <source lang=bash> $ apt-get update && apt-get install -y curl $ curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -

$ echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list

  1. you may want to populate /etc/freeswitch at this point.
  2. if /etc/freeswitch does not exist, the standard vanilla configuration is deployed

$ apt-get update && apt-get install -y freeswitch-all freeswitch-all-dbg gdb </source>

fs_cli

Freeswitch 용 console 실행 명령어는 fs_cli 이다. <source lang=bash> $ fs_cli </source>

Options

Usage: fs_cli [-H <host>] [-P <port>] [-p <secret>] [-d <level>] [-x command] [-t <timeout_ms>] [profile]

  -?,-h --help                    Usage Information
  -H, --host=hostname             Host to connect
  -P, --port=port                 Port to connect (1 - 65535)
  -u, --user=user@domain          user@domain
  -p, --password=password         Password
  -i, --interrupt                 Allow Control-c to interrupt
  -x, --execute=command           Execute Command and Exit
  -l, --loglevel=command          Log Level
  -U, --log-uuid                  Include UUID in log output
  -S, --log-uuid-short            Include shortened UUID in log output
  -q, --quiet                     Disable logging
  -r, --retry                     Retry connection on failure
  -R, --reconnect                 Reconnect if disconnected
  -d, --debug=level               Debug Level (0 - 7)
  -b, --batchmode                 Batch mode
  -t, --timeout                   Timeout for API commands (in miliseconds)
  -T, --connect-timeout           Timeout for socket connection (in miliseconds)
  -n, --no-color                  Disable color

Localhost 접속시, 다음과 같이 입력하면 된다. <source lang=bash> $ fs_cli -H localhost </source>

Config

See also