Hi, I'm curious how others handle CDRs from FreeSWITCH. I need them to end up in a MySQL database and the easiest way I've found of achieving this is to use the mod_xml_cdr module to call a PHP script that inserts the row. Is there a preferred way of achieving this? Also, I only need ONE cdr entry per call, for billing purposes, so what I end up doing is having process_cdr as "b_only" which works great for successful calls. However, a call that is not successfully bridged results in two HTTP POST calls to my script one with is_outbound = true (as I'd expect for the b leg) but also what appears to be the a leg of the CDR (despite requesting b_only) Is this the intended behaviour of "b_only" Regards, Ross
Ross, For the time being, I do batch imports from the Master.csv every morning, using Perl with DBI. I don't need live inserts. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 12/09/2010 à 22:10, Ross McKillop a écrit :
Hi,
I'm curious how others handle CDRs from FreeSWITCH. I need them to end up in a MySQL database and the easiest way I've found of achieving this is to use the mod_xml_cdr module to call a PHP script that inserts the row. Is there a preferred way of achieving this?
Also, I only need ONE cdr entry per call, for billing purposes, so what I end up doing is having process_cdr as "b_only" which works great for successful calls. However, a call that is not successfully bridged results in two HTTP POST calls to my script one with is_outbound = true (as I'd expect for the b leg) but also what appears to be the a leg of the CDR (despite requesting b_only)
Is this the intended behaviour of "b_only"
Regards, Ross _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Can you pastebin a dialplan snippet and samples of CDRs in success and failure scenarios? -MC On Sun, Sep 12, 2010 at 1:10 PM, Ross McKillop <ross@ossiantelecom.co.uk>wrote:
Hi,
I'm curious how others handle CDRs from FreeSWITCH. I need them to end up in a MySQL database and the easiest way I've found of achieving this is to use the mod_xml_cdr module to call a PHP script that inserts the row. Is there a preferred way of achieving this?
Also, I only need ONE cdr entry per call, for billing purposes, so what I end up doing is having process_cdr as "b_only" which works great for successful calls. However, a call that is not successfully bridged results in two HTTP POST calls to my script one with is_outbound = true (as I'd expect for the b leg) but also what appears to be the a leg of the CDR (despite requesting b_only)
Is this the intended behaviour of "b_only"
Regards, Ross _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Ross, I'm doing something similar, with the xml_curl module and php, but I use both legs. It's probably a lot more complicated than it could be, but it suits our purpose. We are doing PBX hosting, so we get situations where an inbound call is transferred twice, then gets transferred back out to a cell phone on another trunk, or an outbound call is then transferred to a different external extension. I also want to try for 1 entry per call where practical. Problem is, it isn't always practical. I capture both legs. If it's a b-leg, some processing is done to extract useful information, and it is entered into the blegs table. When an a-leg is processed, a short timer elapses (to allow any accompanying b-legs to be inserted), before a query is done to retrieve all the b-legs that go with the call (match on uuid of a-leg). If there is only an a-leg, or an a-leg and one b-leg, the values are combined and a single entry is made into the cdr table. Some filtering is done in the b-leg query to discard dead legs of a ring group and so on. If there are multiple b-legs, the a-leg is recorded more or less as-is, and the b-legs are also recorded, with matching uuids to tie them together. When we run our bills, calls with multiple entries appear as a nested row. This keeps things simple, but still allows for accurate records when a call takes multiple hops. It's handy to be able to look at the phone bill and see which calls are being passed around an office. It also allows us to bill things accurately in a metered-usage scenario. -Tim Ross McKillop wrote:
Hi,
I'm curious how others handle CDRs from FreeSWITCH. I need them to end up in a MySQL database and the easiest way I've found of achieving this is to use the mod_xml_cdr module to call a PHP script that inserts the row. Is there a preferred way of achieving this?
Personally I collect both a and b legs using mod_xml_cdr. The a leg is used for customer stats and billing. This is because we have multiple routes so the a leg represents the number of calls the customer makes and the response sent back to them. The b legs are used so I can see which routes were tried for each a leg, and what their results were. Both are used to generate stats and graphs showing how the service is looking inbound and outbound. Steve on iPhone On 12 Sep 2010, at 21:10, Ross McKillop <ross@ossiantelecom.co.uk> wrote:
Hi,
I'm curious how others handle CDRs from FreeSWITCH. I need them to end up in a MySQL database and the easiest way I've found of achieving this is to use the mod_xml_cdr module to call a PHP script that inserts the row. Is there a preferred way of achieving this?
Also, I only need ONE cdr entry per call, for billing purposes, so what I end up doing is having process_cdr as "b_only" which works great for successful calls. However, a call that is not successfully bridged results in two HTTP POST calls to my script one with is_outbound = true (as I'd expect for the b leg) but also what appears to be the a leg of the CDR (despite requesting b_only)
Is this the intended behaviour of "b_only"
Regards, Ross _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
David Ponzone
-
Michael Collins
-
Ross McKillop
-
Steven Ayre
-
Tim St. Pierre