为什么我不再使用语雀

我在2019年的六月份时候,开始使用语雀。 一路走来,我见证了语雀的功能越来越多,但是于此同时,我也越来越讨厌语雀。 2022年12月初,我基本上把语雀上的所有内容都迁移到我的hugo博客上。 我的博客很乱,也很多。我写了一个脚本,一个一个知识库的搬迁,总体速度还算快,唯一不便的就是图片需要一个一个复制粘贴。 有些图片是用语雀的绘图语言例如plantuml编写的,就只能截图保存了。 总之,我也是蛮累的。 简单列一下我不喜欢语雀的几个原因: 性能差,首页渲染慢,常常要等很久,首页才能打开 产品定位混乱,随意更改用户数据 我记得有时候我把知识库升级成了空间,过了一段时间,不知道为什么空间由变成了知识库。 数字花园这个概念真的很烂。我好好的个人主页,某一天打开,大变样,换了个名字,叫做数字花园。甚至没有给用户一个选择保留老版本的个人主页的权利。太不尊重用户了!! 就好像你下班回家,看见房门被人撬开,你打开房门,看见有人在你的客厅种满大蒜,然后还兴高采烈的告诉你,看,这是您的数字菜园!多好,以后不用买蒜了。 会员的流量计费规则, 或许现在的计费规则已经变了,我也没有再充会员,但是再以前。即使是会员,也是按流量计费的。什么叫按流量计费,假如你的一篇博客里上传了一张1mb的图片,即使你后来把这个图片删了,这1mb的流量还是会存在。而且流量是一直往上涨的,还不像运营商,每月一号给你清零一次的机会。

2022-12-06 21:10:38 · 1 分钟 · Eddie Wang

模块传参的重构

写过opensips脚本的同学,往往对函数的传参感到困惑。 例如: ds_select_dst()可以接受整数或者值为正数的变量作为第一个参数,但是nat_uac_test()的第一个参数就只能是整数,而不能是变量 为什么rl_check()可以接受格式化的字符串,而save()只能接受字符串。 为什么ds_select_dst("1", "4") 作为整数也要加上双引号? 为什么变量要加上双引号? ds_select_dst("$var(aa)", "4") 为什么t_on_branch("1")路由的钩子要加上双引号? 为什么route(go_to_something);这里又不需要加上引号? ds_select_dst("1", "0"); $var(aa)=1; ds_select_dst("$var(aa)", "0"); rl_check("gw_$ru", "$var(limit)"); #格式化的gw_$ru save("location"); #单纯的字符串作为参数 从3.0开始,传参可以更加自然。 整数可以直接传参,不用加双引号 do_something(1, 1); 输入或者输出的$var(), 不用加双引号,加了反而会报错 do_something($var(a), $var(b)); 格式化字符串,需要加双引号 do_something(1, "$var(bb)_$var(b)"); 参考 https://blog.opensips.org/2019/11/05/the-module-function-interface-rework-in-opensips-3-0/ https://www.opensips.org/Documentation/Script-Syntax-3-0#

2022-12-03 21:01:02 · 1 分钟 · Eddie Wang

Pdf学习资料

TelNYX.pdf OpenSIPS 2.3 mediasoup Cutting Edge WebRTC Video COnferencing FreeSWITCH-driven routing in OpenSIPS Voicenter: Contact center on Steroids Vlad_Paiu-Distributed_OpenSIPS_Systems_Cluecon14.pdf Vlad_Paiu-OpenSIPS_Summit_Austin_2015-Async.pdf Ionut_Ionita-OpenSIPS_Summit2017-Capturing_beyond_SIP FLAVIO_GONCALVES-Fraud_in_VoIP_Today.pdf Alexandr_Dubovikov-OpenSIPS_Summit2017-RTC_Threat_Intelligence_Exchange.pdf OpenSIPS_LoadBalancing.pdf Vlad_Paiu-OpenSIPS_Summit_2104-OpenSIPS_End_User_Services.pdf Razvan_Crainea-OpenSIPS_Summit2017-From_SIPI_Trunks_to_End_Users.pdf Razvan_Crainea-OpenSIPS_Summit-Scaling_Asterisk.pdf Vlad_Paiu-OpenSIPS_Summit-Service_Enabling_for_Asterisk.pdf Jonas_Borjesson-OpenSIPS_Summit_Austin_2015.pdf Michele_Pinasi-OpenSIPS_Summit2017-How_we_did_VoIP.pdf Bogdan_Iancu-OpenSIPS_Summit_Keynotes.pdf Giovanni_Maruzselli-OpenSIPS_Summit2017-Scaling_FreeSWITCHes.pdf Maksym_Sobolyev-OpenSIPS_Summit2017-Sippy_Labs_update.pdf docker-cluster.pdf voip malware attack tool .pdf Bogdan_Iancu-OpenSIPS_Summit-OpenSIPS_2_1.pdf Pete_Kelly-OpenSIPS_Workshop_Chicago_2015-Calling_Cards_B2BUA.pdf Bogdan_Iancu-OpenSIPS_Summit-keynotes.pdf Alex_Goulis-Opensips_CNAME.pdf OpenSIPS_2.0_Framework.pdf Norman_Brandinger-OpenSIPS_Summit_2014-Advanced_SIP_Routing_with_OpenSIPS_modules.pdf

