[Freeswitch-users] freeswitch.Session origination disposition in Lua

Seven Du dujinfang at gmail.com
Fri Oct 25 17:24:53 MSD 2013


Hi, 

I'm trying to get the disposition of a failed call in lua, but log shows session is not initialised on the "else" case, is there a way to get the reason why it fails?

Thanks.



Lua:


 local bleg = freeswitch.Session("user/" .. digits)


 if bleg:ready() then
  bleg:transfer("conference:3000", "inline", "")
 else
disposition = freeswitch.getVariable("origination_disposition")
  session:speak("Call failed " .. disposition)
 end


-- 
Seven Du
http://www.freeswitch.org.cn
http://about.me/dujinfang
http://www.dujinfang.com


Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131025/d2d69073/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list