Hi,

 

We use MSSQL and in our channels table currently its not update channe-state status. Though in my logs I could see the below messages

 

2013-02-18 17:04:02.767161 [DEBUG] sofia.c:6282 Channel sofia/internal/100@fsfailover.uk01.com entering state [terminated][487]

2013-02-18 17:04:02.767161 [DEBUG] switch_channel.c:2950 (sofia/internal/100@fsfailover.uk01.com) Callstate Change EARLY -> HANGUP

 

Not sure where these states are being saved. I need to invoke my lua script during HANGUP case currently lua script works till call gets established, after that I don’t see its hitting any lua scripts written by us.

Please suggest what can we do now? Many thanks.

 

Regards,

Archana

 

From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Eliot Gable
Sent: 18 February 2013 14:37
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Multicast in freeswitch

 

On Mon, Feb 18, 2013 at 4:17 AM, Archana Venugopan <a.venugopan@mundio.com> wrote:

Hi,

LUA script is written by us. Ya its being lauched from dialplan. The script establishes call to mobile and our deskphone. So far it dint update the DB, it just checks the DB and establishes call.

 

 

This is probably what you want: http://wiki.freeswitch.org/wiki/Mod_lua#session:setHangupHook

 

As for updating the database, if you have a PostgreSQL database, you can enable the core pgsql support and use native pgsql calls from lua to access the database.  

 

Also, keep in mind that FS keeps a channels table in the database and if you just want to read the state of sessions up in FS, if you use core ODBC or core PGSQL support, you can just read the channels table for the current call state information.