add new state for CDR and leg_delay_start originate var and fix FSCORE-315

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12403 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-03-04 04:19:33 +00:00
parent 1908898362
commit d7a12df53f
8 changed files with 104 additions and 34 deletions
@@ -165,7 +165,7 @@ static void write_cdr(const char *path, const char *log_line)
switch_mutex_unlock(fd->mutex);
}
static switch_status_t my_on_hangup(switch_core_session_t *session)
static switch_status_t my_on_reporting(switch_core_session_t *session)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_status_t status = SWITCH_STATUS_SUCCESS;
@@ -286,9 +286,14 @@ static switch_state_handler_table_t state_handlers = {
/*.on_init */ NULL,
/*.on_routing */ NULL,
/*.on_execute */ NULL,
/*.on_hangup */ my_on_hangup,
/*.on_hangup */ NULL,
/*.on_exchange_media */ NULL,
/*.on_soft_execute */ NULL
/*.on_soft_execute */ NULL,
/*.on_consume_media*/ NULL,
/*.on_hibernate*/ NULL,
/*.on_reset*/ NULL,
/*.on_park*/ NULL,
/*.on_reporting*/ my_on_reporting
};
@@ -371,7 +371,7 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
return (retval);
}
static switch_status_t my_on_hangup(switch_core_session_t *session)
static switch_status_t my_on_reporting(switch_core_session_t *session)
{
switch_xml_t cdr;
switch_channel_t *channel = switch_core_session_get_channel(session);
@@ -406,7 +406,7 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
switch_thread_rwlock_rdlock(globals.rwlock);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Entering my_on_hangup\n");
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Entering my_on_reporting\n");
rad_config = my_radius_init();
@@ -705,9 +705,14 @@ static const switch_state_handler_table_t state_handlers = {
/*.on_init */ NULL,
/*.on_routing */ my_on_routing,
/*.on_execute */ NULL,
/*.on_hangup */ my_on_hangup,
/*.on_hangup */ NULL,
/*.on_exchange_media */ NULL,
/*.on_soft_execute */ NULL
/*.on_soft_execute */ NULL,
/*.on_consume_media*/ NULL,
/*.on_hibernate*/ NULL,
/*.on_reset*/ NULL,
/*.on_park*/ NULL,
/*.on_reporting*/ my_on_reporting
};
SWITCH_MODULE_LOAD_FUNCTION(mod_radius_cdr_load)
+8 -3
View File
@@ -66,7 +66,7 @@ static size_t httpCallBack(char *buffer, size_t size, size_t nitems, void *outst
return size * nitems;
}
static switch_status_t my_on_hangup(switch_core_session_t *session)
static switch_status_t my_on_reporting(switch_core_session_t *session)
{
switch_xml_t cdr;
char *xml_text = NULL;
@@ -264,9 +264,14 @@ static switch_state_handler_table_t state_handlers = {
/*.on_init */ NULL,
/*.on_routing */ NULL,
/*.on_execute */ NULL,
/*.on_hangup */ my_on_hangup,
/*.on_hangup */ NULL,
/*.on_exchange_media */ NULL,
/*.on_soft_execute */ NULL
/*.on_soft_execute */ NULL,
/*.on_consume_media*/ NULL,
/*.on_hibernate*/ NULL,
/*.on_reset*/ NULL,
/*.on_park*/ NULL,
/*.on_reporting*/ my_on_reporting
};
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)