开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
master
分支 (24)
标签 (112)
master
3.1
3.2
2.4
3.0
feature/tls_postgres
dialog_custom_ping_interval
uuid_doc_fix
feature/rtp_relay
feature/sql-cacher-iterators
coverity_scan
feature/pi
2.3
2.2
feature/new-globals-syntax
1.11
2.1
1.9
1.10
1.8
3.1.7
3.2.4
3.1.6
3.2.3
3.1.5
3.2.2
3.1.4
3.2.1
3.2.0
3.2.0-rc1
3.1.3
2.4.11
3.2.0-beta
2.4.10
3.1.2
3.0.5
2.4.9
3.0.4
3.1.1
3.1.0
master
分支 (24)
标签 (112)
master
3.1
3.2
2.4
3.0
feature/tls_postgres
dialog_custom_ping_interval
uuid_doc_fix
feature/rtp_relay
feature/sql-cacher-iterators
coverity_scan
feature/pi
2.3
2.2
feature/new-globals-syntax
1.11
2.1
1.9
1.10
1.8
3.1.7
3.2.4
3.1.6
3.2.3
3.1.5
3.2.2
3.1.4
3.2.1
3.2.0
3.2.0-rc1
3.1.3
2.4.11
3.2.0-beta
2.4.10
3.1.2
3.0.5
2.4.9
3.0.4
3.1.1
3.1.0
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (24)
标签 (112)
master
3.1
3.2
2.4
3.0
feature/tls_postgres
dialog_custom_ping_interval
uuid_doc_fix
feature/rtp_relay
feature/sql-cacher-iterators
coverity_scan
feature/pi
2.3
2.2
feature/new-globals-syntax
1.11
2.1
1.9
1.10
1.8
3.1.7
3.2.4
3.1.6
3.2.3
3.1.5
3.2.2
3.1.4
3.2.1
3.2.0
3.2.0-rc1
3.1.3
2.4.11
3.2.0-beta
2.4.10
3.1.2
3.0.5
2.4.9
3.0.4
3.1.1
3.1.0
贡献代码
同步代码
对比差异 通过 Pull Request 同步
同步更新到分支
通过 Pull Request 同步
将会在向当前分支创建一个 Pull
Request,合入后将完成同步
File empty ...
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
lua Module
 __________________________________________________________
 Table of Contents
 1. Admin Guide
 1.1. Overview
 1.2. Installing the module
 1.3. Using the module
 1.4. Dependencies
 1.4.1. OpenSIPS Modules
 1.4.2. External Libraries or Applications
 1.5. Exported Parameters
 1.5.1. luafilename (string)
 1.5.2. lua_auto_reload (int)
 1.5.3. warn_missing_free_fixup (int)
 1.5.4. lua_allocator (string)
 1.5.5. lua_user_debug (int)
 1.6. Exported Functions
 1.6.1. lua_exec(func, [param])
 1.6.2. lua_meminfo()
 1.7. Exported MI Functions
 1.7.1. watch
 2. OpenSIPS Lua API
 2.1. Available functions
 2.1.1. xdbg(message)
 2.1.2. xlog([level],message)
 2.1.3. setUserDebug
 2.1.4. WarnMissingFreeFixup
 2.1.5. getpid
 2.1.6. getmem
 2.1.7. getmeminfo
 2.1.8. gethostname
 2.1.9. getType(msg)
 2.1.10. getURI_User(msg)
 2.1.11. getExpires(msg)
 2.1.12. getHeader(header)
 2.1.13. getContact(msg)
 2.1.14. moduleFunc(msg, function, args1, args2)
 2.1.15. getStatus(msg)
 2.1.16. getMethod(msg)
 2.1.17. getSrcIp(msg)
 2.1.18. getDstIp(msg)
 2.1.19. AVP_get(msg, name)
 2.1.20. AVP_set(msg, name, value)
 2.1.21. AVP_destroy(msg, name)
 2.1.22. pseudoVar(msg, variable)
 2.1.23. add_lump_rpl
 3. Contributors
 3.1. By Commit Statistics
 3.2. By Commit Activity
 4. Documentation
 4.1. Contributors
 List of Tables
 3.1. Top contributors by DevScore^(1), authored commits^(2) and
 lines added/removed^(3)
 3.2. Most recently active contributors^(1) to this module
 List of Examples
 1.1. Set luafilename parameter
 1.2. lua_exec() usage
