I have no had time to do it but if you want to start a patch I can work on getting it in.<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 3, 2012 at 6:56 PM, Seven Du <span dir="ltr"><<a href="mailto:dujinfang@gmail.com" target="_blank">dujinfang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
Any update on this?
</div><div><br></div><div>How about just fire a SWITCH_EVENT_CDR with raw event headers so mod like mod_cdr_pg_csv can listen to it and write to db without parsing back the XML?</div><div><br></div><div>
Thanks.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><div>-- </div><div>Seven Du</div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig" target="_blank">Sparrow</a></div><div><br></div></div>
</font></span><div class="HOEnZb"><div class="h5">
<p style="color:#a0a0a8">On Tuesday, June 12, 2012 at 10:31 AM, Anthony Minessale wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
<span><div><div><p>B is the right choice.<br>
The size of the body has no limit.</p>
<p>How bout, if a certian header exists in the event with a local file path, then the the mod opens the referenced file for delivery; Otherwise it uses the body if it exists.<br>
</p>
<div>On Jun 11, 2012 8:39 PM, "Mariusz Czulada" <<a href="mailto:manieq@wp.eu" target="_blank">manieq@wp.eu</a>> wrote:<br type="attribution"><blockquote type="cite"><div>
Hi all,<br>
<br>
I was thinking about sending CDRs via HTTP in a same or similar way mod_xml_cdr does. I consider implementing this (unless someone else is working on it) but first wanted to discuss with you the best approach.<br>
<br>
<br>
A. All in mod_conference<br>
<br>
This would require to copy many fragments of code from mod_xml_cdr into mod_conference. Also same configuration parameters used in xml_cdr must be processed and used for sending data. The advantage for this solution is that everything related to this mechanism is included in this module. Drawback: if something in mod_xml_cdr requires fixing or extending, probably the same changes should by applied in related parts of mod_conference.<br>
<br>
<br>
B. mod_conference builds, mod_xml_cdr sends data<br>
<br>
For this solution I'll give more details.<br>
1. New event type should be added (like SWITCH_EVENT_CDR)<br>
2. When a module (in this case: mod_conference) wants to store CDR via HTTP it must fire an event of that type and:<br>
- "Event-Subclass" set (like "conference")<br>
- Only common headers are needed, plus...<br>
- "Content-Type" and "Content-Length" must be set<br>
- CDR data must be build as XML in a module and added as an event content.<br>
3. mod_xml_cdr will listen to this event type.<br>
4. For each event subclass which mod_xml_cdr must must react, configuration file will contain a set of params same as for generic channel CDRs.<br>
5. If subclass matches configuration, mod_xml_cdr reads data from event content and sends them according to configuration.<br>
<br>
Changes in mod_conference:<br>
- one new parameter for each profile (like "cdr-via-event=yes|no")<br>
- if "yes" then xml must be build even if "cdr-log-dir" is unset<br>
- if "yes", then an event must be fired as described above<br>
<br>
Changes in mod_xml_cdr:<br>
- extra parameters from configuration to be parsed (like '<settings subclass="conference">....</settings>')<br>
- bind to SWITCH_EVENT_CDR<br>
- if 'Event-Subclass' matches configuration, a content of the event will be sent via HTTP (probably most of 'my_on_report' routine bellow 'try to post it to the web server' comment will be reused)<br>
<br>
A [small] drawback is that it makes an indirect module dependency, but we already have such situations (like mod_shout needed to record a conference in mp3).<br>
<br>
Advantages are:<br>
- one can create an external tool for handling this type of event (to store it directly in db or send it with other protocols)<br>
- this mechanism can be easily reused in other modules if needed; maybe in mod_callcenter, maybe in other components. No further changes in mod_xml_cdr should be needed.<br>
<br>
What is unknown to me is a maximum size of event content. Conference CDR XMLs can be quite big - will it be a problem to send it this way?<br>
<br>
<br>
I think the second solution is better and more universal but I'd like to hear your opinions about this case.<br>
<br>
Regards,<br>
<br>
Mariusz<br>
<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></blockquote></div>
</div><div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></div>
<div><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a></div>
<div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a></div>
<div><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></div><div><br></div><div>Join Us At ClueCon - Aug 7-9, 2012</div><div><br></div><div>FreeSWITCH-dev mailing list</div><div><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a></div>
<div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a></div>
<div><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>