Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Help with lua and channel variable processing


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
lcm at marshap.com
Guest





PostPosted: Sun May 31, 2009 11:51 am    Post subject: [Freeswitch-users] Help with lua and channel variable proces Reply with quote

I would like to process the ${billsec} variable in the conf/autoload_configs/cdr_csv.conf.xml file below, returning a different value for the INSERT command.

I already have written a lua function which takes an integer value from ${billsec} and returns a string. It is stored in freeswitch/scripts as sec2time.lua.

Do I change the sql template below to …, ${lua(billsec)}, …?

<configuration name="cdr_csv.conf" description="CDR CSV Format">
<settings>
<param name="default-template" value="sql"/>
<param name="rotate-on-hup" value="true"/>
<param name="legs" value="a"/>
</settings>
<templates>
<template name="sql">INSERT INTO cdr VALUES ("${caller_id_name}","${caller_id_number}","${destination_number}","${context}"
,"${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}",...
</templates>
</configuration>

Thanks, Lars
Back to top
brian at freeswitch.org
Guest





PostPosted: Sun May 31, 2009 11:22 pm    Post subject: [Freeswitch-users] Help with lua and channel variable proces Reply with quote

Nope those aren't expanded there. Can you not post process this?

/b

On May 31, 2009, at 11:50 AM, Larry Marshall wrote:
Quote:
Do I change the sql template below to …, ${lua(billsec)}, …?


Brian West
brian@freeswitch.org (brian@freeswitch.org)



-- Meet us at ClueCon! http://www.cluecon.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services