Freeswitch-mod event socket

From 탱이의 잡동사니
Revision as of 14:35, 23 October 2017 by Pchero (talk | contribs) (→‎Commands)
Jump to navigation Jump to search

Overview

Freeswitch mod_event_socket 모듈 내용 정리

Commands

api

api 명령을 전송한다(blocking mode).

api <command> <arg>

Example

api show calls

Content-Type: api/response
Content-Length: 7329

uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid,hostname,sent_callee_name,sent_callee_num,b_uuid,b_direction,b_created,b_created_epoch,b_name,b_state,b_cid_name,b_cid_num,b_ip_addr,b_dest,b_presence_id,b_presence_data,b_callstate,b_callee_name,b_callee_num,b_callee_direction,b_sent_callee_name,b_sent_callee_num,call_created_epoch
b5f031ca-af47-11e7-85f8-e75cb83de8fb,inbound,2017-10-12 14:20:18,1507810818,sofia/internal/asterisk@127.0.0.1,CS_EXECUTE,asterisk,asterisk,127.0.0.1,user_501,,,ACTIVE,,,,,localhost,,,,,,,,,,,,,,,,,,,,,

...
30 total

bgapi

api 명령을 back ground 로 실행한다.

Clients

telnet

telnet 으로도 접속이 가능하다. 8021 포트로 접속하며 되며, 기본 password 는 'ClueCon' 이다.

telent 접속 후, auth 명령어와 설정한 password 를 입력하면 접속이 된다.

auth <password>

Example

telnet localhost 8021
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Content-Type: auth/request

auth ClueCon

Content-Type: command/reply
Reply-Text: +OK accepted

See also