[Freeswitch-users] CDR Gateways

Nazim Agabekov nazim.agabekov at gmail.com
Fri Jan 22 15:38:49 PST 2010


Hello Fernando,

I have coded a small xml_cdr FCGI logger for this purpose, it receives
mod_xml_cdr's data and inserts it into mysql table.
Basically it's a FastCgi and Libxml's XPATH hacked together. Example
config file is pretty easy to understand.
Software is of pre-alfa quality, but works. You could get the svn
snapshot from blog.buta-tech.com.

Best Regards,
Nazim Aghabayov


On 01/22/2010 08:26 AM, FERNANDO VILLARROEL wrote:
> Dear All.
>
> I have defined various gateways in ~/sip-profiles/external
>
> My questions is if a gateway named foo that send calls from diferents IP address like x.x.x.x and x.x.x.y. How i can doing a group for both ip address where i can doing later a sql like accountcode=foo?
>
> In this moment if i need know the traffic of customer foo, i should doing two differents cdr, one for every ip address.
>
> It's fine or i can doing of different way?
>
> I hope anyone could me explain how i can doing. 
>
> my gateway foo.xml
>
> <include>
>     <gateway name="foo">
>       <param name="username" value="foo"/>
>       <param name="password" value="foo"/>
>       <param name="realm" value="x.x.x.x"/>
>       <param name="register" value="false"/>
>       <param name="context" value="public"/>
>     </gateway>
> </include>
>
> foo1.xml
>
> <include>
>     <gateway name="foo1">
>       <param name="username" value="foo1"/>
>       <param name="password" value="foo1"/>
>       <param name="realm" value="x.x.x.y"/>
>       <param name="register" value="false"/>
>       <param name="context" value="public"/>
>     </gateway>
> </include>
>
> Both gateways foo and foo1 are the same customer
>
> my cdr_csv.conf.xml
>
> <configuration name="cdr_csv.conf" description="CDR CSV Format">
>   <settings>
>     <!-- 'cdr-csv' will always be appended to log-base -->
>     <!--<param name="log-base" value="/var/log"/>-->
>     <param name="default-template" value="sql"/>
>     <!-- This is like the info app but after the call is hung up -->
>     <!--<param name="debug" value="true"/>-->
>     <param name="rotate-on-hup" value="false"/>
>     <!-- may be a b or ab -->
>     <param name="legs" value="ab"/>
>   </settings>
>   <templates>
>         <template name="sql">INSERT INTO v_cdr (v_id, caller_id_name, caller_id_number, destination_number, context, start_stamp, answer_stamp, end_stamp,
> duration, billsec, hangup_cause, uuid, bleg_uuid, accountcode, read_codec, write_codec, remote_media_ip, network_addr) VALUES ("{v_id}", "${caller_id_name}"
> ,"${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}"
> ,"${uuid}","${bleg_uuid}", "${accountcode}", "${read_codec}", "${write_codec}", "${remote_media_ip}", "${network_addr}");</template>
>
> The argument accountcode on my database is Blank or None for all records of gateways.
> Regards.
>
>
>       
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>   





More information about the FreeSWITCH-users mailing list