Hi Karsten,
Thank you for the reply. You are correct. I am trying to retrieve billing information from a basic call. I am calling lua script in the dialplan. When a call comes in, FS hands it over to lua script for processing.
<include>
<extension>
<condition field="destination_number" expression="^(15[0-9][0-9])$">
<action application="lua" data="fs_billing.lua"/>
</condition>
</extension>
</include>
I did the same thing with ESL where I listened for CHANNEL_ANSWER and CHANNEL_HANGUP events then fetched answer and hangup times and that worked just fine. I would like to do the same thing with lua.
Thanks