mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-05 04:35:46 +00:00
...
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4950 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
50f3d21e76
commit
b15aff2c11
@ -1433,7 +1433,7 @@ static int on_ringing(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
|
|||||||
static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *pevent)
|
static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *pevent)
|
||||||
{
|
{
|
||||||
char name[128];
|
char name[128];
|
||||||
switch_core_session_t *session;
|
switch_core_session_t *session = NULL;
|
||||||
switch_channel_t *channel;
|
switch_channel_t *channel;
|
||||||
struct channel_map *chanmap;
|
struct channel_map *chanmap;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -1441,7 +1441,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
|
|||||||
switch_mutex_lock(globals.channel_mutex);
|
switch_mutex_lock(globals.channel_mutex);
|
||||||
|
|
||||||
chanmap = spri->private_info;
|
chanmap = spri->private_info;
|
||||||
if (switch_core_session_locate(chanmap->map[pevent->ring.channel])) {
|
if ((session = switch_core_session_locate(chanmap->map[pevent->ring.channel]))) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "--Duplicate Ring on channel s%dc%d (ignored)\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "--Duplicate Ring on channel s%dc%d (ignored)\n",
|
||||||
spri->span, pevent->ring.channel);
|
spri->span, pevent->ring.channel);
|
||||||
switch_core_session_rwunlock(session);
|
switch_core_session_rwunlock(session);
|
||||||
|
@ -225,7 +225,10 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cause = endpoint_interface->io_routines->outgoing_channel(session, outgoing_profile, new_session, pool)) == SWITCH_CAUSE_SUCCESS) {
|
if ((cause = endpoint_interface->io_routines->outgoing_channel(session, outgoing_profile, new_session, pool)) != SWITCH_CAUSE_SUCCESS) {
|
||||||
|
return cause;
|
||||||
|
}
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
for (ptr = session->event_hooks.outgoing_channel; ptr; ptr = ptr->next) {
|
for (ptr = session->event_hooks.outgoing_channel; ptr; ptr = ptr->next) {
|
||||||
if ((status = ptr->outgoing_channel(session, caller_profile, *new_session)) != SWITCH_STATUS_SUCCESS) {
|
if ((status = ptr->outgoing_channel(session, caller_profile, *new_session)) != SWITCH_STATUS_SUCCESS) {
|
||||||
@ -233,14 +236,13 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return cause;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate outgoing channel interface for %s\n", endpoint_name);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate outgoing channel interface for %s\n", endpoint_name);
|
||||||
return SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED;
|
return SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(*new_session != NULL);
|
||||||
|
|
||||||
if (*new_session) {
|
if (*new_session) {
|
||||||
switch_caller_profile_t *profile = NULL, *peer_profile = NULL, *cloned_profile = NULL;
|
switch_caller_profile_t *profile = NULL, *peer_profile = NULL, *cloned_profile = NULL;
|
||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user