add switch_core_session_get_id function
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9899 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f04b1ade4a
commit
584669c25e
|
@ -522,6 +522,8 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(_Inout_ switch_core_ses
|
|||
*/
|
||||
SWITCH_DECLARE(uint32_t) switch_core_session_count(void);
|
||||
|
||||
SWITCH_DECLARE(uint32_t) switch_core_session_get_id(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Provide the current session_id
|
||||
\return the total number of allocated sessions since core startup
|
||||
|
|
|
@ -964,6 +964,11 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void)
|
|||
return session_manager.session_count;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(uint32_t) switch_core_session_get_id(switch_core_session_t *session)
|
||||
{
|
||||
return session->id;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_size_t) switch_core_session_id(void)
|
||||
{
|
||||
return session_manager.session_id;
|
||||
|
|
|
@ -1199,6 +1199,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
sent_ring = 1;
|
||||
}
|
||||
/* When the AND operator is being used, and fail_on_single_reject is set, a hangup indicates that the call should fail. */
|
||||
|
||||
if ((to = (uint8_t) ((switch_timestamp(NULL) - start) >= (time_t) timelimit_sec))
|
||||
|| (fail_on_single_reject && hups)) {
|
||||
idx = IDX_TIMEOUT;
|
||||
|
@ -1282,9 +1283,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
}
|
||||
|
||||
} else {
|
||||
switch_yield(1000);
|
||||
switch_yield(10000);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
notready:
|
||||
|
|
Loading…
Reference in New Issue