[Freeswitch-users] little hangup problem - prepaid application

Sergey Okhapkin sos at sokhapkin.dyndns.org
Mon Jan 25 13:20:35 PST 2010


To my experience most of "interesting" billing-related variables are created 
not when channel is hung up, but later, when channel enters REPORTING state. 
I use mod_cdr_csv to access these variables:

cdr_csv.conf.xml:

<param name="default-template" value="lua"/>

<template name="lua">${lua(onhangup.lua)}</template>

onhangup.lua script accesses required variables like "billsec", does final 
calculations and writes CDR to DB.


On Monday 25 January 2010, Christian Löschenkohl wrote:
> hello
>
> i try to implement a prepaid application and mod_nibblebill isn't my first
> choice. the implementation is quite ok so far. now my problem:
>
> - the call setup is normal (a little scripting)
> - the calls get ended by sched_hangup (max duration of calls)
> - then i would like to execute a script with api_hangup_hook
>    in this last script i would also like to use some channel vars
> (a-number, call duration after answer) but i can't do that
>
> i try to use an outbound event socket script but i couldn't get the
> variables/information i need to calculate the amount charge
>
> any hint here
>
> br






More information about the FreeSWITCH-users mailing list