使用会话uuid获取会话变量

编程入门 行业动态 更新时间:2024-10-23 17:25:59
本文介绍了使用会话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获取会话变量

本文发布于:2023-10-31 16:30:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546639.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   uuid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!