Freeswitch

pchero on July 2nd, 2014

Freeswitch 에서 TTS 서비스를 제공하는 방법은 크게 두가지가 있다. 1. Dialplan 에서 해당 모듈을 직접 호출하는 방법. 2. Python, Lua 와 같은 스크립트 모듈에서 호출하는 방법 여기에서는 Python 스크립트 모듈에서 사용하는 방법을 기술한다.   mod_tts_commandline 을 사용하는 방법 Freeswitch 에서는 TTS 서비스를 위해 여러가지 모듈들을 제공하는데, 그 중 mod_tts_commandline 모듈은 서버에 설치되어 있는 TTS 프로그램과 […]

Continue reading about [Freeswitch] TTS on python

pchero on June 13th, 2014

Freeswitch 에서 Python 으로 dialplan 작성시… Call-Bridge 를 해야 하는 경우.. call_addr = ‘sofia/profile_name/call_to@host_ip’ session.execute(“bridge”, call_addr) 과 같이 입력하면 된다. Freeswitch Python 모듈에서 제공하는 Transfer 의 경우, 이미 작성되어 있는 Dailplan 으로 넘겨주는 역할밖에 하지 못한다. 즉, 다른 곳으로 전화를 걸어서 그쪽으로 넘겨주는 기능이 아닌 것이다. 가장 대표적인 기능이 음성 사서함에서의 콜백 기능인데, 콜백 기능을 […]

Continue reading about [Freeswitch] python-bridge

pchero on June 6th, 2014

Freeswitch 에서 python 으로 dialplan 작성시,.. originate 를 해야 하는 경우. from freeswitch import * new_session = Session(sofia/profile_name/call_to@host_ip) 만약 콜 생성을 하면서 (INVITE) 시, 특정 옵션 값들을 입력하고 싶다면.. {sip_h_TestOpt=test}sofia/internal/200@pchero21.com 과 같이 sofia 앞부분에 “{}” 를 넣어서 입력하고자 하는 값들을 입력하면 된다.   출처 : http://lists.freeswitch.org/pipermail/freeswitch-users/2011-March/070126.html

Continue reading about [Freeswitch] python-originate

pchero on June 3rd, 2014

새로운 콜을 생성할 때 사용하는 모듈이다. 기본 메뉴얼. https://wiki.freeswitch.org/wiki/Mod_commands#originate freeswitch@internal> originate -USAGE: <call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] Parameters: <call_url> : 전화를 걸고자 하는 URL 을 입력한다. PBX 서버의 IP 주소 혹은 Freeswitch 내부에 설정된 설정값의 항목을 입력한다. 목적지 주소(즉 전화를 걸고자하는 번호)는 다음 중 하나가 되어야 한다 : <exten> Dailplan 에 입력된 […]

Continue reading about [Freeswitch] Originate

pchero on May 8th, 2014

실행되는 기본 함수 Freeswitch 에서 Python 스크립트를 호출할 때, 호출하는 주체가 어디냐에 따라 자동으로 실행되는 Default 함수가 달라진다.   – Dialplan 내에서 <action application=”python” data=”mod_fstest.python_example”/> 와 같은 형식으로 호출되는 경우. 호출되는 스크립트 내, handler() 함수가 호출된다. handler() 함수의 모습은 # APPLICATION # # default name for apps is “handler” it can be overridden with <modname>::<function> […]

Continue reading about [Freeswitch] Making freeswitch python script