Chapter 1. Admin Guide
1.1. Overview
 The time needed when writing a new OpenSIPS module
 unfortunately is quite high, while the options provided by the
 configuration file are limited to the features implemented in
 the modules.
 With this Lua module, you can easily implement your own
 OpenSIPS extensions in Lua.
1.2. Installing the module
 This Lua module is loaded in opensips.cfg (just like all the
 other modules) with loadmodule("/path/to/lua.so");.
 For the Lua module to compile, you need a recent version of Lua
 (tested with 5.1) linked dynamically. The default version of
 your favorite Linux distribution should work fine.
1.3. Using the module
 With the Lua module, you can access to lua function on the
 OpenSIPS side. You need to define a file to load and call a
 function from it. Write a function "mongo_alias" and then write
 in your opensips.cfg
...
if (lua_exec("mongo_alias")) {
 ...
}
...
 On the Lua side, you have access to opensips functions and
 variables (AVP, pseudoVar, ...). Read the documentation below
 for further informations.
1.4. Dependencies
1.4.1. OpenSIPS Modules
 None ;-)
1.4.2. External Libraries or Applications
 The following libraries or applications must be installed
 before running OpenSIPS with this module loaded:
 * Lua 5.1.x or later
 * memcached
 This module has been developed and tested with Lua 5.1.?, but
 should work with any 5.1.x release. Earlier versions do not
 work.
 On current Debian systems, at least the following packages
 should be installed:
 * lua5.1
 * liblua5.1-0-dev
 * libmemcached-dev
 * libmysqlclient-dev
 It was reported that other Debian-style distributions (such as
 Ubuntu) need the same packages.
 On OpenBSD systems, at least the following packages should be
 installed:
 * Lua
1.5. Exported Parameters
1.5.1. luafilename (string)
 This is the file name of your script. This may be set once
 only, but it may include an arbitary number of functions and
 "use" as many Lua module as necessary.
 The default value is "/etc/opensips/opensips.lua"
 Example 1.1. Set luafilename parameter
...
modparam("lua", "luafilename", "/etc/opensips/opensips.lua")
...
1.5.2. lua_auto_reload (int)
 Define this value to 1 if you want to reload automatically the
 lua script. Disabled by default.
1.5.3. warn_missing_free_fixup (int)
 When you call a function via moduleFunc() you could have a
 memleak. Enable this warns you when you're doing it. Enabled by
 default.
1.5.4. lua_allocator (string)
 Change the default memory allocator for the lua module.
 Possible values are :
 * opensips (default)
 * malloc
1.5.5. lua_user_debug (int)
 Disable by default
1.6. Exported Functions
1.6.1. lua_exec(func, [param])
 Calls a Lua function with passing it the current SIP message.
 This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
 ONREPLY_ROUTE and BRANCH_ROUTE.
 Parameters:
 * func (string) - Lua function name
 * param (string, optional) - Parameter to be passed to the
 Lua function.
 Example 1.2. lua_exec() usage
...
if (lua_exec("mongo_alias")) {
 ...
}
...
1.6.2. lua_meminfo()
 Logs informations about memory.
1.7. Exported MI Functions
1.7.1. watch
 Name: watch
 Parameters: none
 * action (optional) - 'add' or 'delete'
 * extension (optional) - required if action is provided
 MI FIFO Command Format:
 opensips-cli -x mi watch
Chapter 2. OpenSIPS Lua API
2.1. Available functions
 This module provides access to a limited number of OpenSIPS
 core functions.
2.1.1. xdbg(message)
 An alias for xlog(DBG, message)
2.1.2. xlog([level],message)
 Logs the message with OpenSIPS's logging facility. The logging
 level is one of the following:
 * ALERT
 * CRIT
 * ERR
 * WARN
 * NOTICE
 * INFO
 * DBG
2.1.3. setUserDebug
 Enable or disable the xlog feature. Disabled, the xlog function
 has no effect.
2.1.4. WarnMissingFreeFixup
 Dynamically change the variable warn_missing_free_fixup.
2.1.5. getpid
 Returns the current pid.
2.1.6. getmem
 Returns a table with the size of allocated memory and the
 fragmentation.
