mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 21:44:51 +00:00
tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@724 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d0955e5e8d
commit
aabfeee994
@ -1572,25 +1572,26 @@ static void switch_core_standard_on_hangup(switch_core_session *session)
|
|||||||
|
|
||||||
static void switch_core_standard_on_ring(switch_core_session *session)
|
static void switch_core_standard_on_ring(switch_core_session *session)
|
||||||
{
|
{
|
||||||
switch_dialplan_interface *dialplan_interface;
|
switch_dialplan_interface *dialplan_interface = NULL;
|
||||||
switch_caller_profile *caller_profile;
|
switch_caller_profile *caller_profile;
|
||||||
switch_caller_extension *extension;
|
switch_caller_extension *extension;
|
||||||
|
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Standard RING %s\n", switch_channel_get_name(session->channel));
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Standard RING %s\n", switch_channel_get_name(session->channel));
|
||||||
|
|
||||||
|
|
||||||
if (switch_channel_test_flag(session->channel, CF_OUTBOUND)) {
|
|
||||||
switch_channel_set_state(session->channel, CS_TRANSMIT);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((caller_profile = switch_channel_get_caller_profile(session->channel)) == 0) {
|
if ((caller_profile = switch_channel_get_caller_profile(session->channel)) == 0) {
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't get profile!\n");
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't get profile!\n");
|
||||||
switch_channel_set_state(session->channel, CS_HANGUP);
|
switch_channel_set_state(session->channel, CS_HANGUP);
|
||||||
} else {
|
} else {
|
||||||
if ((dialplan_interface = switch_loadable_module_get_dialplan_interface(caller_profile->dialplan)) == 0) {
|
if (!switch_strlen_zero(caller_profile->dialplan)) {
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't get dialplan [%s]!\n", caller_profile->dialplan);
|
dialplan_interface = switch_loadable_module_get_dialplan_interface(caller_profile->dialplan);
|
||||||
switch_channel_set_state(session->channel, CS_HANGUP);
|
}
|
||||||
|
|
||||||
|
if (!dialplan_interface) {
|
||||||
|
if (switch_channel_test_flag(session->channel, CF_OUTBOUND)) {
|
||||||
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "No Dialplan, changing state to TRANSMIT\n");
|
||||||
|
switch_channel_set_state(session->channel, CS_TRANSMIT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((extension = dialplan_interface->hunt_function(session)) != 0) {
|
if ((extension = dialplan_interface->hunt_function(session)) != 0) {
|
||||||
switch_channel_set_caller_extension(session->channel, extension);
|
switch_channel_set_caller_extension(session->channel, extension);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user