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:
Anthony Minessale committed 2009-02-23 16:31:59 +00:00
1 parent 26caa46c97
commit 9886f369c3
22 files changed
+97 -38

No files matched your search

@@ -604,7 +604,7 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", conference->name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", "CS_ROUTING");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", conference->count == 1 ? "early" : "confirmed");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", conference->count == 1 ? "outbound" : "inbound");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "presence-call-direction", conference->count == 1 ? "outbound" : "inbound");
switch_event_fire(&event);
}
+1 -1
View File
@@ -617,7 +617,7 @@ static void send_presence(fifo_node_t *node)
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "channel-state", wait_count > 0 ? "CS_ROUTING" : "CS_HANGUP");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", node->name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", wait_count > 0 ? "early" : "terminated");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", "inbound");
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "presence-call-direction", "inbound");
switch_event_fire(&event);
}
}
+2 -2
View File
@@ -757,7 +757,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -1412,7 +1412,7 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
}
dest = argv[0];
if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
if ((session = switch_core_session_request(&channel_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
char *dialplan = globals.dialplan;
@@ -1569,7 +1569,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(dingaling_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(dingaling_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile = NULL;
@@ -2547,7 +2547,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
status = LDL_STATUS_FALSE;
goto done;
}
if ((session = switch_core_session_request(dingaling_endpoint_interface, NULL)) != 0) {
if ((session = switch_core_session_request(dingaling_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
switch_core_session_add_stream(session, NULL);
if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object))) != 0) {
+2 -2
View File
@@ -702,7 +702,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(iax_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(iax_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -1008,7 +1008,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_iax_runtime)
switch_core_session_t *session;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "New Inbound Channel %s!\n", iaxevent->ies.calling_name);
if ((session = switch_core_session_request(iax_endpoint_interface, NULL)) != 0) {
if ((session = switch_core_session_request(iax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
switch_core_session_add_stream(session, NULL);
if ((tech_pvt = (private_t *) switch_core_session_alloc(session, sizeof(private_t))) != 0) {
channel = switch_core_session_get_channel(session);
@@ -214,7 +214,7 @@ static switch_status_t channel_on_init(switch_core_session_t *session)
if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND) && !switch_test_flag(tech_pvt, TFLAG_BLEG)) {
if (!(b_session = switch_core_session_request(loopback_endpoint_interface, NULL))) {
if (!(b_session = switch_core_session_request(loopback_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failure.\n");
goto end;
}
@@ -648,7 +648,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_channel_pre_answer(channel);
}
if ((*new_session = switch_core_session_request(loopback_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(loopback_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
+2 -1
View File
@@ -483,7 +483,8 @@ FSConnection::FSConnection(OpalCall & call, FSEndPoint & endpoint, switch_caller
{
opal_private_t *tech_pvt;
FSManager & mgr = (FSManager &) endpoint.GetManager();
m_fsSession = switch_core_session_request(mgr.GetSwitchInterface(), NULL);
m_fsSession = switch_core_session_request(mgr.GetSwitchInterface(),
outbound_profile ? SWITCH_CALL_DIRECTION_OUTBOUND : SWITCH_CALL_DIRECTION_INBOUND, NULL);
m_fsChannel = switch_core_session_get_channel(m_fsSession);
tech_pvt = (opal_private_t *) switch_core_session_alloc(m_fsSession, sizeof(*tech_pvt));
@@ -708,7 +708,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(portaudio_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(portaudio_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -1668,7 +1668,7 @@ static switch_status_t place_call(char **argv, int argc, switch_stream_handle_t
}
dest = argv[0];
if ((session = switch_core_session_request(portaudio_endpoint_interface, NULL)) != 0) {
if ((session = switch_core_session_request(portaudio_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
char *dialplan = globals.dialplan;
@@ -399,7 +399,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(reference_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(reference_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -1852,7 +1852,7 @@ int new_inbound_channel(private_t * p)
switch_core_session_t *session = NULL;
switch_channel_t *channel = NULL;
if ((session = switch_core_session_request(skypiax_endpoint_interface, NULL)) != 0) {
if ((session = switch_core_session_request(skypiax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
switch_core_session_add_stream(session, NULL);
channel = switch_core_session_get_channel(session);
skypiax_tech_init(tech_pvt, session);
+2 -2
View File
@@ -506,7 +506,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t * sess
switch_memory_pool_t ** pool,
switch_originate_flag_t flags)
{
if ((*new_session = switch_core_session_request(skypiax_endpoint_interface, pool)) != 0) {
if ((*new_session = switch_core_session_request(skypiax_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -1139,7 +1139,7 @@ int new_inbound_channel(private_t * tech_pvt)
switch_core_session_t *session = NULL;
switch_channel_t *channel = NULL;
if ((session = switch_core_session_request(skypiax_endpoint_interface, NULL)) != 0) {
if ((session = switch_core_session_request(skypiax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
switch_core_session_add_stream(session, NULL);
channel = switch_core_session_get_channel(session);
skypiax_tech_init(tech_pvt, session);
+1 -1
View File
@@ -2335,7 +2335,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
*new_session = NULL;
if (!(nsession = switch_core_session_request(sofia_endpoint_interface, pool))) {
if (!(nsession = switch_core_session_request(sofia_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error Creating Session\n");
goto error;
}
+2 -2
View File
@@ -4016,9 +4016,9 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
if (sofia_endpoint_interface) {
if (sofia_test_pflag(profile, PFLAG_CALLID_AS_UUID)) {
session = switch_core_session_request_uuid(sofia_endpoint_interface, NULL, sip->sip_call_id->i_id);
session = switch_core_session_request_uuid(sofia_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL, sip->sip_call_id->i_id);
} else {
session = switch_core_session_request(sofia_endpoint_interface, NULL);
session = switch_core_session_request(sofia_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL);
}
}
+2 -2
View File
@@ -830,7 +830,7 @@ static int sofia_presence_resub_callback(void *pArg, int argc, char **argv, char
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "unique-id", uuid);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "answer-state", state);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "astate", state);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call-direction", direction);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "presence-call-direction", direction);
}
switch_event_fire(&event);
@@ -1030,7 +1030,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
if (helper->event) {
switch_stream_handle_t stream = { 0 };
const char *direction = switch_str_nil(switch_event_get_header(helper->event, "call-direction"));
const char *direction = switch_str_nil(switch_event_get_header(helper->event, "presence-call-direction"));
const char *uuid = switch_str_nil(switch_event_get_header(helper->event, "unique-id"));
const char *state = switch_str_nil(switch_event_get_header(helper->event, "channel-state"));
const char *event_status = switch_str_nil(switch_event_get_header(helper->event, "status"));
+2 -2
View File
@@ -202,7 +202,7 @@ static switch_call_cause_t unicall_incoming_channel(zap_sigmsg_t *sigmsg, switch
*sp = NULL;
if (!(session = switch_core_session_request(openzap_endpoint_interface, NULL)))
if (!(session = switch_core_session_request(openzap_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)))
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Initialization Error!\n");
return ZAP_FAIL;
@@ -1540,7 +1540,7 @@ static switch_call_cause_t unicall_outgoing_channel(switch_core_session_t *sessi
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "unicall_outgoing_channel(%p)\n", (void *) session);
if ((*new_session = switch_core_session_request(unicall_endpoint_interface, pool)) == NULL)
if ((*new_session = switch_core_session_request(unicall_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) == NULL)
{
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}