Freeswitch-trunk
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
January 2007
- 5 participants
- 167 discussions
23 Jan '07
Author: anthm
Date: Tue Jan 23 17:04:05 2007
New Revision: 4046
Modified:
freeswitch/trunk/conf/sofia.conf.xml
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
add nonce TTL option to sofia to decide when nonce is stale
Modified: freeswitch/trunk/conf/sofia.conf.xml
==============================================================================
--- freeswitch/trunk/conf/sofia.conf.xml (original)
+++ freeswitch/trunk/conf/sofia.conf.xml Tue Jan 23 17:04:05 2007
@@ -36,6 +36,9 @@
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
<param name="accept-blind-reg" value="true"/>
+ <!--TTL for nonce in sip auth-->
+ <param name="nonce-ttl" value="60"/>
+
<!--<param name="auth-calls" value="true"/>-->
<!-- on authed calls, authenticate *all* the packets not just invite -->
<!--<param name="auth-all-packets" value="true"/>-->
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Tue Jan 23 17:04:05 2007
@@ -242,6 +242,7 @@
unsigned int flags;
unsigned int pflags;
uint32_t max_calls;
+ uint32_t nonce_ttl;
nua_t *nua;
switch_memory_pool_t *pool;
su_root_t *s_root;
@@ -2574,7 +2575,7 @@
tagi_t tags[])
{
- char *l_sdp = NULL, *r_sdp = NULL;
+ const char *l_sdp = NULL, *r_sdp = NULL;
int offer_recv = 0, answer_recv = 0, offer_sent = 0, answer_sent = 0;
int ss_state = nua_callstate_init;
switch_channel_t *channel = NULL;
@@ -2627,9 +2628,9 @@
if (r_sdp) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Remote SDP:\n%s\n", r_sdp);
- tech_pvt->remote_sdp_str = switch_core_session_strdup(session, r_sdp);
- switch_channel_set_variable(channel, SWITCH_R_SDP_VARIABLE, r_sdp);
- pass_sdp(tech_pvt, r_sdp);
+ tech_pvt->remote_sdp_str = switch_core_session_strdup(session, (char *)r_sdp);
+ switch_channel_set_variable(channel, SWITCH_R_SDP_VARIABLE, (char *)r_sdp);
+ pass_sdp(tech_pvt, (char *)r_sdp);
}
}
@@ -2679,7 +2680,7 @@
}
goto done;
} else if (!switch_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION)) {
- if (tech_media(tech_pvt, r_sdp) != SWITCH_STATUS_SUCCESS) {
+ if (tech_media(tech_pvt, (char *)r_sdp) != SWITCH_STATUS_SUCCESS) {
switch_channel_set_variable(channel, "endpoint_disposition", "CODEC NEGOTIATION ERROR");
nua_respond(nh, SIP_488_NOT_ACCEPTABLE, TAG_END());
}
@@ -3138,7 +3139,7 @@
from_host,
a1_hash,
uuid_str,
- time(NULL) + 60);
+ time(NULL) + profile->nonce_ttl);
auth_str = switch_mprintf("Digest realm=\"%q\", nonce=\"%q\",%s algorithm=MD5, qop=\"auth\"", from_host, uuid_str,
stale ? " stale=\"true\"," : "");
@@ -4952,6 +4953,8 @@
if (switch_true(val)) {
profile->pflags |= PFLAG_AUTH_CALLS;
}
+ } else if (!strcasecmp(var, "nonce-ttl")) {
+ profile->nonce_ttl = atoi(val);
} else if (!strcasecmp(var, "accept-blind-reg")) {
if (switch_true(val)) {
profile->pflags |= PFLAG_BLIND_REG;
@@ -5001,6 +5004,11 @@
}
}
+ if (profile->nonce_ttl < 60) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting nonce TTL to 60 seconds\n");
+ profile->nonce_ttl = 60;
+ }
+
if (switch_test_flag(profile, TFLAG_TIMER) && !profile->timer_name) {
profile->timer_name = switch_core_strdup(profile->pool, "soft");
}
1
0
Author: anthm
Date: Tue Jan 23 13:22:42 2007
New Revision: 4040
Modified:
freeswitch/trunk/conf/freeswitch.xml
Log:
fix typo (ya ya very funny)
Modified: freeswitch/trunk/conf/freeswitch.xml
==============================================================================
--- freeswitch/trunk/conf/freeswitch.xml (original)
+++ freeswitch/trunk/conf/freeswitch.xml Tue Jan 23 13:22:42 2007
@@ -15,7 +15,7 @@
<!--#set "domain=mydomain.com"-->
<!--#set "subdomain=sub.mydomain.com"-->
- <!--#set "default_codecs=PCUM@20i"-->
+ <!--#set "default_codecs=PCMU@20i"-->
<!--my domain is $${domain}-->
<section name="configuration" description="Various Configuration">
<!--#include "switch.conf.xml"-->
1
0
23 Jan '07
Author: anthm
Date: Tue Jan 23 13:00:37 2007
New Revision: 4038
Modified:
freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c
Log:
add via hack for portaudio
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c Tue Jan 23 13:00:37 2007
@@ -85,6 +85,10 @@
# define PaUtil_FullMemoryBarrier() asm volatile("sync":::"memory")
# define PaUtil_ReadMemoryBarrier() asm volatile("sync":::"memory")
# define PaUtil_WriteMemoryBarrier() asm volatile("sync":::"memory")
+# elif defined(__VIA_HACK__)
+# define PaUtil_FullMemoryBarrier()
+# define PaUtil_ReadMemoryBarrier()
+# define PaUtil_WriteMemoryBarrier()
# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) || defined(__x86_64__)
# define PaUtil_FullMemoryBarrier() asm volatile("mfence":::"memory")
# define PaUtil_ReadMemoryBarrier() asm volatile("lfence":::"memory")
1
0
23 Jan '07
Author: anthm
Date: Tue Jan 23 11:06:25 2007
New Revision: 4032
Modified:
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
Log:
add flags command to control mute and deaf operations
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Tue Jan 23 11:06:25 2007
@@ -51,6 +51,12 @@
typedef switch_status_t (*pa_command_t)(char **argv, int argc, switch_stream_handle_t *stream);
typedef enum {
+ GFLAG_NONE = 0,
+ GFLAG_EAR = (1 << 0),
+ GFLAG_MOUTH = (1 << 1)
+} GFLAGS;
+
+typedef enum {
TFLAG_IO = (1 << 0),
TFLAG_INBOUND = (1 << 1),
TFLAG_OUTBOUND = (1 << 2),
@@ -63,11 +69,6 @@
TFLAG_MASTER = (1 << 9)
} TFLAGS;
-typedef enum {
- GFLAG_MY_CODEC_PREFS = (1 << 0)
-} GFLAGS;
-
-
struct private_object {
unsigned int flags;
switch_core_session_t *session;
@@ -97,7 +98,6 @@
char *ring_file;
char *hold_file;
char *timer_name;
- unsigned int flags;
int ringdev;
int indev;
int outdev;
@@ -117,6 +117,7 @@
unsigned char cngbuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
private_t *call_list;
int ring_interval;
+ GFLAGS flags;
} globals;
@@ -550,9 +551,7 @@
}
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
- switch_yield(globals.read_codec.implementation->microseconds_per_frame);
- *frame = &globals.cng_frame;
- return SWITCH_STATUS_SUCCESS;
+ goto cng;
}
if (!is_master(tech_pvt)) {
@@ -643,6 +642,11 @@
globals.read_frame.datalen = samples * 2;
globals.read_frame.samples = samples;
*frame = &globals.read_frame;
+
+ if (!switch_test_flag((&globals), GFLAG_MOUTH)) {
+ memset(globals.read_frame.data, 255, globals.read_frame.datalen);
+ }
+
status = SWITCH_STATUS_SUCCESS;
}
switch_mutex_unlock(globals.device_lock);
@@ -675,7 +679,9 @@
}
if (globals.audio_stream) {
- WriteAudioStream(globals.audio_stream, (short *) frame->data, (int) (frame->datalen / sizeof(SAMPLE)));
+ if (switch_test_flag((&globals), GFLAG_EAR)) {
+ WriteAudioStream(globals.audio_stream, (short *) frame->data, (int) (frame->datalen / sizeof(SAMPLE)));
+ }
status = SWITCH_STATUS_SUCCESS;
}
@@ -821,13 +827,13 @@
switch_caller_profile_t *caller_profile;
switch_core_session_add_stream(*new_session, NULL);
- if ((tech_pvt =
- (private_t *) switch_core_session_alloc(*new_session, sizeof(private_t))) != 0) {
- memset(tech_pvt, 0, sizeof(*tech_pvt));
+ if ((tech_pvt = (private_t *) switch_core_session_alloc(*new_session, sizeof(private_t))) != 0) {
+ memset(tech_pvt, 0, sizeof(*tech_pvt));
switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(*new_session));
channel = switch_core_session_get_channel(*new_session);
switch_core_session_set_private(*new_session, tech_pvt);
tech_pvt->session = *new_session;
+ globals.flags = GFLAG_EAR | GFLAG_MOUTH;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(new_session);
@@ -1481,6 +1487,73 @@
}
+static switch_status_t do_flags(char **argv, int argc, switch_stream_handle_t *stream)
+{
+ char *action = argv[0];
+ char *flag_str = argv[1];
+ GFLAGS flags = GFLAG_NONE;
+ char *p;
+ int x = 0;
+
+ if (argc < 2) {
+ goto desc;
+ }
+
+ for (x = 1; x < argc; x++) {
+ flag_str = argv[x];
+ for(p = flag_str; *p; p++) {
+ *p = tolower(*p);
+ }
+
+ if (strstr(flag_str, "ear")) {
+ flags |= GFLAG_EAR;
+ }
+ if (strstr(flag_str, "mouth")) {
+ flags |= GFLAG_MOUTH;
+ }
+ }
+
+ if (!strcasecmp(action, "on")) {
+ if (flags & GFLAG_EAR) {
+ switch_set_flag((&globals), GFLAG_EAR);
+ }
+ if (flags & GFLAG_MOUTH) {
+ switch_set_flag((&globals), GFLAG_MOUTH);
+ }
+ } else if (!strcasecmp(action, "off")) {
+ if (flags & GFLAG_EAR) {
+ switch_clear_flag((&globals), GFLAG_EAR);
+ }
+ if (flags & GFLAG_MOUTH) {
+ switch_clear_flag((&globals), GFLAG_MOUTH);
+ }
+ } else {
+ goto bad;
+ }
+
+ desc:
+ x = 0;
+ stream->write_function(stream, "FLAGS: ");
+ if (switch_test_flag((&globals), GFLAG_EAR)) {
+ stream->write_function(stream, "ear");
+ x++;
+ }
+ if (switch_test_flag((&globals), GFLAG_MOUTH)) {
+ stream->write_function(stream, "%smouth", x ? "|" : "");
+ x++;
+ }
+ if (!x) {
+ stream->write_function(stream, "none");
+ }
+
+ goto done;
+
+ bad:
+ stream->write_function(stream, "Usage: flags [on|off] <flags>\n");
+ done:
+ return SWITCH_STATUS_SUCCESS;
+}
+
static switch_status_t list_calls(char **argv, int argc, switch_stream_handle_t *stream)
{
private_t *tp;
@@ -1544,6 +1617,7 @@
channel = switch_core_session_get_channel(session);
switch_core_session_set_private(session, tech_pvt);
tech_pvt->session = session;
+ globals.flags = GFLAG_EAR | GFLAG_MOUTH;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(&session);
@@ -1624,6 +1698,7 @@
"pa list\n"
"pa switch [<call_id>|none]\n"
"pa dtmf <digit string>\n"
+ "pa flags [on|off] [ear] [mouth]\n"
"--------------------------------------------------------------------------------\n";
if (switch_strlen_zero(cmd)) {
@@ -1651,6 +1726,8 @@
goto done;
} else if (!strcasecmp(argv[0], "list")) {
func = list_calls;
+ } else if (!strcasecmp(argv[0], "flags")) {
+ func = do_flags;
} else if (!strcasecmp(argv[0], "hangup")) {
func = hangup_call;
} else if (!strcasecmp(argv[0], "answer")) {
1
0
Author: anthm
Date: Tue Jan 23 09:39:56 2007
New Revision: 4031
Added:
freeswitch/trunk/conf/freeswitch_combined.xml
Log:
add original combined conf as an example
Added: freeswitch/trunk/conf/freeswitch_combined.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/freeswitch_combined.xml Tue Jan 23 09:39:56 2007
@@ -0,0 +1,797 @@
+<?xml version="1.0"?>
+<document type="freeswitch/xml">
+
+ <section name="configuration" description="Various Configuration">
+
+ <configuration name="switch.conf" description="Modules">
+ <settings>
+ <!--Most channels to allow at once -->
+ <param name="max-sessions" value="1000"/>
+ </settings>
+ <!--Any variables defined here will be available in every channel, in the dialplan etc -->
+ <variables>
+ <variable name="uk-ring" value="%(400,200,400,450);%(400,2200,400,450)"/>
+ <variable name="us-ring" value="%(2000, 4000, 440.0, 480.0)"/>
+ <variable name="bong-ring" value="v=4000;>=0;+=2;#(60,0);v=2000;%(940,0,350,440)"/>
+ </variables>
+ </configuration>
+
+ <configuration name="modules.conf" description="Modules">
+ <modules>
+ <!-- Loggers (I'd load these first) -->
+ <load module="mod_console"/>
+ <!-- <load module="mod_syslog"/> -->
+
+ <!-- Multi-Faceted -->
+ <!-- mod_enum is a dialplan interface, an application interface and an api command interface -->
+ <load module="mod_enum"/>
+
+ <!-- XML Interfaces -->
+ <!-- <load module="mod_xml_rpc"/> -->
+ <!-- <load module="mod_xml_curl"/> -->
+
+ <!-- Event Handlers -->
+ <!-- <load module="mod_cdr"/> -->
+ <!-- <load module="mod_event_multicast"/> -->
+ <!-- <load module="mod_event_socket"/> -->
+ <!-- <load module="mod_xmpp_event"/> -->
+ <!-- <load module="mod_zeroconf"/> -->
+
+ <!-- Directory Interfaces -->
+ <!-- <load module="mod_ldap"/> -->
+
+ <!-- Endpoints -->
+ <!-- <load module="mod_dingaling"/> -->
+ <!--<load module="mod_iax"/>-->
+ <load module="mod_portaudio"/>
+ <load module="mod_sofia"/>
+ <!-- <load module="mod_wanpipe"/> -->
+ <!-- <load module="mod_woomera"/> -->
+
+ <!-- Applications -->
+ <load module="mod_bridgecall"/>
+ <load module="mod_commands"/>
+ <load module="mod_conference"/>
+ <load module="mod_dptools"/>
+ <load module="mod_echo"/>
+ <!--<load module="mod_park"/>-->
+ <load module="mod_playback"/>
+
+ <!-- Dialplan Interfaces -->
+ <!-- <load module="mod_dialplan_directory"/> -->
+ <load module="mod_dialplan_xml"/>
+
+ <!-- Codec Interfaces -->
+ <load module="mod_g711"/>
+ <load module="mod_gsm"/>
+ <!-- <load module="mod_ilbc"/> -->
+ <load module="mod_l16"/>
+ <!-- <load module="mod_speex"/> -->
+
+ <!-- File Format Interfaces -->
+ <load module="mod_sndfile"/>
+ <load module="mod_native_file"/>
+
+ <!-- Timers -->
+ <load module="mod_softtimer"/>
+
+ <!-- Languages -->
+ <!-- <load module="mod_spidermonkey"/> -->
+ <!-- <load module="mod_perl"/> -->
+
+ <!-- ASR /TTS -->
+ <!-- <load module="mod_cepstral"/> -->
+ <!-- <load module="mod_rss"/> -->
+ </modules>
+ </configuration>
+
+ <configuration name="spidermonkey.conf" description="Spider Monkey JavaScript Plug-Ins">
+ <modules>
+ <load module="mod_spidermonkey_teletone"/>
+ <load module="mod_spidermonkey_core_db"/>
+ <!--<load module="mod_spidermonkey_odbc"/>-->
+ </modules>
+ </configuration>
+
+ <configuration name="event_multicast.conf" description="Multicast Event">
+ <settings>
+ <param name="address" value="225.1.1.1"/>
+ <param name="port" value="4242"/>
+ <param name="bindings" value="all"/>
+ </settings>
+ </configuration>
+
+ <configuration name="event_socket.conf" description="Socket Client">
+ <settings>
+ <param name="listen-ip" value="127.0.0.1"/>
+ <param name="listen-port" value="8021"/>
+ <param name="password" value="ClueCon"/>
+ </settings>
+ </configuration>
+
+ <configuration name="iax.conf" description="IAX Configuration">
+ <settings>
+ <param name="debug" value="0"/>
+ <!-- <param name="ip" value="1.2.3.4"> -->
+ <param name="port" value="4569"/>
+ <param name="dialplan" value="XML"/>
+ <param name="codec-prefs" value="PCMU@20i,PCMA,speex,L16"/>
+ <param name="codec-master" value="us"/>
+ <param name="codec-rates" value="8"/>
+ </settings>
+ </configuration>
+
+ <configuration name="console.conf" description="Console Logger">
+ <!-- pick a file name, a function name or 'all' -->
+ <!-- map as many as you need for specific debugging -->
+ <mappings>
+ <!-- <param name="log_event" value="DEBUG"/> -->
+ <param name="all" value="DEBUG"/>
+ </mappings>
+ </configuration>
+
+ <configuration name="sofia.conf" description="sofia Endpoint">
+ <profiles>
+ <profile name="mydomain1.com">
+ <registrations>
+ <!-- <registration name="asterlink">
+ <param name="register-scheme" value="Digest"/>
+ <param name="register-realm" value=""/>
+ <param name="register-username" value="1001"/>
+ <param name="register-password" value="nhy65tgb"/>
+ <param name="register-from" value="sip:1001@208.64.200.40"/>
+ <param name="register-to" value="sip:1001@conference.freeswitch.org"/>
+ <param name="register-proxy" value="sip:conference.freeswitch.org:5060"/>
+ <param name="register-frequency" value="20"/>
+ </registration> -->
+ </registrations>
+ <settings>
+ <param name="debug" value="1"/>
+ <param name="rfc2833-pt" value="101"/>
+ <param name="sip-port" value="5060"/>
+ <param name="dialplan" value="XML"/>
+ <param name="dtmf-duration" value="100"/>
+ <param name="codec-prefs" value="PCMU@20i"/>
+ <param name="codec-ms" value="20"/>
+ <param name="use-rtp-timer" value="true"/>
+ <param name="rtp-timer-name" value="soft"/>
+ <param name="rtp-ip" value="192.168.1.20"/>
+ <param name="sip-ip" value="mydomain1.com"/>
+
+ <!--Uncomment to set all inbound calls to no media mode-->
+ <!--<param name="inbound-no-media" value="true"/>-->
+
+ <!-- this lets anything register -->
+ <!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
+ <param name="accept-blind-reg" value="true"/>
+
+ <!--<param name="auth-calls" value="true"/>-->
+ <!-- on authed calls, authenticate *all* the packets not just invite -->
+ <!--<param name="auth-all-packets" value="true"/>-->
+
+ <!-- optional ; -->
+ <!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/>-->
+ <!-- <param name="ext-rtp-ip" value="100.101.102.103"/> -->
+ <!-- VAD choose one (out is a good choice); -->
+ <!-- <param name="vad" value="in"/> -->
+ <!-- <param name="vad" value="out"/> -->
+ <!-- <param name="vad" value="both"/> -->
+ <!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
+ </settings>
+ </profile>
+ </profiles>
+ </configuration>
+
+ <configuration name="syslog.conf" description="Syslog Logger">
+ <!-- SYSLOG -->
+ <!-- emerg - system is unusable -->
+ <!-- alert - action must be taken immediately -->
+ <!-- crit - critical conditions -->
+ <!-- err - error conditions -->
+ <!-- warning - warning conditions -->
+ <!-- notice - normal, but significant, condition -->
+ <!-- info - informational message -->
+ <!-- debug - debug-level message -->
+ <settings>
+ <param name="ident" value="freeswitch"/>
+ <param name="facility" value="user"/>
+ <param name="format" value="${time} - ${message}"/>
+ <param name="level" value="debug,info,warning-alert"/>
+ </settings>
+ </configuration>
+
+ <configuration name="woomera.conf" description="Woomera Endpoint">
+ <settings>
+ <param name="debug" value="0"/>
+ </settings>
+ <interface>
+ <param name="host" value="localhost"/>
+ <param name="port" value="42420"/>
+ <param name="audio-ip" value="127.0.0.1"/>
+ <param name="dialplan" value="XML"/>
+ </interface>
+ </configuration>
+
+ <configuration name="wanpipe.conf" description="Sangoma Wanpipe Endpoint">
+ <settings>
+ <param name="debug" value="1"/>
+ <param name="dialplan" value="XML"/>
+ <param name="mtu" value="320"/>
+ <param name="dtmf-on" value="800"/>
+ <param name="dtmf-off" value="100"/>
+ <param name="supress-dtmf-tone" value="yes"/>
+ </settings>
+ <span>
+ <param name="span" value="1"/>
+ <param name="node" value="cpe"/>
+ <!-- <param name="switch" value="ni2"/> -->
+ <param name="switch" value="dms100"/>
+ <!-- <param name="switch" value="lucent5e"/> -->
+ <!-- <param name="switch" value="att4ess"/> -->
+ <!-- <param name="switch" value="euroisdn"/> -->
+ <!-- <param name="switch" value="gr303eoc"/> -->
+ <!-- <param name="switch" value="gr303tmc"/> -->
+ <param name="dp" value="national"/>
+ <!-- <param name="dp" value="international"/> -->
+ <!-- <param name="dp" value="local"/> -->
+ <!-- <param name="dp" value="private"/> -->
+ <!-- <param name="dp" value="unknown"/> -->
+ <param name="l1" value="ulaw"/>
+ <!-- <param name="l1" value="alaw"/> -->
+ <param name="bchan" value="1-23"/>
+ <param name="dchan" value="24"/>
+ <param name="dialplan" value="XML"/>
+ </span>
+ </configuration>
+
+ <configuration name="portaudio.conf" description="Soundcard Endpoint">
+ <settings>
+ <!-- indev, outdev, ringdev:
+ partial case sensitive string match on something in the name
+ or the device number prefixed with # eg "#1" (or blank for default) -->
+
+ <!-- device to use for input -->
+ <param name="indev" value=""/>
+ <!-- device to use for output -->
+ <param name="outdev" value=""/>
+
+ <!--device to use for inbound ring -->
+ <!--<param name="ringdev" value=""/>-->
+ <!--File to play as the ring sound -->
+ <!--<param name="ring-file" value="/sounds/ring.wav"/>-->
+ <!--Number of seconds to pause between rings -->
+ <!--<param name="ring-interval" value="5"/>-->
+
+ <!--file to play when calls are on hold-->
+ <!--<param name="hold-file" value="/sounds/holdmusic.wav"/>-->
+ <!--Timer to use for hold music (i'd leave this one commented)-->
+ <!--<param name="timer-name" value="soft"/>-->
+
+ <!--Default dialplan and caller-id info -->
+ <param name="dialplan" value="XML"/>
+ <param name="cid-name" value="FreeSwitch"/>
+ <param name="cid-num" value="5555551212"/>
+
+ <!--audio sample rate and interval -->
+ <param name="sample-rate" value="8000"/>
+ <param name="codec-ms" value="20"/>
+ </settings>
+ </configuration>
+
+ <configuration name="zeroconf.conf" description="Zeroconf Event Handler">
+ <settings>
+ <param name="publish" value="yes"/>
+ <param name="browse" value="_sip._udp"/>
+ </settings>
+ </configuration>
+
+ <configuration name="xmpp_event.conf" description="XMPP Event Handler">
+ <settings>
+ <param name="#debug" value="1"/>
+ <param name="jid" value="freeswitch(a)my.jabber.com/me"/>
+ <param name="passwd" value="mypass"/>
+ <param name="target-jid" value="freeswitch(a)reader.org/him"/>
+ </settings>
+ </configuration>
+
+ <configuration name="dialplan_directory.conf" description="Dialplan Directory">
+ <settings>
+ <param name="directory-name" value="ldap"/>
+ <param name="host" value="ldap.freeswitch.org"/>
+ <param name="dn" value="cn=Manager,dc=freeswitch,dc=org"/>
+ <param name="pass" value="test"/>
+ <param name="base" value="dc=freeswitch,dc=org"/>
+ </settings>
+ </configuration>
+
+ <configuration name="dingaling.conf" description="XMPP Jingle Endpoint">
+ <settings>
+ <param name="debug" value="0"/>
+ <param name="codec-prefs" value="PCMU"/>
+ </settings>
+
+ <!-- *NOTE* change <x-profile></x-profile> to <profile></profile> to enable -->
+
+ <!-- Client Profile (Original mode) -->
+ <x-profile type="client">
+ <param name="name" value="mydomain.com"/>
+ <param name="login" value="myjid(a)myserver.com/talk"/>
+ <param name="password" value="mypass"/>
+ <param name="dialplan" value="XML"/>
+ <param name="message" value="Jingle all the way"/>
+ <param name="rtp-ip" value="10.0.0.1"/>
+ <param name="auto-login" value="true"/>
+ <param name="auto-reply" value="Press *Call* to call FreeSWITCH and be sure to come to ClueCon! http://www.cluecon.com"/>
+ <!-- SASL "plain" or "md5" -->
+ <param name="sasl" value="plain"/>
+ <!-- if the server where the jabber is hosted is not the same as the one in the jid -->
+ <!--<param name="server" value="alternate.server.com"/>-->
+ <!-- Enable TLS or not -->
+ <param name="tls" value="true"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
+ <!-- or -->
+ <!-- <param name="rtp-ip" value="my_lan_ip"/> -->
+ <!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/> -->
+ <!-- default extension (if one cannot be determined) -->
+ <param name="exten" value="888"/>
+ <!-- VAD choose one -->
+ <!-- <param name="vad" value="in"/> -->
+ <!-- <param name="vad" value="out"/> -->
+ <param name="vad" value="both"/>
+ </x-profile>
+
+ <!-- Component (Server to Server Login) -->
+ <x-profile type="component">
+ <!-- All traffic for *(a)sub.mydomain.com will come to you -->
+ <param name="name" value="sub.mydomain.com"/>
+ <param name="password" value="secret"/>
+ <param name="dialplan" value="XML"/>
+ <param name="rtp-ip" value="208.64.200.42"/>
+ <param name="server" value="jabber.server.org:5347"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
+ <!-- "_auto_" means the extension will be automaticly set to the called jid -->
+ <param name="exten" value="_auto_"/>
+ <!--<param name="vad" value="both"/>-->
+ </x-profile>
+
+ </configuration>
+
+ <configuration name="xml_curl.conf" description="cURL XML Gateway">
+ <settings>
+ <!-- The url to a gateway cgi that can generate xml similar to
+ what's in this file only on-the-fly (leave it commented if you dont
+ need it) -->
+ <!-- one or more |-delim of configuration|directory|dialplan -->
+ <!--<param name="gateway-url" value="http://www.mydomain.com/test.cgi" bindings="dialplan"/>-->
+ <!-- set this to provide authentication credentials to the server -->
+ <!--<param name="gateway-credentials" value="muser:mypass"/>-->
+ </settings>
+ </configuration>
+
+ <configuration name="xml_rpc.conf" description="XML RPC">
+ <settings>
+ <!-- The port where you want to run the http service (default 8080) -->
+ <param name="http-port" value="8080"/>
+ <!-- if all 3 of the following params exist all http traffic will require auth -->
+ <param name="auth-realm" value="freeswitch"/>
+ <param name="auth-user" value="freeswitch"/>
+ <param name="auth-pass" value="works"/>
+ </settings>
+ </configuration>
+
+ <configuration name="rss.conf" description="RSS Parser">
+ <feeds>
+ <!-- Just download the files to wherever and refer to them here -->
+ <!-- <feed name="Slash Dot">/home/rss/rss.rss</feed> -->
+ <!-- <feed name="News Forge">/home/rss/newsforge.rss</feed> -->
+ </feeds>
+ </configuration>
+
+ <!-- None of these paths are real if you want any of these options you need to really set them up -->
+ <configuration name="conference.conf" description="Audio Conference">
+ <!-- Advertise certian presence on startup . -->
+ <advertise>
+ <room name="888(a)sub.mydomain.com" status="FreeSWITCH"/>
+ </advertise>
+
+<!-- These are the default keys that map when you do not specify a caller control group -->
+<!-- Note: none and default are reserved names for group names -->
+ <caller-controls>
+ <group name="default">
+ <control action="mute" digits="0"/>
+ <control action="deaf mute" digits="*"/>
+ <control action="energy up" digits="9"/>
+ <control action="energy equ" digits="8"/>
+ <control action="energy dn" digits="7"/>
+ <control action="vol talk up" digits="3"/>
+ <control action="vol talk zero" digits="2"/>
+ <control action="vol talk dn" digits="1"/>
+ <control action="vol listen up" digits="6"/>
+ <control action="vol listen zero" digits="5"/>
+ <control action="vol listen dn" digits="4"/>
+ <control action="hangup" digits="#"/>
+ </group>
+ </caller-controls>
+
+ <!-- Profiles are collections of settings you can reference by name. -->
+ <profiles>
+ <!--If no profile is specified it will default to "default"-->
+ <profile name="default">
+ <!-- Domain (for presence) -->
+ <param name="domain" value="sub.mydomain.com"/>
+ <!-- Sample Rate-->
+ <param name="rate" value="8000"/>
+ <!-- Number of milliseconds per frame -->
+ <param name="interval" value="20"/>
+ <!-- Energy level required for audio to be sent to the other users -->
+ <param name="energy-level" value="300"/>
+ <!-- Name of the caller control group to use for this profile -->
+ <!-- <param name="caller-controls" value="some name"/> -->
+ <!-- TTS Engine to use -->
+ <!--<param name="tts-engine" value="cepstral"/>-->
+ <!-- TTS Voice to use -->
+ <!--<param name="tts-voice" value="david"/>-->
+
+ <!-- If TTS is enabled all audio-file params beginning with -->
+ <!-- 'say:' will be considered text to say with TTS -->
+ <!-- Set a default path here so you can use relative paths in the other sound params-->
+ <!--<param name="sound-prefix" value="/soundfiles"/>-->
+ <!-- File to play to acknowledge succees -->
+ <!--<param name="ack-sound" value="beep.wav"/>-->
+ <!-- File to play to acknowledge failure -->
+ <!--<param name="nack-sound" value="beeperr.wav"/>-->
+ <!-- File to play to acknowledge muted -->
+ <!--<param name="muted-sound" value="muted.wav"/>-->
+ <!-- File to play to acknowledge unmuted -->
+ <!--<param name="unmuted-sound" value="unmuted.wav"/>-->
+ <!-- File to play if you are alone in the conference -->
+ <!--<param name="alone-sound" value="yactopitc.wav"/>-->
+ <!-- File to play when you join the conference -->
+ <!--<param name="enter-sound" value="welcome.wav"/>-->
+ <!-- File to play when you leave the conference -->
+ <!--<param name="exit-sound" value="exit.wav"/>-->
+ <!-- File to play when you ae ejected from the conference -->
+ <!--<param name="kicked-sound" value="kicked.wav"/>-->
+ <!-- File to play when the conference is locked -->
+ <!--<param name="locked-sound" value="locked.wav"/>-->
+ <!-- File to play when the conference is locked during the call-->
+ <!--<param name="is-locked-sound" value="is-locked.wav"/>-->
+ <!-- File to play when the conference is unlocked during the call-->
+ <!--<param name="is-unlocked-sound" value="is-unlocked.wav"/>-->
+ <!-- File to play to prompt for a pin -->
+ <!--<param name="pin-sound" value="pin.wav"/>-->
+ <!-- File to play to when the pin is invalid -->
+ <!--<param name="bad-pin-sound" value="invalid-pin.wav"/>-->
+ <!-- Conference pin -->
+ <!--<param name="pin" value="12345"/>-->
+ <!-- Default Caller ID Name for outbound calls -->
+ <param name="caller-id-name" value="FreeSWITCH"/>
+ <!-- Default Caller ID Number for outbound calls -->
+ <param name="caller-id-number" value="8777423583"/>
+ </profile>
+ </profiles>
+ </configuration>
+
+ <configuration name="enum.conf" description="ENUM Module">
+ <settings>
+ <param name="default-root" value="e164.org"/>
+ </settings>
+
+ <routes>
+ <route service="E2U+SIP" regex="sip:(.*)" replace="sofia/test/$1"/>
+ <route service="E2U+IAX2" regex="iax2:(.*)" replace="iax/$1"/>
+ <route service="E2U+XMPP" regex="XMPP:(.*)" replace="dingaling/jingle/$1"/>
+ </routes>
+ </configuration>
+
+ <configuration name="ivr.conf" description="IVR menus">
+ <menus>
+ <menu name="main"
+ greet-long="/soundfiles/greet-long.wav"
+ greet-short="/soundfiles/greet-short.wav"
+ invalid-sound="/soundfiles/invalid.wav"
+ exit-sound="/soundfiles/exit.wav" timeout ="15" max-failures="3">
+ <entry action="menu-exit" digits="*"/>
+ <entry action="menu-sub" digits="2" param="menu2"/>
+ <entry action="menu-exec-api" digits="3" param="api arg"/>
+ <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
+ <entry action="menu-back" digits="5"/>
+ <entry action="menu-call-transfer" digits="7" param="888"/>
+ <entry action="menu-sub" digits="8" param="menu8"/>>
+ </menu>
+ <menu name="menu8"
+ greet-long="/soundfiles/greet-long.wav"
+ greet-short="/soundfiles/greet-short.wav"
+ invalid-sound="/soundfiles/invalid.wav"
+ exit-sound="/soundfiles/exit.wav"
+ timeout ="15"
+ max-failures="3">
+ <entry action="menu-back" digits="#"/>
+ <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
+ <entry action="menu-top" digits="*"/>
+ </menu>
+ <menu name="menu2"
+ greet-long="/soundfiles/greet-long.wav"
+ greet-short="/soundfiles/greet-short.wav"
+ invalid-sound="/soundfiles/invalid.wav"
+ exit-sound="/soundfiles/exit.wav"
+ timeout ="15"
+ max-failures="3">
+ <entry action="menu-back" digits="#"/>
+ <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
+ <entry action="menu-top" digits="*"/>
+ </menu>
+ </menus>
+ </configuration>
+
+ </section>
+
+ <section name="dialplan" description="Regex/XML Dialplan">
+ <!-- Valid fields in conditions: -->
+ <!-- "dialplan, caller_id_name, ani, ani2, caller_id_number, -->
+ <!-- rdnis, destination_number, uuid, source, context, chan_name" -->
+
+ <!-- *NOTE* The special context name 'any' will match any context -->
+ <context name="default">
+ <extension name="556"> <!-- demo phrases -->
+ <condition field="destination_number" expression="^556$">
+ <action application="answer"/>
+ <action application="sleep" data="1000"/>
+ <action application="phrase" data="spell,${caller_id_name}"/>
+ <action application="phrase" data="spell-phonetic,${caller_id_name}"/>
+ <action application="phrase" data="timespec,12:45:15"/>
+ <action application="phrase" data="saydate,0"/>
+ <action application="phrase" data="msgcount,130"/>
+ <action application="phrase" data="ip-addr,66.250.68.194"/>
+ <action application="phrase" data="saydate,$strepoch(2006-03-23 7:23)"/>
+ <!--<action application="phrase" data="timeleft,3:30"/>-->
+ </condition>
+ </extension>
+
+ <extension name="tollfree">
+ <condition field="destination_number" expression="^(18(0{2}|8{2}|7{2}|6{2})\d{7})$">
+ <action application="enum" data="$1"/>
+ <action application="bridge" data="${enum_auto_route}"/>
+ </condition>
+ </extension>
+
+ <!-- Call the FreeSWITCH conference via SIP -->
+ <!--<extension name="FreeSWITCH Conference SIP">-->
+ <!--<condition field="destination_number" expression="^888$">-->
+ <!--<action application="bridge" data="sofia/test/888(a)conference.freeswitch.org"/>-->
+ <!--</condition>-->
+ <!--</extension> -->
+
+ <!-- Call the FreeSWITCH conference via IAX -->
+ <!--<extension name="FreeSWITCH Conference IAX">-->
+ <!--<condition field="destination_number" expression="^8888$">-->
+ <!--<action application="bridge" data="iax/guest(a)conference.freeswitch.org/888"/>-->
+ <!--</condition>-->
+ <!--</extension>-->
+
+ <extension name="testmusic">
+ <condition field="destination_number" expression="^1234$">
+ <!-- Request a certain tone/file to be played while you wait for the call to be answered-->
+ <action application="set" data="ringback=${us-ring}"/>
+ <!--<action application="set" data="ringback=/home/ring.wav"/>-->
+ <action application="bridge" data="sofia/test/1234(a)conference.freeswitch.org"/>
+ </condition>
+ </extension>
+
+ <!-- Enter an existing conference -->
+ <extension name="1000">
+ <condition field="destination_number" expression="^1000$">
+ <action application="conference" data="freeswitch"/>
+ </condition>
+ </extension>
+
+ <!-- Start a dynamic conference and call someone at the same time -->
+ <extension name="2000">
+ <condition field="destination_number" expression="^2000$">
+ <action application="conference" data="bridge:mydynaconf:sofia/test/1234@conference.freeswitch.org"/>
+ </condition>
+ </extension>
+
+ <!-- extensions starting with 4, all the numbers after 4 form a numeric filename -->
+ <!-- continue="true" means keep looking for more extensions to match -->
+ <!-- *NOTE* The entire dialplan is parsed ONCE when the call starts -->
+ <!-- so any call info acquired after the various actions cannot -->
+ <!-- be taken into consideration. -->
+
+ <!-- The first match will play a beep and the second one plays -->
+ <!-- the desired file. This is for demo purposes both actions -->
+ <!-- could have been under the same <extension> tag as well. -->
+ <extension name="playsound1" continue="true">
+ <condition field="source" expression="mod_sofia"/>
+ <condition field="destination_number" expression="^4(\d+)">
+ <action application="playback" data="/var/sounds/beep.gsm"/>
+ </condition>
+ </extension>
+
+ <extension name="playsound2">
+ <condition field="source" expression="mod_sofia"/>
+ <condition field="destination_number" expression="^4(\d+)">
+ <action application="playback" data="/root/$1.raw"/>
+ </condition>
+ </extension>
+
+ <!-- send everything with a certian RDNIS to Wanpipe ISDN -->
+ <extension name="To PRI">
+ <condition field="rdnis" expression="8881231234"/>
+ <condition field="destination_number" expression="(.*)">
+ <action application="bridge" data="wanpipe/a/a/$1"/>
+ </condition>
+ </extension>
+
+ <!-- Call *MUST* originate from mod_iax and also be dialing ext 9999-->
+ <extension name="9999">
+ <condition field="source" expression="mod_iax"/>
+ <condition field="destination_number" expression="9999">
+ <action application="playback" data="/var/sounds/beep.gsm"/>
+ </condition>
+ </extension>
+
+ </context>
+ </section>
+
+ <section name="directory" description="User Directory">
+ <!--the domain or ip (the right hand side of the @ in the addr-->
+ <domain name="jabber.org">
+ <!--the user id (the left hand side of the @ in the addr-->
+ <user id="stpeter">
+ <params>
+ <!-- omit password for authless registration -->
+ <param name="password" value="mypass"/>
+ </params>
+
+ <vcard xmlns='vcard-temp'>
+ <FN>Peter Saint-Andre</FN>
+ <N>
+ <FAMILY>Saint-Andre</FAMILY>
+ <GIVEN>Peter</GIVEN>
+ <MIDDLE/>
+ </N>
+ <NICKNAME>stpeter</NICKNAME>
+ <URL>http://www.jabber.org/people/stpeter.php</URL>
+ <BDAY>1966-08-06</BDAY>
+ <ORG>
+ <ORGNAME>Jabber Software Foundation</ORGNAME>
+ <ORGUNIT>Jabber Software Foundation</ORGUNIT>
+ </ORG>
+ <TITLE>Executive Director</TITLE>
+ <ROLE>Patron Saint</ROLE>
+ <TEL><WORK/><VOICE/><NUMBER>303-308-3282</NUMBER></TEL>
+ <TEL><WORK/><FAX/><NUMBER/></TEL>
+ <TEL><WORK/><MSG/><NUMBER/></TEL>
+ <ADR>
+ <WORK/>
+ <EXTADD>Suite 600</EXTADD>
+ <STREET>1899 Wynkoop Street</STREET>
+ <LOCALITY>Denver</LOCALITY>
+ <REGION>CO</REGION>
+ <PCODE>80202</PCODE>
+ <CTRY>USA</CTRY>
+ </ADR>
+ <TEL><HOME/><VOICE/><NUMBER>303-555-1212</NUMBER></TEL>
+ <TEL><HOME/><FAX/><NUMBER/></TEL>
+ <TEL><HOME/><MSG/><NUMBER/></TEL>
+ <ADR>
+ <HOME/>
+ <EXTADD/>
+ <STREET/>
+ <LOCALITY>Denver</LOCALITY>
+ <REGION>CO</REGION>
+ <PCODE>80209</PCODE>
+ <CTRY>USA</CTRY>
+ </ADR>
+ <EMAIL><INTERNET/><PREF/><USERID>stpeter(a)jabber.org</USERID></EMAIL>
+ <JABBERID>stpeter(a)jabber.org</JABBERID>
+ <DESC>
+ More information about me is located on my
+ personal website: http://www.saint-andre.com/
+ </DESC>
+ </vcard>
+
+ </user>
+ </domain>
+ </section>
+
+ <!-- phrases section (under development still) -->
+ <section name="phrases" description="Speech Phrase Management">
+ <macros>
+ <language name="en" sound_path="/snds" tts_engine="cepstral" tts_voice="david">
+ <macro name="msgcount">
+ <input pattern="(.*)">
+ <match>
+ <action function="execute" data="sleep(1000)"/>
+ <action function="play-file" data="vm-youhave.wav"/>
+ <action function="say" data="$1" method="pronounced" type="items"/>
+ <action function="play-file" data="vm-messages.wav"/>
+ <!-- or -->
+ <!--<action function="speak-text" data="you have $1 messages"/>-->
+ </match>
+ </input>
+ </macro>
+ <macro name="saydate">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="current_date_time"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="timespec">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="time_measurement"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="ip-addr">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="iterated" type="ip_address"/>
+ <action function="say" data="$1" method="pronounced" type="ip_address"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="spell">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="name_spelled"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="spell-phonetic">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="tts-timeleft">
+ <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
+ <!-- If the function "break" is encountered all parsing will cease -->
+ <input pattern="(\d+):(\d+)">
+ <match>
+ <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
+ <action function="break"/>
+ </match>
+ <nomatch>
+ <action function="speak-text" data="That input was invalid."/>
+ </nomatch>
+ </input>
+ <input pattern="(\d+) min (\d+) sec">
+ <match>
+ <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
+ </match>
+ <nomatch>
+ <action function="speak-text" data="That input was invalid."/>
+ </nomatch>
+ </input>
+ </macro>
+ </language>
+ <language name="fr" sound_path="/var/sounds/lang/fr/jean" tts_engine="cepstral" tts_voice="jean-pierre">
+ <macro name="msgcount">
+ <input pattern="(.*)">
+ <match>
+ <action function="play-file" data="tuas.wav"/>
+ <action function="say" data="$1" method="pronounced" type="items"/>
+ <action function="play-file" data="messages.wav"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="timeleft">
+ <input pattern="(\d+):(\d+)">
+ <match>
+ <action function="speak-text" data="il y a $1 minutes et de $2 secondes de restant"/>
+ </match>
+ </input>
+ </macro>
+ </language>
+ </macros>
+ </section>
+</document>
+
+
1
0
Author: mikej
Date: Tue Jan 23 07:50:20 2007
New Revision: 4030
Modified:
freeswitch/trunk/src/switch_core.c
Log:
void functions shouldn't return values.
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Tue Jan 23 07:50:20 2007
@@ -2898,8 +2898,6 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Caught signal %d for unmapped thread!", sig);
abort();
}
-
- return 0;
}
#endif
1
0
Author: mikej
Date: Mon Jan 22 21:54:20 2007
New Revision: 4029
Modified:
freeswitch/trunk/src/switch_xml.c
Log:
use the right #define flags for permissions on open.
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Mon Jan 22 21:54:20 2007
@@ -59,6 +59,14 @@
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
+#ifdef WIN32
+#ifndef S_IRUSR
+#define S_IRUSR _S_IREAD
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR _S_IWRITE
+#endif
+#endif
#define SWITCH_XML_WS "\t\r\n " // whitespace
#define SWITCH_XML_ERRL 128 // maximum error string length
@@ -860,7 +868,7 @@
goto done;
}
- if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 700)) < 0) {
+ if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) < 0) {
goto done;
}
close_fd = new_fd;
1
0
Author: mikej
Date: Mon Jan 22 21:22:45 2007
New Revision: 4028
Modified:
freeswitch/trunk/src/switch_xml.c
Log:
change new xml stuff to use path sep define, and to set file mode on open for write.
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Mon Jan 22 21:22:45 2007
@@ -856,11 +856,11 @@
}
if (new_fd < 0) {
- if (!(new_file = switch_mprintf("%s/freeswitch.registry", SWITCH_GLOBAL_dirs.log_dir))) {
+ if (!(new_file = switch_mprintf("%s%sfreeswitch.registry", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR))) {
goto done;
}
- if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 0)) < 0) {
+ if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 700)) < 0) {
goto done;
}
close_fd = new_fd;
1
0
Author: mikej
Date: Mon Jan 22 20:40:14 2007
New Revision: 4027
Modified:
freeswitch/trunk/Makefile.am
freeswitch/trunk/Makefile.in
freeswitch/trunk/src/switch_xml.c
Log:
tweak var types in xml config, change makefile to install all the new broken out xml files.
Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am (original)
+++ freeswitch/trunk/Makefile.am Mon Jan 22 20:40:14 2007
@@ -199,7 +199,7 @@
install_mod: modules
@echo Installing $(NAME)
@mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db $(PREFIX)/log $(PREFIX)/bin $(PREFIX)/scripts $(PREFIX)/htdocs $(PREFIX)/grammar
- @if [ ! -f $(PREFIX)/conf/freeswitch.xml ] ; then /bin/cp -p conf/freeswitch.xml $(PREFIX)/conf/; fi
+ @if [ ! -f $(PREFIX)/conf/freeswitch.xml ] ; then /bin/cp -p conf/*.xml $(PREFIX)/conf/; fi
@if [ -f .libs/$(NAME) ] ; then /bin/cp -p .libs/$(NAME) $(PREFIX)/bin ; else /bin/cp -p ./$(NAME) $(PREFIX)/bin ; fi
@echo Installing Modules
@rm -f build/freeswitch.env
Modified: freeswitch/trunk/Makefile.in
==============================================================================
--- freeswitch/trunk/Makefile.in (original)
+++ freeswitch/trunk/Makefile.in Mon Jan 22 20:40:14 2007
@@ -1137,7 +1137,7 @@
install_mod: modules
@echo Installing $(NAME)
@mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db $(PREFIX)/log $(PREFIX)/bin $(PREFIX)/scripts $(PREFIX)/htdocs $(PREFIX)/grammar
- @if [ ! -f $(PREFIX)/conf/freeswitch.xml ] ; then /bin/cp -p conf/freeswitch.xml $(PREFIX)/conf/; fi
+ @if [ ! -f $(PREFIX)/conf/freeswitch.xml ] ; then /bin/cp -p conf/*.xml $(PREFIX)/conf/; fi
@if [ -f .libs/$(NAME) ] ; then /bin/cp -p .libs/$(NAME) $(PREFIX)/bin ; else /bin/cp -p ./$(NAME) $(PREFIX)/bin ; fi
@echo Installing Modules
@rm -f build/freeswitch.env
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Mon Jan 22 20:40:14 2007
@@ -886,11 +886,11 @@
}
if ((cmd = strstr(bp, "<!--#"))) {
- write(new_fd, bp, cmd - bp);
+ write(new_fd, bp, (unsigned)(cmd - bp));
if ((e = strstr(cmd, "-->"))) {
*e = '\0';
e += 3;
- write(new_fd, e, strlen(e));
+ write(new_fd, e, (unsigned)strlen(e));
} else {
ml++;
}
@@ -947,7 +947,7 @@
continue;
}
- write(new_fd, bp, cur);
+ write(new_fd, bp, (unsigned)cur);
}
close(old_fd);
1
0
Author: anthm
Date: Mon Jan 22 20:12:47 2007
New Revision: 4026
Added:
freeswitch/trunk/conf/conference.conf.xml
freeswitch/trunk/conf/console.conf.xml
freeswitch/trunk/conf/default_context.xml
freeswitch/trunk/conf/dialplan_directory.conf.xml
freeswitch/trunk/conf/dingaling.conf.xml
freeswitch/trunk/conf/directory.xml
freeswitch/trunk/conf/enum.conf.xml
freeswitch/trunk/conf/event_multicast.conf.xml
freeswitch/trunk/conf/event_socket.conf.xml
freeswitch/trunk/conf/iax.conf.xml
freeswitch/trunk/conf/ivr.conf.xml
freeswitch/trunk/conf/lang_en.xml
freeswitch/trunk/conf/lang_fr.xml
freeswitch/trunk/conf/modules.conf.xml
freeswitch/trunk/conf/portaudio.conf.xml
freeswitch/trunk/conf/rss.conf.xml
freeswitch/trunk/conf/sofia.conf.xml
freeswitch/trunk/conf/spidermonkey.conf.xml
freeswitch/trunk/conf/switch.conf.xml
freeswitch/trunk/conf/syslog.conf.xml
freeswitch/trunk/conf/wanpipe.conf.xml
freeswitch/trunk/conf/woomera.conf.xml
freeswitch/trunk/conf/xml_curl.conf.xml
freeswitch/trunk/conf/xml_rpc.conf.xml
freeswitch/trunk/conf/xmpp_event.conf.xml
freeswitch/trunk/conf/zeroconf.conf.xml
Modified:
freeswitch/trunk/conf/freeswitch.xml
freeswitch/trunk/src/switch_xml.c
Log:
xml preprocessor (calling all documentors and default config composers!!)
Added: freeswitch/trunk/conf/conference.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/conference.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,84 @@
+<!-- None of these paths are real if you want any of these options you need to really set them up -->
+<configuration name="conference.conf" description="Audio Conference">
+ <!-- Advertise certian presence on startup . -->
+ <advertise>
+ <room name="888(a)sub.mydomain.com" status="FreeSWITCH"/>
+ </advertise>
+
+ <!-- These are the default keys that map when you do not specify a caller control group -->
+ <!-- Note: none and default are reserved names for group names -->
+ <caller-controls>
+ <group name="default">
+ <control action="mute" digits="0"/>
+ <control action="deaf mute" digits="*"/>
+ <control action="energy up" digits="9"/>
+ <control action="energy equ" digits="8"/>
+ <control action="energy dn" digits="7"/>
+ <control action="vol talk up" digits="3"/>
+ <control action="vol talk zero" digits="2"/>
+ <control action="vol talk dn" digits="1"/>
+ <control action="vol listen up" digits="6"/>
+ <control action="vol listen zero" digits="5"/>
+ <control action="vol listen dn" digits="4"/>
+ <control action="hangup" digits="#"/>
+ </group>
+ </caller-controls>
+
+ <!-- Profiles are collections of settings you can reference by name. -->
+ <profiles>
+ <!--If no profile is specified it will default to "default"-->
+ <profile name="default">
+ <!-- Domain (for presence) -->
+ <param name="domain" value="sub.mydomain.com"/>
+ <!-- Sample Rate-->
+ <param name="rate" value="8000"/>
+ <!-- Number of milliseconds per frame -->
+ <param name="interval" value="20"/>
+ <!-- Energy level required for audio to be sent to the other users -->
+ <param name="energy-level" value="300"/>
+ <!-- Name of the caller control group to use for this profile -->
+ <!-- <param name="caller-controls" value="some name"/> -->
+ <!-- TTS Engine to use -->
+ <!--<param name="tts-engine" value="cepstral"/>-->
+ <!-- TTS Voice to use -->
+ <!--<param name="tts-voice" value="david"/>-->
+
+ <!-- If TTS is enabled all audio-file params beginning with -->
+ <!-- 'say:' will be considered text to say with TTS -->
+ <!-- Set a default path here so you can use relative paths in the other sound params-->
+ <!--<param name="sound-prefix" value="/soundfiles"/>-->
+ <!-- File to play to acknowledge succees -->
+ <!--<param name="ack-sound" value="beep.wav"/>-->
+ <!-- File to play to acknowledge failure -->
+ <!--<param name="nack-sound" value="beeperr.wav"/>-->
+ <!-- File to play to acknowledge muted -->
+ <!--<param name="muted-sound" value="muted.wav"/>-->
+ <!-- File to play to acknowledge unmuted -->
+ <!--<param name="unmuted-sound" value="unmuted.wav"/>-->
+ <!-- File to play if you are alone in the conference -->
+ <!--<param name="alone-sound" value="yactopitc.wav"/>-->
+ <!-- File to play when you join the conference -->
+ <!--<param name="enter-sound" value="welcome.wav"/>-->
+ <!-- File to play when you leave the conference -->
+ <!--<param name="exit-sound" value="exit.wav"/>-->
+ <!-- File to play when you ae ejected from the conference -->
+ <!--<param name="kicked-sound" value="kicked.wav"/>-->
+ <!-- File to play when the conference is locked -->
+ <!--<param name="locked-sound" value="locked.wav"/>-->
+ <!-- File to play when the conference is locked during the call-->
+ <!--<param name="is-locked-sound" value="is-locked.wav"/>-->
+ <!-- File to play when the conference is unlocked during the call-->
+ <!--<param name="is-unlocked-sound" value="is-unlocked.wav"/>-->
+ <!-- File to play to prompt for a pin -->
+ <!--<param name="pin-sound" value="pin.wav"/>-->
+ <!-- File to play to when the pin is invalid -->
+ <!--<param name="bad-pin-sound" value="invalid-pin.wav"/>-->
+ <!-- Conference pin -->
+ <!--<param name="pin" value="12345"/>-->
+ <!-- Default Caller ID Name for outbound calls -->
+ <param name="caller-id-name" value="FreeSWITCH"/>
+ <!-- Default Caller ID Number for outbound calls -->
+ <param name="caller-id-number" value="8777423583"/>
+ </profile>
+ </profiles>
+</configuration>
Added: freeswitch/trunk/conf/console.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/console.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,8 @@
+<configuration name="console.conf" description="Console Logger">
+ <!-- pick a file name, a function name or 'all' -->
+ <!-- map as many as you need for specific debugging -->
+ <mappings>
+ <!-- <param name="log_event" value="DEBUG"/> -->
+ <param name="all" value="DEBUG"/>
+ </mappings>
+</configuration>
Added: freeswitch/trunk/conf/default_context.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/default_context.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,105 @@
+<!-- Valid fields in conditions: -->
+<!-- "dialplan, caller_id_name, ani, ani2, caller_id_number, -->
+<!-- rdnis, destination_number, uuid, source, context, chan_name" -->
+
+<!-- *NOTE* The special context name 'any' will match any context -->
+<context name="default">
+ <extension name="556"> <!-- demo phrases -->
+ <condition field="destination_number" expression="^556$">
+ <action application="answer"/>
+ <action application="sleep" data="1000"/>
+ <action application="phrase" data="spell,${caller_id_name}"/>
+ <action application="phrase" data="spell-phonetic,${caller_id_name}"/>
+ <action application="phrase" data="timespec,12:45:15"/>
+ <action application="phrase" data="saydate,0"/>
+ <action application="phrase" data="msgcount,130"/>
+ <action application="phrase" data="ip-addr,66.250.68.194"/>
+ <action application="phrase" data="saydate,$strepoch(2006-03-23 7:23)"/>
+ <!--<action application="phrase" data="timeleft,3:30"/>-->
+ </condition>
+ </extension>
+
+ <extension name="tollfree">
+ <condition field="destination_number" expression="^(18(0{2}|8{2}|7{2}|6{2})\d{7})$">
+ <action application="enum" data="$1"/>
+ <action application="bridge" data="${enum_auto_route}"/>
+ </condition>
+ </extension>
+
+ <!-- Call the FreeSWITCH conference via SIP -->
+ <!--<extension name="FreeSWITCH Conference SIP">-->
+ <!--<condition field="destination_number" expression="^888$">-->
+ <!--<action application="bridge" data="sofia/test/888(a)conference.freeswitch.org"/>-->
+ <!--</condition>-->
+ <!--</extension> -->
+
+ <!-- Call the FreeSWITCH conference via IAX -->
+ <!--<extension name="FreeSWITCH Conference IAX">-->
+ <!--<condition field="destination_number" expression="^8888$">-->
+ <!--<action application="bridge" data="iax/guest(a)conference.freeswitch.org/888"/>-->
+ <!--</condition>-->
+ <!--</extension>-->
+
+ <extension name="testmusic">
+ <condition field="destination_number" expression="^1234$">
+ <!-- Request a certain tone/file to be played while you wait for the call to be answered-->
+ <action application="set" data="ringback=${us-ring}"/>
+ <!--<action application="set" data="ringback=/home/ring.wav"/>-->
+ <action application="bridge" data="sofia/test/1234(a)conference.freeswitch.org"/>
+ </condition>
+ </extension>
+
+ <!-- Enter an existing conference -->
+ <extension name="1000">
+ <condition field="destination_number" expression="^1000$">
+ <action application="conference" data="freeswitch"/>
+ </condition>
+ </extension>
+
+ <!-- Start a dynamic conference and call someone at the same time -->
+ <extension name="2000">
+ <condition field="destination_number" expression="^2000$">
+ <action application="conference" data="bridge:mydynaconf:sofia/test/1234@conference.freeswitch.org"/>
+ </condition>
+ </extension>
+
+ <!-- extensions starting with 4, all the numbers after 4 form a numeric filename -->
+ <!-- continue="true" means keep looking for more extensions to match -->
+ <!-- *NOTE* The entire dialplan is parsed ONCE when the call starts -->
+ <!-- so any call info acquired after the various actions cannot -->
+ <!-- be taken into consideration. -->
+
+ <!-- The first match will play a beep and the second one plays -->
+ <!-- the desired file. This is for demo purposes both actions -->
+ <!-- could have been under the same <extension> tag as well. -->
+ <extension name="playsound1" continue="true">
+ <condition field="source" expression="mod_sofia"/>
+ <condition field="destination_number" expression="^4(\d+)">
+ <action application="playback" data="/var/sounds/beep.gsm"/>
+ </condition>
+ </extension>
+
+ <extension name="playsound2">
+ <condition field="source" expression="mod_sofia"/>
+ <condition field="destination_number" expression="^4(\d+)">
+ <action application="playback" data="/root/$1.raw"/>
+ </condition>
+ </extension>
+
+ <!-- send everything with a certian RDNIS to Wanpipe ISDN -->
+ <extension name="To PRI">
+ <condition field="rdnis" expression="8881231234"/>
+ <condition field="destination_number" expression="(.*)">
+ <action application="bridge" data="wanpipe/a/a/$1"/>
+ </condition>
+ </extension>
+
+ <!-- Call *MUST* originate from mod_iax and also be dialing ext 9999-->
+ <extension name="9999">
+ <condition field="source" expression="mod_iax"/>
+ <condition field="destination_number" expression="9999">
+ <action application="playback" data="/var/sounds/beep.gsm"/>
+ </condition>
+ </extension>
+
+</context>
Added: freeswitch/trunk/conf/dialplan_directory.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/dialplan_directory.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,9 @@
+<configuration name="dialplan_directory.conf" description="Dialplan Directory">
+ <settings>
+ <param name="directory-name" value="ldap"/>
+ <param name="host" value="ldap.freeswitch.org"/>
+ <param name="dn" value="cn=Manager,dc=freeswitch,dc=org"/>
+ <param name="pass" value="test"/>
+ <param name="base" value="dc=freeswitch,dc=org"/>
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/dingaling.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/dingaling.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,53 @@
+<configuration name="dingaling.conf" description="XMPP Jingle Endpoint">
+ <settings>
+ <param name="debug" value="0"/>
+ <param name="codec-prefs" value="PCMU"/>
+ </settings>
+
+ <!-- *NOTE* change <x-profile></x-profile> to <profile></profile> to enable -->
+
+ <!-- Client Profile (Original mode) -->
+ <x-profile type="client">
+ <param name="name" value="$${domain}"/>
+ <param name="login" value="myjid(a)myserver.com/talk"/>
+ <param name="password" value="mypass"/>
+ <param name="dialplan" value="XML"/>
+ <param name="message" value="Jingle all the way"/>
+ <param name="rtp-ip" value="auto"/>
+ <param name="auto-login" value="true"/>
+ <param name="auto-reply" value="Press *Call* to call FreeSWITCH and be sure to come to ClueCon! http://www.cluecon.com"/>
+ <!-- SASL "plain" or "md5" -->
+ <param name="sasl" value="plain"/>
+ <!-- if the server where the jabber is hosted is not the same as the one in the jid -->
+ <!--<param name="server" value="alternate.server.com"/>-->
+ <!-- Enable TLS or not -->
+ <param name="tls" value="true"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
+ <!-- or -->
+ <!-- <param name="rtp-ip" value="auto"/> -->
+ <!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/> -->
+ <!-- default extension (if one cannot be determined) -->
+ <param name="exten" value="888"/>
+ <!-- VAD choose one -->
+ <!-- <param name="vad" value="in"/> -->
+ <!-- <param name="vad" value="out"/> -->
+ <param name="vad" value="both"/>
+ </x-profile>
+
+ <!-- Component (Server to Server Login) -->
+ <x-profile type="component">
+ <!-- All traffic for *(a)sub.mydomain.com will come to you -->
+ <param name="name" value="$${subdomain}"/>
+ <param name="password" value="secret"/>
+ <param name="dialplan" value="XML"/>
+ <param name="rtp-ip" value="auto"/>
+ <param name="server" value="jabber.server.org:5347"/>
+ <!-- disable to trade async for more calls -->
+ <param name="use-rtp-timer" value="true"/>
+ <!-- "_auto_" means the extension will be automaticly set to the called jid -->
+ <param name="exten" value="_auto_"/>
+ <!--<param name="vad" value="both"/>-->
+ </x-profile>
+
+</configuration>
Added: freeswitch/trunk/conf/directory.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/directory.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,59 @@
+<!--the domain or ip (the right hand side of the @ in the addr-->
+<domain name="jabber.org">
+ <!--the user id (the left hand side of the @ in the addr-->
+ <user id="stpeter">
+ <params>
+ <!-- omit password for authless registration -->
+ <param name="password" value="mypass"/>
+ </params>
+
+ <vcard xmlns='vcard-temp'>
+ <FN>Peter Saint-Andre</FN>
+ <N>
+ <FAMILY>Saint-Andre</FAMILY>
+ <GIVEN>Peter</GIVEN>
+ <MIDDLE/>
+ </N>
+ <NICKNAME>stpeter</NICKNAME>
+ <URL>http://www.jabber.org/people/stpeter.php</URL>
+ <BDAY>1966-08-06</BDAY>
+ <ORG>
+ <ORGNAME>Jabber Software Foundation</ORGNAME>
+ <ORGUNIT>Jabber Software Foundation</ORGUNIT>
+ </ORG>
+ <TITLE>Executive Director</TITLE>
+ <ROLE>Patron Saint</ROLE>
+ <TEL><WORK/><VOICE/><NUMBER>303-308-3282</NUMBER></TEL>
+ <TEL><WORK/><FAX/><NUMBER/></TEL>
+ <TEL><WORK/><MSG/><NUMBER/></TEL>
+ <ADR>
+ <WORK/>
+ <EXTADD>Suite 600</EXTADD>
+ <STREET>1899 Wynkoop Street</STREET>
+ <LOCALITY>Denver</LOCALITY>
+ <REGION>CO</REGION>
+ <PCODE>80202</PCODE>
+ <CTRY>USA</CTRY>
+ </ADR>
+ <TEL><HOME/><VOICE/><NUMBER>303-555-1212</NUMBER></TEL>
+ <TEL><HOME/><FAX/><NUMBER/></TEL>
+ <TEL><HOME/><MSG/><NUMBER/></TEL>
+ <ADR>
+ <HOME/>
+ <EXTADD/>
+ <STREET/>
+ <LOCALITY>Denver</LOCALITY>
+ <REGION>CO</REGION>
+ <PCODE>80209</PCODE>
+ <CTRY>USA</CTRY>
+ </ADR>
+ <EMAIL><INTERNET/><PREF/><USERID>stpeter(a)jabber.org</USERID></EMAIL>
+ <JABBERID>stpeter(a)jabber.org</JABBERID>
+ <DESC>
+ More information about me is located on my
+ personal website: http://www.saint-andre.com/
+ </DESC>
+ </vcard>
+
+ </user>
+</domain>
Added: freeswitch/trunk/conf/enum.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/enum.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,11 @@
+<configuration name="enum.conf" description="ENUM Module">
+ <settings>
+ <param name="default-root" value="e164.org"/>
+ </settings>
+
+ <routes>
+ <route service="E2U+SIP" regex="sip:(.*)" replace="sofia/test/$1"/>
+ <route service="E2U+IAX2" regex="iax2:(.*)" replace="iax/$1"/>
+ <route service="E2U+XMPP" regex="XMPP:(.*)" replace="dingaling/jingle/$1"/>
+ </routes>
+</configuration>
Added: freeswitch/trunk/conf/event_multicast.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/event_multicast.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,8 @@
+<configuration name="event_multicast.conf" description="Multicast Event">
+ <settings>
+ <param name="address" value="225.1.1.1"/>
+ <param name="port" value="4242"/>
+ <param name="bindings" value="all"/>
+ </settings>
+</configuration>
+
Added: freeswitch/trunk/conf/event_socket.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/event_socket.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,7 @@
+<configuration name="event_socket.conf" description="Socket Client">
+ <settings>
+ <param name="listen-ip" value="127.0.0.1"/>
+ <param name="listen-port" value="8021"/>
+ <param name="password" value="ClueCon"/>
+ </settings>
+</configuration>
Modified: freeswitch/trunk/conf/freeswitch.xml
==============================================================================
--- freeswitch/trunk/conf/freeswitch.xml (original)
+++ freeswitch/trunk/conf/freeswitch.xml Mon Jan 22 20:12:47 2007
@@ -1,800 +1,66 @@
<?xml version="1.0"?>
<document type="freeswitch/xml">
-
+ <!--#comment
+ All comments starting with #command will be preprocessed and never sent to the xml parser
+ Valid instructions:
+ #include ==> Include another file to this exact point
+ (partial xml should be encased in <include></include> tags)
+ #set ==> Set a global variable (can be expanded during preprocessing with $$ variables)
+ (note the double $$ which denotes preprocessor variables)
+ #comment ==> A general comment such as this
+
+ The preprocessor will compuile the full xml document to ${prefix}/log/freeswitch.registry
+ Don't modify it while freeswitch is running cos it is mem mapped in most cases =D
+ -->
+
+ <!--#set "domain=mydomain.com"-->
+ <!--#set "subdomain=sub.mydomain.com"-->
+ <!--#set "default_codecs=PCUM@20i"-->
+ <!--my domain is $${domain}-->
<section name="configuration" description="Various Configuration">
-
- <configuration name="switch.conf" description="Modules">
- <settings>
- <!--Most channels to allow at once -->
- <param name="max-sessions" value="1000"/>
- </settings>
- <!--Any variables defined here will be available in every channel, in the dialplan etc -->
- <variables>
- <variable name="uk-ring" value="%(400,200,400,450);%(400,2200,400,450)"/>
- <variable name="us-ring" value="%(2000, 4000, 440.0, 480.0)"/>
- <variable name="bong-ring" value="v=4000;>=0;+=2;#(60,0);v=2000;%(940,0,350,440)"/>
- </variables>
- </configuration>
-
- <configuration name="modules.conf" description="Modules">
- <modules>
- <!-- Loggers (I'd load these first) -->
- <load module="mod_console"/>
- <!-- <load module="mod_syslog"/> -->
-
- <!-- Multi-Faceted -->
- <!-- mod_enum is a dialplan interface, an application interface and an api command interface -->
- <load module="mod_enum"/>
-
- <!-- XML Interfaces -->
- <!-- <load module="mod_xml_rpc"/> -->
- <!-- <load module="mod_xml_curl"/> -->
-
- <!-- Event Handlers -->
- <!-- <load module="mod_cdr"/> -->
- <!-- <load module="mod_event_multicast"/> -->
- <!-- <load module="mod_event_socket"/> -->
- <!-- <load module="mod_xmpp_event"/> -->
- <!-- <load module="mod_zeroconf"/> -->
-
- <!-- Directory Interfaces -->
- <!-- <load module="mod_ldap"/> -->
-
- <!-- Endpoints -->
- <!-- <load module="mod_dingaling"/> -->
- <!--<load module="mod_iax"/>-->
- <load module="mod_portaudio"/>
- <load module="mod_sofia"/>
- <!-- <load module="mod_wanpipe"/> -->
- <!-- <load module="mod_woomera"/> -->
-
- <!-- Applications -->
- <load module="mod_bridgecall"/>
- <load module="mod_commands"/>
- <load module="mod_conference"/>
- <load module="mod_dptools"/>
- <load module="mod_echo"/>
- <!--<load module="mod_park"/>-->
- <load module="mod_playback"/>
-
- <!-- Dialplan Interfaces -->
- <!-- <load module="mod_dialplan_directory"/> -->
- <load module="mod_dialplan_xml"/>
-
- <!-- Codec Interfaces -->
- <load module="mod_g711"/>
- <load module="mod_gsm"/>
- <!-- <load module="mod_ilbc"/> -->
- <load module="mod_l16"/>
- <!-- <load module="mod_speex"/> -->
-
- <!-- File Format Interfaces -->
- <load module="mod_sndfile"/>
- <load module="mod_native_file"/>
-
- <!-- Timers -->
- <load module="mod_softtimer"/>
-
- <!-- Languages -->
- <!-- <load module="mod_spidermonkey"/> -->
- <!-- <load module="mod_perl"/> -->
-
- <!-- ASR /TTS -->
- <!-- <load module="mod_cepstral"/> -->
- <!-- <load module="mod_rss"/> -->
- </modules>
- </configuration>
-
- <configuration name="spidermonkey.conf" description="Spider Monkey JavaScript Plug-Ins">
- <modules>
- <load module="mod_spidermonkey_teletone"/>
- <load module="mod_spidermonkey_core_db"/>
- <!--<load module="mod_spidermonkey_odbc"/>-->
- </modules>
- </configuration>
-
- <configuration name="event_multicast.conf" description="Multicast Event">
- <settings>
- <param name="address" value="225.1.1.1"/>
- <param name="port" value="4242"/>
- <param name="bindings" value="all"/>
- </settings>
- </configuration>
-
- <configuration name="event_socket.conf" description="Socket Client">
- <settings>
- <param name="listen-ip" value="127.0.0.1"/>
- <param name="listen-port" value="8021"/>
- <param name="password" value="ClueCon"/>
- </settings>
- </configuration>
-
- <configuration name="iax.conf" description="IAX Configuration">
- <settings>
- <param name="debug" value="0"/>
- <!-- <param name="ip" value="1.2.3.4"> -->
- <param name="port" value="4569"/>
- <param name="dialplan" value="XML"/>
- <param name="codec-prefs" value="PCMU@20i,PCMA,speex,L16"/>
- <param name="codec-master" value="us"/>
- <param name="codec-rates" value="8"/>
- </settings>
- </configuration>
-
- <configuration name="console.conf" description="Console Logger">
- <!-- pick a file name, a function name or 'all' -->
- <!-- map as many as you need for specific debugging -->
- <mappings>
- <!-- <param name="log_event" value="DEBUG"/> -->
- <param name="all" value="DEBUG"/>
- </mappings>
- </configuration>
-
- <configuration name="sofia.conf" description="sofia Endpoint">
- <profiles>
- <profile name="mydomain1.com">
- <registrations>
- <!-- <registration name="asterlink">
- <param name="register-scheme" value="Digest"/>
- <param name="register-realm" value=""/>
- <param name="register-username" value="1001"/>
- <param name="register-password" value="nhy65tgb"/>
- <param name="register-from" value="sip:1001@208.64.200.40"/>
- <param name="register-to" value="sip:1001@conference.freeswitch.org"/>
- <param name="register-proxy" value="sip:conference.freeswitch.org:5060"/>
- <param name="register-frequency" value="20"/>
- </registration> -->
- </registrations>
- <settings>
- <param name="debug" value="1"/>
- <param name="rfc2833-pt" value="101"/>
- <param name="sip-port" value="5060"/>
- <param name="dialplan" value="XML"/>
- <param name="dtmf-duration" value="100"/>
- <param name="codec-prefs" value="PCMU@20i"/>
- <param name="codec-ms" value="20"/>
- <param name="use-rtp-timer" value="true"/>
- <param name="rtp-timer-name" value="soft"/>
- <param name="rtp-ip" value="auto"/>
- <param name="sip-ip" value="auto"/>
-
- <!--Uncomment to set all inbound calls to no media mode-->
- <!--<param name="inbound-no-media" value="true"/>-->
-
- <!--Uncomment to let calls hit the dialplan *before* you decide if the codec is ok-->
- <!--<param name="inbound-late-negotiation" value="true"/>-->
-
- <!-- this lets anything register -->
- <!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
- <param name="accept-blind-reg" value="true"/>
-
- <!--<param name="auth-calls" value="true"/>-->
- <!-- on authed calls, authenticate *all* the packets not just invite -->
- <!--<param name="auth-all-packets" value="true"/>-->
-
- <!-- optional ; -->
- <!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/>-->
- <!-- <param name="ext-rtp-ip" value="100.101.102.103"/> -->
- <!-- VAD choose one (out is a good choice); -->
- <!-- <param name="vad" value="in"/> -->
- <!-- <param name="vad" value="out"/> -->
- <!-- <param name="vad" value="both"/> -->
- <!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
- </settings>
- </profile>
- </profiles>
- </configuration>
-
- <configuration name="syslog.conf" description="Syslog Logger">
- <!-- SYSLOG -->
- <!-- emerg - system is unusable -->
- <!-- alert - action must be taken immediately -->
- <!-- crit - critical conditions -->
- <!-- err - error conditions -->
- <!-- warning - warning conditions -->
- <!-- notice - normal, but significant, condition -->
- <!-- info - informational message -->
- <!-- debug - debug-level message -->
- <settings>
- <param name="ident" value="freeswitch"/>
- <param name="facility" value="user"/>
- <param name="format" value="${time} - ${message}"/>
- <param name="level" value="debug,info,warning-alert"/>
- </settings>
- </configuration>
-
- <configuration name="woomera.conf" description="Woomera Endpoint">
- <settings>
- <param name="debug" value="0"/>
- </settings>
- <interface>
- <param name="host" value="localhost"/>
- <param name="port" value="42420"/>
- <param name="audio-ip" value="127.0.0.1"/>
- <param name="dialplan" value="XML"/>
- </interface>
- </configuration>
-
- <configuration name="wanpipe.conf" description="Sangoma Wanpipe Endpoint">
- <settings>
- <param name="debug" value="1"/>
- <param name="dialplan" value="XML"/>
- <param name="mtu" value="320"/>
- <param name="dtmf-on" value="800"/>
- <param name="dtmf-off" value="100"/>
- <param name="supress-dtmf-tone" value="yes"/>
- </settings>
- <span>
- <param name="span" value="1"/>
- <param name="node" value="cpe"/>
- <!-- <param name="switch" value="ni2"/> -->
- <param name="switch" value="dms100"/>
- <!-- <param name="switch" value="lucent5e"/> -->
- <!-- <param name="switch" value="att4ess"/> -->
- <!-- <param name="switch" value="euroisdn"/> -->
- <!-- <param name="switch" value="gr303eoc"/> -->
- <!-- <param name="switch" value="gr303tmc"/> -->
- <param name="dp" value="national"/>
- <!-- <param name="dp" value="international"/> -->
- <!-- <param name="dp" value="local"/> -->
- <!-- <param name="dp" value="private"/> -->
- <!-- <param name="dp" value="unknown"/> -->
- <param name="l1" value="ulaw"/>
- <!-- <param name="l1" value="alaw"/> -->
- <param name="bchan" value="1-23"/>
- <param name="dchan" value="24"/>
- <param name="dialplan" value="XML"/>
- </span>
- </configuration>
-
- <configuration name="portaudio.conf" description="Soundcard Endpoint">
- <settings>
- <!-- indev, outdev, ringdev:
- partial case sensitive string match on something in the name
- or the device number prefixed with # eg "#1" (or blank for default) -->
-
- <!-- device to use for input -->
- <param name="indev" value=""/>
- <!-- device to use for output -->
- <param name="outdev" value=""/>
-
- <!--device to use for inbound ring -->
- <!--<param name="ringdev" value=""/>-->
- <!--File to play as the ring sound -->
- <!--<param name="ring-file" value="/sounds/ring.wav"/>-->
- <!--Number of seconds to pause between rings -->
- <!--<param name="ring-interval" value="5"/>-->
-
- <!--file to play when calls are on hold-->
- <!--<param name="hold-file" value="/sounds/holdmusic.wav"/>-->
- <!--Timer to use for hold music (i'd leave this one commented)-->
- <!--<param name="timer-name" value="soft"/>-->
-
- <!--Default dialplan and caller-id info -->
- <param name="dialplan" value="XML"/>
- <param name="cid-name" value="FreeSwitch"/>
- <param name="cid-num" value="5555551212"/>
-
- <!--audio sample rate and interval -->
- <param name="sample-rate" value="8000"/>
- <param name="codec-ms" value="20"/>
- </settings>
- </configuration>
-
- <configuration name="zeroconf.conf" description="Zeroconf Event Handler">
- <settings>
- <param name="publish" value="yes"/>
- <param name="browse" value="_sip._udp"/>
- </settings>
- </configuration>
-
- <configuration name="xmpp_event.conf" description="XMPP Event Handler">
- <settings>
- <param name="#debug" value="1"/>
- <param name="jid" value="freeswitch(a)my.jabber.com/me"/>
- <param name="passwd" value="mypass"/>
- <param name="target-jid" value="freeswitch(a)reader.org/him"/>
- </settings>
- </configuration>
-
- <configuration name="dialplan_directory.conf" description="Dialplan Directory">
- <settings>
- <param name="directory-name" value="ldap"/>
- <param name="host" value="ldap.freeswitch.org"/>
- <param name="dn" value="cn=Manager,dc=freeswitch,dc=org"/>
- <param name="pass" value="test"/>
- <param name="base" value="dc=freeswitch,dc=org"/>
- </settings>
- </configuration>
-
- <configuration name="dingaling.conf" description="XMPP Jingle Endpoint">
- <settings>
- <param name="debug" value="0"/>
- <param name="codec-prefs" value="PCMU"/>
- </settings>
-
- <!-- *NOTE* change <x-profile></x-profile> to <profile></profile> to enable -->
-
- <!-- Client Profile (Original mode) -->
- <x-profile type="client">
- <param name="name" value="mydomain.com"/>
- <param name="login" value="myjid(a)myserver.com/talk"/>
- <param name="password" value="mypass"/>
- <param name="dialplan" value="XML"/>
- <param name="message" value="Jingle all the way"/>
- <param name="rtp-ip" value="auto"/>
- <param name="auto-login" value="true"/>
- <param name="auto-reply" value="Press *Call* to call FreeSWITCH and be sure to come to ClueCon! http://www.cluecon.com"/>
- <!-- SASL "plain" or "md5" -->
- <param name="sasl" value="plain"/>
- <!-- if the server where the jabber is hosted is not the same as the one in the jid -->
- <!--<param name="server" value="alternate.server.com"/>-->
- <!-- Enable TLS or not -->
- <param name="tls" value="true"/>
- <!-- disable to trade async for more calls -->
- <param name="use-rtp-timer" value="true"/>
- <!-- or -->
- <!-- <param name="rtp-ip" value="auto"/> -->
- <!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/> -->
- <!-- default extension (if one cannot be determined) -->
- <param name="exten" value="888"/>
- <!-- VAD choose one -->
- <!-- <param name="vad" value="in"/> -->
- <!-- <param name="vad" value="out"/> -->
- <param name="vad" value="both"/>
- </x-profile>
-
- <!-- Component (Server to Server Login) -->
- <x-profile type="component">
- <!-- All traffic for *(a)sub.mydomain.com will come to you -->
- <param name="name" value="sub.mydomain.com"/>
- <param name="password" value="secret"/>
- <param name="dialplan" value="XML"/>
- <param name="rtp-ip" value="auto"/>
- <param name="server" value="jabber.server.org:5347"/>
- <!-- disable to trade async for more calls -->
- <param name="use-rtp-timer" value="true"/>
- <!-- "_auto_" means the extension will be automaticly set to the called jid -->
- <param name="exten" value="_auto_"/>
- <!--<param name="vad" value="both"/>-->
- </x-profile>
-
- </configuration>
-
- <configuration name="xml_curl.conf" description="cURL XML Gateway">
- <settings>
- <!-- The url to a gateway cgi that can generate xml similar to
- what's in this file only on-the-fly (leave it commented if you dont
- need it) -->
- <!-- one or more |-delim of configuration|directory|dialplan -->
- <!--<param name="gateway-url" value="http://www.mydomain.com/test.cgi" bindings="dialplan"/>-->
- <!-- set this to provide authentication credentials to the server -->
- <!--<param name="gateway-credentials" value="muser:mypass"/>-->
- </settings>
- </configuration>
-
- <configuration name="xml_rpc.conf" description="XML RPC">
- <settings>
- <!-- The port where you want to run the http service (default 8080) -->
- <param name="http-port" value="8080"/>
- <!-- if all 3 of the following params exist all http traffic will require auth -->
- <param name="auth-realm" value="freeswitch"/>
- <param name="auth-user" value="freeswitch"/>
- <param name="auth-pass" value="works"/>
- </settings>
- </configuration>
-
- <configuration name="rss.conf" description="RSS Parser">
- <feeds>
- <!-- Just download the files to wherever and refer to them here -->
- <!-- <feed name="Slash Dot">/home/rss/rss.rss</feed> -->
- <!-- <feed name="News Forge">/home/rss/newsforge.rss</feed> -->
- </feeds>
- </configuration>
-
- <!-- None of these paths are real if you want any of these options you need to really set them up -->
- <configuration name="conference.conf" description="Audio Conference">
- <!-- Advertise certian presence on startup . -->
- <advertise>
- <room name="888(a)sub.mydomain.com" status="FreeSWITCH"/>
- </advertise>
-
-<!-- These are the default keys that map when you do not specify a caller control group -->
-<!-- Note: none and default are reserved names for group names -->
- <caller-controls>
- <group name="default">
- <control action="mute" digits="0"/>
- <control action="deaf mute" digits="*"/>
- <control action="energy up" digits="9"/>
- <control action="energy equ" digits="8"/>
- <control action="energy dn" digits="7"/>
- <control action="vol talk up" digits="3"/>
- <control action="vol talk zero" digits="2"/>
- <control action="vol talk dn" digits="1"/>
- <control action="vol listen up" digits="6"/>
- <control action="vol listen zero" digits="5"/>
- <control action="vol listen dn" digits="4"/>
- <control action="hangup" digits="#"/>
- </group>
- </caller-controls>
-
- <!-- Profiles are collections of settings you can reference by name. -->
- <profiles>
- <!--If no profile is specified it will default to "default"-->
- <profile name="default">
- <!-- Domain (for presence) -->
- <param name="domain" value="sub.mydomain.com"/>
- <!-- Sample Rate-->
- <param name="rate" value="8000"/>
- <!-- Number of milliseconds per frame -->
- <param name="interval" value="20"/>
- <!-- Energy level required for audio to be sent to the other users -->
- <param name="energy-level" value="300"/>
- <!-- Name of the caller control group to use for this profile -->
- <!-- <param name="caller-controls" value="some name"/> -->
- <!-- TTS Engine to use -->
- <!--<param name="tts-engine" value="cepstral"/>-->
- <!-- TTS Voice to use -->
- <!--<param name="tts-voice" value="david"/>-->
-
- <!-- If TTS is enabled all audio-file params beginning with -->
- <!-- 'say:' will be considered text to say with TTS -->
- <!-- Set a default path here so you can use relative paths in the other sound params-->
- <!--<param name="sound-prefix" value="/soundfiles"/>-->
- <!-- File to play to acknowledge succees -->
- <!--<param name="ack-sound" value="beep.wav"/>-->
- <!-- File to play to acknowledge failure -->
- <!--<param name="nack-sound" value="beeperr.wav"/>-->
- <!-- File to play to acknowledge muted -->
- <!--<param name="muted-sound" value="muted.wav"/>-->
- <!-- File to play to acknowledge unmuted -->
- <!--<param name="unmuted-sound" value="unmuted.wav"/>-->
- <!-- File to play if you are alone in the conference -->
- <!--<param name="alone-sound" value="yactopitc.wav"/>-->
- <!-- File to play when you join the conference -->
- <!--<param name="enter-sound" value="welcome.wav"/>-->
- <!-- File to play when you leave the conference -->
- <!--<param name="exit-sound" value="exit.wav"/>-->
- <!-- File to play when you ae ejected from the conference -->
- <!--<param name="kicked-sound" value="kicked.wav"/>-->
- <!-- File to play when the conference is locked -->
- <!--<param name="locked-sound" value="locked.wav"/>-->
- <!-- File to play when the conference is locked during the call-->
- <!--<param name="is-locked-sound" value="is-locked.wav"/>-->
- <!-- File to play when the conference is unlocked during the call-->
- <!--<param name="is-unlocked-sound" value="is-unlocked.wav"/>-->
- <!-- File to play to prompt for a pin -->
- <!--<param name="pin-sound" value="pin.wav"/>-->
- <!-- File to play to when the pin is invalid -->
- <!--<param name="bad-pin-sound" value="invalid-pin.wav"/>-->
- <!-- Conference pin -->
- <!--<param name="pin" value="12345"/>-->
- <!-- Default Caller ID Name for outbound calls -->
- <param name="caller-id-name" value="FreeSWITCH"/>
- <!-- Default Caller ID Number for outbound calls -->
- <param name="caller-id-number" value="8777423583"/>
- </profile>
- </profiles>
- </configuration>
-
- <configuration name="enum.conf" description="ENUM Module">
- <settings>
- <param name="default-root" value="e164.org"/>
- </settings>
-
- <routes>
- <route service="E2U+SIP" regex="sip:(.*)" replace="sofia/test/$1"/>
- <route service="E2U+IAX2" regex="iax2:(.*)" replace="iax/$1"/>
- <route service="E2U+XMPP" regex="XMPP:(.*)" replace="dingaling/jingle/$1"/>
- </routes>
- </configuration>
-
- <configuration name="ivr.conf" description="IVR menus">
- <menus>
- <menu name="main"
- greet-long="/soundfiles/greet-long.wav"
- greet-short="/soundfiles/greet-short.wav"
- invalid-sound="/soundfiles/invalid.wav"
- exit-sound="/soundfiles/exit.wav" timeout ="15" max-failures="3">
- <entry action="menu-exit" digits="*"/>
- <entry action="menu-sub" digits="2" param="menu2"/>
- <entry action="menu-exec-api" digits="3" param="api arg"/>
- <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
- <entry action="menu-back" digits="5"/>
- <entry action="menu-call-transfer" digits="7" param="888"/>
- <entry action="menu-sub" digits="8" param="menu8"/>>
- </menu>
- <menu name="menu8"
- greet-long="/soundfiles/greet-long.wav"
- greet-short="/soundfiles/greet-short.wav"
- invalid-sound="/soundfiles/invalid.wav"
- exit-sound="/soundfiles/exit.wav"
- timeout ="15"
- max-failures="3">
- <entry action="menu-back" digits="#"/>
- <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
- <entry action="menu-top" digits="*"/>
- </menu>
- <menu name="menu2"
- greet-long="/soundfiles/greet-long.wav"
- greet-short="/soundfiles/greet-short.wav"
- invalid-sound="/soundfiles/invalid.wav"
- exit-sound="/soundfiles/exit.wav"
- timeout ="15"
- max-failures="3">
- <entry action="menu-back" digits="#"/>
- <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
- <entry action="menu-top" digits="*"/>
- </menu>
- </menus>
- </configuration>
-
+ <!--#include "switch.conf.xml"-->
+ <!--#include "modules.conf.xml"-->
+ <!--#include "spidermonkey.conf.xml"-->
+ <!--#include "event_multicast.conf.xml"-->
+ <!--#include "event_socket.conf.xml"-->
+ <!--#include "iax.conf.xml"-->
+ <!--#include "console.conf.xml"-->
+ <!--#include "sofia.conf.xml"-->
+ <!--#include "syslog.conf.xml"-->
+ <!--#include "woomera.conf.xml"-->
+ <!--#include "wanpipe.conf.xml"-->
+ <!--#include "portaudio.conf.xml"-->
+ <!--#include "zeroconf.conf.xml"-->
+ <!--#include "xmpp_event.conf.xml"-->
+ <!--#include "dialplan_directory.conf.xml"-->
+ <!--#include "dingaling.conf.xml"-->
+ <!--#include "xml_curl.conf.xml"-->
+ <!--#include "xml_rpc.conf.xml"-->
+ <!--#include "rss.conf.xml"-->
+ <!--#include "conference.conf.xml"-->
+ <!--#include "enum.conf.xml"-->
+ <!--#include "ivr.conf.xml"-->
</section>
<section name="dialplan" description="Regex/XML Dialplan">
- <!-- Valid fields in conditions: -->
- <!-- "dialplan, caller_id_name, ani, ani2, caller_id_number, -->
- <!-- rdnis, destination_number, uuid, source, context, chan_name" -->
-
- <!-- *NOTE* The special context name 'any' will match any context -->
- <context name="default">
- <extension name="556"> <!-- demo phrases -->
- <condition field="destination_number" expression="^556$">
- <action application="answer"/>
- <action application="sleep" data="1000"/>
- <action application="phrase" data="spell,${caller_id_name}"/>
- <action application="phrase" data="spell-phonetic,${caller_id_name}"/>
- <action application="phrase" data="timespec,12:45:15"/>
- <action application="phrase" data="saydate,0"/>
- <action application="phrase" data="msgcount,130"/>
- <action application="phrase" data="ip-addr,66.250.68.194"/>
- <action application="phrase" data="saydate,$strepoch(2006-03-23 7:23)"/>
- <!--<action application="phrase" data="timeleft,3:30"/>-->
- </condition>
- </extension>
-
- <extension name="tollfree">
- <condition field="destination_number" expression="^(18(0{2}|8{2}|7{2}|6{2})\d{7})$">
- <action application="enum" data="$1"/>
- <action application="bridge" data="${enum_auto_route}"/>
- </condition>
- </extension>
-
- <!-- Call the FreeSWITCH conference via SIP -->
- <!--<extension name="FreeSWITCH Conference SIP">-->
- <!--<condition field="destination_number" expression="^888$">-->
- <!--<action application="bridge" data="sofia/test/888(a)conference.freeswitch.org"/>-->
- <!--</condition>-->
- <!--</extension> -->
-
- <!-- Call the FreeSWITCH conference via IAX -->
- <!--<extension name="FreeSWITCH Conference IAX">-->
- <!--<condition field="destination_number" expression="^8888$">-->
- <!--<action application="bridge" data="iax/guest(a)conference.freeswitch.org/888"/>-->
- <!--</condition>-->
- <!--</extension>-->
-
- <extension name="testmusic">
- <condition field="destination_number" expression="^1234$">
- <!-- Request a certain tone/file to be played while you wait for the call to be answered-->
- <action application="set" data="ringback=${us-ring}"/>
- <!--<action application="set" data="ringback=/home/ring.wav"/>-->
- <action application="bridge" data="sofia/test/1234(a)conference.freeswitch.org"/>
- </condition>
- </extension>
-
- <!-- Enter an existing conference -->
- <extension name="1000">
- <condition field="destination_number" expression="^1000$">
- <action application="conference" data="freeswitch"/>
- </condition>
- </extension>
-
- <!-- Start a dynamic conference and call someone at the same time -->
- <extension name="2000">
- <condition field="destination_number" expression="^2000$">
- <action application="conference" data="bridge:mydynaconf:sofia/test/1234@conference.freeswitch.org"/>
- </condition>
- </extension>
-
- <!-- extensions starting with 4, all the numbers after 4 form a numeric filename -->
- <!-- continue="true" means keep looking for more extensions to match -->
- <!-- *NOTE* The entire dialplan is parsed ONCE when the call starts -->
- <!-- so any call info acquired after the various actions cannot -->
- <!-- be taken into consideration. -->
-
- <!-- The first match will play a beep and the second one plays -->
- <!-- the desired file. This is for demo purposes both actions -->
- <!-- could have been under the same <extension> tag as well. -->
- <extension name="playsound1" continue="true">
- <condition field="source" expression="mod_sofia"/>
- <condition field="destination_number" expression="^4(\d+)">
- <action application="playback" data="/var/sounds/beep.gsm"/>
- </condition>
- </extension>
-
- <extension name="playsound2">
- <condition field="source" expression="mod_sofia"/>
- <condition field="destination_number" expression="^4(\d+)">
- <action application="playback" data="/root/$1.raw"/>
- </condition>
- </extension>
-
- <!-- send everything with a certian RDNIS to Wanpipe ISDN -->
- <extension name="To PRI">
- <condition field="rdnis" expression="8881231234"/>
- <condition field="destination_number" expression="(.*)">
- <action application="bridge" data="wanpipe/a/a/$1"/>
- </condition>
- </extension>
-
- <!-- Call *MUST* originate from mod_iax and also be dialing ext 9999-->
- <extension name="9999">
- <condition field="source" expression="mod_iax"/>
- <condition field="destination_number" expression="9999">
- <action application="playback" data="/var/sounds/beep.gsm"/>
- </condition>
- </extension>
-
- </context>
+ <!--#include "default_context.xml"-->
</section>
<section name="directory" description="User Directory">
- <!--the domain or ip (the right hand side of the @ in the addr-->
- <domain name="jabber.org">
- <!--the user id (the left hand side of the @ in the addr-->
- <user id="stpeter">
- <params>
- <!-- omit password for authless registration -->
- <param name="password" value="mypass"/>
- </params>
-
- <vcard xmlns='vcard-temp'>
- <FN>Peter Saint-Andre</FN>
- <N>
- <FAMILY>Saint-Andre</FAMILY>
- <GIVEN>Peter</GIVEN>
- <MIDDLE/>
- </N>
- <NICKNAME>stpeter</NICKNAME>
- <URL>http://www.jabber.org/people/stpeter.php</URL>
- <BDAY>1966-08-06</BDAY>
- <ORG>
- <ORGNAME>Jabber Software Foundation</ORGNAME>
- <ORGUNIT>Jabber Software Foundation</ORGUNIT>
- </ORG>
- <TITLE>Executive Director</TITLE>
- <ROLE>Patron Saint</ROLE>
- <TEL><WORK/><VOICE/><NUMBER>303-308-3282</NUMBER></TEL>
- <TEL><WORK/><FAX/><NUMBER/></TEL>
- <TEL><WORK/><MSG/><NUMBER/></TEL>
- <ADR>
- <WORK/>
- <EXTADD>Suite 600</EXTADD>
- <STREET>1899 Wynkoop Street</STREET>
- <LOCALITY>Denver</LOCALITY>
- <REGION>CO</REGION>
- <PCODE>80202</PCODE>
- <CTRY>USA</CTRY>
- </ADR>
- <TEL><HOME/><VOICE/><NUMBER>303-555-1212</NUMBER></TEL>
- <TEL><HOME/><FAX/><NUMBER/></TEL>
- <TEL><HOME/><MSG/><NUMBER/></TEL>
- <ADR>
- <HOME/>
- <EXTADD/>
- <STREET/>
- <LOCALITY>Denver</LOCALITY>
- <REGION>CO</REGION>
- <PCODE>80209</PCODE>
- <CTRY>USA</CTRY>
- </ADR>
- <EMAIL><INTERNET/><PREF/><USERID>stpeter(a)jabber.org</USERID></EMAIL>
- <JABBERID>stpeter(a)jabber.org</JABBERID>
- <DESC>
- More information about me is located on my
- personal website: http://www.saint-andre.com/
- </DESC>
- </vcard>
-
- </user>
- </domain>
+ <!--#include "directory.xml"-->
</section>
<!-- phrases section (under development still) -->
<section name="phrases" description="Speech Phrase Management">
<macros>
<language name="en" sound_path="/snds" tts_engine="cepstral" tts_voice="david">
- <macro name="msgcount">
- <input pattern="(.*)">
- <match>
- <action function="execute" data="sleep(1000)"/>
- <action function="play-file" data="vm-youhave.wav"/>
- <action function="say" data="$1" method="pronounced" type="items"/>
- <action function="play-file" data="vm-messages.wav"/>
- <!-- or -->
- <!--<action function="speak-text" data="you have $1 messages"/>-->
- </match>
- </input>
- </macro>
- <macro name="saydate">
- <input pattern="(.*)">
- <match>
- <action function="say" data="$1" method="pronounced" type="current_date_time"/>
- </match>
- </input>
- </macro>
- <macro name="timespec">
- <input pattern="(.*)">
- <match>
- <action function="say" data="$1" method="pronounced" type="time_measurement"/>
- </match>
- </input>
- </macro>
- <macro name="ip-addr">
- <input pattern="(.*)">
- <match>
- <action function="say" data="$1" method="iterated" type="ip_address"/>
- <action function="say" data="$1" method="pronounced" type="ip_address"/>
- </match>
- </input>
- </macro>
- <macro name="spell">
- <input pattern="(.*)">
- <match>
- <action function="say" data="$1" method="pronounced" type="name_spelled"/>
- </match>
- </input>
- </macro>
- <macro name="spell-phonetic">
- <input pattern="(.*)">
- <match>
- <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
- </match>
- </input>
- </macro>
- <macro name="tts-timeleft">
- <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
- <!-- If the function "break" is encountered all parsing will cease -->
- <input pattern="(\d+):(\d+)">
- <match>
- <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
- <action function="break"/>
- </match>
- <nomatch>
- <action function="speak-text" data="That input was invalid."/>
- </nomatch>
- </input>
- <input pattern="(\d+) min (\d+) sec">
- <match>
- <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
- </match>
- <nomatch>
- <action function="speak-text" data="That input was invalid."/>
- </nomatch>
- </input>
- </macro>
+ <!--#include "lang_en.xml"-->
</language>
<language name="fr" sound_path="/var/sounds/lang/fr/jean" tts_engine="cepstral" tts_voice="jean-pierre">
- <macro name="msgcount">
- <input pattern="(.*)">
- <match>
- <action function="play-file" data="tuas.wav"/>
- <action function="say" data="$1" method="pronounced" type="items"/>
- <action function="play-file" data="messages.wav"/>
- </match>
- </input>
- </macro>
- <macro name="timeleft">
- <input pattern="(\d+):(\d+)">
- <match>
- <action function="speak-text" data="il y a $1 minutes et de $2 secondes de restant"/>
- </match>
- </input>
- </macro>
+ <!--#include "lang_fr.xml"-->
</language>
</macros>
</section>
-</document>
+</document>
Added: freeswitch/trunk/conf/iax.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/iax.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,11 @@
+<configuration name="iax.conf" description="IAX Configuration">
+ <settings>
+ <param name="debug" value="0"/>
+ <!-- <param name="ip" value="1.2.3.4"> -->
+ <param name="port" value="4569"/>
+ <param name="dialplan" value="XML"/>
+ <param name="codec-prefs" value="PCMU@20i,PCMA,speex,L16"/>
+ <param name="codec-master" value="us"/>
+ <param name="codec-rates" value="8"/>
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/ivr.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/ivr.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,39 @@
+<configuration name="ivr.conf" description="IVR menus">
+ <menus>
+ <menu name="main"
+ greet-long="/soundfiles/greet-long.wav"
+ greet-short="/soundfiles/greet-short.wav"
+ invalid-sound="/soundfiles/invalid.wav"
+ exit-sound="/soundfiles/exit.wav" timeout ="15" max-failures="3">
+ <entry action="menu-exit" digits="*"/>
+ <entry action="menu-sub" digits="2" param="menu2"/>
+ <entry action="menu-exec-api" digits="3" param="api arg"/>
+ <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
+ <entry action="menu-back" digits="5"/>
+ <entry action="menu-call-transfer" digits="7" param="888"/>
+ <entry action="menu-sub" digits="8" param="menu8"/>>
+ </menu>
+ <menu name="menu8"
+ greet-long="/soundfiles/greet-long.wav"
+ greet-short="/soundfiles/greet-short.wav"
+ invalid-sound="/soundfiles/invalid.wav"
+ exit-sound="/soundfiles/exit.wav"
+ timeout ="15"
+ max-failures="3">
+ <entry action="menu-back" digits="#"/>
+ <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
+ <entry action="menu-top" digits="*"/>
+ </menu>
+ <menu name="menu2"
+ greet-long="/soundfiles/greet-long.wav"
+ greet-short="/soundfiles/greet-short.wav"
+ invalid-sound="/soundfiles/invalid.wav"
+ exit-sound="/soundfiles/exit.wav"
+ timeout ="15"
+ max-failures="3">
+ <entry action="menu-back" digits="#"/>
+ <entry action="menu-play-sound" digits="4" param="/soundfiles/4.wav"/>
+ <entry action="menu-top" digits="*"/>
+ </menu>
+ </menus>
+</configuration>
Added: freeswitch/trunk/conf/lang_en.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/lang_en.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,71 @@
+<include><!--This line will be ignored it's here to validate the xml and is optional -->
+ <macro name="msgcount">
+ <input pattern="(.*)">
+ <match>
+ <action function="execute" data="sleep(1000)"/>
+ <action function="play-file" data="vm-youhave.wav"/>
+ <action function="say" data="$1" method="pronounced" type="items"/>
+ <action function="play-file" data="vm-messages.wav"/>
+ <!-- or -->
+ <!--<action function="speak-text" data="you have $1 messages"/>-->
+ </match>
+ </input>
+ </macro>
+ <macro name="saydate">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="current_date_time"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="timespec">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="time_measurement"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="ip-addr">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="iterated" type="ip_address"/>
+ <action function="say" data="$1" method="pronounced" type="ip_address"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="spell">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="name_spelled"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="spell-phonetic">
+ <input pattern="(.*)">
+ <match>
+ <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
+ </match>
+ </input>
+ </macro>
+ <macro name="tts-timeleft">
+ <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
+ <!-- If the function "break" is encountered all parsing will cease -->
+ <input pattern="(\d+):(\d+)">
+ <match>
+ <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
+ <action function="break"/>
+ </match>
+ <nomatch>
+ <action function="speak-text" data="That input was invalid."/>
+ </nomatch>
+ </input>
+ <input pattern="(\d+) min (\d+) sec">
+ <match>
+ <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
+ </match>
+ <nomatch>
+ <action function="speak-text" data="That input was invalid."/>
+ </nomatch>
+ </input>
+ </macro>
+</include><!--This line will be ignored it's here to validate the xml and is optional -->
Added: freeswitch/trunk/conf/lang_fr.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/lang_fr.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,18 @@
+<include><!--This line will be ignored it's here to validate the xml and is optional -->
+<macro name="msgcount">
+ <input pattern="(.*)">
+ <match>
+ <action function="play-file" data="tuas.wav"/>
+ <action function="say" data="$1" method="pronounced" type="items"/>
+ <action function="play-file" data="messages.wav"/>
+ </match>
+ </input>
+</macro>
+<macro name="timeleft">
+ <input pattern="(\d+):(\d+)">
+ <match>
+ <action function="speak-text" data="il y a $1 minutes et de $2 secondes de restant"/>
+ </match>
+ </input>
+</macro>
+</include><!--This line will be ignored it's here to validate the xml and is optional -->
Added: freeswitch/trunk/conf/modules.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/modules.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,68 @@
+<configuration name="modules.conf" description="Modules">
+ <modules>
+ <!-- Loggers (I'd load these first) -->
+ <load module="mod_console"/>
+ <!-- <load module="mod_syslog"/> -->
+
+ <!-- Multi-Faceted -->
+ <!-- mod_enum is a dialplan interface, an application interface and an api command interface -->
+ <load module="mod_enum"/>
+
+ <!-- XML Interfaces -->
+ <!-- <load module="mod_xml_rpc"/> -->
+ <!-- <load module="mod_xml_curl"/> -->
+
+ <!-- Event Handlers -->
+ <!-- <load module="mod_cdr"/> -->
+ <!-- <load module="mod_event_multicast"/> -->
+ <!-- <load module="mod_event_socket"/> -->
+ <!-- <load module="mod_xmpp_event"/> -->
+ <!-- <load module="mod_zeroconf"/> -->
+
+ <!-- Directory Interfaces -->
+ <!-- <load module="mod_ldap"/> -->
+
+ <!-- Endpoints -->
+ <!-- <load module="mod_dingaling"/> -->
+ <!--<load module="mod_iax"/>-->
+ <load module="mod_portaudio"/>
+ <load module="mod_sofia"/>
+ <!-- <load module="mod_wanpipe"/> -->
+ <!-- <load module="mod_woomera"/> -->
+
+ <!-- Applications -->
+ <load module="mod_bridgecall"/>
+ <load module="mod_commands"/>
+ <load module="mod_conference"/>
+ <load module="mod_dptools"/>
+ <load module="mod_echo"/>
+ <!--<load module="mod_park"/>-->
+ <load module="mod_playback"/>
+
+ <!-- Dialplan Interfaces -->
+ <!-- <load module="mod_dialplan_directory"/> -->
+ <load module="mod_dialplan_xml"/>
+
+ <!-- Codec Interfaces -->
+ <load module="mod_g711"/>
+ <load module="mod_gsm"/>
+ <!-- <load module="mod_ilbc"/> -->
+ <load module="mod_l16"/>
+ <!-- <load module="mod_speex"/> -->
+
+ <!-- File Format Interfaces -->
+ <load module="mod_sndfile"/>
+ <load module="mod_native_file"/>
+
+ <!-- Timers -->
+ <load module="mod_softtimer"/>
+
+ <!-- Languages -->
+ <!-- <load module="mod_spidermonkey"/> -->
+ <!-- <load module="mod_perl"/> -->
+
+ <!-- ASR /TTS -->
+ <!-- <load module="mod_cepstral"/> -->
+ <!-- <load module="mod_rss"/> -->
+ </modules>
+</configuration>
Added: freeswitch/trunk/conf/portaudio.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/portaudio.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,33 @@
+<configuration name="portaudio.conf" description="Soundcard Endpoint">
+ <settings>
+ <!-- indev, outdev, ringdev:
+ partial case sensitive string match on something in the name
+ or the device number prefixed with # eg "#1" (or blank for default) -->
+
+ <!-- device to use for input -->
+ <param name="indev" value=""/>
+ <!-- device to use for output -->
+ <param name="outdev" value=""/>
+
+ <!--device to use for inbound ring -->
+ <!--<param name="ringdev" value=""/>-->
+ <!--File to play as the ring sound -->
+ <!--<param name="ring-file" value="/sounds/ring.wav"/>-->
+ <!--Number of seconds to pause between rings -->
+ <!--<param name="ring-interval" value="5"/>-->
+
+ <!--file to play when calls are on hold-->
+ <!--<param name="hold-file" value="/sounds/holdmusic.wav"/>-->
+ <!--Timer to use for hold music (i'd leave this one commented)-->
+ <!--<param name="timer-name" value="soft"/>-->
+
+ <!--Default dialplan and caller-id info -->
+ <param name="dialplan" value="XML"/>
+ <param name="cid-name" value="FreeSwitch"/>
+ <param name="cid-num" value="5555551212"/>
+
+ <!--audio sample rate and interval -->
+ <param name="sample-rate" value="8000"/>
+ <param name="codec-ms" value="20"/>
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/rss.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/rss.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,7 @@
+<configuration name="rss.conf" description="RSS Parser">
+ <feeds>
+ <!-- Just download the files to wherever and refer to them here -->
+ <!-- <feed name="Slash Dot">/home/rss/rss.rss</feed> -->
+ <!-- <feed name="News Forge">/home/rss/newsforge.rss</feed> -->
+ </feeds>
+</configuration>
Added: freeswitch/trunk/conf/sofia.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/sofia.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,54 @@
+<configuration name="sofia.conf" description="sofia Endpoint">
+ <profiles>
+ <profile name="$${domain}">
+ <registrations>
+ <!-- <registration name="asterlink">
+ <param name="register-scheme" value="Digest"/>
+ <param name="register-realm" value=""/>
+ <param name="register-username" value="1001"/>
+ <param name="register-password" value="nhy65tgb"/>
+ <param name="register-from" value="sip:1001@208.64.200.40"/>
+ <param name="register-to" value="sip:1001@conference.freeswitch.org"/>
+ <param name="register-proxy" value="sip:conference.freeswitch.org:5060"/>
+ <param name="register-frequency" value="20"/>
+ </registration> -->
+ </registrations>
+ <settings>
+ <param name="debug" value="1"/>
+ <param name="rfc2833-pt" value="101"/>
+ <param name="sip-port" value="5060"/>
+ <param name="dialplan" value="XML"/>
+ <param name="dtmf-duration" value="100"/>
+ <param name="codec-prefs" value="$${default_codecs}"/>
+ <param name="codec-ms" value="20"/>
+ <param name="use-rtp-timer" value="true"/>
+ <param name="rtp-timer-name" value="soft"/>
+ <param name="rtp-ip" value="auto"/>
+ <param name="sip-ip" value="auto"/>
+
+ <!--Uncomment to set all inbound calls to no media mode-->
+ <!--<param name="inbound-no-media" value="true"/>-->
+
+ <!--Uncomment to let calls hit the dialplan *before* you decide if the codec is ok-->
+ <!--<param name="inbound-late-negotiation" value="true"/>-->
+
+ <!-- this lets anything register -->
+ <!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
+ <param name="accept-blind-reg" value="true"/>
+
+ <!--<param name="auth-calls" value="true"/>-->
+ <!-- on authed calls, authenticate *all* the packets not just invite -->
+ <!--<param name="auth-all-packets" value="true"/>-->
+
+ <!-- optional ; -->
+ <!-- <param name="ext-rtp-ip" value="stun:stun.server.com"/>-->
+ <!-- <param name="ext-rtp-ip" value="100.101.102.103"/> -->
+ <!-- VAD choose one (out is a good choice); -->
+ <!-- <param name="vad" value="in"/> -->
+ <!-- <param name="vad" value="out"/> -->
+ <!-- <param name="vad" value="both"/> -->
+ <!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
+ </settings>
+ </profile>
+ </profiles>
+</configuration>
Added: freeswitch/trunk/conf/spidermonkey.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/spidermonkey.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,7 @@
+<configuration name="spidermonkey.conf" description="Spider Monkey JavaScript Plug-Ins">
+ <modules>
+ <load module="mod_spidermonkey_teletone"/>
+ <load module="mod_spidermonkey_core_db"/>
+ <!--<load module="mod_spidermonkey_odbc"/>-->
+ </modules>
+</configuration>
Added: freeswitch/trunk/conf/switch.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/switch.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,13 @@
+<configuration name="switch.conf" description="Modules">
+ <settings>
+ <!--Most channels to allow at once -->
+ <param name="max-sessions" value="1000"/>
+ </settings>
+ <!--Any variables defined here will be available in every channel, in the dialplan etc -->
+ <variables>
+ <variable name="uk-ring" value="%(400,200,400,450);%(400,2200,400,450)"/>
+ <variable name="us-ring" value="%(2000, 4000, 440.0, 480.0)"/>
+ <variable name="bong-ring" value="v=4000;>=0;+=2;#(60,0);v=2000;%(940,0,350,440)"/>
+ </variables>
+</configuration>
+
Added: freeswitch/trunk/conf/syslog.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/syslog.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,17 @@
+<configuration name="syslog.conf" description="Syslog Logger">
+ <!-- SYSLOG -->
+ <!-- emerg - system is unusable -->
+ <!-- alert - action must be taken immediately -->
+ <!-- crit - critical conditions -->
+ <!-- err - error conditions -->
+ <!-- warning - warning conditions -->
+ <!-- notice - normal, but significant, condition -->
+ <!-- info - informational message -->
+ <!-- debug - debug-level message -->
+ <settings>
+ <param name="ident" value="freeswitch"/>
+ <param name="facility" value="user"/>
+ <param name="format" value="${time} - ${message}"/>
+ <param name="level" value="debug,info,warning-alert"/>
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/wanpipe.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/wanpipe.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,31 @@
+<configuration name="wanpipe.conf" description="Sangoma Wanpipe Endpoint">
+ <settings>
+ <param name="debug" value="1"/>
+ <param name="dialplan" value="XML"/>
+ <param name="mtu" value="320"/>
+ <param name="dtmf-on" value="800"/>
+ <param name="dtmf-off" value="100"/>
+ <param name="supress-dtmf-tone" value="yes"/>
+ </settings>
+ <span>
+ <param name="span" value="1"/>
+ <param name="node" value="cpe"/>
+ <!-- <param name="switch" value="ni2"/> -->
+ <param name="switch" value="dms100"/>
+ <!-- <param name="switch" value="lucent5e"/> -->
+ <!-- <param name="switch" value="att4ess"/> -->
+ <!-- <param name="switch" value="euroisdn"/> -->
+ <!-- <param name="switch" value="gr303eoc"/> -->
+ <!-- <param name="switch" value="gr303tmc"/> -->
+ <param name="dp" value="national"/>
+ <!-- <param name="dp" value="international"/> -->
+ <!-- <param name="dp" value="local"/> -->
+ <!-- <param name="dp" value="private"/> -->
+ <!-- <param name="dp" value="unknown"/> -->
+ <param name="l1" value="ulaw"/>
+ <!-- <param name="l1" value="alaw"/> -->
+ <param name="bchan" value="1-23"/>
+ <param name="dchan" value="24"/>
+ <param name="dialplan" value="XML"/>
+ </span>
+</configuration>
Added: freeswitch/trunk/conf/woomera.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/woomera.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,11 @@
+<configuration name="woomera.conf" description="Woomera Endpoint">
+ <settings>
+ <param name="debug" value="0"/>
+ </settings>
+ <interface>
+ <param name="host" value="localhost"/>
+ <param name="port" value="42420"/>
+ <param name="audio-ip" value="127.0.0.1"/>
+ <param name="dialplan" value="XML"/>
+ </interface>
+</configuration>
Added: freeswitch/trunk/conf/xml_curl.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/xml_curl.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,11 @@
+<configuration name="xml_curl.conf" description="cURL XML Gateway">
+ <settings>
+ <!-- The url to a gateway cgi that can generate xml similar to
+ what's in this file only on-the-fly (leave it commented if you dont
+ need it) -->
+ <!-- one or more |-delim of configuration|directory|dialplan -->
+ <!--<param name="gateway-url" value="http://www.mydomain.com/test.cgi" bindings="dialplan"/>-->
+ <!-- set this to provide authentication credentials to the server -->
+ <!--<param name="gateway-credentials" value="muser:mypass"/>-->
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/xml_rpc.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/xml_rpc.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,10 @@
+<configuration name="xml_rpc.conf" description="XML RPC">
+ <settings>
+ <!-- The port where you want to run the http service (default 8080) -->
+ <param name="http-port" value="8080"/>
+ <!-- if all 3 of the following params exist all http traffic will require auth -->
+ <param name="auth-realm" value="freeswitch"/>
+ <param name="auth-user" value="freeswitch"/>
+ <param name="auth-pass" value="works"/>
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/xmpp_event.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/xmpp_event.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,8 @@
+<configuration name="xmpp_event.conf" description="XMPP Event Handler">
+ <settings>
+ <param name="#debug" value="1"/>
+ <param name="jid" value="freeswitch(a)my.jabber.com/me"/>
+ <param name="passwd" value="mypass"/>
+ <param name="target-jid" value="freeswitch(a)reader.org/him"/>
+ </settings>
+</configuration>
Added: freeswitch/trunk/conf/zeroconf.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/zeroconf.conf.xml Mon Jan 22 20:12:47 2007
@@ -0,0 +1,6 @@
+<configuration name="zeroconf.conf" description="Zeroconf Event Handler">
+ <settings>
+ <param name="publish" value="yes"/>
+ <param name="browse" value="_sip._udp"/>
+ </settings>
+</configuration>
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Mon Jan 22 20:12:47 2007
@@ -781,13 +781,204 @@
return &root->xml;
}
+static switch_size_t read_line(int fd, char *buf, switch_size_t len) {
+ char c, *p;
+ int cur;
+ switch_size_t total = 0;
+
+ p = buf;
+ while (total + sizeof(c) < len && (cur = read(fd, &c, sizeof(c))) > 0) {
+ total += cur;
+ *p++ = c;
+ if (c == '\n') {
+ break;
+ }
+ }
+
+ *p++ = '\0';
+ return total;
+}
+
+static char *expand_vars(char *buf, char *ebuf, switch_size_t elen, switch_size_t *newlen)
+{
+ char *var, *val;
+ char *rp = buf;
+ char *wp = ebuf;
+ char *ep = ebuf + elen - 1;
+
+ if (!(var = strstr(rp, "$${"))) {
+ *newlen = strlen(buf);
+ return buf;
+ }
+
+ while(*rp && wp < ep) {
+
+ if (*rp == '$' && *(rp+1) == '$' && *(rp+2) == '{') {
+ char *e = strchr(rp, '}');
+
+ if (e) {
+ rp += 3;
+ var = rp;
+ *e++ = '\0';
+ rp = e;
+ if ((val = switch_core_get_variable(var))) {
+ char *p;
+ for(p = val; p && *p && wp <= ep; p++) {
+ *wp++ = *p;
+ }
+ }
+ }
+
+ }
+
+ *wp++ = *rp++;
+ }
+ *wp++ = '\0';
+ *newlen = strlen(ebuf);
+
+ return ebuf;
+
+}
+
+static int preprocess(const char *file, int new_fd, int rlevel)
+{
+ int old_fd, close_fd = -1;
+ char *new_file = NULL;
+ switch_size_t cur = 0, ml = 0;
+ char *q, *cmd, buf[2048], ebuf[8192];
+
+ if ((old_fd = open(file, O_RDONLY, 0)) < 0) {
+ return old_fd;
+ }
+
+ if (rlevel > 100) {
+ return -1;
+ }
+
+ if (new_fd < 0) {
+ if (!(new_file = switch_mprintf("%s/freeswitch.registry", SWITCH_GLOBAL_dirs.log_dir))) {
+ goto done;
+ }
+
+ if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 0)) < 0) {
+ goto done;
+ }
+ close_fd = new_fd;
+ }
+
+ while((cur = read_line(old_fd, buf, sizeof(buf))) > 0) {
+ char *arg, *e;
+ char *bp = expand_vars(buf, ebuf, sizeof(ebuf), &cur);
+
+ /* we ignore <include> or </include> for the sake of validators */
+ if (strstr(buf, "<include>") || strstr(buf, "</include>")) {
+ continue;
+ }
+
+ if (ml) {
+ if ((e = strstr(buf, "-->"))) {
+ ml = 0;
+ bp = e + 3;
+ cur = strlen(bp);
+ } else {
+ continue;
+ }
+ }
+
+ if ((cmd = strstr(bp, "<!--#"))) {
+ write(new_fd, bp, cmd - bp);
+ if ((e = strstr(cmd, "-->"))) {
+ *e = '\0';
+ e += 3;
+ write(new_fd, e, strlen(e));
+ } else {
+ ml++;
+ }
+
+ cmd += 5;
+ if ((e = strchr(cmd, '\r')) || (e = strchr(cmd, '\n'))) {
+ *e = '\0';
+ }
+
+ if ((arg = strchr(cmd, ' '))) {
+ *arg++ = '\0';
+ if ((q = strchr(arg, '"'))) {
+ char *qq = q+1;
+
+ if ((qq = strchr(qq, '"'))) {
+ *qq = '\0';
+ arg = q+1;
+ }
+ }
+
+ if (!strcasecmp(cmd, "set")) {
+ char *name = arg;
+ char *val = strchr(name, '=');
+
+ if (val) {
+ char *ve = val++;
+ while(*val && *val == ' ') {
+ val++;
+ }
+ *ve-- = '\0';
+ while(*ve && *ve == ' ') {
+ *ve-- = '\0';
+ }
+ }
+
+ if (name && val) {
+ switch_core_set_variable(name, val);
+ }
+
+ } else if (!strcasecmp(cmd, "include")) {
+ char *fme = NULL, *ifile = arg;
+
+ if (!switch_is_file_path(ifile)) {
+ fme = switch_mprintf("%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, arg);
+ ifile = fme;
+ }
+ if (preprocess(ifile, new_fd, rlevel + 1) < 0) {
+ fprintf(stderr, "Error including %s (%s)\n", ifile, strerror(errno));
+ }
+ switch_safe_free(fme);
+ } /* else NO OP */
+ }
+
+ continue;
+ }
+
+ write(new_fd, bp, cur);
+ }
+
+ close(old_fd);
+
+ if (close_fd > -1) {
+ close(close_fd);
+ new_fd = open(new_file, O_RDONLY, 0);
+ }
+
+ done:
+
+ switch_safe_free(new_file);
+
+ if (new_fd < 0) {
+ return old_fd;
+ }
+
+ return new_fd;
+}
+
// a wrapper for switch_xml_parse_fd that accepts a file name
SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file)
{
- int fd = open(file, O_RDONLY, 0);
- switch_xml_t xml = switch_xml_parse_fd(fd);
+ int fd = -1;
+ switch_xml_t xml = NULL;
+
+ if ((fd = preprocess(file, -1, 0)) > -1) {
+ xml = switch_xml_parse_fd(fd);
+ close(fd);
+ }
- if (fd >= 0) close(fd);
return xml;
}
1
0