<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][15287] </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=15287">15287</a></dd>
<dt>Author</dt> <dd>ledr</dd>
<dt>Date</dt> <dd>2009-10-30 03:32:01 -0500 (Fri, 30 Oct 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>busy with mod_pcli</pre>

<h3>Added Paths</h3>
<ul>
<li>freeswitch/trunk/contrib/ledr/c/mod_pcli/</li>
<li><a href="#freeswitchtrunkcontribledrcmod_pclimod_pclic">freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_pcli.c</a></li>
<li><a href="#freeswitchtrunkcontribledrcmod_pclipcliconfxml">freeswitch/trunk/contrib/ledr/c/mod_pcli/pcli.conf.xml</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>freeswitch/trunk/contrib/ledr/c/mod_li/</li>
<li><a href="#freeswitchtrunkcontribledrcmod_pcliliconfxml">freeswitch/trunk/contrib/ledr/c/mod_pcli/li.conf.xml</a></li>
<li><a href="#freeswitchtrunkcontribledrcmod_pclimod_lic">freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_li.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkcontribledrcmod_pclifromrev15286freeswitchtrunkcontribledrcmod_li"></a>
<div class="copfile"><h4>Copied: freeswitch/trunk/contrib/ledr/c/mod_pcli (from rev 15286, freeswitch/trunk/contrib/ledr/c/mod_li)</h4></div>
<a id="freeswitchtrunkcontribledrcmod_pcli"></a>
<div class="propset"><h4>Property changes: freeswitch/trunk/contrib/ledr/c/mod_pcli</h4>
<pre class="diff"><span>
<span class="cx">Name: svn:mergeinfo
</span><span class="cx">   + 
</span></span></pre></div>
<a id="freeswitchtrunkcontribledrcmod_pcliliconfxml"></a>
<div class="delfile"><h4>Deleted: freeswitch/trunk/contrib/ledr/c/mod_pcli/li.conf.xml</h4></div>
<a id="freeswitchtrunkcontribledrcmod_pclimod_lic"></a>
<div class="delfile"><h4>Deleted: freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_li.c</h4></div>
<a id="freeswitchtrunkcontribledrcmod_pclimod_pclicfromrev15286freeswitchtrunkcontribledrcmod_limod_lic"></a>
<div class="copfile"><h4>Copied: freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_pcli.c (from rev 15286, freeswitch/trunk/contrib/ledr/c/mod_li/mod_li.c) (0 => 15287)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_pcli.c                                (rev 0)
+++ freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_pcli.c        2009-10-30 08:32:01 UTC (rev 15287)
</span><span class="lines">@@ -0,0 +1,345 @@
</span><ins>+/* 
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005-2009, Anthony Minessale II &lt;anthm@freeswitch.org&gt;
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an &quot;AS IS&quot; basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II &lt;anthm@freeswitch.org&gt;
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * 
+ * Leon de Rooij &lt;leon@toyos.nl&gt;
+ *
+ *
+ * mod_pcli.c -- Packet Cable Lawful Intercept
+ *
+ */
+#include &lt;switch.h&gt;
+
+#define PCLI_HEADER_LEN 32
+#define PCLI_HEADER_LEN_DIRECTION 2
+#define PCLI_HEADER_LEN_CALL_ID 10
+#define PCLI_HEADER_LEN_SWITCH_ID 4
+#define PCLI_HEADER_LEN_INI_ID 16
+
+
+/*
+typedef enum {
+        MEDIA_DIRECTION_UNKNOWN,
+        MEDIA_DIRECTION_FROM_TARGET,
+        MEDIA_DIRECTION_TO_TARGET,
+        MEDIA_DIRECTION_MONO_MODE
+} pcli_media_direction_t;
+*/
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_li_load);
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_li_shutdown);
+SWITCH_MODULE_DEFINITION(mod_li, mod_li_load, mod_li_shutdown, NULL);
+
+SWITCH_STANDARD_APP(li_start_function);
+
+static struct {
+        switch_memory_pool_t *pool;
+        int switch_id;
+        char *local_addr;
+        int local_port;
+        char *remote_addr;
+        int remote_port;
+        switch_socket_t *socket;
+} li_globals;
+
+typedef struct {
+        switch_core_session_t *session;
+        char *ini_id;
+} li_session_helper_t;
+
+/* config item validations */
+static switch_xml_config_int_options_t config_opt_valid_switch_id = { SWITCH_TRUE, 0, SWITCH_TRUE, 15 };
+static switch_xml_config_string_options_t config_opt_valid_addr = { NULL, 0, &quot;.+&quot; };
+static switch_xml_config_int_options_t config_opt_valid_port = { SWITCH_TRUE, 0, SWITCH_TRUE, 65535 };
+
+/* config items */
+static switch_xml_config_item_t instructions[] = {
+        SWITCH_CONFIG_ITEM(&quot;switch_id&quot;, SWITCH_CONFIG_INT, CONFIG_RELOADABLE, &amp;li_globals.switch_id,
+                (void*)0, &amp;config_opt_valid_switch_id, NULL, NULL),
+        SWITCH_CONFIG_ITEM(&quot;local_addr&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &amp;li_globals.local_addr,
+                &quot;localhost&quot;, &amp;config_opt_valid_addr, NULL, NULL),
+        SWITCH_CONFIG_ITEM(&quot;local_port&quot;, SWITCH_CONFIG_INT, CONFIG_RELOADABLE, &amp;li_globals.local_port,
+                (void*)10741, &amp;config_opt_valid_port, NULL, NULL),
+        SWITCH_CONFIG_ITEM(&quot;remote_addr&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOADABLE, &amp;li_globals.remote_addr,
+                &quot;localhost&quot;, &amp;config_opt_valid_addr, NULL, NULL),
+        SWITCH_CONFIG_ITEM(&quot;remote_port&quot;, SWITCH_CONFIG_INT, CONFIG_RELOADABLE, &amp;li_globals.remote_port,
+                (void*)10741, &amp;config_opt_valid_port, NULL, NULL),
+  SWITCH_CONFIG_ITEM_END()
+};
+
+static switch_status_t do_config(switch_bool_t reload)
+{
+        switch_socket_t *socket = NULL;
+        switch_sockaddr_t *local_sockaddr;
+        switch_sockaddr_t *remote_sockaddr;
+
+        if (switch_xml_config_parse_module_settings(&quot;li.conf&quot;, reload, instructions) != SWITCH_STATUS_SUCCESS) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Could not open li.conf\n&quot;);
+                return SWITCH_STATUS_FALSE;
+        }
+
+        /* for now, only init port on startup, fix reload later !! */
+        if (!reload) {
+
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Trying to create a udp socket !!\n&quot;);
+
+                if (switch_sockaddr_info_get(&amp;local_sockaddr, li_globals.local_addr, SWITCH_UNSPEC, li_globals.local_port, 0, li_globals.pool) != SWITCH_STATUS_SUCCESS || !local_sockaddr) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Local Address Error!\n&quot;);
+                        return SWITCH_STATUS_FALSE;
+                }
+
+                if (switch_socket_create(&amp;socket, switch_sockaddr_get_family(local_sockaddr), SOCK_DGRAM, 0, li_globals.pool) != SWITCH_STATUS_SUCCESS) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Socket Error!\n&quot;);
+                        return SWITCH_STATUS_FALSE;
+                }
+
+                if (switch_socket_opt_set(socket, SWITCH_SO_REUSEADDR, 1) != SWITCH_STATUS_SUCCESS) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Socket Error!\n&quot;);
+                        return SWITCH_STATUS_FALSE;
+                }
+
+                if (switch_socket_bind(socket, local_sockaddr) != SWITCH_STATUS_SUCCESS) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Bind Error!\n&quot;);
+                        return SWITCH_STATUS_FALSE;
+                }
+
+                li_globals.socket = socket;
+
+                /* TEST SENDING A PACKET */
+                if (switch_sockaddr_info_get(&amp;remote_sockaddr, li_globals.remote_addr, SWITCH_UNSPEC, li_globals.remote_port, 0, li_globals.pool) != SWITCH_STATUS_SUCCESS || !remote_sockaddr) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Remote Address Error!\n&quot;);
+                        return SWITCH_STATUS_FALSE;
+                }
+
+                switch_size_t len = sizeof(&quot;X&quot;);
+                switch_socket_sendto(li_globals.socket, remote_sockaddr, 0, &quot;X&quot;, &amp;len);
+
+        }
+
+        return SWITCH_STATUS_SUCCESS;
+}
+
+/* called when SWITCH_EVENT_RELOADXML is sent to this module */
+static void reload_event_handler(switch_event_t *event)
+{
+  do_config(SWITCH_TRUE);
+}
+
+//static switch_status_t gen_pcli_header(uint32_t *pcli_heqader, pcli_media_direction_t media_direction, int call_id, int switch_id, int ini_id)
+static switch_status_t gen_pcli_header(uint32_t *pcli_header, uint8_t media_direction, uint16_t call_id, uint8_t switch_id, uint16_t ini_id)
+{
+        *pcli_header = 0;
+
+        /* some sanity checks */
+
+  if (media_direction &gt; 3) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Invalid media direction, may only be 0-3\n&quot;);
+                return SWITCH_STATUS_FALSE;
+        }
+
+        if (call_id &gt; 1023) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Invalid call_id, may only be 0-1023\n&quot;);
+                return SWITCH_STATUS_FALSE;
+        }
+
+        if (switch_id &gt; 15) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Invalid switch_id, may only be 0-15\n&quot;);
+                return SWITCH_STATUS_FALSE;
+        }
+
+        /* ini_id needs no check as it may use the full uint16_t */
+
+        *pcli_header |= (media_direction);
+        *pcli_header |= (call_id &lt;&lt; 2);
+        *pcli_header |= (switch_id &lt;&lt; 12);
+  *pcli_header |= (ini_id &lt;&lt; 16);
+
+        return SWITCH_STATUS_SUCCESS;
+}
+
+/* necessary for hooking to SWITCH_EVENT_RELOADXML */
+static switch_event_node_t *NODE = NULL;
+
+static switch_bool_t li_callback(switch_media_bug_t *bug, void *user_data, switch_abc_type_t type)
+{
+//        li_session_helper_t *li_session_helper = (li_session_helper_t *) user_data;
+
+        switch (type) {
+        case SWITCH_ABC_TYPE_INIT:
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; INIT\n&quot;);
+                break;
+
+        case SWITCH_ABC_TYPE_READ_PING:
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; PING\n&quot;);
+                break;
+
+        case SWITCH_ABC_TYPE_CLOSE:
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; CLOSE\n&quot;);
+                break;
+
+        case SWITCH_ABC_TYPE_READ:
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; READ\n&quot;);
+                break;
+
+        case SWITCH_ABC_TYPE_WRITE:
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; WRITE\n&quot;);
+                break;
+
+        case SWITCH_ABC_TYPE_READ_REPLACE:
+                {
+                        switch_frame_t *rframe = switch_core_media_bug_get_read_replace_frame(bug);
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; READ_REPLACE seq[%u] ssrc[%lu] packetlen[%lu] rate [%lu] samples [%lu]\n&quot;,
+                                (unsigned)rframe-&gt;seq, (unsigned long)rframe-&gt;ssrc, (unsigned long)rframe-&gt;packetlen, (unsigned long)rframe-&gt;rate, (unsigned long)rframe-&gt;samples);
+switch_size_t packetlength = sizeof(rframe-&gt;packet);
+switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;&gt;&gt;&gt; [%lu]\n&quot;, (unsigned long)packetlength);
+
+                }
+                break;
+
+        case SWITCH_ABC_TYPE_WRITE_REPLACE:
+                {
+                        switch_frame_t *rframe = switch_core_media_bug_get_write_replace_frame(bug);
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;--&gt; WRITE_REPLACE seq[%u] ssrc[%lu] packetlen[%lu] rate [%lu] samples[%lu]\n&quot;,
+                                (unsigned)rframe-&gt;seq, (unsigned long)rframe-&gt;ssrc, (unsigned long)rframe-&gt;packetlen, (unsigned long)rframe-&gt;rate, (unsigned long)rframe-&gt;samples);
+switch_size_t packetlength = sizeof(rframe-&gt;packet);
+switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;&gt;&gt;&gt; [%lu]\n&quot;, (unsigned long)packetlength);
+
+                }
+                break;
+        }
+
+        return SWITCH_TRUE;
+}
+
+SWITCH_STANDARD_APP(li_start_function)
+{
+    switch_media_bug_t *bug;
+    switch_status_t status;
+    switch_channel_t *channel;
+    li_session_helper_t *li_session_helper;
+                const char *p;
+
+    if (session == NULL)
+        return;
+
+    channel = switch_core_session_get_channel(session);
+
+    /* Is this channel already set? */
+    bug = (switch_media_bug_t *) switch_channel_get_private(channel, &quot;_li_&quot;);
+    /* If yes */
+    if (bug != NULL) {
+        /* If we have a stop remove audio bug */
+        if (strcasecmp(data, &quot;stop&quot;) == 0) {
+            switch_channel_set_private(channel, &quot;_li_&quot;, NULL);
+            switch_core_media_bug_remove(session, &amp;bug);
+            return;
+        }
+
+        /* We have already started */
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Cannot run 2 at once on the same channel!\n&quot;);
+
+        return;
+    }
+
+                /* create a new li_session_helper */
+    li_session_helper = (li_session_helper_t *) switch_core_session_alloc(session, sizeof(li_session_helper_t));
+
+                /* make session available from li_session_helper */
+    li_session_helper-&gt;session = session;
+
+                /* get LI_ID and store in li_session_helper */
+                if ((p = switch_channel_get_variable(channel, &quot;LI_ID&quot;)) &amp;&amp; switch_true(p)) {
+                        li_session_helper-&gt;ini_id = switch_core_session_strdup(session, p);
+                } else {
+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No LI_ID was set!\n&quot;);
+                        return;
+                }
+
+                /* add the bug */
+    //status = switch_core_media_bug_add(session, li_callback, li_session_helper, 0, SMBF_BOTH, &amp;bug);
+    //status = switch_core_media_bug_add(session, li_callback, li_session_helper, 0, SMBF_READ_STREAM | SMBF_WRITE_STREAM, &amp;bug);
+    status = switch_core_media_bug_add(session, li_callback, li_session_helper, 0, SMBF_READ_REPLACE | SMBF_WRITE_REPLACE, &amp;bug);
+    //status = switch_core_media_bug_add(session, li_callback, li_session_helper, 0, SMBF_READ_REPLACE, &amp;bug);
+
+    if (status != SWITCH_STATUS_SUCCESS) {
+        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Failure hooking to stream\n&quot;);
+        return;
+    }
+
+    switch_channel_set_private(channel, &quot;_li_&quot;, bug);
+}
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_li_load)
+{
+    switch_application_interface_t *app_interface;
+
+                /* initialize li_globals struct */
+                memset(&amp;li_globals, 0, sizeof(li_globals));
+
+                /* make the pool available from li_globals */
+                li_globals.pool = pool;
+
+                /* do config */
+                do_config(SWITCH_FALSE);
+
+    /* connect my internal structure to the blank pointer passed to me */
+    *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+
+                /* make the li application available to the system */
+    SWITCH_ADD_APP(app_interface, &quot;li&quot;, &quot;Lawful Intercept&quot;, &quot;Lawful Intercept&quot;, li_start_function, &quot;&lt;start&gt;&quot;, SAF_NONE);
+
+                /* subscribe to reloadxml event, and hook it to reload_event_handler */
+                if ((switch_event_bind_removable(modname, SWITCH_EVENT_RELOADXML, NULL, reload_event_handler, NULL, &amp;NODE) != SWITCH_STATUS_SUCCESS)) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Couldn't bind event!\n&quot;);
+                        return SWITCH_STATUS_TERM;
+                }
+
+                /* say it */
+    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Lawful Intercept enabled\n&quot;);
+
+    /* indicate that the module should continue to be loaded */
+    return SWITCH_STATUS_SUCCESS;
+}
+
+
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_li_shutdown)
+{
+    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Lawful Intercept disabled\n&quot;);
+
+/* TODO DESTROY THE SOCKET HERE ! */
+
+    return SWITCH_STATUS_SUCCESS;
+}
+
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4:
+ */
</ins></span></pre></div>
<a id="freeswitchtrunkcontribledrcmod_pclimod_pclic"></a>
<div class="propset"><h4>Property changes: freeswitch/trunk/contrib/ledr/c/mod_pcli/mod_pcli.c</h4>
<pre class="diff"><span>
<span class="cx">Name: svn:mergeinfo
</span><span class="cx">   + 
</span></span></pre></div>
<a id="freeswitchtrunkcontribledrcmod_pclipcliconfxmlfromrev15286freeswitchtrunkcontribledrcmod_liliconfxml"></a>
<div class="copfile"><h4>Copied: freeswitch/trunk/contrib/ledr/c/mod_pcli/pcli.conf.xml (from rev 15286, freeswitch/trunk/contrib/ledr/c/mod_li/li.conf.xml) (0 => 15287)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/ledr/c/mod_pcli/pcli.conf.xml                                (rev 0)
+++ freeswitch/trunk/contrib/ledr/c/mod_pcli/pcli.conf.xml        2009-10-30 08:32:01 UTC (rev 15287)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;configuration name=&quot;li.conf&quot; description=&quot;Lawful Intercept Configuration&quot;&gt;
+
+  &lt;settings&gt;
+    &lt;param name=&quot;switch_id&quot; value=&quot;0&quot;/&gt;
+    &lt;!-- &lt;param name=&quot;method&quot; value=&quot;bug&quot;/&gt; --&gt;
+    &lt;param name=&quot;local_addr&quot; value=&quot;172.31.1.5&quot;/&gt;
+    &lt;param name=&quot;local_port&quot; value=&quot;8000&quot;/&gt;
+    &lt;param name=&quot;remote_addr&quot; value=&quot;172.31.1.4&quot;/&gt;
+    &lt;param name=&quot;remote_port&quot; value=&quot;8000&quot;/&gt;
+  &lt;/settings&gt;
+
+&lt;/configuration&gt;
</ins></span></pre></div>
<a id="freeswitchtrunkcontribledrcmod_pclipcliconfxml"></a>
<div class="propset"><h4>Property changes: freeswitch/trunk/contrib/ledr/c/mod_pcli/pcli.conf.xml</h4>
<pre class="diff"><span>
<span class="cx">Name: svn:mergeinfo
</span><span class="cx">   + 
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>