2.1.7. getmeminfo
 Returns a table with memory infos.
2.1.8. gethostname
 Returns the value of the current hostname.
2.1.9. getType(msg)
 Returns "SIP_REQUEST" or "SIP_REPLY".
2.1.10. getURI_User(msg)
 Returns the user of the To URI.
2.1.11. getExpires(msg)
 Returns the expires header of the current message.
2.1.12. getHeader(header)
 Returns the value of the specified header.
2.1.13. getContact(msg)
 Returns a table with the contact header.
2.1.14. moduleFunc(msg, function, args1, args2)
 You can pass arguments to this function.
2.1.15. getStatus(msg)
 Returns the current status if the SIP message is a SIP_REPLY.
2.1.16. getMethod(msg)
 Returns the current method.
2.1.17. getSrcIp(msg)
 Returns the IP address of the source.
2.1.18. getDstIp(msg)
 Returns the IP address of the destination.
2.1.19. AVP_get(msg, name)
 Returns an AVP variable.
2.1.20. AVP_set(msg, name, value)
 Defines an AVP variable.
2.1.21. AVP_destroy(msg, name)
 Destroys an AVP variable.
2.1.22. pseudoVar(msg, variable)
 Returns a pseudoVar.
2.1.23. add_lump_rpl
 Add header to the reply.
Chapter 3. Contributors
3.1. By Commit Statistics
 Table 3.1. Top contributors by DevScore^(1), authored
 commits^(2) and lines added/removed^(3)
 Name DevScore Commits Lines ++ Lines --
 1. Arnaud Chong + Eric Gouyer 37 1 4335 0
 2. Razvan Crainea (@razvancrainea) 33 26 272 229
 3. Vlad Patrascu (@rvlad-patrascu) 20 13 273 226
 4. Liviu Chircu (@liviuchircu) 13 10 15 63
 5. Bogdan-Andrei Iancu (@bogdan-iancu) 8 6 9 3
 6. Vlad Paiu (@vladpaiu) 5 3 7 9
 7. Julián Moreno Patiño 3 1 1 1
 8. Peter Lemenkov (@lemenkov) 3 1 1 1
 (1) DevScore = author_commits + author_lines_added /
 (project_lines_added / project_commits) + author_lines_deleted
 / (project_lines_deleted / project_commits)
 (2) including any documentation-related commits, excluding
 merge commits. Regarding imported patches/code, we do our best
 to count the work on behalf of the proper owner, as per the
 "fix_authors" and "mod_renames" arrays in
 opensips/doc/build-contrib.sh. If you identify any
 patches/commits which do not get properly attributed to you,
 please submit a pull request which extends "fix_authors" and/or
 "mod_renames".
 (3) ignoring whitespace edits, renamed files and auto-generated
 files
3.2. By Commit Activity
 Table 3.2. Most recently active contributors^(1) to this module
 Name Commit Activity
 1. Razvan Crainea (@razvancrainea) Feb 2012 - Jan 2021
 2. Vlad Patrascu (@rvlad-patrascu) May 2017 - Jul 2020
 3. Bogdan-Andrei Iancu (@bogdan-iancu) May 2014 - Jan 2020
 4. Liviu Chircu (@liviuchircu) Mar 2014 - Mar 2019
 5. Peter Lemenkov (@lemenkov) Jun 2018 - Jun 2018
 6. Julián Moreno Patiño Feb 2016 - Feb 2016
 7. Vlad Paiu (@vladpaiu) Feb 2012 - Jun 2012
 8. Arnaud Chong + Eric Gouyer Dec 2011 - Dec 2011
 (1) including any documentation-related commits, excluding
 merge commits
Chapter 4. Documentation
4.1. Contributors
 Last edited by: Vlad Patrascu (@rvlad-patrascu), Razvan Crainea
 (@razvancrainea), Peter Lemenkov (@lemenkov), Liviu Chircu
 (@liviuchircu), Vlad Paiu (@vladpaiu), Arnaud Chong + Eric
 Gouyer.
 Documentation Copyrights:
 Copyright © 2006-2011 Arnaud Chong, Eric Gouyer
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

暂无描述
暂无标签
README
GPL-2.0
使用 GPL-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phpgoer/opensips.git
git@gitee.com:phpgoer/opensips.git
phpgoer
opensips
opensips
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /