使用会话uuid获取会话变量 [英] Get session variable using session uuid

查看:69
本文介绍了使用会话uuid获取会话变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何仅使用会话uuid(使用lua)就可以获取会话变量.

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

因此,例如,我们有一个leg_a会话(当有人连接了sip电话时).当对方回答时,我们将在其他会话中(leg_b 的会话).

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).

仅使用

session:getVariable("variable_name") 

在这种情况下不会有帮助,因为 session 指的是当前 session.

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

当我知道会话uuid时,如何使用lua来获取变量名.(这样我就可以获取其他会话变量,即使我们在当前会话中也是如此)

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)

我是否可以提供两个参数,变量名和会话uuid?

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

推荐答案

您需要执行API调用 uuid_getvar .

you need to execute the API call uuid_getvar.

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

(我忘记了如何在Lua中连接字符串,但您应该明白了)

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

这篇关于使用会话uuid获取会话变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