Get session variable using session uuid

社会主义新天地 提交于 2019-12-11 08:09:16

问题


How am i able to get session variable using just session uuid (using lua).

So for example, we have session of leg_a (when someone connect sip phone). When other side answers, we will be within other session (session of leg_b).

Using just,

session:getVariable("variable_name") 

will not help in that case because session refers to the current session.

How am i able to use lua to get variable name when i know session uuid. (so i can get other sessions variable, even we are within current session which is different)

Is there some kind of function where I am able to provide two parameteres, variable name and session uuid?


回答1:


you need to execute the API call uuid_getvar.

value = api:execute("uuid_getvar", "UUID VARNAME"); 

(I forgot how to concatenate strings in Lua, but you should get the idea)



来源:https://stackoverflow.com/questions/25605796/get-session-variable-using-session-uuid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!