mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
*) Add support for unified config:
When config file does not exist the system will browse freeswitch.conf (if it exists) for an embedded file. Embeded files denoted with +file.conf Terminated by either another [+XXX] or EOF eg [+iax.conf] ... [+exosip.conf] ... EOF *) Change default examples to use this method *) Fix small bug in core to pass along failure when outgoing channel fails. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@663 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
b1150960c1
commit
9bfd7ae25a
17 files changed
+241
-162
No files matched your search
@@ -73,6 +73,7 @@ static struct {
|
||||
int dtmf_on;
|
||||
int dtmf_off;
|
||||
int supress_dtmf_tone;
|
||||
int configured_spans;
|
||||
char *dialplan;
|
||||
} globals;
|
||||
|
||||
@@ -351,6 +352,12 @@ static switch_status wanpipe_on_transmit(switch_core_session *session)
|
||||
static switch_status wanpipe_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
|
||||
switch_core_session **new_session)
|
||||
{
|
||||
if (!globals.configured_spans) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Error No Spans Configured.\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if ((*new_session = switch_core_session_request(&wanpipe_endpoint_interface, NULL))) {
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel;
|
||||
@@ -1177,7 +1184,7 @@ static int config_wanpipe(int reload)
|
||||
}
|
||||
|
||||
|
||||
|
||||
globals.configured_spans = 0;
|
||||
for(current_span = 1; current_span < MAX_SPANS; current_span++) {
|
||||
if (SPANS[current_span]) {
|
||||
|
||||
@@ -1195,6 +1202,7 @@ static int config_wanpipe(int reload)
|
||||
}
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Launch span %d\n", current_span);
|
||||
pri_thread_launch(&SPANS[current_span]->spri);
|
||||
globals.configured_spans++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user