]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Added patch to close JIRA MODEVENT-28
authorChris Parker <cparker@segv.org>
Mon, 15 Dec 2008 19:42:02 +0000 (19:42 +0000)
committerChris Parker <cparker@segv.org>
Mon, 15 Dec 2008 19:42:02 +0000 (19:42 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10780 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c

index abe41543b3b76d70cc90c28996f254d7438dac67..d471a66e8893bfed6a923391c239d5554e89f65b 100644 (file)
@@ -155,6 +155,13 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
                return SWITCH_STATUS_FALSE;
        }
 
+       if(channel) {
+               if(switch_true(switch_channel_get_variable(channel, "disable_radius_start"))) {
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Start\n");
+                       return SWITCH_STATUS_SUCCESS;
+               }
+       }
+
        switch_thread_rwlock_rdlock(globals.rwlock);
 
        rad_config = my_radius_init();
@@ -385,6 +392,14 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
                return SWITCH_STATUS_FALSE;
        }
 
+
+        if(channel) {
+                if(switch_true(switch_channel_get_variable(channel, "disable_radius_stop"))) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Stop\n");
+                        return SWITCH_STATUS_SUCCESS;
+                }
+        }
+
        switch_thread_rwlock_rdlock(globals.rwlock);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Entering my_on_hangup\n");