2022-12-03 16:02:18 · 1 分钟 · Eddie Wang

1.1 脚本结构 - 全局参数、模块配置、路由

1. Structure The structure of the kamailio.cfg can be seen as three parts: global parameters modules settings routing blocks For clarity and making it easy to maintain, it is recommended to keep them in this order, although some of them can be mixed. ✅ 这三个部分可以混合,但为了清晰和维护的方便,建议按照这个顺序排列。 2. Global Parameters Section This is the first part of the configuration file, containing the parameters for the core of kamailio and custom global parameters. ...

2 分钟 · Eddie Wang

1.10 SCTP参数

1. disable_sctp Global parameter to disable SCTP support in the SIP server. see enable_sctp Default value is ‘auto’. Example of usage: disable_sctp=yes 2. enable_sctp enable_sctp = 0/1/2 - SCTP disabled (0)/ SCTP enabled (1)/auto (2), default auto (2) 3. sctp_children sctp children no (similar to udp children) sctp_children = number 4. sctp_socket_rcvbuf Size for the sctp socket receive buffer Alias name: sctp_socket_receive_buffer sctp_socket_rcvbuf = number 5. sctp_socket_sndbuf Size for the sctp socket send buffer ...

6 分钟 · Eddie Wang

1.11 UDP参数

1. udp4_raw Enables raw socket support for sending UDP IPv4 datagrams (40-50% performance increase on linux multi-cpu). Possible values: 0 - disabled (default), 1 - enabled, -1 auto. In “auto” mode it will be enabled if possible (sr started as root or with CAP_NET_RAW). udp4_raw can be used on Linux and FreeBSD. For other BSDs and Darwin one must compile with -DUSE_RAW_SOCKS. On Linux one should also set udp4_raw_mtu if the MTU on any network interface that could be used for sending is smaller than 1500. ...

2 分钟 · Eddie Wang

1.12 黑名单参数

1. dst_blocklist_expire Alias name: dst_blocklist_ttl How much time a blocklisted destination will be kept in the blocklist (w/o any update). dst_blocklist_expire = time in s (default 60 s) 2. dst_blocklist_gc_interval How often the garbage collection will run (eliminating old, expired entries). dst_blocklist_gc_interval = time in s (default 60 s) 3. dst_blocklist_init If off, the blocklist is not initialized at startup and cannot be enabled at runtime, this saves some memory. ...

1 分钟 · Eddie Wang

1.13 实时参数

1. real_time Sets real time priority for all the Kamailio processes, or the timers (bitmask). Possible values: 0 - off 1 - the "fast" timer 2 - the "slow" timer 4 - all processes, except the timers Example: real_time= 7 => everything switched to real time priority. real_time = <int> (flags) (default off) 2. rt_policy Real time scheduling policy, 0 = SCHED_OTHER, 1= SCHED_RR and 2=SCHED_FIFO rt_policy= <0..3> (default 0) 3. rt_prio Real time priority used for everything except the timers, if real_time is enabled. ...

1 分钟 · Eddie Wang

1.14 核心函数

Functions exported by core that can be used in route blocks. 1. add_local_rport ⭐️ Add rport parameter to local generated Via header – see RFC3581. In effect for forwarded SIP requests. Example of usage: add_local_rport(); 2. avpflags 3. break ‘break’ statement can be used to end a ‘case’ block in a ‘switch’ statement or exit from a ‘while’ statement. 4. drop ⭐️ Stop the execution of the configuration script and alter the implicit action which is done afterwards. ...

9 分钟 · Eddie Wang

1.15 自定义全局参数

These are parameters that can be defined by the writer of kamailio.cfg in order to be used inside routing blocks. One of the important properties for custom global parameters is that their value can be changed at runtime via RPC commands, without restarting Kamailio. The definition of a custom global parameter must follow the pattern: group.variable = value desc "description" The value can be a quoted string or integer number. ...

1 分钟 · Eddie Wang