Question Answertime variable?
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call? For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks. --------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
billseconds or bill_msec would be the one to turn to. On Wed, Nov 30, 2011 at 4:22 AM, Thomas Hoellriegel <admin@blindi.net> wrote:
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call?
For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 all, i have a acoount on a phonebankingservice. If I send the characters, then I only hear the sounds coming. But not the Phone Banking Service here is my extension: <extension name="phonebanking_login" > <condition field="destination_number" expression="^701$"> <action application="send_dtmf" data="3312262146WW22331332@100"/> <action application="start_dtmf" /> <action application="bridge" data="sofia/gateway/festnetz/08925007676"/> </condition> </extension> Can you see what is wrong please? thanks. --------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
You are sending the dtmf not queueing the dtmf. Try "queue_dtmf" instead of "send_dtmf". -MC On Wed, Nov 30, 2011 at 7:30 AM, Thomas Hoellriegel <admin@blindi.net>wrote:
Hi all, i have a acoount on a phonebankingservice. If I send the characters, then I only hear the sounds coming. But not the Phone Banking Service
here is my extension: <extension name="phonebanking_login" > <condition field="destination_number" expression="^701$"> <action application="send_dtmf" data="3312262146WW22331332@100**"/> <action application="start_dtmf" /> <action application="bridge" data="sofia/gateway/festnetz/**08925007676"/>
</condition> </extension>
Can you see what is wrong please? thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/**listinfo/blinde-misc<http://www.blindi.net/mailman/listinfo/blinde-misc>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 Michael, Thanks for you reply. Now the following problem occurs: The queue_dtmf sent to bleg. But queue_dtmf send the digits before the channel is answerd. The characters are sent to the channel, while it ringing. <action application="export" data="nolocal:execute_on_answer=queue_dtmf 121231W333"/> sent the tones to aleg. send_dtmf with this construct, is not working. --------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
Sounds like the early media is fooling queue_dtmf. You could try using execute_on_answer and send_dtmf together. -MC On Wed, Nov 30, 2011 at 6:39 PM, Thomas Hoellriegel <admin@blindi.net>wrote:
Hi Michael,
Thanks for you reply. Now the following problem occurs: The queue_dtmf sent to bleg. But queue_dtmf send the digits before the channel is answerd. The characters are sent to the channel, while it ringing. <action application="export" data="nolocal:execute_on_**answer=queue_dtmf 121231W333"/> sent the tones to aleg. send_dtmf with this construct, is not working.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/**listinfo/blinde-misc<http://www.blindi.net/mailman/listinfo/blinde-misc>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 Michael, thanks for you nice help!!! i.m. so glad!!! Nice weekend --------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
Hi all, I send various dtmftoenes. But the tones are sent very slowly. I've tried the following parameters: <action application="queue_dtmf" data="08925007676@100"/> or: <action application="queue_dtmf" data="08925007676@10"/> or: <action application="queue_dtmf" data="08925007676@300"/> But unfortunately it does not work. I've tried it the following: In the external / internal probile: <param name="dtmf-duration" value="2000"/> or: <param name="dtmf-duration" value="100"/> or: <param name="dtmf-duration" value="3000"/> But unfortunately it does not work. The tones are given still slow. I mean pay the length and the distance between. Can your help please? thanks. --------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call? For example: in asterisk exists a variable name: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks. --------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
The channel variables for this purpose seems to be {duration, billsec, answersec, flow_billsec, mduration, billmsec, answermsec, uduration, billusec, answerusec} see: source code "switch_channel.c"; and wiki document on categories: channel variables see: http://wiki.freeswitch.com/index.php?title=Category:Variable&from=Variable+b... However, when I tried to access these channel variables from Lua script or dialplan, their values are always "nil" or empty. -- dialplan: { <action application="answer"/> ........ <action application="log" data="INFO billsec: ${billsec}; billmsec: ${billmsec}"/> <action application="sleep" data="2000"/> <action application="hangup"/> } -- Lua script: 2011-12-10 13:39:55.609375 [ERR] mod_lua.cpp:191 C:\c4dev\freeswitch\Release\scr ipts/test1.lua:60: attempt to concatenate global 'ctsec' (a nil value) stack traceback: C:\c4dev\freeswitch\Release\scripts/test1.lua:60: in main chunk see: { session:answer() ......... ctsec = session:getVariable('billsec') ctmsec = session:getVariable('billmsec') freeswitch.consoleLog("INFO","***** Call-Time: sec=" .. ctsec .. "\n") freeswitch.consoleLog("INFO","***** Call-Time: msec=" .. ctmsec .. "\n") session:hangup() } From: curriegrad2004 <curriegrad2004@gmail.com> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Wednesday, November 30, 2011 11:15 PM Subject: Re: [Freeswitch-users] Question Answertime variable? billseconds or bill_msec would be the one to turn to. On Wed, Nov 30, 2011 at 4:22 AM, Thomas Hoellriegel <admin@blindi.net> wrote:
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call?
For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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
Are you trying to access these before the channel hangup is complete? If so then yes, they will always be empty. They are not populated until the call actually ends. Are you doing a hangup hook in Lua or something else? -MC On Fri, Dec 9, 2011 at 10:03 PM, king2kin <xing2kin@yahoo.com> wrote:
The channel variables for this purpose seems to be {duration, billsec, answersec, flow_billsec, mduration, billmsec, answermsec, uduration, billusec, answerusec} see: source code "switch_channel.c"; and wiki document on categories: channel variables see: http://wiki.freeswitch.com/index.php?title=Category:Variable&from=Variable+b...
However, when I tried to access these channel variables from Lua script or dialplan, their values are always "nil" or empty.
-- dialplan: { <action application="answer"/> ........ <action application="log" data="INFO billsec: ${billsec}; billmsec: ${billmsec}"/> <action application="sleep" data="2000"/> <action application="hangup"/> }
-- Lua script: 2011-12-10 13:39:55.609375 [ERR] mod_lua.cpp:191 C:\c4dev\freeswitch\Release\scr ipts/test1.lua:60: attempt to concatenate global 'ctsec' (a nil value) stack traceback: C:\c4dev\freeswitch\Release\scripts/test1.lua:60: in main chunk
see: { session:answer() ......... ctsec = session:getVariable('billsec') ctmsec = session:getVariable('billmsec') freeswitch.consoleLog("INFO","***** Call-Time: sec=" .. ctsec .. "\n") freeswitch.consoleLog("INFO","***** Call-Time: msec=" .. ctmsec .. "\n") session:hangup() }
*From:* curriegrad2004 <curriegrad2004@gmail.com> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Wednesday, November 30, 2011 11:15 PM *Subject:* Re: [Freeswitch-users] Question Answertime variable?
billseconds or bill_msec would be the one to turn to.
On Wed, Nov 30, 2011 at 4:22 AM, Thomas Hoellriegel <admin@blindi.net> wrote:
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call?
For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
MC, Thank you for your reply. The problem still exists even though I follow your advice to access the variable 'billsec' after the channel hangup is complete. lua script: { session:answer() ......... session:hangup() session:sleep(1250) ctsec = session:getVariable('billsec') freeswitch.consoleLog("INFO","***** Call-Time: sec=" .. ctsec .. "\n") } freeswitch log info from console are copied as follows: { freeswitch@W2k3T602> 2011-12-16 12:06:01.187500 [INFO] switch_rtp.c:3152 Auto Ch anging port from 127.0.0.1:40036 to 192.168.0.119:40036 2011-12-16 12:06:03.234375 [INFO] switch_cpp.cpp:1199 Prompt file is 'ivr\ivr-we lcome_to_freeswitch.wav' 2011-12-16 12:06:19.156250 [NOTICE] switch_cpp.cpp:620 Hangup sofia/internal/sip :1006@127.0.0.1:1312 [CS_EXECUTE] [NORMAL_CLEARING] 2011-12-16 12:06:24.515625 [ERR] mod_lua.cpp:191 C:\c4dev\freeswitch\Release\scr ipts/test1.lua:61: attempt to concatenate global 'ctsec' (a nil value) stack traceback: C:\c4dev\freeswitch\Release\scripts/test1.lua:61: in main chunk 2011-12-16 12:06:24.515625 [NOTICE] switch_core_session.c:1354 Session 6 (sofia/ internal/sip:1006@127.0.0.1:1312) Ended 2011-12-16 12:06:24.515625 [NOTICE] switch_core_session.c:1356 Close Channel sof ia/internal/sip:1006@127.0.0.1:1312 [CS_DESTROY] } please continue to explain why this happens. x.k. From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Wednesday, December 14, 2011 8:38 AM Subject: Re: [Freeswitch-users] Question Answertime variable? billsec is not available Are you trying to access these before the channel hangup is complete? If so then yes, they will always be empty. They are not populated until the call actually ends. Are you doing a hangup hook in Lua or something else? -MC On Fri, Dec 9, 2011 at 10:03 PM, king2kin <xing2kin@yahoo.com> wrote: The channel variables for this purpose seems to be
{duration, billsec, answersec, flow_billsec, mduration, billmsec, answermsec, uduration, billusec, answerusec} see: source code "switch_channel.c"; and wiki document on categories: channel variables see: http://wiki.freeswitch.com/index.php?title=Category:Variable&from=Variable+b... However, when I tried to access these channel variables from Lua script or dialplan, their values are always "nil" or empty. -- dialplan: { <action application="answer"/> ........ <action application="log" data="INFO billsec: ${billsec}; billmsec: ${billmsec}"/> <action application="sleep" data="2000"/> <action application="hangup"/> } -- Lua script: 2011-12-10 13:39:55.609375 [ERR] mod_lua.cpp:191 C:\c4dev\freeswitch\Release\scr ipts/test1.lua:60: attempt to concatenate global 'ctsec' (a nil value) stack traceback: C:\c4dev\freeswitch\Release\scripts/test1.lua:60: in main chunk see: { session:answer() ......... ctsec = session:getVariable('billsec') ctmsec = session:getVariable('billmsec') freeswitch.consoleLog("INFO","***** Call-Time: sec=" .. ctsec .. "\n") freeswitch.consoleLog("INFO","***** Call-Time: msec=" .. ctmsec .. "\n") session:hangup() }
From: curriegrad2004 <curriegrad2004@gmail.com> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Wednesday, November 30, 2011 11:15 PM Subject: Re: [Freeswitch-users] Question Answertime variable?
billseconds or bill_msec would be the one to turn to.
On Wed, Nov 30, 2011 at 4:22 AM, Thomas Hoellriegel <admin@blindi.net> wrote:
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call?
For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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
pastebin the extension that calls this script and also the console log of the call from start to finish. -MC On Thu, Dec 15, 2011 at 8:14 PM, king2kin <xing2kin@yahoo.com> wrote:
MC,
Thank you for your reply. The problem still exists even though I follow your advice to access the variable 'billsec' after the channel hangup is complete.
lua script: { session:answer() ......... session:hangup() session:sleep(1250)
ctsec = session:getVariable('billsec') freeswitch.consoleLog("INFO","***** Call-Time: sec=" .. ctsec .. "\n") }
freeswitch log info from console are copied as follows: { freeswitch@W2k3T602> 2011-12-16 12:06:01.187500 [INFO] switch_rtp.c:3152 Auto Ch anging port from 127.0.0.1:40036 to 192.168.0.119:40036 2011-12-16 12:06:03.234375 [INFO] switch_cpp.cpp:1199 Prompt file is 'ivr\ivr-we lcome_to_freeswitch.wav' 2011-12-16 12:06:19.156250 [NOTICE] switch_cpp.cpp:620 Hangup sofia/internal/sip :1006@127.0.0.1:1312 [CS_EXECUTE] [NORMAL_CLEARING] *2011-12-16 12:06:24.515625 [ERR] mod_lua.cpp:191 C:\c4dev\freeswitch\Release\scr ipts/test1.lua:61: attempt to concatenate global 'ctsec' (a nil value) stack traceback: C:\c4dev\freeswitch\Release\scripts/test1.lua:61: in main chunk *2011-12-16 12:06:24.515625 [NOTICE] switch_core_session.c:1354 Session 6 (sofia/ internal/sip:1006@127.0.0.1:1312) Ended 2011-12-16 12:06:24.515625 [NOTICE] switch_core_session.c:1356 Close Channel sof ia/internal/sip:1006@127.0.0.1:1312 [CS_DESTROY] }
please continue to explain why this happens.
x.k.
*From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Wednesday, December 14, 2011 8:38 AM *Subject:* Re: [Freeswitch-users] Question Answertime variable? billsec is not available
Are you trying to access these before the channel hangup is complete? If so then yes, they will always be empty. They are not populated until the call actually ends. Are you doing a hangup hook in Lua or something else?
-MC
On Fri, Dec 9, 2011 at 10:03 PM, king2kin <xing2kin@yahoo.com> wrote:
The channel variables for this purpose seems to be {duration, billsec, answersec, flow_billsec, mduration, billmsec, answermsec, uduration, billusec, answerusec} see: source code "switch_channel.c"; and wiki document on categories: channel variables see: http://wiki.freeswitch.com/index.php?title=Category:Variable&from=Variable+b...
However, when I tried to access these channel variables from Lua script or dialplan, their values are always "nil" or empty.
-- dialplan: { <action application="answer"/> ........ <action application="log" data="INFO billsec: ${billsec}; billmsec: ${billmsec}"/> <action application="sleep" data="2000"/> <action application="hangup"/> }
-- Lua script: 2011-12-10 13:39:55.609375 [ERR] mod_lua.cpp:191 C:\c4dev\freeswitch\Release\scr ipts/test1.lua:60: attempt to concatenate global 'ctsec' (a nil value) stack traceback: C:\c4dev\freeswitch\Release\scripts/test1.lua:60: in main chunk
see: { session:answer() ......... ctsec = session:getVariable('billsec') ctmsec = session:getVariable('billmsec') freeswitch.consoleLog("INFO","***** Call-Time: sec=" .. ctsec .. "\n") freeswitch.consoleLog("INFO","***** Call-Time: msec=" .. ctmsec .. "\n") session:hangup() }
*From:* curriegrad2004 <curriegrad2004@gmail.com> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Wednesday, November 30, 2011 11:15 PM *Subject:* Re: [Freeswitch-users] Question Answertime variable?
billseconds or bill_msec would be the one to turn to.
On Wed, Nov 30, 2011 at 4:22 AM, Thomas Hoellriegel <admin@blindi.net> wrote:
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call?
For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/listinfo/blinde-misc
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
I think you'll find all sorts of useful variables on this page: http://wiki.freeswitch.org/wiki/Mod_xml_cdr#Channel_Variables You can get the answer time as a timestamp, epoch seconds, epoch milliseconds, and epoch microseconds. What kind of CDRs are you using - CSV or XML? -MC On Wed, Nov 30, 2011 at 4:22 AM, Thomas Hoellriegel <admin@blindi.net>wrote:
Hi all, Is there a possibility to determine the caller time for a channel at the end of a call?
For example: in asterisk exists a variable: ${ANSWEREDTIME} I like to store the Answertime in a Database for example: Dailly minutes to call a Cellphone. Can your help plese? Thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/**listinfo/blinde-misc<http://www.blindi.net/mailman/listinfo/blinde-misc>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 (4)
-
curriegrad2004
-
king2kin
-
Michael Collins
-
Thomas Hoellriegel