Extract Channel Variables inline When using Lua script
Hi Guys, Sorry for the post here but I just wanted to check if this was possible. I am using one large .lua script, and Im setting up channel variables before the call is connected, so for example I am setting in line; table.insert(xml, [[<action application="set" data="closedop=voicemail" inline="true"/>]]); table.insert(xml, [[<action application="set" data="closedopact=2000" inline="true"/>]]); This then terminates on a dialplan, where I would like to use the value of closedop and closedopact as an anti-action; <anti-action application="]]..closedop..[[" data="default ]]..h.Customer_Domain..[[ ]]..closedopact..[["/> I can see in the logs the value is set; Action set(closedop=voicemail) INLINE EXECUTE sofia/internal/07917190439@62.239.9.74 set(closedop=voicemail) 2015-09-14 20:41:47.828526 [DEBUG] mod_dptools.c:1435 sofia/internal/ 07917190438@62.239.9.74 *SET [closedop]=[voicemail]* Dialplan: sofia/internal/07917190439@62.239.9.74 Action set(closedopact=2000) INLINE EXECUTE sofia/internal/07917190439@62.239.9.74 set(closedopact=2000) 2015-09-14 20:41:47.828526 [DEBUG] mod_dptools.c:1435 sofia/internal/ 07917190438@62.239.9.74 *SET [closedopact]=[2000]* So I want to set the application to voicemail, and the extension to 2000. How can I extract this? I have tried using ${closedop}, and session:getvariables, however this is only suitable when session established I believe? Plus I'm doing this inline, so setting variables, then wanting to get them again before answer. Can anyone advise? Thanks Jon
participants (1)
-
Jonathan Hunter