This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="freeswitch/xml"> | |
<section name="dialplan" description="RE Dial Plan For FreeSwitch"> | |
<context name="default"> | |
<extension name="9196"> | |
<condition field="destination_number" expression="^9196$"> | |
<action application="log" data="ERR I'm from xml curl dialplan"/> | |
<action application="answer"/> | |
<action application="echo"/> | |
</condition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <esl.h> | |
int main(void) | |
{ | |
esl_handle_t handle = {{0}}; | |
int i; | |
int rate = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<extension name="socket"> | |
<condition field="destination_number" expression="^socket$"> | |
<action application="socket" data="127.0.0.1 8084 async full"/> | |
</condition> | |
</extension> | |
*/ | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cid = session:getVariable("caller_id_number"); | |
dest= session:getVariable("destination_number"); | |
session:execute("log", "ERR cid is:" .. cid); | |
session:execute("log", "ERR dest is:" .. dest .. " or " .. argv[1]); | |
session:hangup(); | |
freeswitch.msleep(2000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%------------------------------------------------------------------- | |
%%% @author egobrain <egobrain@linux-ympb> | |
%%% @copyright (C) 2012, egobrain | |
%%% @doc | |
%%% Function for uploading files and properties,which were sent as a | |
%%% multipart. Files are stored in tmp_folder with random name, | |
%%% generated by tmp_filename function. | |
%%% @end | |
%%% Created : 25 Mar 2012 by egobrain <egobrain@linux-ympb> | |
%%%------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(fsm_ivr). | |
-behaviour(gen_fsfsm). | |
-export([start/1, init/1, handle_info/3, handle_event/3, terminate/3]). | |
-export([welcome/2, wait_lang/2, wait_number/2, wait_hangup/2]). | |
-define(FS_NODE, 'freeswitch@localhost'). | |
-define(WELCOME_SOUND, "tone_stream://%(100,1000,800);loops=1"). | |
-define(INPUT_NUMBER_SOUND, "tone_stream://%(100,1000,800);loops=2"). | |
-define(SELECT_LANG_SOUND, "tone_stream://%(100,1000,800);loops=3"). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(xcds_user_sup). | |
-behaviour(supervisor). | |
%% API | |
-export([start_link/0, start_users/0]). | |
%% Supervisor callbacks | |
-export([init/1]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#dropZone { | |
color: #555; | |
font-size: 18px; | |
text-align: center; | |
width: 400px; | |
padding: 50px 0; | |
margin: 50px auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% This is copied from gen_fsm from Erlang release R13B01 | |
%% Modified by Seven Du <dujinfang at gmail.com> for easy handle FS messages | |
%% From FreeSWITCH through mod_erlang_event. | |
%% | |
%% %CopyrightBegin% | |
%% | |
%% Copyright Ericsson AB 1996-2010. All Rights Reserved. | |
%% | |
%% The contents of this file are subject to the Erlang Public License, | |
%% Version 1.1, (the "License"); you may not use this file except in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ivr). | |
-author("Seven Du"). | |
-export([start/0, start/1]). | |
-define(FS_NODE, 'freeswitch@localhost'). | |
-define(WELCOME_SOUND, "tone_stream://%(100,1000,800);loops=1"). | |
-define(INPUT_NUMBER_SOUND, "tone_stream://%(100,1000,800);loops=2"). | |
-define(LOG(Fmt, Args), io:format("~b " ++ Fmt, [?LINE | Args])). |