mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 04:57:05 +00:00
add direction col to sql db, add direction param to session_create, log dtmf digits to digits_dialed variable for cdr
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12244 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
26caa46c97
commit
9886f369c3
22 files changed
+97
-38
No files matched your search
@@ -269,6 +269,8 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
|
||||
|
||||
switch_assert(channel != NULL);
|
||||
|
||||
switch_channel_set_flag(channel, CF_OUTBOUND);
|
||||
|
||||
forwardvar = switch_channel_get_variable(channel, SWITCH_MAX_FORWARDS_VARIABLE);
|
||||
if (!switch_strlen_zero(forwardvar)) {
|
||||
forwardval = atoi(forwardvar) - 1;
|
||||
@@ -1043,7 +1045,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_uuid(switch_core_session
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(switch_endpoint_interface_t
|
||||
*endpoint_interface, switch_memory_pool_t **pool, const char *use_uuid)
|
||||
*endpoint_interface,
|
||||
switch_call_direction_t direction,
|
||||
switch_memory_pool_t **pool,
|
||||
const char *use_uuid)
|
||||
{
|
||||
switch_memory_pool_t *usepool;
|
||||
switch_core_session_t *session;
|
||||
@@ -1091,10 +1096,14 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_uuid(switch_
|
||||
session = switch_core_alloc(usepool, sizeof(*session));
|
||||
session->pool = usepool;
|
||||
|
||||
if (switch_channel_alloc(&session->channel, session->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_channel_alloc(&session->channel, direction, session->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
abort();
|
||||
}
|
||||
|
||||
if (direction == SWITCH_CALL_DIRECTION_OUTBOUND) {
|
||||
switch_channel_set_flag(session->channel, CF_OUTBOUND);
|
||||
}
|
||||
|
||||
switch_channel_init(session->channel, session, CS_NEW, 0);
|
||||
|
||||
/* The session *IS* the pool you may not alter it because you have no idea how
|
||||
@@ -1154,7 +1163,9 @@ SWITCH_DECLARE(switch_size_t) switch_core_session_id(void)
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(const char *endpoint_name, switch_memory_pool_t **pool)
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(const char *endpoint_name,
|
||||
switch_call_direction_t direction,
|
||||
switch_memory_pool_t **pool)
|
||||
{
|
||||
switch_endpoint_interface_t *endpoint_interface;
|
||||
switch_core_session_t *session;
|
||||
@@ -1164,7 +1175,7 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(cons
|
||||
return NULL;
|
||||
}
|
||||
|
||||
session = switch_core_session_request(endpoint_interface, pool);
|
||||
session = switch_core_session_request(endpoint_interface, direction, pool);
|
||||
|
||||
UNPROTECT_INTERFACE(endpoint_interface);
|
||||
|
||||
|
||||
Reference in new issue
Block a user